What kind of medical images are analyzed with Capillary.io and how does AI help?

There are many use cases where AI is used in medicine to differentiate between images with pathological and non-pathological features (e.g. to differentiate between benign and malignant skin lesions), and also to detect areas of interest in images (e.g. the presence of dermatitis).

At Capillary.io we have focused on another medical test that is somewhat less well known but widely used in rheumatology, internal medicine and sometimes dermatology: nailfold capillaroscopy.

Capillaroscopy consists of observing the blood capillaries at the base of the patient’s nails (nail bed) using a special microscope called a capillaroscope, and helps to determine the state of the patient’s vascular system in a simple, fast and non-invasive way.

The reason why the nail bed is observed is that there the capillaries are parallel to the skin, while in other parts of the body they are perpendicular and cannot be easily inspected.

Capillaroscopy is frequently used for the diagnosis and follow-up of some autoimmune diseases such as scleroderma, dermatomyositis or mixed connective tissue disease.

Capillaroscopy procedure - The capillaries at the base of the nails are observed using a portable USB microscope connected to the computer.
Capillaroscopy procedure - The capillaries at the base of the nails are observed using a portable USB microscope connected to the computer.

Automatic recognition of blood capillaries in photos taken with the microscope

So, how can AI help to improve capillaroscopy practice? And what types of deep-learning models are used for this?

To analyze capillaroscopy images we mainly need to use 3 types of models:

  1. An object detection model to locate the blood capillaries in the image, and thus be able to know how many capillaries are there and where they are. One of the most important tasks in capillaroscopy is to count how many capillaries there are per millimeter since the normal capillary density is 7 to 12 capillaries per mm.

  2. An image classification model to classify capillaries according to their shape. Capillaries can have a normal shape (straight, elongated and inverted “U” shape) or present a tortuous irregular shape, angiogenesis or even much larger than normal (known as megacapillary).

  3. A keypoint detection model so that, once each capillary has been located, capillary measurements can be taken of the diameter of its apex or loop and the width of its arterial and venous branches. With these measurements we can be more objective when deciding whether a capillary is larger than normal (dilated) or much larger (megacapillary).

In addition, the object detection model also helps us to detect micro-hemorrhages, and their presence is often a pathology indicator.

In summary, during a capillaroscopy procedure, the physician will observe the capillaries with the microscope and take pictures of them to later count each capillary, decide if each one of them presents a normal shape or not and calculate some statistical metrics such as capillary density, percentage of dilatations, presence or not of megacapillaries and micro-hemorrhages, average apical diameter, etc.

But in reality, due to lack of time or practical reasons, many physicians did not perform such a rigorous analysis based on objective data: they simply observed the capillaries in a short time to get a general idea and make a diagnosis based on very limited data.

With capillary.io we have improved this process for doctors, who no longer have to analyze each image and calculate the metrics manually, as the system calculates them instantly when all the necessary data is available. In addition, the doctor will be able to fix incorrect predictions made by the models, since no perfect AI system can work with 100% accuracy, and the quality of the images may vary depending on the doctor’s own skill and the microscope used.

Example of a capillaroscopy where capillaries and hemorrhages can be seen framed and marked with different colors according to their type and size.
Example of a capillaroscopy where capillaries and hemorrhages can be seen framed and marked with different colors according to their type and size.

Measurement of capillaries

There are certain criteria and standards for capillaroscopy when evaluating the size of capillaries to decide if they are enlarged (dilated) or well above normal size (giant capillaries or megacapillaries). The apical diameter of a normal capillary is usually between 10 and 25 μm.

However, again, in practice many physicians did not perform measurements of each capillary manually as it is very time consuming, and therefore decided “at a glance” whether the capillary was normal, dilated or giant.

This is where the keypoint detection model comes into play, and one of the great advantages of the use of artificial intelligence in capillaroscopy: we can isolate each capillary by its framing and process it with an additional model that detects the points where each capillary loop and apex begins and ends.

Example of measurements in several capillaries. A tortuous capillary has an apical diameter of 38.3 microns.
Example of measurements in several capillaries. A tortuous capillary has an apical diameter of 38.3 microns.

This is a way, leveraging keypoints, to take measurements of each localized capillary, not only just a few capillaries or those that are doubtful for the physician. This information is then used to obtain additional statistics that until now were too laborious to produce.

Statistics of a complete capillaroscopy generated by Capillary.io.
Statistics of a complete capillaroscopy generated by Capillary.io.

In conclusion, deep-learning models can be of great use to physicians to improve the quantity and quality of the data they obtain from their patients with diagnostic imaging. AI is therefore a support tool that facilitates the diagnosis and monitoring of diseases. By properly integrating AI into medical software we can help the doctor make better decisions.

To learn more about how Capillary.io capillaroscopy system works in detail, read our paper published on Clinical and Experimental Rheumatology.