Skip to content

Commit d34fcad

Browse files
committed
minor fixes for v1.0.1
1 parent a216493 commit d34fcad

File tree

11 files changed

+535
-388
lines changed

11 files changed

+535
-388
lines changed

.github/workflows/gh-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
3333
- name: "Deploy Github Page"
3434
continue-on-error: true
35-
run: mkdocs gh-deploy --force
35+
run: mkdocs gh-deploy --force

CITATION.cff

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ authors:
1313
- family-names: Caan
1414
given-names: Matthan
1515
orcid: https://orcid.org/0000-0002-5162-8880
16-
title: "Advanced Toolbox for Multitask Medical Imaging Consistency (ATOMMIC)"
16+
title: "Atommic: An Advanced Toolbox for Multitask Medical Imaging Consistency to Facilitate Artificial Intelligence Applications from Acquisition to Analysis in Magnetic Resonance Imaging"
17+
doi: "10.2139/ssrn.4801289"
18+
url: "https://ssrn.com/abstract=4801289"
1719
repository-code: https://github.com/wdika/atommic
18-
version: 1.0.0
19-
date-released: 2023-12-01
20+
version: 1.0.1
21+
date-released: 2024-04-25

Dockerfile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN apt-get update && \
1212
apt-get install -y --no-install-recommends \
1313
libsndfile1 sox \
1414
libfreetype6 \
15-
swig \
15+
swig && \
1616
rm -rf /var/lib/apt/lists/*
1717

1818
WORKDIR /workspace/
@@ -21,15 +21,15 @@ WORKDIR /workspace/
2121
WORKDIR /tmp/
2222

2323
COPY requirements .
24-
RUN for f in "$(ls requirements*.txt)"; do pip3 install --disable-pip-version-check --no-cache-dir -r $f; done
24+
RUN for f in requirements*.txt; do pip3 install --disable-pip-version-check --no-cache-dir -r $f; done
2525

2626
# copy atommic source into a scratch image
2727
FROM scratch as atommic-src
2828
COPY . .
2929

3030
# start building the final container
3131
FROM atommic-deps as atommic
32-
ARG ATOMMIC_VERSION=1.0.0
32+
ARG ATOMMIC_VERSION=1.0.1
3333

3434
# Check that atommic_VERSION is set. Build will fail without this. Expose atommic and base container
3535
# version information as runtime environment variable for introspection purposes
@@ -38,7 +38,12 @@ RUN /usr/bin/test -n "$ATOMMIC_VERSION" && \
3838
/bin/echo "export BASE_IMAGE=${BASE_IMAGE}" >> /root/.bashrc
3939

4040
# Install ATOMMIC
41-
RUN --mount=from=atommic-src,target=/tmp/atommic cd /tmp/atommic && pip install --no-cache-dir ".[all]"
41+
RUN --mount=from=atommic-src,target=/tmp/atommic cd /tmp/atommic && pip install --no-cache-dir ".[all]" || bash
42+
43+
RUN --mount=from=atommic-src,target=/tmp/atommic cd /tmp/atommic && pip install atommic || bash
44+
45+
# Check that the module can be imported
46+
RUN python -c "import atommic"
4247

4348
# Check install
4449
RUN python -c "import atommic.collections.multitask.rs as atommic_mrs" && \
@@ -51,7 +56,7 @@ WORKDIR /workspace/atommic
5156
COPY projects /workspace/atommic/projects
5257
COPY tests /workspace/atommic/tests
5358
COPY tools /workspace/atommic/tools
54-
# COPY README.rst LICENSE /workspace/atommic/
59+
COPY tutorials /workspace/atommic/tutorials
5560

5661
RUN printf "#!/bin/bash\njupyter lab --no-browser --allow-root --ip=0.0.0.0" >> start-jupyter.sh && \
5762
chmod +x start-jupyter.sh \

README.md

Lines changed: 91 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,91 @@
11
# Advanced Toolbox for Multitask Medical Imaging Consistency (ATOMMIC)
22
[![HuggingFace](https://img.shields.io/badge/HuggingFace-Models-blue)](https://huggingface.co/wdika)
3-
[![GitHub issues](https://img.shields.io/github/issues/wdika/atommic)](https://github.com/wdika/atommic/issues)
3+
[![DockerHub](https://img.shields.io/badge/DockerHub-Link-blue)](docker.io/wdika/atommic)
44
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
5-
[![Documentation Status](https://readthedocs.org/projects/atommic/badge/?version=latest)](https://atommic.readthedocs.io/en/latest/?badge=latest)
65
[![PyPI version](https://badge.fury.io/py/atommic.svg)](https://badge.fury.io/py/atommic)
76
[![PyPI - Downloads](https://img.shields.io/pypi/dm/atommic)](https://pypi.org/project/atommic/)
7+
[![GitHub issues](https://img.shields.io/github/issues/wdika/atommic)](https://github.com/wdika/atommic/issues)
8+
[![Documentation Status](https://readthedocs.org/projects/atommic/badge/?version=latest)](https://atommic.readthedocs.io/en/latest/?badge=latest)
89
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/atommic)](https://pypi.org/project/atommic/)
910
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)]()
10-
<p align="center">
11-
<img src="assets/atommic-logo.png" alt="Your Image" width="600" />
11+
<p align="center" style="margin-top: -40px; margin-bottom: -80px;">
12+
<img src="assets/atommic-logo.png" alt="ATOMMIC-logo" width="600" />
1213
</p>
1314

14-
# 👋 Introduction
15+
<div align="center">
16+
<span style="font-size:24px;">
17+
18+
[📜](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4801289)
19+
[🤗](https://huggingface.co/wdika)
20+
[🐳](docker.io/wdika/atommic)
21+
[📦](https://pypi.org/project/atommic)
22+
[📚](https://atommic.readthedocs.io/)
23+
24+
</div>
1525

16-
The [Advanced Toolbox for Multitask Medical Imaging Consistency (ATOMMIC)](https://github.com/wdika/atommic) is a
17-
toolbox for applying AI methods for **accelerated MRI reconstruction (REC)**, **MRI segmentation (SEG)**,
18-
**quantitative MR imaging (qMRI)**, as well as **multitask learning (MTL)**, i.e., performing multiple tasks
19-
simultaneously, such as reconstruction and segmentation. Each task is implemented in a separate collection, which
20-
consists of data loaders, transformations, models, metrics, and losses. **ATOMMIC** is designed to be modular and
21-
extensible, and it is easy to add new tasks, models, and datasets. **ATOMMIC** uses
22-
[PyTorch Lightning](https://www.pytorchlightning.ai/) for feasible high-performance multi-GPU/multi-node
23-
mixed-precision training.
26+
## 👋 Introduction
2427

25-
![ATOMMIC Schematic Overview](https://github.com/wdika/atommic/tree/main/assets/atommic-schematic_overview.png)
28+
The [Advanced Toolbox for Multitask Medical Imaging Consistency (ATOMMIC)](https://github.com/wdika/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](https://www.pytorchlightning.ai/) for feasible high-performance multi-GPU/multi-node mixed-precision training.
29+
30+
![ATOMMIC Schematic Overview](assets/atommic-schematic_overview.png)
2631

2732
The schematic overview of **ATOMMIC** showcases the main components of the toolbox. First, we need an [MRI Dataset](README.md#mri-datasets) (e.g., **CC359**). Next, we need to define the high-level parameters, such as the [task and the model](https://atommic.readthedocs.io/en/latest/mri/collections.html), the [undersampling](https://atommic.readthedocs.io/en/latest/mri//undersampling.html), the [transforms](https://atommic.readthedocs.io/en/latest/mri//transforms.html), the [optimizer](https://atommic.readthedocs.io/en/latest/core/core.html#optimization), the [scheduler](https://atommic.readthedocs.io/en/latest/core/core.html#learning-rate-schedulers), the [loss](https://atommic.readthedocs.io/en/latest/mri/losses.html), the [trainer parameters](https://atommic.readthedocs.io/en/latest/core/core.html#training), and the [experiment manager](https://atommic.readthedocs.io/en/latest/core/exp_manager.html). All these parameters are defined in a `.yaml` file using [Hydra](https://hydra.cc/) and [OmegaConf](https://omegaconf.readthedocs.io/).
2833

2934
The trained model is an `.atommic` [module](https://atommic.readthedocs.io/en/latest/core/export.html), exported with [ONNX](https://onnx.ai/) and [TorchScript](https://pytorch.org/docs/stable/jit.html) support, which can be used for inference. The `.atommic` module can also be uploaded on [HuggingFace](https://huggingface.co/). Pretrained models are available on our [HF](https://huggingface.co/wdika) account and can be downloaded and used for inference.
3035

36+
## 🛠️ Installation
37+
38+
**ATOMMIC** is best to be installed in a Conda environment.
39+
40+
### 🐍 Conda
41+
```
42+
conda create -n atommic python=3.10
43+
conda activate atommic
44+
```
45+
46+
### 📦 Pip
47+
Use this installation mode if you want the latest released version.
48+
49+
```bash
50+
pip install atommic
51+
```
52+
53+
### From source
54+
55+
Use this installation mode if you are contributing to atommic.
56+
57+
```bash
58+
git clone https://github.com/wdika/atommic
59+
cd atommic
60+
bash ./reinstall.sh
61+
```
62+
63+
### 🐳 Docker containers
64+
65+
An atommic container is available at dockerhub, you can pull it with:
66+
```bash
67+
docker pull wdika/atommic
68+
```
69+
70+
You can also build an atommic container with:
71+
```bash
72+
DOCKER_BUILDKIT=1 docker build -f Dockerfile -t atommic:latest .
73+
```
74+
75+
You can run the container with:
76+
```bash
77+
docker run --gpus all -it --rm -v /home/user/configs:/config atommic:latest atommic run -c /config/config.yaml
78+
```
79+
where ```/config/config.yaml``` is the path to your local configuration file.
80+
81+
Or you can run it interactively with:
82+
```bash
83+
docker run --gpus all -it --rm -p 8888:8888 atommic:latest /bin/bash -c "./start-jupyter.sh"
84+
```
85+
3186
## 🚀 Quick Start Guide
3287

33-
The best way to get started with ATOMMIC is to start with one of the [tutorials](https://atommic.readthedocs.io/en/latest/starthere/tutorials.html):
88+
The best way to get started with ATOMMIC is with one of the [tutorials](https://atommic.readthedocs.io/en/latest/starthere/tutorials.html):
3489

3590
- [ATOMMIC Primer](https://github.com/wdika/atommic/blob/main/tutorials/00_ATOMMIC_Primer.ipynb) - demonstrates how to use ATOMMIC.
3691
- [ATOMMIC MRI transforms](https://github.com/wdika/atommic/blob/main/tutorials/01_ATOMMIC_MRI_transforms.ipynb) - demonstrates how to use ATOMMIC to undersample MRI data.
@@ -39,12 +94,13 @@ The best way to get started with ATOMMIC is to start with one of the [tutorials]
3994

4095
You can also check the [projects](https://github.com/wdika/atommic/tree/main/projects) page to see how to use ATOMMIC for specific tasks and public datasets.
4196

97+
Pre-trained models are available on HuggingFace [🤗](https://huggingface.co/wdika).
98+
4299
### **ATOMMIC paper is fully reproducible. Please check [here](https://github.com/wdika/atommic/tree/main/projects/ATOMMIC_paper/README.md) for more information.**
43100

44101
## 🤖 Training & Testing
45102

46-
Training and testing models in **ATOMMIC** is intuitive and easy. You just need to properly configure the `.yaml`
47-
file and just run the following command:
103+
Training and testing models in **ATOMMIC** is intuitive and easy. You just need to properly configure a `.yaml` file and run the following command:
48104

49105
```bash
50106
atommic run -c path-to-config-file
@@ -102,48 +158,6 @@ You can also check the [projects](https://github.com/wdika/atommic/tree/main/pro
102158
- [SKM-TEA](https://github.com/wdika/atommic/tree/main/projects/MTL/rs/SKMTEA): Supports the `(REC)`, `(SEG)`, and `(MTL)` tasks.
103159
- [Stanford Knees](https://github.com/wdika/atommic/tree/main/projects/REC/StanfordKnees2019): Supports the `(REC)` task.
104160

105-
## 🛠️ Installation
106-
107-
**ATOMMIC** is best to be installed in a Conda environment.
108-
109-
### 🐍 Conda
110-
```
111-
conda create -n atommic python=3.10
112-
conda activate atommic
113-
```
114-
115-
### 📦 Pip
116-
Use this installation mode if you want the latest released version.
117-
118-
```bash
119-
pip install atommic
120-
```
121-
122-
### From source
123-
124-
Use this installation mode if you are contributing to atommic.
125-
126-
```bash
127-
git clone https://github.com/wdika/atommic
128-
cd atommic
129-
bash ./reinstall.sh
130-
```
131-
132-
### 🐳 Docker containers
133-
To build an atommic container with Dockerfile from a branch, please run
134-
135-
```bash
136-
DOCKER_BUILDKIT=1 docker build -f Dockerfile -t atommic:latest.
137-
```
138-
139-
As [NeMo](https://github.com/NVIDIA/NeMo) suggests, if you choose to work with the `main` branch, use NVIDIA's PyTorch container version [21.05-py3](https://ngc.nvidia.com/containers/nvidia:pytorch/tags), then install from GitHub.
140-
141-
```bash
142-
docker run --gpus all -it --rm -v <atommic_github_folder>:/ATOMMIC --shm-size=8g \
143-
-p 8888:8888 -p 6006:6006 --ulimit memlock=-1 --ulimit \
144-
stack=67108864 --device=/dev/snd nvcr.io/nvidia/pytorch:21.05-py3
145-
```
146-
147161
## 📚 API Documentation
148162

149163
[![Documentation Status](https://readthedocs.org/projects/atommic/badge/?version=latest)](https://atommic.readthedocs.io/en/latest/?badge=latest)
@@ -154,34 +168,40 @@ Access the API Documentation [here](https://atommic.readthedocs.io/en/latest/ind
154168

155169
**ATOMMIC** is under [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
156170

157-
158171
## 📖 Citation
159172

160173
If you use ATOMMIC in your research, please cite as follows:
161174

162175
```BibTeX
163-
@misc{atommic,
164-
author = {Karkalousos Dimitrios, Isqum Ivana, Marquering Henk, Caan Matthan},
165-
title = {ATOMMIC: Advanced Toolbox for Multitask Medical Imaging Consistency},
166-
year = {2023},
167-
url = {https://github.com/wdika/atommic},
168-
}
176+
@article{Karkalousos_2024,
177+
title={Atommic: An Advanced Toolbox for Multitask Medical Imaging Consistency to Facilitate Artificial Intelligence Applications from Acquisition to Analysis in Magnetic Resonance Imaging},
178+
url={http://dx.doi.org/10.2139/ssrn.4801289},
179+
DOI={10.2139/ssrn.4801289},
180+
publisher={Elsevier BV},
181+
author={Karkalousos, Dimitrios and Išgum, Ivana and Marquering, Henk and Caan, Matthan W.A.},
182+
year={2024}}
169183
```
170184

171185
## 🔗 References
172186

173-
The following papers have used ATOMMIC:
187+
ATOMMIC has been used or is referenced in the following papers:
188+
189+
1. 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
190+
191+
2. 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
192+
193+
3. 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
174194

175-
1. Karkalousos, D., Isgum, I., Marquering, H. &amp; Caan, M.W.A.. (2024). MultiTask Learning for accelerated-MRI Reconstruction and Segmentation of Brain Lesions in Multiple Sclerosis. <i>Medical Imaging with Deep Learning</i>, in <i>Proceedings of Machine Learning Research</i> 227:991-1005 Available from https://proceedings.mlr.press/v227/karkalousos24a.html.
195+
4. Karkalousos, D., Isgum, I., Marquering, H. &amp; Caan, M.W.A.. (2024). MultiTask Learning for accelerated-MRI Reconstruction and Segmentation of Brain Lesions in Multiple Sclerosis. <i>Medical Imaging with Deep Learning</i>, in <i>Proceedings of Machine Learning Research</i> 227:991-1005 Available from https://proceedings.mlr.press/v227/karkalousos24a.html.
176196

177-
2. 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](https://doi.org/10.1016/j.neuroimage.2022.119680)
197+
5. 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](https://doi.org/10.1016/j.neuroimage.2022.119680)
178198

179-
3. 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](https://doi.org/10.1088/1361-6560/AC6CC2)
199+
6. 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](https://doi.org/10.1088/1361-6560/AC6CC2)
180200

181201
## 📧 Contact
182202

183203
For any questions, please contact Dimitris Karkalousos @ [d.karkalousos@amsterdamumc.nl](mailto:d.karkalousos@amsterdamumc.nl).
184204

185205
## ⚠️🙏 Disclaimer & Acknowledgements
186206

187-
> **Note:** ATOMMIC is built on top of [NeMo](https://github.com/NVIDIA/NeMo). NeMo is under Apache 2.0 license, so we are allowed to use it. We also assume that it is allowed to use the NeMo documentation, as long as we cite it and we always refer to the baselines everywhere and in the code and docs. ATOMMIC also includes implementations of reconstruction methods from [fastMRI](https://github.com/facebookresearch/fastMRI) and [DIRECT](https://github.com/NKI-AI/direct), and segmentation methods from [MONAI](https://github.com/Project-MONAI/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.
207+
> **Note:** ATOMMIC is built on top of [NeMo](https://github.com/NVIDIA/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](https://github.com/facebookresearch/fastMRI) and [DIRECT](https://github.com/NKI-AI/direct), and segmentation methods from [MONAI](https://github.com/Project-MONAI/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.
139 KB
Loading

atommic/package_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
MAJOR = 1
44
MINOR = 0
5-
PATCH = 0
5+
PATCH = 1
66
PRE_RELEASE = ""
77

88
# Use the following formatting: (major, minor, patch, pre-release)

0 commit comments

Comments
 (0)