|
1 | 1 |
|
2 | 2 | # KiTS23
|
3 | 3 |
|
4 |
| -The KiTS dataset is from MICCAI 2023 challenge **[The 2023 Kidney and Kidney Tumor Segmentation Challenge (KiTS23)](https://kits-challenge.org/kits23/)**. The solution described here won the 1st place in the KiTS challenge [(NVAUTO team)](https://kits-challenge.org/kits23/#kits23-official-results): |
| 4 | +<img align="right" src="./kits23_example.png" width=30%> |
| 5 | + |
| 6 | +This tutorial shows how to use Auto3DSeg with KiTS 2023 dataset from the MICCAI 2023 challenge **[The 2023 Kidney and Kidney Tumor Segmentation Challenge (KiTS23)](https://kits-challenge.org/kits23/)**. |
| 7 | +The example is based on the 1st place solution in the KiTS challenge [(NVAUTO team)](https://kits-challenge.org/kits23/#kits23-official-results): |
5 | 8 |
|
6 | 9 | Andriy Myronenko, Dong Yang, Yufan He and Daguang Xu: "Automated 3D Segmentation of Kidneys and Tumors in MICCAI KiTS 2023 Challenge". In MICCAI (2023). [arXiv](https://arxiv.org/abs/2310.04110)
|
7 | 10 |
|
8 |
| - |
9 | 11 |
|
10 | 12 | ## Task overview
|
11 | 13 |
|
12 |
| -The task is to segment kidneys, tumors and cysts from 3D CTs. The ground truth labels are provided for 489 cases with resolutions between 0.39x0.39x0.5 and 1x1x5 mm. |
13 |
| - |
| 14 | +The task is to segment kidneys, tumors and cysts from 3D CTs. The dataset contains 489 cases with resolutions rangingn between 0.39x0.39x0.5 and 1x1x5 mm. |
| 15 | +Please download the KiTS23 [dataset](https://kits-challenge.org/kits23/#) and place it in the "/data/kits23" folder to follow this tutorial. |
14 | 16 |
|
15 | 17 | ## Auto3DSeg
|
16 | 18 |
|
17 |
| -The KiTS tutorial is only supported for **SegResNet** algo, Auto3DSeg runs a full workflow including data analysis, and multi-fold training. Please download the dataset into /data/kits23 folder first. |
| 19 | +With Auto3DSeg most segmentation parameters are automatically determined. In this tutorial, we start from a basic automated example, then show how different options can be adjusted if necessary. We use only the **SegResNet** algo here for simplicity, which is a training recepie based on the [segresnet] (https://docs.monai.io/en/latest/networks.html#segresnetds). |
18 | 20 |
|
19 | 21 |
|
20 |
| -### Running based on the input config |
| 22 | +### Running based on the input config (one-liner) |
21 | 23 |
|
22 | 24 | The Auto3DSeg can be run using a config **input.yaml**
|
23 | 25 |
|
24 | 26 | ```bash
|
25 | 27 | python -m monai.apps.auto3dseg AutoRunner run --input=./input.yaml --algos=segresnet
|
26 | 28 | ```
|
27 | 29 |
|
| 30 | +This one line of code will run the full training workflow, including data analysis, multi-fold training, ensembling. The system will adjust parameters based on the data and your available GPU (or multi-GPU) hardware configuration. |
| 31 | +Here we explicitely specified to use only segresnet algo, for other possible parameters of the AutoRunner please see the [monai docs](https://github.com/Project-MONAI/MONAI/blob/main/monai/apps/auto3dseg/auto_runner.py). |
| 32 | + |
| 33 | +The [input.yaml](./input.yaml) describes the dataset (KiTS23) task, and must include at least 3 mandatory fields: mondality (CT), dataset location (here it's /data/kits23) and the dataset manifest json file [kits23_folds.json](./kits23_folds.json). |
| 34 | +Other parameters can optionally be also added to the input.yaml config. For KiTS23 dataset specifically, we include the "class_names" key that show the label grouping for the 3 output classes that KiTS23 challenge asks (which is something specific for the KiTS task) |
| 35 | + |
| 36 | +### Running from the code |
| 37 | + |
| 38 | +If you prefer to run the same thing from code (which will allow more customizations), once can create a python file "example.py" and simply run it as |
| 39 | +```bash |
| 40 | +python example.py |
| 41 | +``` |
| 42 | +```python |
| 43 | +# example.py file |
| 44 | + |
| 45 | +from monai.apps.auto3dseg import AutoRunner |
| 46 | + |
| 47 | +def main(): |
| 48 | + runner = AutoRunner(input='./input.yaml', algos = 'segresnet') |
| 49 | + runner.run() |
| 50 | + |
| 51 | +if __name__ == '__main__': |
| 52 | + main() |
| 53 | +``` |
| 54 | + |
28 | 55 | ## Validation performance: NVIDIA DGX-1 (8x V100 32G)
|
29 | 56 |
|
30 | 57 | The validation results can be obtained by running the training script with MONAI 1.3.0 on NVIDIA DGX-1 with (8x V100 32GB) GPUs. The results below are in terms of average dice.
|
|
0 commit comments