Skip to content

Code for paper "Diffusion Deep Learning for Brain Age Prediction and Longitudinal Tracking in Children through Adulthood

License

Notifications You must be signed in to change notification settings

AIM-KannLab/pediatric-brain-age

Repository files navigation

Diffusion Deep Learning for Brain Age Prediction and Longitudinal Tracking in Children through Adulthood

What is this about?

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

Main figure

Not intended for clinical use.

Hardware requirements

This repository was developed and tested on the following hardware:

  • Ubuntu 22.04.1 LTS, 1x Nvidia RTX A6000 GPU

Quick Start - No Docker (single MRI T1 inference)

Prerequisites: conda, gpu, cuda drivers

  1. Clone repo git clone

  2. To create an enviroment, run: conda env create -f environment.yml

  3. To activate the enviroment: conda activate pba

  4. Download model weights from link (12 GB), unzip and place into /model_weights path.

  5. 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)

Quick Start - Docker(single MRI T1 inference), estimated time for set up: 10-15 minutes

Prerequisites: conda, gpu, docker

  1. Clone repo git clone

  2. To build a docker: docker build -t pba .

  3. 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)

Jupiter notebook inference demo (no docker needed)

Prerequisites: conda, gpu

  1. Create enviroment:
conda env create -f environment.yml
conda activate brain-age
  1. Run the notebook:
jupyter notebook 

And navigate to notebooks/Demo-notebook.ipynb

Things To-Do:

  • 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

Acknowledgements

Cite

If you find this code useful, please cite: Paper

Dataset

For mode details on the dataset, please refer to the following paper: Paper

LICENSE: CC BY-NC 4.0

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]

About

Code for paper "Diffusion Deep Learning for Brain Age Prediction and Longitudinal Tracking in Children through Adulthood

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published