File Exchange

image thumbnail


version 1.0.1 (74.7 MB) by Vijay Iyer
MATLAB example using deep learning to classify chronological age from brain MRI images


Updated 25 May 2020

View Version History

GitHub view license on GitHub

This example shows how to use transfer learning to modify and retrain ResNet-18, a pretrained convolutional neural network, to perform image classification on a brain MRI image dataset.

The MRI scans used in this example were obtained during a study [1] of social brain development conducted by researchers at the Massachusetts Institute of Technology (MIT). These data are available for download at the OpenNEURO platform [2] in NIfTI file format [3].

This example works with the 2D axial midslice images from the brain MRI scan volumes, and shows how these images can be classified into 3 categories according to the chronological age of the participant:

1. Participants Aged 3-5
2. Participants Aged 7-12
3. Participants older than 18, classified as Adults

This example works though multiple steps of a deep learning workflow:

1. Exploring a public brain MRI image dataset
2. Preparing the dataset for deep learning
3. Training a deep learning model to perform chronological age classification
4. Evaluating the trained model

Open and run the live script BrainMRIAgeClassificationUsingDeepLearning.mlx

[1] Richardson, H., Lisandrelli, G., Riobueno-Naylor, A., & Saxe, R. (2018). Development of the social brain from age three to twelve years. Nature Communications, 9(1), 1027.
[3] Cox, R. W., J. Ashburner, H. Breman, K. Fissell, C. Haselgrove, C. J. Holmes, J. L. Lancaster, D. E. Rex, S. M. Smith, J. B. Woodward, and S. C. Strother (2004). A (sort of) new image data format standard: NiFTI-1. 10th Annual Meeting of Organisation of Human Brain Mapping, Budapest, Hungary.

Cite As

Vijay Iyer (2020). Brain-MRI-Age-Classification-using-Deep-Learning (, GitHub. Retrieved .

Comments and Ratings (3)

Sagar Zade


Stephen Forczyk

Could not download data from Step 1, Browser says can not find the web page after pressing download button

MATLAB Release Compatibility
Created with R2020a
Compatible with R2019b to R2020a
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!