// 🏆 MONAITHON — 1ST PLACE
Retinal vessel segmentation using MONAI and PyTorch — deployed as a production FastAPI service.
Developed an automated retinal vessel segmentation pipeline using the MONAI framework and U-Net architecture on the DRIVE benchmark dataset. The model was deployed as a production-grade web service using FastAPI, Streamlit, and Docker — winning 1st place at the JNNCE MONAITHON Hackathon.
Manual retinal vessel segmentation is time-consuming and subject to inter-observer variability in clinical settings. An automated, accurate, and low-latency system is needed to assist ophthalmologists with early detection of diabetic retinopathy and other vascular diseases.
Name
DRIVE (Digital Retinal Images for Vessel Extraction)
Metadata Matrix Size
100 images
Telemetry Source
https://www.kaggle.com/datasets/andrewmvd/drive-digital-retinal-images-for-vessel-extraction
Pipeline Preprocessing Steps
Model Architecture
U-Net
Technology Stack
MONAI + PyTorch
Key Components
Data Ingestion
Load DRIVE retinal dataset (.tif images, .gif vessel masks) and split into train/validation (80/20).
Preprocessing
Extract green channel, normalize to [0,1], apply CLAHE for contrast enhancement, resize to 256×256, and binarize masks.
Data Augmentation
Apply MONAI transforms: flips, rotations, zoom, Gaussian noise, and contrast adjustment to improve generalization.
Model Training
Train MONAI U-Net (batch norm, deeper channels) using Dice + CrossEntropy loss, Adam optimizer, cosine LR scheduler, with early stopping.
Validation & Monitoring
Evaluate using Dice score every 2 epochs with sliding window inference; save best model checkpoint.
Results Visualization
Plot training loss & Dice curves and visualize predictions vs ground truth masks.
Evaluation Metrics
Compute Dice (~0.47), Precision (~0.32), Recall (~0.89), and F1-score (~0.47) on validation set.
Model Export
Save trained model weights (.pth) for deployment or inference.
UI
Streamlit frontend for image upload and segmentation overlay visualization.
Containerization
Dockerized service for portable, reproducible deployment.
0.4729
Dice Score
0.3215
Precision
0.8929
Recall
0.4728
F1-Score