Advanced Toolbox for Multitask Medical Imaging Consistency (ATOMMIC)
Project description
Advanced Toolbox for Multitask Medical Imaging Consistency (ATOMMIC)
👋 Introduction
The Advanced Toolbox for Multitask Medical Imaging Consistency (ATOMMIC) is a toolbox for applying AI methods for accelerated MRI reconstruction (REC), MRI segmentation (SEG), quantitative MR imaging (qMRI), as well as multitask learning (MTL), i.e., performing multiple tasks simultaneously, such as reconstruction and segmentation. Each task is implemented in a separate collection consisting of data loaders, transformations, models, metrics, and losses. ATOMMIC is designed to be modular and extensible on new tasks, models, and datasets. ATOMMIC uses PyTorch Lightning for feasible high-performance multi-GPU/multi-node mixed-precision training.
The schematic overview of ATOMMIC showcases the main components of the toolbox. First, we need an MRI Dataset (e.g., CC359). Next, we need to define the high-level parameters, such as the task and the model, the undersampling, the transforms, the optimizer, the scheduler, the loss, the trainer parameters, and the experiment manager. All these parameters are defined in a .yaml
file using Hydra and OmegaConf.
The trained model is an .atommic
module, exported with ONNX and TorchScript support, which can be used for inference. The .atommic
module can also be uploaded on HuggingFace. Pretrained models are available on our HF account and can be downloaded and used for inference.
🛠️ Installation
ATOMMIC is best to be installed in a Conda environment.
🐍 Conda
conda create -n atommic python=3.10
conda activate atommic
📦 Pip
Use this installation mode if you want the latest released version.
pip install atommic
From source
Use this installation mode if you are contributing to atommic.
git clone https://github.com/wdika/atommic
cd atommic
bash ./reinstall.sh
🐳 Docker containers
An atommic container is available at dockerhub, you can pull it with:
docker pull wdika/atommic
You can also build an atommic container with:
DOCKER_BUILDKIT=1 docker build -f Dockerfile -t atommic:latest .
You can run the container with:
docker run --gpus all -it --rm -v /home/user/configs:/config atommic:latest atommic run -c /config/config.yaml
where /config/config.yaml
is the path to your local configuration file.
Or you can run it interactively with:
docker run --gpus all -it --rm -p 8888:8888 atommic:latest /bin/bash -c "./start-jupyter.sh"
🚀 Quick Start Guide
The best way to get started with ATOMMIC is with one of the tutorials:
- ATOMMIC Primer - demonstrates how to use ATOMMIC.
- ATOMMIC MRI transforms - demonstrates how to use ATOMMIC to undersample MRI data.
- ATOMMIC MRI undersampling - demonstrates how to use ATOMMIC to apply transforms to MRI data.
- ATOMMIC Upload Model on HuggingFace - demonstrates how to upload a model on HuggingFace.
You can also check the projects page to see how to use ATOMMIC for specific tasks and public datasets.
Pre-trained models are available on HuggingFace 🤗.
ATOMMIC paper is fully reproducible. Please check here for more information.
🤖 Training & Testing
Training and testing models in ATOMMIC is intuitive and easy. You just need to properly configure a .yaml
file and run the following command:
atommic run -c path-to-config-file
⚙️ Configuration
-
Choose the task and the model, according to the collections.
-
Choose the dataset and the dataset parameters, according to the datasets or your own dataset.
-
Choose the undersampling.
-
Choose the transforms.
-
Choose the losses.
-
Choose the optimizer.
-
Choose the scheduler.
-
Choose the trainer parameters.
-
Choose the experiment manager.
You can also check the projects page to see how to configure the .yaml
file for specific tasks.
🗂️ Collections
ATOMMIC is organized into collections, each of which implements a specific task. The following collections are currently available, implementing various models as listed:
MultiTask Learning (MTL)
- End-to-End Recurrent Attention Network (
SERANet
), 2. Image domain Deep Structured Low-Rank Network (IDSLR
), 3. Image domain Deep Structured Low-Rank UNet (IDSLRUNet
), 4. Multi-Task Learning for MRI Reconstruction and Segmentation (MTLRS
), 5. Reconstruction Segmentation method using UNet (RecSegUNet
), 6. Segmentation Network MRI (SegNet
).
Quantitative MR Imaging (qMRI)
- Quantitative Recurrent Inference Machines (
qRIMBlock
), 2. Quantitative End-to-End Variational Network (qVarNet
), 3. Quantitative Cascades of Independently Recurrent Inference Machines (qCIRIM
).
MRI Reconstruction (REC)
- Cascades of Independently Recurrent Inference Machines (
CIRIM
), 2. Convolutional Recurrent Neural Networks (CRNNet
), 3. Deep Cascade of Convolutional Neural Networks (CascadeNet
), 4. Down-Up Net (DUNet
), 5. End-to-End Variational Network (VarNet
), 6. Independently Recurrent Inference Machines (RIMBlock
), 7. Joint Deep Model-Based MR Image and Coil Sensitivity Reconstruction Network (JointICNet
), 8.KIKINet
, 9. Learned Primal-Dual Net (LPDNet
), 10. Model-based Deep Learning Reconstruction (MoDL
), 11.MultiDomainNet
, 12.ProximalGradient
, 13. Recurrent Inference Machines (RIMBlock
), 14. Recurrent Variational Network (RecurrentVarNet
), 15.UNet
, 16. Variable Splitting Network (VSNet
), 17.XPDNet
, 18. Zero-Filled reconstruction (ZF
).
MRI Segmentation (SEG)
SegmentationAttentionUNet
, 2.SegmentationDYNUNet
, 3.SegmentationLambdaUNet
, 4.SegmentationUNet
, 5.Segmentation3DUNet
, 6.SegmentationUNetR
, 7.SegmentationVNet
.
MRI Datasets
ATOMMIC supports public datasets, as well as private datasets. The following public datasets are supported natively:
- AHEAD: Supports the
(qMRI)
and(REC)
tasks. - BraTS 2023 Adult Glioma: Supports the
(SEG)
task. - CC359: Supports the
(REC)
task. - fastMRI Brains Multicoil: Supports the
(REC)
task. - fastMRI Knees Multicoil: Supports the
(REC)
task. - fastMRI Knees Singlecoil: Supports the
(REC)
task. - ISLES 2022 Sub Acute Stroke: Supports the
(SEG)
task. - SKM-TEA: Supports the
(REC)
,(SEG)
, and(MTL)
tasks. - Stanford Knees: Supports the
(REC)
task.
📚 API Documentation
Access the API Documentation here
📄 License
📖 Citation
If you use ATOMMIC in your research, please cite as follows:
@article{Karkalousos_2024,
title={Atommic: An Advanced Toolbox for Multitask Medical Imaging Consistency to Facilitate Artificial Intelligence Applications from Acquisition to Analysis in Magnetic Resonance Imaging},
url={http://dx.doi.org/10.2139/ssrn.4801289},
DOI={10.2139/ssrn.4801289},
publisher={Elsevier BV},
author={Karkalousos, Dimitrios and Išgum, Ivana and Marquering, Henk and Caan, Matthan W.A.},
year={2024}}
🔗 References
ATOMMIC has been used or is referenced in the following papers:
-
Karkalousos, Dimitrios and Išgum, Ivana and Marquering, Henk and Caan, Matthan W.A., Atommic: An Advanced Toolbox for Multitask Medical Imaging Consistency to Facilitate Artificial Intelligence Applications from Acquisition to Analysis in Magnetic Resonance Imaging. Available at SSRN: https://ssrn.com/abstract=4801289 or http://dx.doi.org/10.2139/ssrn.4801289
-
Karkalousos, D., Išgum, I., Marquering, H. A., & Caan, M. W. A. (2024). ATOMMIC: An Advanced Toolbox for Multitask Medical Imaging Consistency to facilitate Artificial Intelligence applications from acquisition to analysis in Magnetic Resonance Imaging. https://doi.org/10.2139/ssrn.4801289
-
Karkalousos, D., Isgum, I., Marquering, H., & Caan, M. W. A. (2024, April 27). The Advanced Toolbox for Multitask Medical Imaging Consistency (ATOMMIC): A Deep Learning framework to facilitate Magnetic Resonance Imaging. Medical Imaging with Deep Learning. https://openreview.net/forum?id=HxTZr9yA0N
-
Karkalousos, D., Isgum, I., Marquering, H. & Caan, M.W.A.. (2024). MultiTask Learning for accelerated-MRI Reconstruction and Segmentation of Brain Lesions in Multiple Sclerosis. Medical Imaging with Deep Learning, in Proceedings of Machine Learning Research 227:991-1005 Available from https://proceedings.mlr.press/v227/karkalousos24a.html.
-
Zhang, C., Karkalousos, D., Bazin, P. L., Coolen, B. F., Vrenken, H., Sonke, J. J., Forstmann, B. U., Poot, D. H. J., & Caan, M. W. A. (2022). A unified model for reconstruction and R2* mapping of accelerated 7T data using the quantitative recurrent inference machine. NeuroImage, 264. DOI
-
Karkalousos, D., Noteboom, S., Hulst, H. E., Vos, F. M., & Caan, M. W. A. (2022). Assessment of data consistency through cascades of independently recurrent inference machines for fast and robust accelerated MRI reconstruction. Physics in Medicine & Biology. DOI
📧 Contact
For any questions, please contact Dimitris Karkalousos @ d.karkalousos@amsterdamumc.nl.
⚠️🙏 Disclaimer & Acknowledgements
Note: ATOMMIC is built on top of NeMo. NeMo is under Apache 2.0 license, so we are allowed to use it. We also assume that we can use the NeMo documentation basis as long as we cite it and always refer to the baselines everywhere in the code and docs. ATOMMIC also includes implementations of reconstruction methods from fastMRI and DIRECT, and segmentation methods from MONAI, as well as other codebases which are always cited on the corresponding files. All methods in ATOMMIC are reimplemented and not called from the original libraries, allowing for full reproducibility, support, and easy extension. ATOMMIC is an open-source project under the Apache 2.0 license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file atommic-1.0.1.tar.gz
.
File metadata
- Download URL: atommic-1.0.1.tar.gz
- Upload date:
- Size: 402.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f73e4ee287008010cbbe240fd4fe5044becc0c84b09d0bc45c41b233c64c623e |
|
MD5 | c46a64a15205f93aa9ee3438dce0a6d4 |
|
BLAKE2b-256 | 3036ce3858a7c07589f69fbeda9ad0ac83dfd56b8bdc814eba2a495892ec4341 |
File details
Details for the file atommic-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: atommic-1.0.1-py3-none-any.whl
- Upload date:
- Size: 512.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c8b0f9b3b960e32a0ab0ab52446a4f1b3adaefa11a588cde7709b7957d9ca42 |
|
MD5 | 2bf39b8d705406985128999b90a4b97a |
|
BLAKE2b-256 | 090950da488ae351476b85223a6443b800975c7d6eca863559659f74c59d40ff |