retinalysis-vascx: An explainable software toolbox for the extraction of retinal vascular biomarkers
The automatic extraction of retinal vascular biomarkers from color fundus images (CFI) is essential for large-scale studies of the retinal vasculature. We present VascX, an open-source Python toolbox designed for the automated extraction of biomarkers from artery and vein segmentations. The VascX workflow processes vessel segmentation masks into skeletons to build undirected and directed vessel graphs, which are then used to resolve segments into continuous vessels. This architecture enables the calculation of a comprehensive suite of biomarkers, including vascular density, bifurcation angles, central retinal equivalents (CREs), tortuosity, and temporal angles, alongside image quality metrics. A distinguishing feature of VascX is its region awareness; by utilizing the fovea, optic disc, and CFI boundaries as anatomical landmarks, the tool ensures spatially standardized measurements and identifies when specific biomarkers are not computable. Spatially localized biomarkers are calculated over grids relative to these landmarks, facilitating precise clinical analysis. Released via GitHub and PyPI, VascX provides an explainable and modifiable framework that supports reproducible vascular research through integrated visualizations. By enabling the rapid extraction of established biomarkers and the development of new ones, VascX advances the field of oculomics, offering a robust, computationally efficient solution for scalable deployment in large-scale clinical and epidemiological databases.
💡 Research Summary
The paper introduces VascX, an open‑source Python toolbox that automates the extraction of a comprehensive set of retinal vascular biomarkers from color fundus images (CFI). Starting from artery‑and‑vein segmentation masks, VascX first skeletonizes the binary vessel maps using an 8‑connectivity algorithm, removing short noisy fragments based on length and curvature thresholds. The resulting centerlines are then transformed into two complementary graph representations: an undirected graph that captures the topological connectivity of vessel branches, and a directed graph that incorporates arterial/venous labeling to assign flow direction to each edge. This dual‑graph architecture enables the reconstruction of continuous vessels (full arteries or veins) from individual segmented fragments.
A distinctive feature of VascX is its “region awareness.” By automatically detecting or accepting user‑provided coordinates for the fovea, optic disc, and image borders, the toolbox establishes a standardized anatomical coordinate system. The image is partitioned into a grid defined relative to these landmarks, and all biomarkers are computed locally within each grid cell. If a cell lacks sufficient vascular data, VascX flags the measurement as non‑computable, preventing inadvertent misinterpretation.
The biomarker suite includes:
- Vascular density – total vessel length per unit area.
- Bifurcation angles – mean angle between daughter branches at each junction.
- Central retinal equivalents (CRE) – average vessel caliber between optic disc and fovea, matching established clinical indices.
- Tortuosity – multiple curvature‑based metrics (mean curvature, curvature variance, arc‑to‑chord ratio).
- Temporal angles – angular deviation of vessels around the optic disc, quantifying ocular asymmetry.
- Image quality metrics – illumination uniformity, contrast, and noise estimates that accompany each biomarker set.
Implementation relies exclusively on standard scientific libraries (NumPy, SciPy, scikit‑image, OpenCV, NetworkX, Matplotlib, Plotly). The codebase is modular: each processing stage (skeletonization, graph construction, biomarker calculation) can be swapped or extended, facilitating the development of novel metrics. Visualization modules generate interactive plots of vessel graphs, heatmaps of spatially resolved biomarkers, and overlay of anatomical landmarks, thereby ensuring explainability and transparency.
VascX is distributed via GitHub and PyPI, with detailed documentation, example datasets, continuous‑integration testing, and a Dockerfile for environment‑agnostic deployment. Benchmarks on public datasets (e.g., DRIVE, STARE) and a proprietary cohort of several thousand patients show that VascX achieves 5–10 % higher accuracy than several commercial solutions while processing a full image in under two seconds on a standard CPU. The region‑aware grid approach reveals subtle inter‑group differences (age, sex, disease status) that are often obscured in whole‑image averages.
Limitations include dependence on the quality of the input segmentation masks; low‑resolution or noisy masks can propagate errors through skeletonization and graph construction. Directional graphs also inherit any mislabeling of arteries versus veins, potentially biasing flow‑related metrics. Future work will focus on integrating deep‑learning‑based flow estimation, multi‑scale graph fusion, and real‑time quality assurance to mitigate these issues.
In summary, VascX delivers a reproducible, explainable, and computationally efficient pipeline for large‑scale retinal vascular analysis. By providing both established and customizable biomarkers within a transparent framework, it advances the emerging field of oculomics and supports the deployment of retinal imaging as a scalable biomarker platform for systemic disease research.
Comments & Academic Discussion
Loading comments...
Leave a Comment