Skip to content

Commit 326f246

Browse files
committed
init
Signed-off-by: myron <[email protected]>
1 parent 3093dec commit 326f246

File tree

4 files changed

+2594
-0
lines changed

4 files changed

+2594
-0
lines changed

auto3dseg/tasks/kits23/README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
2+
# KiTS23
3+
4+
TODO
5+
6+
7+
The KiTS dataset is from MICCAI 2023 challenge **[HEad and NeCK TumOR Segmentation and Outcome Prediction (HECKTOR22)](https://hecktor.grand-challenge.org)**. The solution described here won the 1st place in the HECKTOR22 challenge [(NVAUTO team)](https://hecktor.grand-challenge.org/final-leaderboard/):
8+
9+
Andriy Myronenko, Md Mahfuzur Rahman Siddiquee, Dong Yang, Yufan He and Daguang Xu: "Automated head and neck tumor segmentation from 3D PET/CT". In MICCAI (2022). [arXiv](https://arxiv.org/abs/2209.10809)
10+
11+
![hecktor_PET_CT](./hecktor_data.jpg)
12+
13+
## Task overview
14+
15+
The task is to segment 3D Head and Neck (H&N) tumors and lymph nodes classes from a pair of 3D CT and PET images. The ground truth labels are provided for 524 cases with average 3D CT size of 512x512x200 voxels at 0.98x0.98x3 mm average resolution, and with average 3D PET size of 200x200x200 voxels at 4x4x4 mm. The CT and PET images where rigidly aligned to a common origin, but remain at different sizes and resolutions.
16+
17+
18+
## Auto3DSeg
19+
20+
The HECKTOR22 tutorial is only supported for **SegResNet** algo (since currently it is the only algo with support of multi-resolution input images, such as CT and PET).
21+
Auto3DSeg runs a full workflow including data analysis, and multi-fold training. Please download the dataset into /data/hecktor22 folder first.
22+
23+
24+
### Running based on the input config
25+
26+
The Auto3DSeg can be run using a config **input.yaml**
27+
28+
```bash
29+
python -m monai.apps.auto3dseg AutoRunner run --input='./input.yaml' --algos='segresnet'
30+
```
31+
32+
### Running from python
33+
34+
Alternatively you can also run Auto3DSeg from a python script, where you can customize more options. Please see the comments in **hecktor22.py**
35+
```bash
36+
python hecktor22.py
37+
```
38+
39+
40+
## Validation performance: NVIDIA DGX-1 (8x V100 16G)
41+
42+
The validation results can be obtained by running the training script with MONAI 1.1.0 on NVIDIA DGX-1 with (8x V100 16GB) GPUs. The results below are in terms of **Aggregated Dice**, which was used as the key metric in the challenge [1,2]. The values of the Aggregated Dice slightly differ from a conventional average Dice (which is used by Auto3DSeg by default for all tasks).
43+
44+
45+
| | Fold 0 | Fold 1 | Fold 2 | Fold 3 | Fold 4 | Avg |
46+
|:------:|:------:|:------:|:------:|:------:|:------:|:---:|
47+
| SegResNet | 0.7933 | 0.7862 | 0.7816 |0.8275 | 0.8059 | 0.7989 |
48+
49+
50+
## Data
51+
52+
The HECKTOR22 challenge dataset [2,3] can be downloaded from [here](https://hecktor.grand-challenge.org) after the registration. Each user is responsible for checking the content of the datasets and the applicable licenses and determining if suitable for the intended use. The license for the HECKTOR22 dataset is different than MONAI license.
53+
54+
## References
55+
[1] Andriy Myronenko, Md Mahfuzur Rahman Siddiquee, Dong Yang, Yufan He and Daguang Xu: "Automated head and neck tumor segmentation from 3D PET/CT". In MICCAI (2022). https://arxiv.org/abs/2209.10809
56+
57+
[2] Andrearczyk, V., Oreiller, V., Boughdad, S., Rest, C.C.L., Elhalawani, H., Jreige, M., Prior, J.O., Valli`eres, M., Visvikis, D., Hatt, M., Depeursinge, A.: Overview of the HECKTOR Challenge at MICCAI 2022: Automatic Head and Neck Tumor Segmentation and Outcome Prediction in PET/CT (2023), https://arxiv.org/abs/2201.04138
58+
59+
[3] Oreiller, V., Andrearczyk, V., Jreige, M., Boughdad, S., Elhalawani, H., Castelli, J., Valli`eres, M., Zhu, S., Xie, J., Peng, Y., Iantsen, A., Hatt, M., Yuan, Y., Ma, J., Yang, X., Rao, C., Pai, S., Ghimire, K., Feng, X. Naser, M.A., Fuller, C.D., Yousefirizi, F., Rahmim, A., Chen, H., Wang, L., Prior, J.O., Depeursinge, A.: Head and neck tumor segmentation in PET/CT: The HECKTOR challenge. Medical Image Analysis 77, 102336 (2022)

auto3dseg/tasks/kits23/input.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# KiTS23 Auto3dseg minimal user input
2+
3+
modality: CT # primary modality
4+
dataroot: /data/kits23 # dataset location
5+
datalist: kits23_folds.json # a list of filenames
6+
class_names: # names for tensorboard, and label index grouping specific for KiTS data
7+
- { name: kidney_and_mass, index: [1,2,3] }
8+
- { name: mass, index: [2,3] }
9+
- { name: tumor, index: [2] }
10+
11+
# use final sigmoid activation (instead of the default softmax), since KiTS regions are overlapping (multi-label segmentation)
12+
# this is optional to set, the system auto-detect overlapping labels.
13+
sigmoid: true
14+
15+
16+
roi_size: [192, 192, 192]
17+
18+

auto3dseg/tasks/kits23/kits23.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) MONAI Consortium
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.
11+
12+
from monai.apps.auto3dseg import AutoRunner
13+
14+
# the minimum required code is to create an AutoRunner() and call runner.run()
15+
# the algos must be set to 'segresnet' (since currently it's the only algo with support of multi-resolution input images, such as CT and PET)
16+
# here we also set ensemble=False (optional) to prevent inference on the testing set (since we do not use any testing sets, only the 5-fold cross validation)
17+
# for you own inference (and ensemble) you can provide a list of testing files in "hecktor22_folds.json"
18+
runner = AutoRunner(input="input.yaml", algos="segresnet", work_dir="./work_dir", ensemble=False)
19+
20+
## optionally, we can use just 1-fold (for a quick training of a single model, instead of training 5 folds)
21+
# runner.set_num_fold(1)
22+
23+
## optionally, we can define the path to the dataset here, instead of the one in input.yaml
24+
# runner.set_training_params({"dataroot" : '/data/hecktor22'})
25+
26+
runner.run()

0 commit comments

Comments
 (0)