@@ -26,7 +26,7 @@ pip install brats
26
26
> [ !IMPORTANT]
27
27
> To run ` brats ` you require a Docker installation. <br >
28
28
> Many algorithms also require GPU support (NVIDIA Docker). <br >
29
- > In case you do not have access to a Cuda-capable GPU, the overview tables in the [ Algorithms] ( #algorithms ) section indicate which algorithms are CPU compatible.
29
+ > 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.
30
30
31
31
32
32
@@ -36,13 +36,19 @@ pip install brats
36
36
- ** Docker** : Installation instructions on the official [ website] ( https://docs.docker.com/get-docker/ )
37
37
- ** 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 )
38
38
39
- ## Use Cases and Tutorials
40
39
41
- A minimal example to create a segmentation could look like this:
40
+ ## Available Algorithms and Usage
41
+
42
+ ### Segmentation
43
+ <details open >
44
+
45
+ <summary > <strong > Adult Glioma Segmentation </strong > </summary >
46
+ <br >
47
+
42
48
43
49
``` python
44
50
from brats import AdultGliomaSegmenter
45
- from brats.utils. constants import AdultGliomaAlgorithms
51
+ from brats.constants import AdultGliomaAlgorithms
46
52
47
53
segmenter = AdultGliomaSegmenter(algorithm = AdultGliomaAlgorithms.BraTS23_1, cuda_devices = " 0" )
48
54
# these parameters are optional, by default the winning algorithm will be used on cuda:0
@@ -55,19 +61,10 @@ segmenter.infer_single(
55
61
)
56
62
```
57
63
58
- For more examples and details please refer to our extensive Notebook tutorials here [ NBViewer] ( https://nbviewer.org/github/BrainLesion/tutorials/blob/main/BraTS/tutorial.ipynb ) ([ GitHub] ( https://github.com/BrainLesion/tutorials/blob/main/BraTS/tutorial.ipynb ) ). For the best experience open the notebook in Colab.
59
-
60
- ## Algorithms
61
-
62
- <details open >
63
-
64
- <summary > <strong > Adult Glioma Segmentation </strong > </summary >
65
- <br >
66
-
67
64
** Class:** ` brats.AdultGliomaSegmenter ` ([ Docs] ( https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.AdultGliomaSegmenter ) )
68
65
69
- | Year | Rank | Author | Paper | CPU Support | Key Enum |
70
- | ---- | ---- | --------------------------------- | ------------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------ |
66
+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
67
+ | ---- | ---- | --------------------------------- | ------------------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------- |
71
68
| 2023 | 1st | _ André Ferreira, et al._ | [ Link] ( https://arxiv.org/abs/2402.17317v1 ) | ❌ ; | [ BraTS23_1] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.AdultGliomaAlgorithms.BraTS23_1 ) |
72
69
| 2023 | 2nd | _ Andriy Myronenko, et al._ | N/A | ❌ ; | [ BraTS23_2] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.AdultGliomaAlgorithms.BraTS23_2 ) |
73
70
| 2023 | 3rd | _ Fadillah Adamsyah Maani, et al._ | N/A | ❌ ; | [ BraTS23_3] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.AdultGliomaAlgorithms.BraTS23_3 ) |
@@ -78,10 +75,25 @@ For more examples and details please refer to our extensive Notebook tutorials h
78
75
<summary > <strong > BraTS-Africa Segmentation </strong > </summary >
79
76
<br >
80
77
78
+ ``` python
79
+ from brats import AfricaSegmenter
80
+ from brats.constants import AfricaAlgorithms
81
+
82
+ segmenter = AfricaSegmenter(algorithm = AfricaAlgorithms.BraTS23_1, cuda_devices = " 0" )
83
+ # these parameters are optional, by default the winning algorithm will be used on cuda:0
84
+ segmenter.infer_single(
85
+ t1c = " path/to/t1c.nii.gz" ,
86
+ t1n = " path/to/t1n.nii.gz" ,
87
+ t2f = " path/to/t2f.nii.gz" ,
88
+ t2w = " path/to/t2w.nii.gz" ,
89
+ output_file = " segmentation.nii.gz" ,
90
+ )
91
+ ```
92
+
81
93
** Class:** ` brats.AfricaSegmenter ` ([ Docs] ( https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.AfricaSegmenter ) )
82
94
83
- | Year | Rank | Author | Paper | CPU Support | Key Enum |
84
- | ---- | ---- | -------------------------- | ----- | ----------- | ------------------------------------------------------------------------------------------------------------------- |
95
+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
96
+ | ---- | ---- | -------------------------- | ----- | ----------- | --------------------------------------------------------------------------------------------------------------------- |
85
97
| 2023 | 1st | _ Andriy Myronenko, et al._ | TODO | ❌ ; | [ BraTS23_1] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.AfricaAlgorithms.BraTS23_1 ) |
86
98
| 2023 | 2nd | _ Alyssa R Amod, et al._ | N/A | ❌ ; | [ BraTS23_2] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.AfricaAlgorithms.BraTS23_2 ) |
87
99
| 2023 | 3rd | _ Ziyan Huang, et al._ | N/A | ✅ ; | [ BraTS23_3] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.AfricaAlgorithms.BraTS23_3 ) |
@@ -92,10 +104,25 @@ For more examples and details please refer to our extensive Notebook tutorials h
92
104
<summary > <strong > Meningioma Segmentation </strong > </summary >
93
105
<br >
94
106
107
+ ``` python
108
+ from brats import MeningiomaSegmenter
109
+ from brats.constants import MeningiomaAlgorithms
110
+
111
+ segmenter = MeningiomaSegmenter(algorithm = MeningiomaAlgorithms.BraTS23_1, cuda_devices = " 0" )
112
+ # these parameters are optional, by default the winning algorithm will be used on cuda:0
113
+ segmenter.infer_single(
114
+ t1c = " path/to/t1c.nii.gz" ,
115
+ t1n = " path/to/t1n.nii.gz" ,
116
+ t2f = " path/to/t2f.nii.gz" ,
117
+ t2w = " path/to/t2w.nii.gz" ,
118
+ output_file = " segmentation.nii.gz" ,
119
+ )
120
+ ```
121
+
95
122
** Class:** ` brats.MeningiomaSegmenter ` ([ Docs] ( https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.MeningiomaSegmenter ) )
96
123
97
- | Year | Rank | Author | Paper | CPU Support | Key Enum |
98
- | ---- | ---- | -------------------------- | ----- | ----------- | ----------------------------------------------------------------------------------------------------------------------- |
124
+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
125
+ | ---- | ---- | -------------------------- | ----- | ----------- | ------------------------------------------------------------------------------------------------------------------------- |
99
126
| 2023 | 1st | _ Andriy Myronenko, et al._ | N/A | ❌ ; | [ BraTS23_1] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.MeningiomaAlgorithms.BraTS23_1 ) |
100
127
| 2023 | 2nd | _ Ziyan Huang, et al._ | N/A | ✅ ; | [ BraTS23_2] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.MeningiomaAlgorithms.BraTS23_2 ) |
101
128
| 2023 | 3rd | _ Zhifan Jiang et al._ | N/A | ❌ ; | [ BraTS23_3] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.MeningiomaAlgorithms.BraTS23_3 ) |
@@ -106,10 +133,25 @@ For more examples and details please refer to our extensive Notebook tutorials h
106
133
<summary > <strong > Brain Metastases Segmentation </strong > </summary >
107
134
<br >
108
135
136
+ ``` python
137
+ from brats import MetastasesSegmenter
138
+ from brats.constants import MetastasesAlgorithms
139
+
140
+ segmenter = MetastasesSegmenter(algorithm = MetastasesAlgorithms.BraTS23_1, cuda_devices = " 0" )
141
+ # these parameters are optional, by default the winning algorithm will be used on cuda:0
142
+ segmenter.infer_single(
143
+ t1c = " path/to/t1c.nii.gz" ,
144
+ t1n = " path/to/t1n.nii.gz" ,
145
+ t2f = " path/to/t2f.nii.gz" ,
146
+ t2w = " path/to/t2w.nii.gz" ,
147
+ output_file = " segmentation.nii.gz" ,
148
+ )
149
+ ```
150
+
109
151
** Class:** ` brats.MetastasesSegmenter ` ([ Docs] ( https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.MetastasesSegmenter ) )
110
152
111
- | Year | Rank | Author | Paper | CPU Support | Key Enum |
112
- | ---- | ---- | -------------------------- | ----- | ----------- | ----------------------------------------------------------------------------------------------------------------------- |
153
+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
154
+ | ---- | ---- | -------------------------- | ----- | ----------- | ------------------------------------------------------------------------------------------------------------------------- |
113
155
| 2023 | 1st | _ Andriy Myronenko, et al._ | N/A | ❌ ; | [ BraTS23_1] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.MetastasesAlgorithms.BraTS23_1 ) |
114
156
| 2023 | 2nd | _ Siwei Yang, et al._ | N/A | ❌ ; | [ BraTS23_2] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.MetastasesAlgorithms.BraTS23_2 ) |
115
157
| 2023 | 3rd | _ Ziyan Huang, et al._ | N/A | ✅ ; | [ BraTS23_3] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.MetastasesAlgorithms.BraTS23_3 ) |
@@ -120,32 +162,66 @@ For more examples and details please refer to our extensive Notebook tutorials h
120
162
<summary > <strong > Pediatric Segmentation </strong > </summary >
121
163
<br >
122
164
165
+ ``` python
166
+ from brats import PediatricSegmenter
167
+ from brats.constants import PediatricAlgorithms
168
+
169
+ segmenter = PediatricSegmenter(algorithm = PediatricAlgorithms.BraTS23_1, cuda_devices = " 0" )
170
+ # these parameters are optional, by default the winning algorithm will be used on cuda:0
171
+ segmenter.infer_single(
172
+ t1c = " path/to/t1c.nii.gz" ,
173
+ t1n = " path/to/t1n.nii.gz" ,
174
+ t2f = " path/to/t2f.nii.gz" ,
175
+ t2w = " path/to/t2w.nii.gz" ,
176
+ output_file = " segmentation.nii.gz" ,
177
+ )
178
+ ```
179
+
123
180
** Class:** ` brats.PediatricSegmenter ` ([ Docs] ( https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.PediatricSegmenter ) )
124
181
125
- | Year | Rank | Author | Paper | CPU Support | Key Enum |
126
- | ---- | ---- | -------------------------- | ----- | ----------- | ---------------------------------------------------------------------------------------------------------------------- |
182
+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
183
+ | ---- | ---- | -------------------------- | ----- | ----------- | ------------------------------------------------------------------------------------------------------------------------ |
127
184
| 2023 | 1st | _ Zhifan Jiang et al._ | N/A | ❌ ; | [ BraTS23_1] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.PediatricAlgorithms.BraTS23_1 ) |
128
185
| 2023 | 2nd | _ Andriy Myronenko, et al._ | N/A | ❌ ; | [ BraTS23_2] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.PediatricAlgorithms.BraTS23_2 ) |
129
186
| 2023 | 3rd | _ Yubo Zhou_ | N/A | ❌ ; | [ BraTS23_3] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.PediatricAlgorithms.BraTS23_3 ) |
130
187
131
188
</details >
132
189
133
- ---
190
+ ### Inpainting
134
191
135
192
<details >
136
193
<summary > <strong > Inpainting </strong > </summary >
137
194
<br >
138
195
196
+ ``` python
197
+ from brats import Inpainter
198
+ from brats.constants import InpaintingAlgorithms
199
+
200
+ inpainter = Inpainter(algorithm = InpaintingAlgorithms.BraTS24_1, cuda_devices = " 0" )
201
+ inpainter.infer_single(
202
+ t1n = " path/to/voided_t1n.nii.gz" ,
203
+ mask = " path/to/mask.nii.gz" ,
204
+ output_file = " inpainting.nii.gz" ,
205
+ )
206
+ ```
207
+
139
208
** Class:** ` brats.Inpainter ` ([ Docs] ( https://brats.readthedocs.io/en/latest/core/inpainting_algorithms.html#brats.core.inpainting_algorithms.Inpainter ) )
140
209
141
- | Year | Rank | Author | Paper | CPU Support | Key Enum |
142
- | ---- | ---- | ----------------------- | ----- | ----------- | ----------------------------------------------------------------------------------------------------------------------- |
143
- | 2023 | 1st | _ Juexin Zhang, et al._ | N/A | ✅ ; | [ BraTS23_1] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.InpaintingAlgorithms.BraTS23_1 ) |
144
- | 2023 | 2nd | _ Alicia Durrer, et al._ | N/A | ❌ ; | [ BraTS23_2] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.InpaintingAlgorithms.BraTS23_2 ) |
145
- | 2023 | 3rd | _ Jiayu Huo, et al._ | N/A | ✅ ; | [ BraTS23_3] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.InpaintingAlgorithms.BraTS23_3 ) |
210
+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
211
+ | ---- | ---- | ---------------------------------- | ----- | ----------- | ------------------------------------------------------------------------------------------------------------------------- |
212
+ | 2024 | 1st | _ Ke Chen, Juexin Zhang, Ying Weng_ | N/A | ✅ ; | [ BraTS24_1] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.InpaintingAlgorithms.BraTS24_1 ) |
213
+ | 2024 | 2nd | _ André Ferreira, et al._ | N/A | ❌ ; | [ BraTS24_2] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.InpaintingAlgorithms.BraTS24_2 ) |
214
+ | 2024 | 3rd | _ Team SMINT_ | N/A | ❌ ; | [ BraTS24_3] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.InpaintingAlgorithms.BraTS24_3 ) |
215
+ | 2023 | 1st | _ Juexin Zhang, et al._ | N/A | ✅ ; | [ BraTS23_1] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.InpaintingAlgorithms.BraTS23_1 ) |
216
+ | 2023 | 2nd | _ Alicia Durrer, et al._ | N/A | ❌ ; | [ BraTS23_2] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.InpaintingAlgorithms.BraTS23_2 ) |
217
+ | 2023 | 3rd | _ Jiayu Huo, et al._ | N/A | ✅ ; | [ BraTS23_3] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.InpaintingAlgorithms.BraTS23_3 ) |
146
218
147
219
</details >
148
220
221
+ > [ !TIP]
222
+ > For a full notebook example with more details please check here:
223
+ > [ ![ nbviewer] ( https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.svg )] ( https://nbviewer.org/github/BrainLesion/tutorials/blob/main/BraTS/tutorial.ipynb )
224
+
149
225
## Citation
150
226
151
227
If you use BraTS in your research, please cite it to support the development!
0 commit comments