This repository contains the source code, model architectures, training pipeline, and experimental results from a comparative study on Foveal Avascular Zone (FAZ) segmentation in OCTA images. The project evaluates the performance of two distinct approaches:
-
Canny edge detection: image processing approacch based on the Canny edge algorithm and additional morphological operations as proposed by Díaz et al. (2019)
-
Lightweight U-Net, a U-Net deep learning approach as proposed by Li et al. (2020) for faster segmentations
The objective of this study is to benchmark the segmentation accuracy and inference time of morphological-based algorithms versus deep learning–based methodologies for biomedical image analysis.
├── Canny Edges
│ ├── drawfaz.py # Drawing and plotting functions
│ ├── example.py # Sample usage of the pipeline
│ ├── opsfaz.py # Main script for Canny FAZ pipeline
│ └── util.py # Helper functions
│
├── Lightweight U-NET
│ ├── dataset.py # DataLoader object definition
│ ├── db_loader.py # Script to create CSV file with dataset information
│ ├── early_stopping.py # Early stopping implementation for model training
│ ├── metrics.py # Metrics for performance assessment
│ ├── model.py # Lightweight U-Net model implementation
│ ├── train_unet.py # Script for training the model
│ └── transform.py # Data augmentations (Albumentations)
│
├── Notebooks
│ ├── canny_edges.ipynb # Results for Canny edges algorithm
│ ├── overlay.py # Script to plot OCTA images with overlaid predictions
│ ├── time_testing.ipynb # Inference time benchmarks
│ └── unet_results_08-04-25.ipynb # Results for last training run of Lightweight U-Net model
│
├── OCTA_database(midway).csv # Sample dataset used in the experiments
├── README.md # Project README
├── train_results
│ └── train_results_08-04-25 # Training script outputs (produced in Midway and SCP’d into local environment)
The current data pipeline for training the U-Net model and loading images from the dataset is tailored for the University of Chicago’s Midway file structure and enviroment. If this repository is cloned into a local machine, please note the following:
-
db_loader.py: File paths are based on the folder structure in Midway. The datasets used in this project are not included in this repository and are only available on Midway.
-
OCTA_database(midway).csv: This file is the output of db_loader.py. It contains metadata used for loading and processing images in both the Canny edges and U-Net pipelines. File paths in this CSV are specific to the Midway environment. For details on the database contents, refer to the db_loader.py script.
-
Notebooks: All notebooks rely on OCTA_database(midway).csv. To reproduce the results, ensure that the file paths in the CSV match your local environment and file structure.
The following datasets where utilized for training of the model and to derive the results of this experiment
| Dataset | Images | Subjects / Images per Subject | Demographics / Age | Device | Resolution | Retinal Layers | Annotations |
|---|---|---|---|---|---|---|---|
| OCTA‑500 | 200 @3 mm, 300 @6 mm, 1 image per subject (no overlap) | 1 image per subject | Ages label available (exact range not specified) | RTVue XR + AngioVue (Optovue) | 3 mm @ 304×304 px, 6 mm @ 400×400 px | ILM–OPL, OPL–BM | Large Vessel, Artery, Vein, Capillary, 2D FAZ (ILM–OPL), 3D FAZ (ILM–OPL), Retinal Layer; Manual annotations + Model-based segmentations |
| ROSE‑2 | 112 images, 1 image per subject (no overlap) | Various macular diseases (not specified) | - | Heidelberg OCT2 (Spectralis) | En-face 3×3 mm @ 512×512 px | SVC | No labels |
| ROSE‑O (same as ROSE‑1) | 117 images, 3 images per subject (one per retinal layer) | 39 subjects | Alzheimer: 68.4 ± 7.4; Control: 63.0 ± 10.2 | RTVue XR + AngioVue (Optovue) | 3×3 mm @ 304×304 px (within annular zone 0.6–2.5 mm around foveal center) | SVC, DVC, SVC+DVC (IVC) | Retinal vessels (all vasculature), FAZ, Retinal vascular junctions; Manual labeling and consensus among 2 senior ophthalmologists as ground truth |
- Díaz, M., Novo, J., Cutrín, P., Gómez-Ulla, F., Penedo, M. G., et al. (2019). Automatic segmentation of the foveal avascular zone in ophthalmological OCT-A images. PLOS ONE, 14(2), e0212364. DOI | GitHub
- Li, Mingchao et al. (2020). Fast and robust fovea detection framework for OCT images based on foveal avascular zone segmentation. OSA Continuum, 3, 528–541. DOI
- Li, M., Yuan, S., Chen, Q. (2019). OCTA-500. IEEE Dataport. DOI
- iMED. (2021). ROSE: Retinal OCT-Angiography segmentation dataset [Data set]. IEEE Transactions on Medical Imaging. Zenodo. DOI