CoolFace
Apppublic

varshaak/retinal-vessel-segmentation

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
App README

Retinal Vessel Segmentation

An interactive Streamlit app for exploring retinal vessel segmentation and exploring how algorithm choice and parameter tuning affect clinical measurements. Live demo: https://huggingface.co/spaces/varshaak/retinal-vessel-segmentation

## What the app does This app demonstrates a full image segmentation pipeline applied to retinal fundus images used in clinical screenings for diabetic retinopathy, hypertension and glaucoma.

### Pipeline steps:

  1. 1.Green channel extraction- hemoglobin absorbs green light, hence vessels have highest contrast in this channel.
  2. 2.CLAHE enhancement- locally equalises contrast to handle uneven illumination across the retina.
  3. 3.Segmentation- two methods available:
  4. 4.Otsu thresholding- global intensity-based vessel detection
  5. 5.Watershed- marker-based segmentation that handles touching vessels
  6. 6.Clinical metrics- vessel dencity (%), vessel count, mean vessel width

### Clinical relevance:

  • —Vessel density is a measurable biomarker for diabtic retinopathy
  • —Vessel calibre changes with hypertension and cardiovascular risk
  • —Reproducible, automated segmentation is essential for multi-site clinical trials

## Sample images Sample images are sourced from the DRIVE dataset which is the standard benchmark dataset in retinal vessel segmentation research.

Screenshots

Full App Overview

[image]

Pipeline Steps

[image]

Otsu Thresholding

[image]

Watershed Segmentation

[image]

Diagnostic View

[image]

## Running locally

  1. 1.Download or clone this Space from Hugging Face
  2. 2.Install dependencies: pip install -r requirements.txt
  3. 3.Run the app: streamlit run app.py Python 3.9+ recommended.

Project structure

retinal-segmentation/
├── app.py              # Streamlit interface
├── processing.py       # Image analysis pipeline
├── requirements.txt    # Dependencies
├── README.md
└── sample_images/      # Bundled DRIVE sample images

Dependencies

  • —Streamlit - web interface
  • —scilit-image - image processing
  • —OpenCV - image I/O and resizing
  • —SciPy - distance transforms and morphology
  • —Matplotlib - visualisation