OD segmentation
Updated version (may26)
ConvnextV2 model for optic disc segmentation from color fundus images (CFIs), trained on a variety of public datasets, and on images from the Rotterdam Study.
Robust segmentation of the optic disc boundaries on color fundus images. Useful for localisation and delineation of the optic disc.
We used the publicly available ORIGA, PAPILA, IDRID, ADAM, PALM, REFUGE2, G1020 together with internal Rotterdam Study images. Peripapillary atrophy (PPA) is in general not… Show moreShow less
We used the publicly available ORIGA, PAPILA, IDRID, ADAM, PALM, REFUGE2, G1020 together with internal Rotterdam Study images. Peripapillary atrophy (PPA) is in general not considered part of the disc and excluded from the segmentations. If this model helps you, please consider citing the authors of these datasets.
See VascX Models: Deep Ensembles for Retinal Vascular Analysis From Color Fundus Images. This model follows the same setup, except that it is no longer an ensemble, but a single convnextv2 model fine-tuned from ImageNet weights, which made it faster at no cost in performance.
See VascX Models: Deep Ensembles for Retinal Vascular Analysis From Color Fundus Images
Notes:
- The model was trained and evaluated using CFIs cropped to a square using [retinalysis-fundusprep].
- Does not segment the optic cup
- Not trained on WF or UWF fundus images
- May not generalize well to images with different characteristics
We recommend to run inference using retinalysis-inference, which can auto-download the model weights and execute CFI pre-processing (crop to square) if necessary. For running… Show moreShow less
We recommend to run inference using retinalysis-inference, which can auto-download the model weights and execute CFI pre-processing (crop to square) if necessary. For running inference on a CFI:
-
Install
retinalysis-inference:pip install retinalysis-inference -
Load the ensemble:
from rtnls_inference import (HeatmapRegressionEnsemble,SegmentationEnsemble,)ensemble = SegmentationEnsemble.from_huggingface("Eyened/vascx:disc/disc_may26.pt").to(device) -
Run inference:
# 1. Preprocess one input record.image = np.array(Image.open("/PATH/TO/RGB/FUNDUS/IMAGE.PNG"))item = ensemble.preprocess_item({"image": image})# 2. Make a batch of size 1.batch = ensemble.make_batch([item])# 3. Run the ensemble.predictions = ensemble.predict_batch(batch)# 4. Postprocess the prediction into a final mask.result = ensemble.postprocess_batch(predictions, batch)[0]
For more information see retinalysis-inference.
If you use this model, please consider citing, based on relevance: VascX Models: Deep Ensembles for Retinal Vascular Analysis From Color Fundus Images Vargas Quiros, J. D.,… Show moreShow less
If you use this model, please consider citing, based on relevance:
-
VascX Models: Deep Ensembles for Retinal Vascular Analysis From Color Fundus Images
Vargas Quiros, J. D., Liefers, B., van Garderen, K. A., Vermeulen, J. P., & Klaver, C. C. W. (2025). VascX Models: Deep Ensembles for Retinal Vascular Analysis From Color Fundus Images. Translational Vision Science & Technology, 14(7), 19-19.
-
retinalysis-vascx: An explainable software toolbox for the extraction of retinal vascular biomarkers
Vargas Quiros, J. V., Beyeler, M. J., Vela, S. O., Center, E. R., Bergmann, S., Klaver, C. C. W., & Liefers, B. (2026). retinalysis-vascx: An explainable software toolbox for the extraction of retinal vascular biomarkers. arXiv preprint arXiv:2602.08580.
We share the model under a Creative Commons Attribution–NonCommercial 4.0 license. We note that some of the datasets used for training and evaluating the model ensemble were made publicly available for research purposes, but do not include a license.
Original version (july24)
UNet ensemble (5 models) for optic disc segmentation from color fundus images (CFIs), trained on a variety of public datasets, and on images from the Rotterdam Study.
Robust segmentation of the optic disc boundaries on color fundus images. Useful for localisation and delineation of the optic disc.
We used the publicly available ORIGA, PAPILA, IDRID, ADAM, PALM, REFUGE2, G1020, together with internal Rotterdam Study images. Peripapillary atrophy (PPA) is in general not… Show moreShow less
We used the publicly available ORIGA, PAPILA, IDRID, ADAM, PALM, REFUGE2, G1020, together with internal Rotterdam Study images. Peripapillary atrophy (PPA) is in general not considered part of the disc and excluded from the segmentations. If this model helps you, please consider citing the authors of these datasets.
See VascX Models: Deep Ensembles for Retinal Vascular Analysis From Color Fundus Images
See VascX Models: Deep Ensembles for Retinal Vascular Analysis From Color Fundus Images
Notes:
- The model was trained and evaluated using CFIs cropped to a square using [retinalysis-fundusprep].
- Does not segment the optic cup
- Not trained on WF or UWF fundus images
- May not generalize well to images with different characteristics
We recommend to run inference using retinalysis-inference, which can auto-download the model weights and execute CFI pre-processing (crop to square) if necessary. For running… Show moreShow less
We recommend to run inference using retinalysis-inference, which can auto-download the model weights and execute CFI pre-processing (crop to square) if necessary. For running inference on a CFI:
-
Install
retinalysis-inference:pip install retinalysis-inference -
Load the ensemble:
from rtnls_inference import (HeatmapRegressionEnsemble,SegmentationEnsemble,)ensemble = SegmentationEnsemble.from_huggingface("Eyened/vascx:disc/disc_july24.pt").to(device) -
Run inference:
# 1. Preprocess one input record.image = np.array(Image.open("/PATH/TO/RGB/FUNDUS/IMAGE.PNG"))item = ensemble.preprocess_item({"image": image})# 2. Make a batch of size 1.batch = ensemble.make_batch([item])# 3. Run the ensemble.predictions = ensemble.predict_batch(batch)# 4. Postprocess the prediction into a final mask.result = ensemble.postprocess_batch(predictions, batch)[0]
For more information see retinalysis-inference.
If you use this model, please consider citing, based on relevance: VascX Models: Deep Ensembles for Retinal Vascular Analysis From Color Fundus Images Vargas Quiros, J. D.,… Show moreShow less
If you use this model, please consider citing, based on relevance:
-
VascX Models: Deep Ensembles for Retinal Vascular Analysis From Color Fundus Images
Vargas Quiros, J. D., Liefers, B., van Garderen, K. A., Vermeulen, J. P., & Klaver, C. C. W. (2025). VascX Models: Deep Ensembles for Retinal Vascular Analysis From Color Fundus Images. Translational Vision Science & Technology, 14(7), 19-19.
-
retinalysis-vascx: An explainable software toolbox for the extraction of retinal vascular biomarkers
Vargas Quiros, J. V., Beyeler, M. J., Vela, S. O., Center, E. R., Bergmann, S., Klaver, C. C. W., & Liefers, B. (2026). retinalysis-vascx: An explainable software toolbox for the extraction of retinal vascular biomarkers. arXiv preprint arXiv:2602.08580.
We share the model under a Creative Commons Attribution–NonCommercial 4.0 license. We note that some of the datasets used for training and evaluating the model ensemble were made publicly available for research purposes, but do not include a license.