Datasets:
Dataset Card for Alzheimer's Classification Dataset
Dataset Summary
This dataset is an ML-ready derivative of the OASIS (Open Access Series of Imaging Studies) brain MRI database, curated and preprocessed for Alzheimer's disease stage classification. It contains 10,880 MRI brain scan images split across training, validation, and test sets, each labeled with one of four dementia severity stages.
The OASIS project is a collaborative initiative aimed at making brain MRI datasets freely available to the scientific community to accelerate discoveries in basic and clinical neuroscience. It is made available by:
- Washington University Alzheimer's Disease Research Center
- Dr. Randy Buckner, Howard Hughes Medical Institute (HHMI) at Harvard University
- Neuroinformatics Research Group (NRG), Washington University School of Medicine
- Biomedical Informatics Research Network (BIRN)
The images in this dataset span cross-sectional MRI scans from young, middle-aged, nondemented, and demented older adults, making it suitable for building and benchmarking automated Alzheimer's detection and staging models.
Supported Tasks
| Task | Type |
|---|---|
| Alzheimer's Stage Classification | Multi-class Image Classification (4 classes) |
Languages
Not applicable β this is an image dataset. All metadata and CSV files are in English.
Dataset Structure
Class Labels
The dataset uses four class labels representing stages of Alzheimer's disease progression:
| Label | Abbreviation | Description |
|---|---|---|
NonDemented |
ND | No signs of cognitive impairment |
VeryMildDemented |
VMD | Very early-stage; subtle structural changes |
MildDemented |
MD | Mild cognitive decline; early neurodegeneration |
ModerateDemented |
MoD | Moderate cognitive decline; significant brain atrophy |
Data Splits
| Split | # Images | Files |
|---|---|---|
| Train | 8,960 | Train/ + CSV_datafiles/train.csv |
| Validation | 1,280 | Valid/ + CSV_datafiles/valid.csv |
| Test | 640 | Test/ + CSV_datafiles/test.csv |
| Total | 10,880 |
βΉοΈ The training split has been augmented (see Preprocessing & Augmentation), yielding 2 augmented outputs per original training example.
Repository Structure
alzheimers-classification-dataset/
β
βββ CSV_datafiles/
β βββ train.csv # Image paths + labels for training
β βββ valid.csv # Image paths + labels for validation
β βββ test.csv # Image paths + labels for testing
β
βββ Train/ # 8,960 augmented .png MRI images
βββ Valid/ # 1,280 .png MRI images
βββ Test/ # 640 .png MRI images
Data Fields
| Field | Type | Description |
|---|---|---|
image |
PIL.Image / .png file |
Preprocessed MRI brain scan (224Γ224 px) |
label |
ClassLabel (int) |
Alzheimer's stage: 0=NonDemented, 1=VeryMildDemented, 2=MildDemented, 3=ModerateDemented |
filename |
string |
Path to the image file (referenced in CSV files) |
Data Instances
Example entry from a CSV file:
filename,label
Train/NonDemented/OAS1_0001_MR1_mpr_n4_anon_111_t88_gfc_tra_90.png,NonDemented
Train/VeryMildDemented/OAS1_0003_MR1_mpr_n3_anon_111_t88_gfc_tra_90.png,VeryMildDemented
Dataset Creation
Source Data
The raw MRI data originates from the OASIS Cross-Sectional MRI Database, which includes brain scans from:
- Young and middle-aged adults (ages 18β59)
- Nondemented older adults
- Demented older adults (including individuals diagnosed with Alzheimer's disease)
Original OASIS scans were acquired using a 1.5T Vision scanner (Siemens) with a standardized MP-RAGE sequence. Each subject underwent multiple T1-weighted MRI acquisitions per session.
Curation & Processing by Dataset Author
The dataset author performed the following transformations on the raw OASIS data to make it ML-ready:
- Format conversion: All MRI images converted to
.pngformat. - Dataset restructuring: Images organized into labeled class folders.
- CSV split files created:
train.csv,valid.csv, andtest.csvwere generated to define reproducible dataset splits. - Preprocessing & augmentation applied (see below).
Annotations
Class labels (dementia stages) are derived from clinical assessments and CDR (Clinical Dementia Rating) scores provided in the original OASIS dataset:
| CDR Score | OASIS Clinical Rating | Dataset Label |
|---|---|---|
| 0 | No dementia | NonDemented |
| 0.5 | Very mild dementia | VeryMildDemented |
| 1.0 | Mild dementia | MildDemented |
| 2.0 | Moderate dementia | ModerateDemented |
Preprocessing & Augmentation
All images have been preprocessed and augmented prior to inclusion in the dataset. Users may apply additional transformations on top of these.
Preprocessing Applied
| Step | Details |
|---|---|
| Auto-Orient | EXIF-based orientation correction applied |
| Resize | All images stretched to 224 Γ 224 pixels |
Augmentation Applied (Training Set Only)
| Augmentation | Setting |
|---|---|
| Outputs per example | 2 (each training image yields 2 augmented variants) |
| Horizontal Flip | Enabled |
| Vertical Flip | Enabled |
| Rotation | Random angle in range [β15Β°, +15Β°] |
β You are free to apply additional preprocessing or augmentation techniques based on your specific model requirements.
Usage
Loading with Hugging Face datasets
from datasets import load_dataset
dataset = load_dataset("YOUR_USERNAME/alzheimers-classification-dataset")
# Inspect a sample
print(dataset["train"][0])
# {'image': <PIL.Image>, 'label': 0}
# Class names
print(dataset["train"].features["label"].names)
# ['NonDemented', 'VeryMildDemented', 'MildDemented', 'ModerateDemented']
Loading from CSV files manually
import pandas as pd
from PIL import Image
train_df = pd.read_csv("CSV_datafiles/train.csv")
print(train_df.head())
# Load an image
img = Image.open(train_df.iloc[0]["filename"])
img.show()
Example: Fine-tuning with transformers
from datasets import load_dataset
from transformers import AutoFeatureExtractor, AutoModelForImageClassification, TrainingArguments, Trainer
dataset = load_dataset("YOUR_USERNAME/alzheimers-classification-dataset")
model_checkpoint = "google/vit-base-patch16-224"
extractor = AutoFeatureExtractor.from_pretrained(model_checkpoint)
def preprocess(batch):
inputs = extractor(images=batch["image"], return_tensors="pt")
inputs["labels"] = batch["label"]
return inputs
processed = dataset.map(preprocess, batched=True, remove_columns=["image"])
model = AutoModelForImageClassification.from_pretrained(
model_checkpoint,
num_labels=4,
id2label={0: "NonDemented", 1: "VeryMildDemented", 2: "MildDemented", 3: "ModerateDemented"},
label2id={"NonDemented": 0, "VeryMildDemented": 1, "MildDemented": 2, "ModerateDemented": 3},
ignore_mismatched_sizes=True,
)
training_args = TrainingArguments(
output_dir="./alzheimers-vit",
per_device_train_batch_size=32,
num_train_epochs=10,
evaluation_strategy="epoch",
save_strategy="epoch",
load_best_model_at_end=True,
metric_for_best_model="accuracy",
)
trainer = Trainer(
model=model,
args=training_args,
train_dataset=processed["train"],
eval_dataset=processed["validation"],
)
trainer.train()
Considerations for Using the Data
Social Impact
Automated Alzheimer's staging tools have significant potential in clinical settings, particularly for:
- Early diagnosis in resource-limited healthcare environments
- Screening assistance to support radiologists and neurologists
- Research acceleration in neurodegenerative disease studies
Responsible development of models trained on this data should involve clinical validation before any real-world deployment.
Discussion of Biases
- Class imbalance: The
ModerateDementedclass is substantially underrepresented compared toNonDemented. Models trained without compensation (e.g., weighted loss, oversampling) may be biased toward majority classes. - Augmentation leakage risk: Since training augmentations are pre-applied, ensure no augmented variants of training images appear in the validation or test sets.
- Demographic representation: The underlying OASIS data may not be representative of all ethnic, geographic, or socioeconomic populations, which could affect model generalizability.
Other Known Limitations
- All images are resized to 224Γ224 via stretching (not padding), which may distort original spatial proportions.
- This dataset is intended for research and educational purposes only and should not be used as the sole basis for clinical diagnosis.
Additional Information
Original Dataset Citation
If you use this dataset, please cite the original OASIS project:
@article{marcus2007open,
title = {Open Access Series of Imaging Studies (OASIS): Cross-Sectional MRI Data in Young, Middle Aged, Nondemented, and Demented Older Adults},
author = {Marcus, Daniel S and Wang, Tracy H and Parker, Jamie and Csernansky, John G and Morris, John C and Buckner, Randy L},
journal = {Journal of Cognitive Neuroscience},
volume = {19},
number = {9},
pages = {1498--1507},
year = {2007},
publisher = {MIT Press},
doi = {10.1162/jocn.2007.19.9.1498}
}
Kaggle Dataset Reference
kanaadlimaye. (2024). Alzheimer's Classification Dataset. Kaggle.
https://www.kaggle.com/datasets/kanaadlimaye/alzheimers-classification-dataset
OASIS Project
Website: https://www.oasis-brains.org/ Supported by: NIH grants P50 AG05681, P01 AG03991, R01 AG021910, P50 MH071616, U24 RR021382, R01 MH56584.
Contributions
Dataset curation, preprocessing, and augmentation by kanaadlimaye. Original MRI data provided by the OASIS project and its supporting institutions.
This dataset card was prepared following the Hugging Face Dataset Card guidelines.
- Downloads last month
- 21