Downloads · 30 days
0
mehmetaytugyuruk/retina-resnet-age-prediction
retina-resnet-age-prediction is a machine learning model from mehmetaytugyuruk. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Downloads · 30 days
0
Access
Public
Updated Aug 30, 2026
Repo size
3.9 GB
Likes
0
Public
Click a slice to open those files.
.pth3.9 GB · 100%
From the Hugging Face model README
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, Feb. 2026, pp. 628–633. doi: 10.1109/IISEC69317.2026.11418414
Code and full reproduction instructions: github.com/mehmetaytugyuruk/retina-resnet-age-prediction
Companion study (Vision Transformers, same dataset): mehmetaytugyuruk/retina-vit-age-prediction
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.
| 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.
Research and reproducibility for the associated paper — benchmarking, ablation studies, or extension work on retinal-fundus age prediction. Not intended for clinical or diagnostic use; the underlying dataset and models have not been clinically validated.
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.
| 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 |
| 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).
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-prediction", "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.
Checkpoints released under the MIT License. The training dataset is separately MIT-licensed by its original authors.
@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},
address = {Ankara, Türkiye},
publisher = {IEEE},
doi = {10.1109/IISEC69317.2026.11418414}
}