Datasets:
The dataset viewer is not available for this dataset.
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
YAML Metadata Warning:The task_categories "image-regression" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
Retina Age Analysis Dataset
Dataset Description
This dataset contains 9,857 retinal fundus images from 5,393 patients for age prediction tasks.
Dataset Summary
- Task: Age prediction from retinal fundus images
- Images: 9,857 high-quality retinal images
- Patients: 5,393 unique patients
- Age Range: 5-97 years
- Image Format: JPEG
- Average Image Size: ~1 MB
Supported Tasks
- Regression: Predict continuous age (5-97 years)
- Classification: Predict age group (5 classes: pediatric, young adult, middle age, senior, elderly)
Data Splits
| Split | Images | Patients | Percentage |
|---|---|---|---|
| Train | 6,902 | 3,775 | 70% |
| Validation | 1,493 | 809 | 15% |
| Test | 1,462 | 809 | 15% |
Note: Split at patient level to prevent data leakage.
Age Distribution
| Age Group | Age Range | Count | Percentage |
|---|---|---|---|
| Pediatric | 5-17 | 291 | 3.0% |
| Young Adult | 18-39 | 1,447 | 14.7% |
| Middle Age | 40-59 | 2,946 | 29.9% |
| Senior | 60-74 | 3,484 | 35.3% |
| Elderly | 75+ | 1,689 | 17.1% |
Dataset Structure
retina-age-analysis/
βββ images/ # 9,857 retinal fundus images
β βββ img00001.jpg
β βββ img00002.jpg
β βββ ...
β
βββ splits/ # Train/val/test split CSV files
βββ train.csv # 6,902 samples
βββ val.csv # 1,493 samples
βββ test.csv # 1,462 samples
Data Fields
Each CSV file contains:
image_id: Image filename (without extension)patient_id: Unique patient identifierpatient_age: Age in years (target variable for regression)age_group_broad: Age category nameage_group_broad_numeric: Age category index (0-4, target for classification)patient_sex: Gender (1=Male, 2=Female)exam_eye: Eye examined (1=Right, 2=Left)diabetic_retinopathy: DR status (0=No, 1=Yes)camera: Camera type used- Additional clinical features
Usage Example
from datasets import load_dataset
from PIL import Image
import pandas as pd
# Load dataset
dataset = load_dataset("ramankamran/retina-age-analysis")
# Load splits
train_df = pd.read_csv("hf://datasets/ramankamran/retina-age-analysis/splits/train.csv")
val_df = pd.read_csv("hf://datasets/ramankamran/retina-age-analysis/splits/val.csv")
test_df = pd.read_csv("hf://datasets/ramankamran/retina-age-analysis/splits/test.csv")
# Load an image
from huggingface_hub import hf_hub_download
img_path = hf_hub_download(
repo_id="ramankamran/retina-age-analysis",
filename="images/img00001.jpg",
repo_type="dataset"
)
image = Image.open(img_path)
# Get corresponding label
label = train_df[train_df['image_id'] == 'img00001']['patient_age'].values[0]
PyTorch DataLoader
See the training code in the repository for PyTorch DataLoader implementation with:
- Data augmentation (rotation, flip, brightness, contrast)
- ImageNet normalization
- Batch loading
Baseline Results
Regression (Age Prediction):
- MAE: 7-10 years (baseline)
- Target: < 5 years (optimized)
Classification (Age Groups):
- Accuracy: 70-75% (baseline)
- Target: 85-90% (with semi-supervised learning)
License
MIT License
Citation
If you use this dataset, please cite:
@dataset{retina_age_analysis,
author = {Raman Kamran},
title = {Retina Age Analysis Dataset},
year = {2025},
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/ramankamran/retina-age-analysis}
}
Dataset Curators
Dataset cleaned and prepared by ramankamran.
Preprocessing
- Removed images with missing age labels (33.5% of original data)
- Removed inadequate quality images (8.9%)
- Verified all image files exist
- Created stratified train/val/test splits
- Patient-level splitting to prevent data leakage
Intended Use
- Medical image analysis research
- Age prediction from retinal images
- Transfer learning for ophthalmology tasks
- Semi-supervised learning experiments
Limitations
- Class imbalance (elderly patients over-represented, pediatric under-represented)
- Single imaging center data
- Requires domain knowledge for clinical interpretation
Additional Information
For training code and examples, see: GitHub Repository
- Downloads last month
- 130