Version 1.1 (74.2 MB) by Vijay Iyer
MATLAB example using deep learning to classify chronological age from brain MRI images
Updated 19 Jan 2021

Open in MATLAB Online View Brain-MRI-Age-Classification-using-Deep-Learning on File Exchange

Brain MRI Age Classification Using Deep Learning

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

👀 View the example ▶️ Run the example

About the Data

The MRI scans used in this example were obtained during a study [1] of social brain development conducted by researchers at the Massachussets Institute of Technology (MIT), and are available for download via the OpenNEURO platform:

About the Workflow

This example uses the horizontal midslice images from the brain MRI scan volumes and classifies them 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:

  • Exploring a public brain MRI image dataset
  • Preparing the dataset for deep learning
  • Training a deep learning model to perform chronological age classification
  • Evaluating the trained model

Running the Example

Open in MATLAB Online to run the example in your web browser with no installation required.

To run on your local machine or cloud instance, open & 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.

Copyright 2020 The MathWorks, Inc.

Cite As

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

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

Community Treasure Hunt

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

Start Hunting!

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes

See release notes for this release on GitHub:


See release notes for this release on GitHub:

Add a modified version of main Live Script for rendering purposes

Update image


To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.