Retinal Fundus Age Estimation — ResNet
PyTorch checkpoints for the paper:
M. A. Yürük and A. Memiş, "Age Prediction and Categorization from Retinal Fundus Images Using Residual Neural Networks," in 2026 5th International Informatics and Software Engineering Conference (IISEC), Ankara, Türkiye, 2026, pp. 628–633. DOI: 10.1109/IISEC69317.2026.11418414
Code and full reproduction instructions: github.com/mehmetaytugyuruk/retina-resnet-age-estimation
Companion study (Vision Transformers, same dataset): mehmetaytugyuruk/retina-vit-age-estimation
Model description
Five ResNet variants (ResNet-18/34/50/101/152), ImageNet-pretrained and fully fine-tuned, with the final fully-connected layer replaced by a custom regression head predicting a single continuous value: chronological age. The head architecture depends on the backbone's feature vector size (512 for ResNet-18/34, 2048 for ResNet-50/101/152). Age-category classification (Pediatric / Young Adult / Middle Age / Senior / Elderly) is derived from the regression output at evaluation time only — no separate classification head was trained.
Each architecture was trained twice: once on non-filtered (cropped and resized) retinal images, and once on the same images additionally processed with a Ben Graham vessel-enhancement filter.
Files
| File | Backbone | Preprocessing |
|---|---|---|
resnet18-nonfiltered.pth / resnet18-filtered.pth |
ResNet-18 | non-filtered / Graham-filtered |
resnet34-nonfiltered.pth / resnet34-filtered.pth |
ResNet-34 | non-filtered / Graham-filtered |
resnet50-nonfiltered.pth / resnet50-filtered.pth |
ResNet-50 | non-filtered / Graham-filtered |
resnet101-nonfiltered.pth / resnet101-filtered.pth |
ResNet-101 | non-filtered / Graham-filtered |
resnet152-nonfiltered.pth / resnet152-filtered.pth |
ResNet-152 | non-filtered / Graham-filtered |
Each checkpoint is a dict with keys: model_state_dict, mean_age, std_age, epoch, val_loss, val_mae. Predicted age is recovered as pred = model(image) * std_age + mean_age.
Intended use
Research and reproducibility for the associated paper — benchmarking, ablation studies, or extension work on retinal-fundus age estimation. Not intended for clinical or diagnostic use; the underlying dataset and models have not been clinically validated.
Training details
- Dataset: Retina Age Analysis Dataset (Kamran, 2025), 9,857 fundus images, patient-level split (6,902 train / 1,493 validation / 1,462 test).
- Preprocessing: retina disk cropped, padded, and resized to 224×224; optionally followed by a Ben Graham filter.
- Loss: Smooth L1, reweighted per-sample via Label Distribution Smoothing (LDS) to counter age-distribution imbalance.
- Optimizer: AdamW, learning rate 1e-4, weight decay 1e-4.
- Scheduler: ReduceLROnPlateau (factor 0.5, patience 5 epochs).
- Epochs: 80, batch size 32.
Evaluation results
Values below are exactly as reported in the paper's Tables III and V (test set, 1,462 images). MAE in years; Accuracy/F1 are for the derived 5-class age categorization.
Non-filtered images
| Model | MAE | Accuracy | F1 |
|---|---|---|---|
| ResNet-18 | 5.17 | 0.8426 | 0.7157 |
| ResNet-34 | 5.11 | 0.8382 | 0.7071 |
| ResNet-50 | 5.23 | 0.8373 | 0.7060 |
| ResNet-101 | 5.09 | 0.8431 | 0.7132 |
| ResNet-152 | 5.27 | 0.8368 | 0.7008 |
Graham-filtered images
| Model | MAE | Accuracy | F1 |
|---|---|---|---|
| ResNet-18 | 5.24 | 0.8369 | 0.7053 |
| ResNet-34 | 5.27 | 0.8451 | 0.7165 |
| ResNet-50 | 5.21 | 0.8313 | 0.6912 |
| ResNet-101 | 5.02 | 0.8422 | 0.7081 |
| ResNet-152 | 5.17 | 0.8418 | 0.7056 |
Best overall MAE: ResNet-101, Graham-filtered (5.02 years). Best age-category F1: ResNet-34, Graham-filtered (0.7165).
Limitations
- Trained and evaluated on a single public dataset; generalization to other populations, imaging devices, or acquisition protocols is untested.
- Not clinically validated — do not use for diagnosis, screening, or any medical decision-making.
- Age-category boundaries are derived post-hoc from a regression output, not directly optimized as a classification objective.
- The dataset's demographic composition and any consent/de-identification details are governed by the original dataset authors, not verified independently here.
Example usage
import torch
import torch.nn as nn
from torchvision import models
from huggingface_hub import hf_hub_download
ckpt_path = hf_hub_download("mehmetaytugyuruk/retina-resnet-age-estimation", "resnet101-filtered.pth")
ckpt = torch.load(ckpt_path, map_location="cpu", weights_only=False)
model = models.resnet101(weights=None)
model.fc = nn.Sequential(
nn.Linear(2048, 512), nn.BatchNorm1d(512), nn.ReLU(inplace=True), nn.Dropout(0.4),
nn.Linear(512, 128), nn.BatchNorm1d(128), nn.ReLU(inplace=True), nn.Dropout(0.3),
nn.Linear(128, 1),
)
model.load_state_dict(ckpt["model_state_dict"])
model.eval()
# pred_age = model(image_tensor).item() * ckpt["std_age"] + ckpt["mean_age"]
Full preprocessing and inference code: see the GitHub repository.
License
Checkpoints released under the MIT License. The training dataset is separately MIT-licensed by its original authors.
Citation
@inproceedings{yuruk2026age,
title = {Age Prediction and Categorization from Retinal Fundus Images Using Residual Neural Networks},
author = {Yürük, Mehmet Aytuğ and Memiş, Abbas},
booktitle = {2026 5th International Informatics and Software Engineering Conference (IISEC)},
pages = {628--633},
year = {2026},
publisher = {IEEE},
doi = {10.1109/IISEC69317.2026.11418414}
}