BraTS 0.0.0.dev0__tar.gz → 0.0.19__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. brats-0.0.19/PKG-INFO +445 -0
  2. brats-0.0.19/README.md +414 -0
  3. {brats-0.0.0.dev0 → brats-0.0.19}/brats/__init__.py +1 -6
  4. {brats-0.0.0.dev0 → brats-0.0.19}/brats/constants.py +8 -91
  5. {brats-0.0.0.dev0 → brats-0.0.19}/brats/core/brats_algorithm.py +23 -62
  6. {brats-0.0.0.dev0 → brats-0.0.19}/brats/core/docker.py +51 -121
  7. {brats-0.0.0.dev0 → brats-0.0.19}/brats/core/inpainting_algorithms.py +3 -13
  8. {brats-0.0.0.dev0 → brats-0.0.19}/brats/core/missing_mri_algorithms.py +5 -14
  9. {brats-0.0.0.dev0 → brats-0.0.19}/brats/core/segmentation_algorithms.py +154 -173
  10. brats-0.0.19/brats/data/meta/adult_glioma_post_treatment.yml +68 -0
  11. {brats-0.0.0.dev0 → brats-0.0.19}/brats/data/meta/africa.yml +5 -75
  12. brats-0.0.19/brats/data/meta/goat.yml +29 -0
  13. {brats-0.0.0.dev0 → brats-0.0.19}/brats/data/meta/inpainting.yml +4 -44
  14. brats-0.0.0.dev0/brats/data/meta/meningioma_rt.yml → brats-0.0.19/brats/data/meta/meningioma.yml +54 -51
  15. {brats-0.0.0.dev0 → brats-0.0.19}/brats/data/meta/metastases.yml +0 -34
  16. brats-0.0.19/brats/data/meta/missing_mri.yml +63 -0
  17. {brats-0.0.0.dev0 → brats-0.0.19}/brats/data/meta/pediatric.yml +12 -68
  18. {brats-0.0.0.dev0 → brats-0.0.19}/brats/utils/algorithm_config.py +4 -6
  19. {brats-0.0.0.dev0 → brats-0.0.19}/brats/utils/exceptions.py +0 -6
  20. {brats-0.0.0.dev0 → brats-0.0.19}/brats/utils/zenodo.py +19 -29
  21. {brats-0.0.0.dev0 → brats-0.0.19}/pyproject.toml +25 -27
  22. brats-0.0.0.dev0/PKG-INFO +0 -581
  23. brats-0.0.0.dev0/README.md +0 -549
  24. brats-0.0.0.dev0/brats/core/singularity.py +0 -268
  25. brats-0.0.0.dev0/brats/data/meta/adult_glioma_pre_and_post_treatment.yml +0 -123
  26. brats-0.0.0.dev0/brats/data/meta/goat.yml +0 -84
  27. brats-0.0.0.dev0/brats/data/meta/meningioma.yml +0 -96
  28. brats-0.0.0.dev0/brats/data/meta/missing_mri.yml +0 -125
  29. brats-0.0.0.dev0/brats/data/parameters/brats23_missing_mri_onembyte.yml +0 -5
  30. brats-0.0.0.dev0/brats/preprocessing.py +0 -435
  31. brats-0.0.0.dev0/brats/utils/logging.py +0 -73
  32. {brats-0.0.0.dev0 → brats-0.0.19}/LICENSE +0 -0
  33. {brats-0.0.0.dev0 → brats-0.0.19}/brats/core/__init__.py +0 -0
  34. {brats-0.0.0.dev0 → brats-0.0.19}/brats/data/meta/adult_glioma_pre_treatment.yml +0 -0
  35. {brats-0.0.0.dev0 → brats-0.0.19}/brats/data/parameters/brats23_africa_sparkunn.yml +0 -0
  36. {brats-0.0.0.dev0 → brats-0.0.19}/brats/data/parameters/brats23_inpainting_domaso.yml +0 -0
  37. {brats-0.0.0.dev0 → brats-0.0.19}/brats/data/parameters/brats24_adult_glioma_mist.yml +0 -0
  38. {brats-0.0.0.dev0 → brats-0.0.19}/brats/data/parameters/brats24_inpainting_smint.yml +0 -0
  39. {brats-0.0.0.dev0 → brats-0.0.19}/brats/data/parameters/brats24_missing_mri_cgv.yml +0 -0
  40. {brats-0.0.0.dev0 → brats-0.0.19}/brats/data/parameters/dummy.yml +0 -0
  41. {brats-0.0.0.dev0 → brats-0.0.19}/brats/utils/__init__.py +0 -0
  42. {brats-0.0.0.dev0 → brats-0.0.19}/brats/utils/data_handling.py +0 -0
