Downloads · 30 days
0
Eyened/vascx
vascx is a image segmentation model from Eyened. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. The card lists the license as agpl-3.0.
[!IMPORTANT] The entire VascX pipeline, including feature extraction is available here: retinalysis-vascx. A new preprint presenting the pipeline is available here. We will stop supporting this repository and move to…
Downloads · 30 days
0
Access
Public
Updated Jun 9, 2026
Repo size
8.5 GB
Likes
2
Public
Click a slice to open those files.
.pt8.3 GB · 93%
From the Hugging Face model README
[!IMPORTANT] The entire VascX pipeline, including feature extraction is available here: retinalysis-vascx. A new preprint presenting the pipeline is available here. We will stop supporting this repository and move to the new one linked above. We will keep updating the models and pipeline there.
This repository contains the instructions for using the VascX models from the paper VascX Models: Model Ensembles for Retinal Vascular Analysis from Color Fundus Images.
The model weights are in huggingface.
<img src="imgs/samples_vascx_hrf.png">To install the entire fundus analysis pipeline including fundus preprocessing, model inference code and vascular biomarker extraction:
Create a conda or virtualenv virtual environment, or otherwise ensure a clean environment.
Install the rtnls_inference package.
vascx run CommandThe run command provides a comprehensive pipeline for processing fundus images, performing various analyses, and creating visualizations.
vascx run DATA_PATH OUTPUT_PATH [OPTIONS]
DATA_PATH: Path to input data. Can be either:
OUTPUT_PATH: Directory where processed results will be stored
| Option | Default | Description |
|---|---|---|
--preprocess/--no-preprocess | --preprocess | Run preprocessing to standardize images for model input |
--vessels/--no-vessels | --vessels | Run vessel segmentation and artery-vein classification |
--disc/--no-disc | --disc | Run optic disc segmentation |
--quality/--no-quality | --quality | Run image quality assessment |
--fovea/--no-fovea | --fovea | Run fovea detection |
--overlay/--no-overlay | --overlay | Create visualization overlays combining all results |
--n_jobs | 4 | Number of preprocessing workers for parallel processing |
When run with default options, the command creates the following structure in OUTPUT_PATH:
OUTPUT_PATH/
├── preprocessed_rgb/ # Standardized fundus images
├── vessels/ # Vessel segmentation results
├── artery_vein/ # Artery-vein classification
├── disc/ # Optic disc segmentation
├── overlays/ # Visualization images
├── bounds.csv # Image boundary information
├── quality.csv # Image quality scores
└── fovea.csv # Fovea coordinates
Preprocessing:
Quality Assessment:
Vessel Segmentation and Artery-Vein Classification:
Optic Disc Segmentation:
Fovea Detection:
Visualization Overlays:
Process a directory of images with all analyses:
vascx run /path/to/images /path/to/output
Process specific images listed in a CSV:
vascx run /path/to/image_list.csv /path/to/output
Only run preprocessing and vessel segmentation:
vascx run /path/to/images /path/to/output --no-disc --no-quality --no-fovea --no-overlay
Skip preprocessing on already preprocessed images:
vascx run /path/to/preprocessed/images /path/to/output --no-preprocess
Increase parallel processing workers:
vascx run /path/to/images /path/to/output --n_jobs 8
--no-preprocess is used, input images must already be in the proper formatFor more advanced usage, we have Jupyter notebooks showing how preprocessing and inference are run.
To speed up re-execution of vascx we recommend to run the preprocessing and segmentation steps separately:
Preprocessing. See this notebook. This step is CPU-heavy and benefits from parallelization (see notebook).
Inference. See this notebook. All models can be ran in a single GPU with >10GB VRAM.