varshaak/retinal-vessel-segmentation
0
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:
- Green channel extraction- hemoglobin absorbs green light, hence vessels have highest contrast in this channel.
- CLAHE enhancement- locally equalises contrast to handle uneven illumination across the retina.
- Segmentation- two methods available:
- Otsu thresholding- global intensity-based vessel detection
- Watershed- marker-based segmentation that handles touching vessels
- 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
Pipeline Steps
Otsu Thresholding
Watershed Segmentation
Diagnostic View
## Running locally
- Download or clone this Space from Hugging Face
- Install dependencies: pip install -r requirements.txt
- 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 imagesDependencies
- Streamlit - web interface
- scilit-image - image processing
- OpenCV - image I/O and resizing
- SciPy - distance transforms and morphology
- Matplotlib - visualisation
