@@ -26,7 +26,7 @@ pip install brats
2626> [ !IMPORTANT]
2727> To run ` brats ` you require a Docker installation. <br >
2828> 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.
3030
3131
3232
@@ -36,13 +36,19 @@ pip install brats
3636- ** Docker** : Installation instructions on the official [ website] ( https://docs.docker.com/get-docker/ )
3737- ** 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 )
3838
39- ## Use Cases and Tutorials
4039
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+
4248
4349``` python
4450from brats import AdultGliomaSegmenter
45- from brats.utils. constants import AdultGliomaAlgorithms
51+ from brats.constants import AdultGliomaAlgorithms
4652
4753segmenter = AdultGliomaSegmenter(algorithm = AdultGliomaAlgorithms.BraTS23_1, cuda_devices = " 0" )
4854# these parameters are optional, by default the winning algorithm will be used on cuda:0
@@ -55,19 +61,10 @@ segmenter.infer_single(
5561)
5662```
5763
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-
6764** Class:** ` brats.AdultGliomaSegmenter ` ([ Docs] ( https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.AdultGliomaSegmenter ) )
6865
69- | Year | Rank | Author | Paper | CPU Support | Key Enum |
70- | ---- | ---- | --------------------------------- | ------------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------ |
66+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
67+ | ---- | ---- | --------------------------------- | ------------------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------- |
7168| 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 ) |
7269| 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 ) |
7370| 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
7875<summary > <strong > BraTS-Africa Segmentation </strong > </summary >
7976<br >
8077
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+
8193** Class:** ` brats.AfricaSegmenter ` ([ Docs] ( https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.AfricaSegmenter ) )
8294
83- | Year | Rank | Author | Paper | CPU Support | Key Enum |
84- | ---- | ---- | -------------------------- | ----- | ----------- | ------------------------------------------------------------------------------------------------------------------- |
95+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
96+ | ---- | ---- | -------------------------- | ----- | ----------- | --------------------------------------------------------------------------------------------------------------------- |
8597| 2023 | 1st | _ Andriy Myronenko, et al._ | TODO | ❌ ; | [ BraTS23_1] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.AfricaAlgorithms.BraTS23_1 ) |
8698| 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 ) |
8799| 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
92104<summary > <strong > Meningioma Segmentation </strong > </summary >
93105<br >
94106
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+
95122** Class:** ` brats.MeningiomaSegmenter ` ([ Docs] ( https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.MeningiomaSegmenter ) )
96123
97- | Year | Rank | Author | Paper | CPU Support | Key Enum |
98- | ---- | ---- | -------------------------- | ----- | ----------- | ----------------------------------------------------------------------------------------------------------------------- |
124+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
125+ | ---- | ---- | -------------------------- | ----- | ----------- | ------------------------------------------------------------------------------------------------------------------------- |
99126| 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 ) |
100127| 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 ) |
101128| 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
106133<summary > <strong > Brain Metastases Segmentation </strong > </summary >
107134<br >
108135
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+
109151** Class:** ` brats.MetastasesSegmenter ` ([ Docs] ( https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.MetastasesSegmenter ) )
110152
111- | Year | Rank | Author | Paper | CPU Support | Key Enum |
112- | ---- | ---- | -------------------------- | ----- | ----------- | ----------------------------------------------------------------------------------------------------------------------- |
153+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
154+ | ---- | ---- | -------------------------- | ----- | ----------- | ------------------------------------------------------------------------------------------------------------------------- |
113155| 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 ) |
114156| 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 ) |
115157| 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
120162<summary > <strong > Pediatric Segmentation </strong > </summary >
121163<br >
122164
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+
123180** Class:** ` brats.PediatricSegmenter ` ([ Docs] ( https://brats.readthedocs.io/en/latest/core/segmentation_algorithms.html#brats.core.segmentation_algorithms.PediatricSegmenter ) )
124181
125- | Year | Rank | Author | Paper | CPU Support | Key Enum |
126- | ---- | ---- | -------------------------- | ----- | ----------- | ---------------------------------------------------------------------------------------------------------------------- |
182+ | Year | Rank | Author | Paper | CPU Support | Key Enum |
183+ | ---- | ---- | -------------------------- | ----- | ----------- | ------------------------------------------------------------------------------------------------------------------------ |
127184| 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 ) |
128185| 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 ) |
129186| 2023 | 3rd | _ Yubo Zhou_ | N/A | ❌ ; | [ BraTS23_3] ( https://brats.readthedocs.io/en/latest/utils/utils.html#brats.utils.constants.PediatricAlgorithms.BraTS23_3 ) |
130187
131188</details >
132189
133- ---
190+ ### Inpainting
134191
135192<details >
136193<summary > <strong > Inpainting </strong > </summary >
137194<br >
138195
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+
139208** Class:** ` brats.Inpainter ` ([ Docs] ( https://brats.readthedocs.io/en/latest/core/inpainting_algorithms.html#brats.core.inpainting_algorithms.Inpainter ) )
140209
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 ) |
146218
147219</details >
148220
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+
149225## Citation
150226
151227If you use BraTS in your research, please cite it to support the development!
0 commit comments