← All cases

case() // healthcare · computer vision

Detection of retinal vessels

Segmentation and classification of retinal vessels on slit-lamp photographs: a U-Net model, a skeleton-based classifier and a web interface that turn 1–5 days of manual measurement into 2 minutes.

// brief

challenge

Under stress the body redirects blood from secondary organs, including the eyes, to vital ones. The effect on the eye is medically proven, but measuring it meant highly qualified doctors classifying vessels by hand and spending 1–5 working days on the metrics for a single image.

goal

Automate the monitoring of blood supply to the eye in stress situations to improve diagnostic accuracy and free specialists from routine measurements.

approach

Machine-learning models for vessel segmentation, algorithms for vessel classification and metric computation, and a web interface that processes arbitrary user images.

// key results

2 min

metrics per image

1–5 days

before, by hand

700

photos annotated

0.79

accuracy, ResNet-50

// what we did

Scope of work

01

Dataset and segmentation model

There was no labelled dataset of slit-lamp photographs to train on.

  • Annotated 700 slit-lamp photographs in QuPath and split them into training and validation sets.
  • Scored annotation quality by perimeter and area percentiles to weight high- and low-quality masks.
  • Normalised all images to 1024×1024; augmented with flips, 90° rotations and low gaussian noise.
  • Trained a U-Net segmentation model and compared ResNet-34 and ResNet-50 encoders.
metricResNet-34ResNet-50
Dice, inside 100 px0.7240.725
Dice, whole image0.6290.631
Accuracy, inside 100 px0.6680.793
Accuracy, whole image0.5930.703
Recall0.7340.609
02

Vessel classification and web interface

Segmentation alone does not give doctors the per-class vessel metrics they need.

  • Built a skeleton model of the segmented vessels and classified them with empirical rules.
  • Converted pixels to micrometres with a calibration matrix from a 3D-printed reference eye.
  • Computed per-class vessel metrics for a single image in under 2 minutes.
  • Shipped a web interface with public demo access for uploading and processing any image.

// business value

  • Automatic vessel classification and metrics free doctors and researchers from routine measurement.
  • Applicable in ophthalmology research institutes and clinics.
  • The segmentation and classification algorithms adapt to related tasks in adjacent fields.

// stack

  • Python
  • U-Net
  • ResNet-34 / ResNet-50
  • QuPath
  • Skeleton model
  • Deep learning
  • Computer vision
  • Agile / Scrum

Got an X?

Start with the free discovery. In a week you'll know where your Z is.

Start discovery