Downloads · 30 days
0
mehmetaytugyuruk/retina-vit-age-prediction
retina-vit-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
9.4 GB
Likes
0
Public
Click a slice to open those files.
.pth9.4 GB · 100%
From the Hugging Face model README
PyTorch checkpoints for the paper:
M. A. Yürük and A. Memiş, "Decoding Chronological Age from the Retinal Fundus Images: A Deep Learning-based Analysis with Vision Transformers," in 2026 34th Signal Processing and Communications Applications Conference (SIU), İstanbul, Türkiye, Jul. 2026, pp. 1–4. doi: 10.1109/SIU71813.2026.11636734
Code and full reproduction instructions: github.com/mehmetaytugyuruk/retina-vit-age-prediction
Companion study (ResNet backbones, same dataset): mehmetaytugyuruk/retina-resnet-age-prediction
Four Vision Transformer variants (ViT-B/16, ViT-B/32, ViT-L/16, ViT-L/32), ImageNet-1K-pretrained and fully fine-tuned, with the classification head replaced by a single-neuron regression head predicting chronological age. Age-category classification (Pediatric / Young Adult / Middle Age / Senior / Elderly) is derived from the regression output at evaluation time only. All four variants were trained on Graham-filtered retinal images only (the only preprocessing variant used in this paper).
| File | Backbone | Patch size | Layers | Hidden size | Heads |
|---|---|---|---|---|---|
vit-b16-filtered.pth | ViT-B/16 | 16×16 | 12 | 768 | 12 |
vit-b32-filtered.pth | ViT-B/32 | 32×32 | 12 | 768 | 12 |
vit-l16-filtered.pth | ViT-L/16 | 16×16 | 24 | 1024 | 16 |
vit-l32-filtered.pth | ViT-L/32 | 32×32 | 24 | 1024 | 16 |
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 Table V (test set, 1,462 images, Graham-filtered). MAE in years; Accuracy/F1 are for the derived 5-class age categorization.
| Model | MAE | Accuracy | F1 |
|---|---|---|---|
| ViT-B/16 | 4.99 | 0.8368 | 0.6974 |
| ViT-B/32 | 5.52 | 0.8241 | 0.6764 |
| ViT-L/16 | 4.86 | 0.8497 | 0.7219 |
| ViT-L/32 | 5.59 | 0.8211 | 0.6684 |
ViT-L/16 is the best-performing model overall. The paper additionally reports a point-estimate comparison against the companion ResNet study's results (ResNet-101, MAE 5.01 as cited in this paper's own Table VI).
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-vit-age-prediction", "vit-l16-filtered.pth")
ckpt = torch.load(ckpt_path, map_location="cpu", weights_only=False)
model = models.vit_l_16(weights=None)
model.heads.head = nn.Linear(model.heads.head.in_features, 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{yuruk2026decoding,
title = {Decoding Chronological Age from the Retinal Fundus Images: A Deep Learning-based Analysis with Vision Transformers},
author = {Yürük, Mehmet Aytuğ and Memiş, Abbas},
booktitle = {2026 34th Signal Processing and Communications Applications Conference (SIU)},
year = {2026},
pages = {1--4},
address = {İstanbul, Türkiye},
publisher = {IEEE},
doi = {10.1109/SIU71813.2026.11636734}
}