You need to agree to share your contact information to access this model
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
The Retinal Age model was trained on AlzEye, a restricted NHS dataset. Access is granted for non-commercial research only. Please describe your affiliation and intended use.
Log in or Sign Up to review the conditions and access this model content.
AG-RTM Retinal Age
Retinal Age estimates chronological age from a colour fundus photograph (2D). It is one of the four ageing models released with the paper Prediction bias in biological ageing models (preprint). The age gap is the estimated age minus chronological age.
The other three models (Chest, Abdominal and Brain Age) are public at lyqun/AG-RTM.
Code, installation and data format: HORIZONHealthcare/AG-RTM.
Access. Request access on this page. Once approved, log in with hf auth login before downloading.
Model
- Backbone: DINOv3-Large (
vit_large_patch16_dinov3.lvd1689m), fully fine-tuned. - Head: Linear(1024โ32) โ ReLU โ Dropout(0.5) โ Linear(32โ1).
- Input: Fundus photographs cropped around the fundus and padded to a square. Images are resized to 256 pixels and centre-cropped to 224 ร 224.
- Checkpoint:
retinal_age.pth(epoch 28, the lowest validation MAE). It holds the weights and the settings needed to rebuild the model, and loads withtorch.load(..., weights_only=True). - SHA-256:
fb5fbddb2ab2e0189097b604a025d2d8ba042e8c7a998c7b3b16f2b8afe36b03
Training data
Trained on healthy patients from AlzEye (Moorfields Eye Hospital, London, UK): 9,844 healthy patients (53,680 images); validation 2,462 healthy patients (14,038 images). The split was made at the patient level. AlzEye is a restricted NHS dataset. The weights are shared on request for research use.
Performance
Test subset: 65,360 images from 12,141 patients. The 95% confidence intervals come from a patient-level bootstrap with 1,000 resamples.
| Metric | Value |
|---|---|
| MAE (years) | 5.31 (5.23โ5.40) |
| RMSE (years) | 6.80 (6.68โ6.91) |
| Pearson rยฒ | 0.745 (0.732โ0.758) |
Usage
git clone https://github.com/HORIZONHealthcare/AG-RTM.git && cd AG-RTM
conda create -n ag-rtm python=3.11 -y && conda activate ag-rtm
pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu121
hf download lyqun/AG-RTM-RetinalAge retinal_age.pth --local-dir weights
cd code
python predict.py --checkpoint ../weights/retinal_age.pth --input my_data.csv --output predictions.csv
Input CSV columns: subject_id,image_path,biomarker_value (biomarker_value is chronological age and is optional). The output gives predicted_age, and age_gap when age is supplied.
The paper decoded the JPEG photographs with Pillow built against IJG libjpeg 9e. The pip Pillow (libjpeg-turbo) shifts predictions by 0.2 years on average. To reproduce the paper exactly, install the Anaconda build: pip uninstall -y Pillow && conda install -y -c defaults --override-channels pillow=11.3.0.
Limitations
The paper shows that the age gap from this model is pulled towards the mean age more strongly in unhealthy than in healthy patients (differential regression to the mean). Report associations within age subgroups. The age gap does not reliably reflect the health of an individual. The model was trained on one cohort and has not been validated elsewhere. It is for research use only and is not a medical device.
License
The weights are fine-tuned from DINOv3 and are distributed under the DINOv3 License. Use must also respect the terms of the training dataset.
Citation
@article{lin2026investigating,
title = {Investigating the fundamental characteristics of retinal age models},
author = {Lin, Yiqun and Ong, Ariel Yuhan and Wong, Matthew Yu Heng and others and Zhou, Yukun},
journal = {Research Square},
note = {Preprint},
year = {2026},
doi = {10.21203/rs.3.rs-10157626/v1}
}
Model tree for lyqun/AG-RTM-RetinalAge
Base model
timm/vit_large_patch16_dinov3.lvd1689m