Beginner's guide to MRI brain scans classification using Machine learning
START
Prerequisites
Install Docker (with GPU support if possible)
Download original IXI dataset
Clone tutorial repo from github
Obtain Freesurfer licence
Download preprocessed IXI dataset
https://shorturl.at/ilvX7
Preprocessed IXI data on dropbox
https://brain-development.org/ixi-dataset/
Original IXI data. Download demographic spreadsheet, and optionally, T1 images if you want to do preprocessing by yourself.
https://github.com/damianpolakpjwstk/dsc-2023-mri-classification
git clone https://github.com/damianpolakpjwstk/dsc-2023-mri-classification.git && cd dsc-2023-mri-classification && git submodule init && git submodule update
https://surfer.nmr.mgh.harvard.edu/registration.html
Get the FreeSurfer license
https://docs.docker.com/engine/install/
Install Docker (with GPU support if possible)
IXI dataset
https://brain-development.org/ixi-dataset/
- 600 MR images from normal, healthy subjects
- T1, T2 and PD-weighted images (we'll be using T1 weighted)
- Demographic informations (age, sex, height, weight, etc.)
- Publicly accesible
MRI data characteristics
- 3D arrays
- Pixels vs voxels
- Intensity value
- Slices and axes
- Sequences
source: https://www.hindawi.com/journals/cmmm/2015/450341/
Axial, coronal and sagittal axis
source: https://users.fmrib.ox.ac.uk/~stuart/thesis/chapter_3/image3_5.gif, https://www.researchgate.net/figure/MRI-planes-for-MRI-head-scan-a-Axial-b-Coronal-c-Sagittal-MR-scanner-can-generate_fig2_338448026
source: https://www.researchgate.net/figure/MRI-pulse-sequences-usually-used-in-a-clinical-setting-T1-w-provides-an-anatomical_fig1_331209311
Two ways to work with MRI scans using ML
Tabular data extraction vs MRI scans as 3D images
- Extract volumetric parameters of each structure using specialized software, eg. FreeSurfer or FastSurfer
- Perform classification of tabular data using classical ML approach
- Do all necessary preprocessing steps (intensity normalization, skull stripping, registration, etc)
- Perform classification of 3D data using 3D ConvNets (eg. Pseudo-3D models)
VS
From MRI scan to tabular data
Acquiring volumetric data from scans using FreeSurfer
This process takes hours for a single scan!
Raw MRI scans in DICOM format
Tabular data - volumes of specific anatomical regions in the brain
source: https://www.imaios.com/en/e-anatomy/brain/mri-brain
From MRI scan to tabular data
Acquiring volumetric data from scans using FastSurfer
Using FastSurfer (deep learning based solution), we can extract volumetric data from brain scan in less than a minute!
source: https://deep-mi.org/research/fastsurfer/
VOLUMETRIC DATA EXTRACTIONFASTSURFER PIPELINE
1. Run: docker build -t scans . 2. Change paths in run_fastsurfer.py file 3. Run: python run_fastsurfer.py
TABULAR DATA CLASSIFICATION/REGRESSION
SCANS preparation steps
3D ConvNets
Memory and time consuming approach
source: https://medium.com/convolutional-lstm-neural-networks-for-video-frame/neural-networks-for-classification-of-spatio-temporal-data-beb1693056f
Pseudo-3D CNN models
Learning Spatio-Temporal Representation with Pseudo-3D Residual Networks
- IDEA: Instead of performing one memory-consuming 3D convolution, do two 2D convolutions
- Developed for video classification, can be also used for MRI applications
source: https://arxiv.org/abs/1711.10305
3D Convnets training
Other applications
Ideas for your own projects
Dementia progression/Alzheimer disease detection
Explainability of CNN models (GradCAM, saliency maps)
Tumor/cancer segmentation (not only in brains)
Using Pseudo-3D network to classify videos
Mental disorders detection
THANK you!
polakd7@icloud.com
Beginner's guide to MRI brain scans classification using Machine learn
Damian Polak
Created on October 22, 2023
Start designing with a free template
Discover more than 1500 professional designs like these:
View
Tarot Presentation
View
Vaporwave presentation
View
Women's Presentation
View
Geniaflix Presentation
View
Shadow Presentation
View
Newspaper Presentation
View
Memories Presentation
Explore all templates
Transcript
Beginner's guide to MRI brain scans classification using Machine learning
START
Prerequisites
Install Docker (with GPU support if possible)
Download original IXI dataset
Clone tutorial repo from github
Obtain Freesurfer licence
Download preprocessed IXI dataset
https://shorturl.at/ilvX7
Preprocessed IXI data on dropbox
https://brain-development.org/ixi-dataset/
Original IXI data. Download demographic spreadsheet, and optionally, T1 images if you want to do preprocessing by yourself.
https://github.com/damianpolakpjwstk/dsc-2023-mri-classification
git clone https://github.com/damianpolakpjwstk/dsc-2023-mri-classification.git && cd dsc-2023-mri-classification && git submodule init && git submodule update
https://surfer.nmr.mgh.harvard.edu/registration.html
Get the FreeSurfer license
https://docs.docker.com/engine/install/
Install Docker (with GPU support if possible)
IXI dataset
https://brain-development.org/ixi-dataset/
MRI data characteristics
source: https://www.hindawi.com/journals/cmmm/2015/450341/
Axial, coronal and sagittal axis
source: https://users.fmrib.ox.ac.uk/~stuart/thesis/chapter_3/image3_5.gif, https://www.researchgate.net/figure/MRI-planes-for-MRI-head-scan-a-Axial-b-Coronal-c-Sagittal-MR-scanner-can-generate_fig2_338448026
source: https://www.researchgate.net/figure/MRI-pulse-sequences-usually-used-in-a-clinical-setting-T1-w-provides-an-anatomical_fig1_331209311
Two ways to work with MRI scans using ML
Tabular data extraction vs MRI scans as 3D images
VS
From MRI scan to tabular data
Acquiring volumetric data from scans using FreeSurfer
This process takes hours for a single scan!
Raw MRI scans in DICOM format
Tabular data - volumes of specific anatomical regions in the brain
source: https://www.imaios.com/en/e-anatomy/brain/mri-brain
From MRI scan to tabular data
Acquiring volumetric data from scans using FastSurfer
Using FastSurfer (deep learning based solution), we can extract volumetric data from brain scan in less than a minute!
source: https://deep-mi.org/research/fastsurfer/
VOLUMETRIC DATA EXTRACTIONFASTSURFER PIPELINE
1. Run: docker build -t scans . 2. Change paths in run_fastsurfer.py file 3. Run: python run_fastsurfer.py
TABULAR DATA CLASSIFICATION/REGRESSION
SCANS preparation steps
3D ConvNets
Memory and time consuming approach
source: https://medium.com/convolutional-lstm-neural-networks-for-video-frame/neural-networks-for-classification-of-spatio-temporal-data-beb1693056f
Pseudo-3D CNN models
Learning Spatio-Temporal Representation with Pseudo-3D Residual Networks
source: https://arxiv.org/abs/1711.10305
3D Convnets training
Other applications
Ideas for your own projects
Dementia progression/Alzheimer disease detection
Explainability of CNN models (GradCAM, saliency maps)
Tumor/cancer segmentation (not only in brains)
Using Pseudo-3D network to classify videos
Mental disorders detection
THANK you!
polakd7@icloud.com