Diffusion Deep Learning for Brain Age Prediction and Longitudinal Tracking in Children through Adulthood
Here, we leveraged 32,851 T1-weighted MRI scans(Fig A) from healthy children and adolescents aged 3 to 30 from 16 multisite datasets to develop and evaluate several DL brain age frameworks, including a novel regression diffusion deep learning network (AgeDiffuse, Fig B). On multisite, external validation (5 datasets), we found that AgeDiffuse outperformed conventional deep learning frameworks, with a mean absolute error (MAE) of 2.78 years (IQR=[1.2-3.9], Fig C). In a second, separate external validation (3 datasets) AgeDiffuse yielded MAE 1.97 years (IQR=[0.8-2.8]). We found that AgeDiffuse brain age predictions were associated with age-related brain structure volume changes. Finally, we found that longitudinal predicted brain age tracked closely with chronological age at the individual level.
If you publish any work that uses this package, please cite the following publication: Paper
Not intended for clinical use.
This repository was developed and tested on the following hardware:
- Ubuntu 22.04.1 LTS, 1x Nvidia RTX A6000 GPU
Prerequisites: conda, gpu, cuda drivers
-
Clone repo
git clone
-
To create an enviroment, run:
conda env create -f environment.yml
-
To activate the enviroment:
conda activate pba
-
Download model weights from link (12 GB), unzip and place into /model_weights path.
-
For demo on TM pipeline launch jupyter notebook
notebooks/demo_notebook.ipynb
inside conda enviroment. Estimated inference time: 5 minutes (on Nvidia RTX A6000 GPU)
Prerequisites: conda, gpu, docker
-
Clone repo
git clone
-
To build a docker:
docker build -t pba .
-
To run docker on example MRI:
docker run -it --gpus X -v ${PWD}/output:/output/ -v ${PWD}/model_weights:/model_weights/ pba --chronological_age Y
- Y is chronological age in years (example: 10.4)
- output is the path to the output folder where the results will be saved
- model_weights is the path to the folder with model weights
- X gpu id to use (example: 0)
Prerequisites: conda, gpu
- Create enviroment:
conda env create -f environment.yml
conda activate brain-age
- Run the notebook:
jupyter notebook
And navigate to notebooks/Demo-notebook.ipynb
- retraining on your own MRI dataset how-to
- batched inference
- create docker
- create CPU-only inference and docker
- replace itk-registration with cmd line version / or use updated sitk module
- DiffMIC: Dual-Guidance Diffusion Network for Medical Image Classification.
- XzwHan/CARD
- CompVis/stable-diffusion
- MedSegDiff
- nyukat/GMIC
- HDBET
If you find this code useful, please cite: Paper
For mode details on the dataset, please refer to the following paper: Paper
This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. Copyright (c) [2023] [Diffusion Deep Learning for Brain Age Prediction and Longitudinal Tracking in Children though Adulthood]