Updated 19 Jan 2021
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.
The MRI scans used in this example were obtained during a study  of social brain development conducted by researchers at the Massachussets Institute of Technology (MIT), and are available for download via the OpenNEURO platform: https://openneuro.org/datasets/ds000228/versions/1.1.0
This example shows how horizontal midslice images from the brain MRI scan volumes can be classified into 3 categories according to the chronological age of the participant:
- Participants Aged 3-5
- Participants Aged 7-12
- 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
Open and run the live script
 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. https://doi.org/10.1038/s41467-018-03399-2
Copyright 2020 The MathWorks, Inc.
Vijay Iyer (2022). Brain-MRI-Age-Classification-using-Deep-Learning (https://github.com/matlab-deep-learning/Brain-MRI-Age-Classification-using-Deep-Learning/releases/tag/v1.1), GitHub. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!