brats-0.0.19/PKG-INFO ADDED
@@ -0,0 +1,445 @@
1
+ Metadata-Version: 2.3
2
+ Name: brats
3
+ Version: 0.0.19
4
+ Summary: BraTS algorithms
5
+ License: Apache-2.0
6
+ Keywords: brain tumor,glioma,BraTS,brain lesion,segmentation,synthesis,inpainting
7
+ Author: Marcel Rosier
8
+ Author-email: marcel.rosier@tum.de
9
+ Requires-Python: >=3.8
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Requires-Dist: PyYAML (>=6.0.1)
19
+ Requires-Dist: dacite (>=1.8.0)
20
+ Requires-Dist: docker (>=7.0.0)
21
+ Requires-Dist: loguru (>=0.7.0)
22
+ Requires-Dist: nibabel (>=5.0.0)
23
+ Requires-Dist: numpy (>=1.21.0,<2.0.0) ; python_version <= "3.9"
24
+ Requires-Dist: numpy (>=1.26.0) ; python_version >= "3.10"
25
+ Requires-Dist: rich (>=13.0.0)
26
+ Project-URL: Documentation, https://brats.readthedocs.io/en/latest/
27
+ Project-URL: Homepage, https://github.com/BrainLesion/BraTS
28
+ Project-URL: Repository, https://github.com/BrainLesion/BraTS
29
+ Description-Content-Type: text/markdown
30
+
31
+ # BraTS
32
+
33
+ [![Python Versions](https://img.shields.io/pypi/pyversions/brats)](https://pypi.org/project/brats/)
34
+ [![Stable Version](https://img.shields.io/pypi/v/brats?label=stable)](https://pypi.python.org/pypi/brats/)
35
+ [![Documentation Status](https://readthedocs.org/projects/brats/badge/?version=latest)](http://brats.readthedocs.io/?badge=latest)
36
+ [![tests](https://github.com/BrainLesion/brats/actions/workflows/tests.yml/badge.svg)](https://github.com/BrainLesion/brats/actions/workflows/tests.yml)
37
+ [![codecov](https://codecov.io/gh/BrainLesion/BraTS/graph/badge.svg?token=A7FWUKO9Y4)](https://codecov.io/gh/BrainLesion/BraTS)
38
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
39
+
40
+ Providing the top-performing algorithms from the Brain Tumor Segmentation (BraTS) challenges, through an easy-to-use Python API powered by Docker.
41
+
42
+ ## Features
43
+
44
+ - Access to top-performing algorithms from recent BraTS challenges
45
+ - Easy-to-use minimal API
46
+ - Extensive documentation and examples
47
+
48
+ ## Installation
49
+
50
+ With a Python 3.8+ environment, you can install `brats` directly from [PyPI](https://pypi.org/project/brats/):
51
+
52
+ ```bash
53
+ pip install brats
54
+ ```
55
+
56
+ > [!IMPORTANT]
57
+ > To run `brats`, you require a Docker installation. <br>
58
+ > Many algorithms also require GPU support (NVIDIA Docker). <br>
59
+ > In case you do not have access to a CUDA-capable GPU, the overview tables in the [Available Algorithms and Usage](#available-algorithms-and-usage) section indicate which algorithms are CPU compatible.
60
+
61
+
62
+
63
+
64
+ ### Docker and NVIDIA Container Toolkit Setup
65
+
66
+ - **Docker**: Installation instructions on the official [website](https://docs.docker.com/get-docker/)
67
+ - **NVIDIA Container Toolkit**: Refer to the [NVIDIA install guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) and the official [GitHub page](https://github.com/NVIDIA/nvidia-container-toolkit)
68
+
69
+
70
+ ## Available Algorithms and Usage
71
+
72
+ ### Segmentation Challenges
73
+
74
+ #### Adult Glioma Segmentation (Pre-Treatment)
75
+ > Adult Glioma Segmentation on pre-treatment brain MRI exams.
76
+ <details>
77
+ <summary> Usage example (code) and top 3 participants </summary>
78
+ <br>
79
+
80
+ ```python
81
+ from brats import AdultGliomaPreTreatmentSegmenter
82
+ from brats.constants import AdultGliomaPreTreatmentAlgorithms
83
+
84
+ segmenter = AdultGliomaPreTreatmentSegmenter(algorithm=AdultGliomaPreTreatmentAlgorithms.BraTS23_1, cuda_devices="0")
85
+ # these parameters are optional, by default the winning algorithm of 2023 will be used on cuda:0
86
+ segmenter.infer_single(
87
+ t1c="path/to/t1c.nii.gz",
88
+ t1n="path/to/t1n.nii.gz",
89
+ t2f="path/to/t2f.nii.gz",
90
+ t2w="path/to/t2w.nii.gz",
91
+ output_file="segmentation.nii.gz",
92
+ )
93
+ ```
94
+ > Note: If you're interested in Adult Glioma Segmentation, the [BrainLes GlioMODA package](https://github.com/BrainLesion/GlioMODA?tab=readme-ov-file#gliomoda) may also be of interest.
95
+ <br>
96
+
97
+ **Class:** `brats.AdultGliomaPreTreatmentSegmenter` ([Docs](https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.AdultGliomaPreTreatmentSegmenter))
98
+ <br>
99
+ **Challenge Paper 2023:** [Link](https://arxiv.org/abs/2107.02314)
100
+ <br>
101
+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
102
+ | ---- | ---- | --------------------------------- | ------------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ |
103
+ | 2023 | 1st | _André Ferreira, et al._ | [Link](https://arxiv.org/abs/2402.17317v1) | &#x274C; | [BraTS23_1](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.**AdultGliomaPreTreatmentAlgorithms**.BraTS23_1) |
104
+ | 2023 | 2nd | _Andriy Myronenko, et al._ | N/A | &#x274C; | [BraTS23_2](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.**AdultGliomaPreTreatmentAlgorithms**.BraTS23_2) |
105
+ | 2023 | 3rd | _Fadillah Adamsyah Maani, et al._ | [Link](https://doi.org/10.1007/978-3-031-76163-8_24) | &#x274C; | [BraTS23_3](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.**AdultGliomaPreTreatmentAlgorithms**.BraTS23_3) |
106
+
107
+ </details>
108
+ <br>
109
+
110
+ #### Adult Glioma Segmentation (Post-Treatment)
111
+ > Adult Glioma Segmentation on post-Treatment brain MRI exams.
112
+ <details>
113
+ <summary> Usage example (code) and top 3 participants </summary>
114
+
115
+ <br>
116
+
117
+
118
+ ```python
119
+ from brats import AdultGliomaPostTreatmentSegmenter
120
+ from brats.constants import AdultGliomaPostTreatmentAlgorithms
121
+
122
+ segmenter = AdultGliomaPostTreatmentSegmenter(algorithm=AdultGliomaPostTreatmentAlgorithms.BraTS23_1, cuda_devices="0")
123
+ # these parameters are optional, by default the winning algorithm of 2024 will be used on cuda:0
124
+ segmenter.infer_single(
125
+ t1c="path/to/t1c.nii.gz",
126
+ t1n="path/to/t1n.nii.gz",
127
+ t2f="path/to/t2f.nii.gz",
128
+ t2w="path/to/t2w.nii.gz",
129
+ output_file="segmentation.nii.gz",
130
+ )
131
+ ```
132
+ <br>
133
+
134
+ **Class:** `brats.AdultGliomaPostTreatmentSegmenter` ([Docs](https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.AdultGliomaPostTreatmentSegmenter))
135
+ <br>
136
+ **Challenge Paper 2024:** [Link](https://doi.org/10.48550/arXiv.2405.18368)
137
+ <br>
138
+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
139
+ | ---- | ---- | ------------------------ | ----- | ----------- | --------------------------------------------------------------------------------------------------------------------------------- |
140
+ | 2024 | 1st | _André Ferreira, et al._ | N/A | &#x274C; | [BraTS24_1](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.AdultGliomaPostTreatmentAlgorithms.BraTS24_1) |
141
+ | 2024 | 2nd | _Heejong Kim, et al._ | [Link](https://arxiv.org/abs/2409.08143) | &#x274C; | [BraTS24_2](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.AdultGliomaPostTreatmentAlgorithms.BraTS24_2) |
142
+ | 2024 | 3rd | _Adrian Celaya_ | N/A | &#x2705; | [BraTS24_3](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.AdultGliomaPostTreatmentAlgorithms.BraTS24_3) |
143
+
144
+ </details>
145
+ <br>
146
+
147
+ #### BraTS-Africa Segmentation
148
+ > Adult Glioma Segmentation on brain MRI exams in Sub-Sahara-Africa patient population.
149
+ <details>
150
+ <summary> Usage example (code) and top 3 participants </summary>
151
+ <br>
152
+
153
+ ```python
154
+ from brats import AfricaSegmenter
155
+ from brats.constants import AfricaAlgorithms
156
+
157
+ segmenter = AfricaSegmenter(algorithm=AfricaAlgorithms.BraTS23_1, cuda_devices="0")
158
+ # these parameters are optional, by default the winning algorithm will be used on cuda:0
159
+ segmenter.infer_single(
160
+ t1c="path/to/t1c.nii.gz",
161
+ t1n="path/to/t1n.nii.gz",
162
+ t2f="path/to/t2f.nii.gz",
163
+ t2w="path/to/t2w.nii.gz",
164
+ output_file="segmentation.nii.gz",
165
+ )
166
+ ```
167
+
168
+ **Class:** `brats.AfricaSegmenter` ([Docs](https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.AfricaSegmenter))
169
+ <br>
170
+ **Challenge Paper 2023** [Link](https://doi.org/10.48550/arXiv.2305.19369)
171
+ <br>
172
+ **Challenge Paper 2024**: N/A
173
+ <br>
174
+
175
+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
176
+ | ---- | ---- | -------------------------- | ----- | ----------- | --------------------------------------------------------------------------------------------------------------- |
177
+ | 2024 | 1st | _Zhifan Jiang et al._ | N/A | &#x274C; | [BraTS24_1](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.AfricaAlgorithms.BraTS24_1) |
178
+ | 2024 | 2nd | _Long Bai, et al._ | N/A | &#x2705; | [BraTS24_2](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.AfricaAlgorithms.BraTS24_2) |
179
+ | 2024 | 3rd | _Sarim Hashmi, et al._ | [Link](https://doi.org/10.48550/arXiv.2411.15872) | &#x274C; | [BraTS24_3](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.AfricaAlgorithms.BraTS24_3) |
180
+ | 2023 | 1st | _Andriy Myronenko, et al._ | TODO | &#x274C; | [BraTS23_1](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.AfricaAlgorithms.BraTS23_1) |
181
+ | 2023 | 2nd | _Alyssa R Amod, et al._ | [Link](https://doi.org/10.1007/978-3-031-76163-8_22) | &#x274C; | [BraTS23_2](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.AfricaAlgorithms.BraTS23_2) |
182
+ | 2023 | 3rd | _Ziyan Huang, et al._ | [Link](https://doi.org/10.1007/978-3-031-76163-8_13) | &#x2705; | [BraTS23_3](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.AfricaAlgorithms.BraTS23_3) |
183
+
184
+ </details>
185
+ <br>
186
+
187
+ #### Meningioma Segmentation
188
+ > Segmentation of Meningioma on brain MRI exams.
189
+ <details>
190
+ <summary> Usage example (code) and top 3 participants </summary>
191
+ <br>
192
+
193
+ Unlike other segmentation challenges, the expected inputs for the Meningioma Segmentation Algorithms differ between years.
194
+ - _2023_: All 4 modalities are used (t1c, t1n, t2f, t2w)
195
+ - _2024_: Only t1c is used
196
+
197
+ Therefore, the usage differs slightly, depending on which algorithm is used. To understand why, please refer to the [2024 challenge manuscript](https://arxiv.org/abs/2405.18383).
198
+
199
+ ```python
200
+ from brats import MeningiomaSegmenter
201
+ from brats.constants import MeningiomaAlgorithms
202
+
203
+ ### Example for 2023 algorithms
204
+ segmenter = MeningiomaSegmenter(algorithm=MeningiomaAlgorithms.BraTS23_1, cuda_devices="0")
205
+ # these parameters are optional, by default the winning algorithm will be used on cuda:0
206
+ segmenter.infer_single(
207
+ t1c="path/to/t1c.nii.gz",
208
+ t1n="path/to/t1n.nii.gz",
209
+ t2f="path/to/t2f.nii.gz",
210
+ t2w="path/to/t2w.nii.gz",
211
+ output_file="segmentation_23.nii.gz",
212
+ )
213
+
214
+ ### Example for 2024 algorithms
215
+ segmenter = MeningiomaSegmenter(algorithm=MeningiomaAlgorithms.BraTS24_1, cuda_devices="0")
216
+ segmenter.infer_single(
217
+ t1c="path/to/t1c.nii.gz",
218
+ output_file="segmentation_24.nii.gz",
219
+ )
220
+ ```
221
+
222
+ **Class:** `brats.MeningiomaSegmenter` ([Docs](https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.MeningiomaSegmenter))
223
+ <br>
224
+ **Challenge Paper 2024** [Link](https://arxiv.org/abs/2405.18383)
225
+ <br>
226
+ **Challenge Paper 2023** [Link](https://doi.org/10.48550/arXiv.2305.07642)
227
+ <br>
228
+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
229
+ | ---- | ---- | -------------------------- | ----- | ----------- | ------------------------------------------------------------------------------------------------------------------- |
230
+ | 2024 | 1st | _Valeria Abramova_ | N/A | &#x274C; | [BraTS24_1](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.MeningiomaAlgorithms.BraTS24_1) |
231
+ | 2024 | 2nd | _Mehdi Astaraki_ | N/A | &#x274C; | [BraTS24_2](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.MeningiomaAlgorithms.BraTS24_2) |
232
+ | 2024 | 3rd | _Andre Ferreira, et al._ | [Link](https://arxiv.org/html/2411.04632v1) | &#x2705; | [BraTS24_3](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.MeningiomaAlgorithms.BraTS24_3) |
233
+ | 2023 | 1st | _Andriy Myronenko, et al._ | N/A | &#x274C; | [BraTS23_1](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.MeningiomaAlgorithms.BraTS23_1) |
234
+ | 2023 | 2nd | _Ziyan Huang, et al._ | [Link](https://doi.org/10.1007/978-3-031-76163-8_13) | &#x2705; | [BraTS23_2](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.MeningiomaAlgorithms.BraTS23_2) |
235
+ | 2023 | 3rd | _Daniel Capell'an-Mart'in et al._ | [Link](https://api.semanticscholar.org/CorpusID:272599903) | &#x274C; | [BraTS23_3](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.MeningiomaAlgorithms.BraTS23_3) |
236
+
237
+ </details>
238
+ <br>
239
+
240
+ #### Brain Metastases Segmentation
241
+ > Segmentation on brain metastases on MRI exams for pre- and post-treatment cases.
242
+ <details>
243
+ <summary> Usage example (code) and top 3 participants </summary>
244
+ <br>
245
+
246
+ ```python
247
+ from brats import MetastasesSegmenter
248
+ from brats.constants import MetastasesAlgorithms
249
+
250
+ segmenter = MetastasesSegmenter(algorithm=MetastasesAlgorithms.BraTS23_1, cuda_devices="0")
251
+ # these parameters are optional, by default the winning algorithm will be used on cuda:0
252
+ segmenter.infer_single(
253
+ t1c="path/to/t1c.nii.gz",
254
+ t1n="path/to/t1n.nii.gz",
255
+ t2f="path/to/t2f.nii.gz",
256
+ t2w="path/to/t2w.nii.gz",
257
+ output_file="segmentation.nii.gz",
258
+ )
259
+
260
+ ```
261
+ > Note: If you're interested in Brain Metastases Segmentation, the [BrainLes AURORA package](https://github.com/BrainLesion/AURORA#aurora) may also be of interest.
262
+ <br>
263
+
264
+ **Class:** `brats.MetastasesSegmenter` ([Docs](https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.MetastasesSegmenter))
265
+ <br>
266
+ **Challenge Paper 2023** [Link](https://doi.org/10.48550/arXiv.2306.00838)
267
+ <br>
268
+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
269
+ | ---- | ---- | -------------------------- | ----- | ----------- | ------------------------------------------------------------------------------------------------------------------- |
270
+ | 2023 | 1st | _Andriy Myronenko, et al._ | N/A | &#x274C; | [BraTS23_1](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.MetastasesAlgorithms.BraTS23_1) |
271
+ | 2023 | 2nd | _Siwei Yang, et al._ | [Link](https://doi.org/10.1007/978-3-031-76163-8_17) | &#x274C; | [BraTS23_2](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.MetastasesAlgorithms.BraTS23_2) |
272
+ | 2023 | 3rd | _Ziyan Huang, et al._ | [Link](https://doi.org/10.1007/978-3-031-76163-8_13) | &#x2705; | [BraTS23_3](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.MetastasesAlgorithms.BraTS23_3) |
273
+
274
+ </details>
275
+ <br>
276
+
277
+ #### Pediatric Segmentation
278
+ > Segmentation of pediatric brain tumors on MRI exams.
279
+ <details>
280
+ <summary> Usage example (code) and top 3 participants </summary>
281
+ <br>
282
+
283
+ ```python
284
+ from brats import PediatricSegmenter
285
+ from brats.constants import PediatricAlgorithms
286
+
287
+ segmenter = PediatricSegmenter(algorithm=PediatricAlgorithms.BraTS23_1, cuda_devices="0")
288
+ # these parameters are optional, by default the winning algorithm will be used on cuda:0
289
+ segmenter.infer_single(
290
+ t1c="path/to/t1c.nii.gz",
291
+ t1n="path/to/t1n.nii.gz",
292
+ t2f="path/to/t2f.nii.gz",
293
+ t2w="path/to/t2w.nii.gz",
294
+ output_file="segmentation.nii.gz",
295
+ )
296
+ ```
297
+ > Note: If you're interested in Pediatric Segmentation, the [BrainLes PeTu package](https://github.com/BrainLesion/PeTu?tab=readme-ov-file#petu) may also be of interest.
298
+ <br>
299
+ **Class:** `brats.PediatricSegmenter` ([Docs](https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.PediatricSegmenter))
300
+ <br>
301
+ **Challenge Paper 2024** [Link](https://doi.org/10.48550/arXiv.2404.15009)
302
+ <br>
303
+ **Challenge Paper 2023** [Link](https://doi.org/10.48550/arXiv.2305.17033)
304
+ <br>
305
+
306
+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
307
+ | ---- | ---- | -------------------------- | ----- | ----------- | ------------------------------------------------------------------------------------------------------------------ |
308
+ | 2024 | 1st | _Tim Mulvany, et al._ | [Link](https://doi.org/10.48550/arXiv.2410.14020)| &#x274C; | [BraTS24_1](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.PediatricAlgorithms.BraTS24_1) |
309
+ | 2024 | 2nd | _Mehdi Astaraki_ | N/A | &#x274C; | [BraTS24_2](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.PediatricAlgorithms.BraTS24_2) |
310
+ | 2024 | 3rd | _Sarim Hashmi, et al._ | [Link](https://doi.org/10.48550/arXiv.2411.15872)| &#x274C; | [BraTS24_3](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.PediatricAlgorithms.BraTS24_3) |
311
+ | 2023 | 1st | _Zhifan Jiang et al._ | [Link](https://api.semanticscholar.org/CorpusID:272599903) | &#x274C; | [BraTS23_1](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.PediatricAlgorithms.BraTS23_1) |
312
+ | 2023 | 2nd | _Andriy Myronenko, et al._ | N/A | &#x274C; | [BraTS23_2](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.PediatricAlgorithms.BraTS23_2) |
313
+ | 2023 | 3rd | _Yubo Zhou_ | [Link](https://doi.org/10.1007/978-3-031-76163-8_5) | &#x274C; | [BraTS23_3](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.PediatricAlgorithms.BraTS23_3) |
314
+
315
+ </details>
316
+ <br>
317
+
318
+ #### Generalizability Across Tumors (BraTS-GoAT) Segmentation
319
+ > Segmentation algorithm, adapting and generalizing to different brain tumors with segmentation labels of different tumor sub-regions.
320
+ <details>
321
+ <summary> Usage example (code) and top 3 participants </summary>
322
+ <br>
323
+
324
+ ```python
325
+ from brats import GoATSegmenter
326
+ from brats.constants import GoATAlgorithms
327
+
328
+ segmenter = GoATSegmenter(algorithm=GoATAlgorithms.BraTS24_1, cuda_devices="0")
329
+ # these parameters are optional, by default the winning algorithm will be used on cuda:0
330
+ segmenter.infer_single(
331
+ t1c="path/to/t1c.nii.gz",
332
+ t1n="path/to/t1n.nii.gz",
333
+ t2f="path/to/t2f.nii.gz",
334
+ t2w="path/to/t2w.nii.gz",
335
+ output_file="segmentation.nii.gz",
336
+ )
337
+ ```
338
+
339
+ **Class:** `brats.PediatricSegmenter` ([Docs](https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.PediatricSegmenter))
340
+ <br>
341
+ **Challenge Paper 2024:** N/A
342
+ <br>
343
+
344
+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
345
+ | ---- | ---- | -------------------------- | ----- | ----------- | ------------------------------------------------------------------------------------------------------------- |
346
+ | 2024 | 1st | _Frank Miao, Shengjie Niu_ | N/A | &#x274C; | [BraTS24_1](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.GoATAlgorithms.BraTS24_1) |
347
+
348
+ </details>
349
+ <br>
350
+
351
+ ### Inpainting Challenge
352
+ > Algorithm to realistically synthesize and fill 3D healthy brain tissue in a region affected by glioma in brain MRI exams.
353
+ <details>
354
+ <summary> Usage example (code) and top 3 participants </summary>
355
+ <br>
356
+
357
+
358
+ ```python
359
+ from brats import Inpainter
360
+ from brats.constants import InpaintingAlgorithms
361
+
362
+ inpainter = Inpainter(algorithm=InpaintingAlgorithms.BraTS24_1, cuda_devices="0")
363
+ inpainter.infer_single(
364
+ t1n="path/to/voided_t1n.nii.gz",
365
+ mask="path/to/mask.nii.gz",
366
+ output_file="inpainting.nii.gz",
367
+ )
368
+ ```
369
+
370
+ **Class:** `brats.Inpainter` ([Docs](https://brats.readthedocs.io/en/latest/core/inpainting_algorithms.html#brats.core.inpainting_algorithms.Inpainter))
371
+ <br>
372
+ **Challenge Paper 2023 and 2024** [Link](https://arxiv.org/pdf/2305.08992)
373
+ <br>
374
+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
375
+ | ---- | ---- | ---------------------------------- | ----- | ----------- | ------------------------------------------------------------------------------------------------------------------- |
376
+ | 2024 | 1st | _Ke Chen, Juexin Zhang, Ying Weng_ | N/A | &#x2705; | [BraTS24_1](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.InpaintingAlgorithms.BraTS24_1) |
377
+ | 2024 | 2nd | _André Ferreira, et al._ | N/A | &#x274C; | [BraTS24_2](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.InpaintingAlgorithms.BraTS24_2) |
378
+ | 2024 | 3rd | _Alicia Durrer, et al._ | N/A | &#x274C; | [BraTS24_3](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.InpaintingAlgorithms.BraTS24_3) |
379
+ | 2023 | 1st | _Juexin Zhang, et al._ | [Link](https://doi.org/10.1007/978-3-031-76163-8_21) | &#x2705; | [BraTS23_1](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.InpaintingAlgorithms.BraTS23_1) |
380
+ | 2023 | 2nd | _Alicia Durrer, et al._ | [Link](https://doi.org/10.48550/arXiv.2402.17307) | &#x274C; | [BraTS23_2](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.InpaintingAlgorithms.BraTS23_2) |
381
+ | 2023 | 3rd | _Jiayu Huo, et al._ | [Link](https://doi.org/10.1007/978-3-031-76163-8_1) | &#x2705; | [BraTS23_3](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.InpaintingAlgorithms.BraTS23_3) |
382
+
383
+ </details>
384
+ <br>
385
+
386
+ ### Missing MRI Challenge
387
+ > Algorithm to realistically synthesize missing MRI modalities from available sequences to enhance brain tumor segmentation.
388
+ <details>
389
+ <summary> Usage example (code) and top 3 participants </summary>
390
+ <br>
391
+
392
+ ```python
393
+ from brats import MissingMRI
394
+ from brats.constants import MissingMRIAlgorithms
395
+
396
+ missing_mri = MissingMRI(algorithm=MissingMRIAlgorithms.BraTS24_1, cuda_devices="0")
397
+ # Example to synthesize t2f modality (whichever modality is missing will be inferred)
398
+ missing_mri.infer_single(
399
+ t1c="path/to/t1c.nii.gz",
400
+ t1n="path/to/t1n.nii.gz",
401
+ # t2f="path/to/t2f.nii.gz",
402
+ t2w="path/to/t2w.nii.gz",
403
+ output_file="inferred_t2f.nii.gz",
404
+ )
405
+ ```
406
+
407
+ **Class:** `brats.MissingMRI` ([Docs](https://brats.readthedocs.io/en/latest/core/missing_mri_algorithms.html#brats.core.missing_mri_algorithms.MissingMRI))
408
+ <br>
409
+ **Challenge Paper 2024:** N/A
410
+ <br>
411
+ <br>
412
+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
413
+ | ---- | ---- | ----------------------------------------- | ----- | ----------- | ------------------------------------------------------------------------------------------------------------------- |
414
+ | 2024 | 1st | _Jihoon Cho, Seunghyuck Park, Jinah Park_ | N/A | &#x274C; | [BraTS24_1](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.MissingMRIAlgorithms.BraTS24_1) |
415
+ | 2024 | 2nd | _Haowen Pang_ | N/A | &#x274C; | [BraTS24_2](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.MissingMRIAlgorithms.BraTS24_2) |
416
+ | 2024 | 3rd | _Minjoo Lim, Bogyeong Kang_ | N/A | &#x274C; | [BraTS24_3](https://brats.readthedocs.io/en/latest/utils/utils.html#brats.constants.MissingMRIAlgorithms.BraTS24_3) |
417
+
418
+ </details>
419
+
420
+ ---
421
+
422
+ > [!TIP]
423
+ > For a full notebook example with more details, please check here:
424
+ > [![nbviewer](https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.svg)](https://nbviewer.org/github/BrainLesion/tutorials/blob/main/BraTS/tutorial.ipynb)
425
+
426
+ ## Citation
427
+
428
+ If you use BraTS in your research, please cite it to support the development!
429
+
430
+ ```
431
+ TODO: citation will be added asap
432
+ ```
433
+
434
+ ## Contributing
435
+
436
+ We welcome all kinds of contributions from the community!
437
+
438
+ ### Reporting Bugs, Feature Requests, and Questions
439
+
440
+ Please open a new issue [here](https://github.com/BrainLesion/BraTS/issues).
441
+
442
+ ### Code contributions
443
+
444
+ Nice to have you on board! Please have a look at our [CONTRIBUTING.md](CONTRIBUTING.md) file.
445
+