restructure readme to match updated template
Browse files- README.md +32 -39
- configs/metadata.json +2 -1
- docs/README.md +32 -39
README.md
CHANGED
@@ -5,16 +5,21 @@ tags:
|
|
5 |
library_name: monai
|
6 |
license: apache-2.0
|
7 |
---
|
8 |
-
# Description
|
9 |
-
A pre-trained model for volumetric (3D) segmentation of the spleen from CT image.
|
10 |
-
|
11 |
# Model Overview
|
|
|
|
|
12 |
This model is trained using the runner-up [1] awarded pipeline of the "Medical Segmentation Decathlon Challenge 2018" using the UNet architecture [2] with 32 training images and 9 validation images.
|
13 |
|
14 |
-
![
|
15 |
|
16 |
## Data
|
17 |
-
The training dataset is
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
## Training configuration
|
20 |
The segmentation of spleen region is formulated as the voxel-wise binary classification. Each voxel is predicted as either foreground (spleen) or background. And the model is optimized with gradient descent method minimizing Dice + cross entropy loss between the predicted mask and ground truth segmentation.
|
@@ -28,73 +33,61 @@ The training was performed with the following:
|
|
28 |
- Learning Rate: 1e-4
|
29 |
- Loss: DiceCELoss
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
2. Resample to resolution 1.5 x 1.5 x 2 mm
|
35 |
-
3. Scale intensity
|
36 |
-
4. Cropping foreground surrounding regions
|
37 |
-
5. Cropping random fixed sized regions of size [96,96,96] with the center being a foreground or background voxel at ratio 1 : 1
|
38 |
-
6. Randomly shifting intensity of the volume
|
39 |
|
40 |
-
|
41 |
-
|
|
|
|
|
42 |
|
43 |
-
|
|
|
44 |
|
45 |
-
|
46 |
-
|
47 |
|
48 |
-
|
|
|
49 |
|
50 |
-
##
|
51 |
-
|
52 |
|
53 |
-
|
54 |
|
55 |
-
|
56 |
-
A graph showing the validation mean Dice over 1260 epochs.
|
57 |
-
|
58 |
-
![](https://developer.download.nvidia.com/assets/Clara/Images/clara_pt_spleen_ct_segmentation_val_2.png) <br>
|
59 |
-
|
60 |
-
|
61 |
-
## commands example
|
62 |
-
Execute training:
|
63 |
|
64 |
```
|
65 |
python -m monai.bundle run training --meta_file configs/metadata.json --config_file configs/train.json --logging_file configs/logging.conf
|
66 |
```
|
67 |
|
68 |
-
Override the `train` config to execute multi-GPU training:
|
69 |
|
70 |
```
|
71 |
torchrun --standalone --nnodes=1 --nproc_per_node=2 -m monai.bundle run training --meta_file configs/metadata.json --config_file "['configs/train.json','configs/multi_gpu_train.json']" --logging_file configs/logging.conf
|
72 |
```
|
73 |
|
74 |
-
Please note that the distributed training
|
75 |
-
Please refer to [pytorch's official tutorial](https://pytorch.org/tutorials/intermediate/ddp_tutorial.html) for more details.
|
76 |
|
77 |
-
Override the `train` config to execute evaluation with the trained model:
|
78 |
|
79 |
```
|
80 |
python -m monai.bundle run evaluating --meta_file configs/metadata.json --config_file "['configs/train.json','configs/evaluate.json']" --logging_file configs/logging.conf
|
81 |
```
|
82 |
|
83 |
-
Override the `train` config and `evaluate` config to execute multi-GPU evaluation:
|
84 |
|
85 |
```
|
86 |
torchrun --standalone --nnodes=1 --nproc_per_node=2 -m monai.bundle run evaluating --meta_file configs/metadata.json --config_file "['configs/train.json','configs/evaluate.json','configs/multi_gpu_evaluate.json']" --logging_file configs/logging.conf
|
87 |
```
|
88 |
|
89 |
-
Execute inference:
|
90 |
|
91 |
```
|
92 |
python -m monai.bundle run evaluating --meta_file configs/metadata.json --config_file configs/inference.json --logging_file configs/logging.conf
|
93 |
```
|
94 |
|
95 |
-
# Disclaimer
|
96 |
-
This is an example, not to be used for diagnostic purposes.
|
97 |
-
|
98 |
# References
|
99 |
[1] Xia, Yingda, et al. "3D Semi-Supervised Learning with Uncertainty-Aware Multi-View Co-Training." arXiv preprint arXiv:1811.12506 (2018). https://arxiv.org/abs/1811.12506.
|
100 |
|
|
|
5 |
library_name: monai
|
6 |
license: apache-2.0
|
7 |
---
|
|
|
|
|
|
|
8 |
# Model Overview
|
9 |
+
A pre-trained model for volumetric (3D) segmentation of the spleen from CT images.
|
10 |
+
|
11 |
This model is trained using the runner-up [1] awarded pipeline of the "Medical Segmentation Decathlon Challenge 2018" using the UNet architecture [2] with 32 training images and 9 validation images.
|
12 |
|
13 |
+
![model workflow](https://developer.download.nvidia.com/assets/Clara/Images/clara_pt_spleen_ct_segmentation_workflow.png)
|
14 |
|
15 |
## Data
|
16 |
+
The training dataset is the Spleen Task from the Medical Segmentation Decathalon. Users can find more details on the datasets at http://medicaldecathlon.com/.
|
17 |
+
|
18 |
+
- Target: Spleen
|
19 |
+
- Modality: CT
|
20 |
+
- Size: 61 3D volumes (41 Training + 20 Testing)
|
21 |
+
- Source: Memorial Sloan Kettering Cancer Center
|
22 |
+
- Challenge: Large-ranging foreground size
|
23 |
|
24 |
## Training configuration
|
25 |
The segmentation of spleen region is formulated as the voxel-wise binary classification. Each voxel is predicted as either foreground (spleen) or background. And the model is optimized with gradient descent method minimizing Dice + cross entropy loss between the predicted mask and ground truth segmentation.
|
|
|
33 |
- Learning Rate: 1e-4
|
34 |
- Loss: DiceCELoss
|
35 |
|
36 |
+
### Input
|
37 |
+
One channel
|
38 |
+
- CT image
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
+
### Output
|
41 |
+
Two channels
|
42 |
+
- Label 1: spleen
|
43 |
+
- Label 0: everything else
|
44 |
|
45 |
+
## Performance
|
46 |
+
Dice score is used for evaluating the performance of the model. This model achieves a mean dice score of 0.96.
|
47 |
|
48 |
+
#### Training Loss
|
49 |
+
![A graph showing the training loss over 1260 epochs (10080 iterations).](https://developer.download.nvidia.com/assets/Clara/Images/clara_pt_spleen_ct_segmentation_train_2.png)
|
50 |
|
51 |
+
#### Validation Dice
|
52 |
+
![A graph showing the validation mean Dice over 1260 epochs.](https://developer.download.nvidia.com/assets/Clara/Images/clara_pt_spleen_ct_segmentation_val_2.png)
|
53 |
|
54 |
+
## MONAI Bundle Commands
|
55 |
+
In addition to the Pythonic APIs, a few command line interfaces (CLI) are provided to interact with the bundle. The CLI supports flexible use cases, such as overriding configs at runtime and predefining arguments in a file.
|
56 |
|
57 |
+
For more details usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).
|
58 |
|
59 |
+
#### Execute training:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
```
|
62 |
python -m monai.bundle run training --meta_file configs/metadata.json --config_file configs/train.json --logging_file configs/logging.conf
|
63 |
```
|
64 |
|
65 |
+
#### Override the `train` config to execute multi-GPU training:
|
66 |
|
67 |
```
|
68 |
torchrun --standalone --nnodes=1 --nproc_per_node=2 -m monai.bundle run training --meta_file configs/metadata.json --config_file "['configs/train.json','configs/multi_gpu_train.json']" --logging_file configs/logging.conf
|
69 |
```
|
70 |
|
71 |
+
Please note that the distributed training-related options depend on the actual running environment; thus, users may need to remove `--standalone`, modify `--nnodes`, or do some other necessary changes according to the machine used. For more details, please refer to [pytorch's official tutorial](https://pytorch.org/tutorials/intermediate/ddp_tutorial.html).
|
|
|
72 |
|
73 |
+
#### Override the `train` config to execute evaluation with the trained model:
|
74 |
|
75 |
```
|
76 |
python -m monai.bundle run evaluating --meta_file configs/metadata.json --config_file "['configs/train.json','configs/evaluate.json']" --logging_file configs/logging.conf
|
77 |
```
|
78 |
|
79 |
+
#### Override the `train` config and `evaluate` config to execute multi-GPU evaluation:
|
80 |
|
81 |
```
|
82 |
torchrun --standalone --nnodes=1 --nproc_per_node=2 -m monai.bundle run evaluating --meta_file configs/metadata.json --config_file "['configs/train.json','configs/evaluate.json','configs/multi_gpu_evaluate.json']" --logging_file configs/logging.conf
|
83 |
```
|
84 |
|
85 |
+
#### Execute inference:
|
86 |
|
87 |
```
|
88 |
python -m monai.bundle run evaluating --meta_file configs/metadata.json --config_file configs/inference.json --logging_file configs/logging.conf
|
89 |
```
|
90 |
|
|
|
|
|
|
|
91 |
# References
|
92 |
[1] Xia, Yingda, et al. "3D Semi-Supervised Learning with Uncertainty-Aware Multi-View Co-Training." arXiv preprint arXiv:1811.12506 (2018). https://arxiv.org/abs/1811.12506.
|
93 |
|
configs/metadata.json
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
{
|
2 |
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
|
3 |
-
"version": "0.3.
|
4 |
"changelog": {
|
|
|
5 |
"0.3.6": "enhance readme with details of model training",
|
6 |
"0.3.5": "update to use monai 1.0.1",
|
7 |
"0.3.4": "enhance readme on commands example",
|
|
|
1 |
{
|
2 |
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
|
3 |
+
"version": "0.3.7",
|
4 |
"changelog": {
|
5 |
+
"0.3.7": "restructure readme to match updated template",
|
6 |
"0.3.6": "enhance readme with details of model training",
|
7 |
"0.3.5": "update to use monai 1.0.1",
|
8 |
"0.3.4": "enhance readme on commands example",
|
docs/README.md
CHANGED
@@ -1,13 +1,18 @@
|
|
1 |
-
# Description
|
2 |
-
A pre-trained model for volumetric (3D) segmentation of the spleen from CT image.
|
3 |
-
|
4 |
# Model Overview
|
|
|
|
|
5 |
This model is trained using the runner-up [1] awarded pipeline of the "Medical Segmentation Decathlon Challenge 2018" using the UNet architecture [2] with 32 training images and 9 validation images.
|
6 |
|
7 |
-
![
|
8 |
|
9 |
## Data
|
10 |
-
The training dataset is
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
## Training configuration
|
13 |
The segmentation of spleen region is formulated as the voxel-wise binary classification. Each voxel is predicted as either foreground (spleen) or background. And the model is optimized with gradient descent method minimizing Dice + cross entropy loss between the predicted mask and ground truth segmentation.
|
@@ -21,73 +26,61 @@ The training was performed with the following:
|
|
21 |
- Learning Rate: 1e-4
|
22 |
- Loss: DiceCELoss
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
2. Resample to resolution 1.5 x 1.5 x 2 mm
|
28 |
-
3. Scale intensity
|
29 |
-
4. Cropping foreground surrounding regions
|
30 |
-
5. Cropping random fixed sized regions of size [96,96,96] with the center being a foreground or background voxel at ratio 1 : 1
|
31 |
-
6. Randomly shifting intensity of the volume
|
32 |
|
33 |
-
|
34 |
-
|
|
|
|
|
35 |
|
36 |
-
|
|
|
37 |
|
38 |
-
|
39 |
-
|
40 |
|
41 |
-
|
|
|
42 |
|
43 |
-
##
|
44 |
-
|
45 |
|
46 |
-
|
47 |
|
48 |
-
|
49 |
-
A graph showing the validation mean Dice over 1260 epochs.
|
50 |
-
|
51 |
-
![](https://developer.download.nvidia.com/assets/Clara/Images/clara_pt_spleen_ct_segmentation_val_2.png) <br>
|
52 |
-
|
53 |
-
|
54 |
-
## commands example
|
55 |
-
Execute training:
|
56 |
|
57 |
```
|
58 |
python -m monai.bundle run training --meta_file configs/metadata.json --config_file configs/train.json --logging_file configs/logging.conf
|
59 |
```
|
60 |
|
61 |
-
Override the `train` config to execute multi-GPU training:
|
62 |
|
63 |
```
|
64 |
torchrun --standalone --nnodes=1 --nproc_per_node=2 -m monai.bundle run training --meta_file configs/metadata.json --config_file "['configs/train.json','configs/multi_gpu_train.json']" --logging_file configs/logging.conf
|
65 |
```
|
66 |
|
67 |
-
Please note that the distributed training
|
68 |
-
Please refer to [pytorch's official tutorial](https://pytorch.org/tutorials/intermediate/ddp_tutorial.html) for more details.
|
69 |
|
70 |
-
Override the `train` config to execute evaluation with the trained model:
|
71 |
|
72 |
```
|
73 |
python -m monai.bundle run evaluating --meta_file configs/metadata.json --config_file "['configs/train.json','configs/evaluate.json']" --logging_file configs/logging.conf
|
74 |
```
|
75 |
|
76 |
-
Override the `train` config and `evaluate` config to execute multi-GPU evaluation:
|
77 |
|
78 |
```
|
79 |
torchrun --standalone --nnodes=1 --nproc_per_node=2 -m monai.bundle run evaluating --meta_file configs/metadata.json --config_file "['configs/train.json','configs/evaluate.json','configs/multi_gpu_evaluate.json']" --logging_file configs/logging.conf
|
80 |
```
|
81 |
|
82 |
-
Execute inference:
|
83 |
|
84 |
```
|
85 |
python -m monai.bundle run evaluating --meta_file configs/metadata.json --config_file configs/inference.json --logging_file configs/logging.conf
|
86 |
```
|
87 |
|
88 |
-
# Disclaimer
|
89 |
-
This is an example, not to be used for diagnostic purposes.
|
90 |
-
|
91 |
# References
|
92 |
[1] Xia, Yingda, et al. "3D Semi-Supervised Learning with Uncertainty-Aware Multi-View Co-Training." arXiv preprint arXiv:1811.12506 (2018). https://arxiv.org/abs/1811.12506.
|
93 |
|
|
|
|
|
|
|
|
|
1 |
# Model Overview
|
2 |
+
A pre-trained model for volumetric (3D) segmentation of the spleen from CT images.
|
3 |
+
|
4 |
This model is trained using the runner-up [1] awarded pipeline of the "Medical Segmentation Decathlon Challenge 2018" using the UNet architecture [2] with 32 training images and 9 validation images.
|
5 |
|
6 |
+
![model workflow](https://developer.download.nvidia.com/assets/Clara/Images/clara_pt_spleen_ct_segmentation_workflow.png)
|
7 |
|
8 |
## Data
|
9 |
+
The training dataset is the Spleen Task from the Medical Segmentation Decathalon. Users can find more details on the datasets at http://medicaldecathlon.com/.
|
10 |
+
|
11 |
+
- Target: Spleen
|
12 |
+
- Modality: CT
|
13 |
+
- Size: 61 3D volumes (41 Training + 20 Testing)
|
14 |
+
- Source: Memorial Sloan Kettering Cancer Center
|
15 |
+
- Challenge: Large-ranging foreground size
|
16 |
|
17 |
## Training configuration
|
18 |
The segmentation of spleen region is formulated as the voxel-wise binary classification. Each voxel is predicted as either foreground (spleen) or background. And the model is optimized with gradient descent method minimizing Dice + cross entropy loss between the predicted mask and ground truth segmentation.
|
|
|
26 |
- Learning Rate: 1e-4
|
27 |
- Loss: DiceCELoss
|
28 |
|
29 |
+
### Input
|
30 |
+
One channel
|
31 |
+
- CT image
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
+
### Output
|
34 |
+
Two channels
|
35 |
+
- Label 1: spleen
|
36 |
+
- Label 0: everything else
|
37 |
|
38 |
+
## Performance
|
39 |
+
Dice score is used for evaluating the performance of the model. This model achieves a mean dice score of 0.96.
|
40 |
|
41 |
+
#### Training Loss
|
42 |
+
![A graph showing the training loss over 1260 epochs (10080 iterations).](https://developer.download.nvidia.com/assets/Clara/Images/clara_pt_spleen_ct_segmentation_train_2.png)
|
43 |
|
44 |
+
#### Validation Dice
|
45 |
+
![A graph showing the validation mean Dice over 1260 epochs.](https://developer.download.nvidia.com/assets/Clara/Images/clara_pt_spleen_ct_segmentation_val_2.png)
|
46 |
|
47 |
+
## MONAI Bundle Commands
|
48 |
+
In addition to the Pythonic APIs, a few command line interfaces (CLI) are provided to interact with the bundle. The CLI supports flexible use cases, such as overriding configs at runtime and predefining arguments in a file.
|
49 |
|
50 |
+
For more details usage instructions, visit the [MONAI Bundle Configuration Page](https://docs.monai.io/en/latest/config_syntax.html).
|
51 |
|
52 |
+
#### Execute training:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
```
|
55 |
python -m monai.bundle run training --meta_file configs/metadata.json --config_file configs/train.json --logging_file configs/logging.conf
|
56 |
```
|
57 |
|
58 |
+
#### Override the `train` config to execute multi-GPU training:
|
59 |
|
60 |
```
|
61 |
torchrun --standalone --nnodes=1 --nproc_per_node=2 -m monai.bundle run training --meta_file configs/metadata.json --config_file "['configs/train.json','configs/multi_gpu_train.json']" --logging_file configs/logging.conf
|
62 |
```
|
63 |
|
64 |
+
Please note that the distributed training-related options depend on the actual running environment; thus, users may need to remove `--standalone`, modify `--nnodes`, or do some other necessary changes according to the machine used. For more details, please refer to [pytorch's official tutorial](https://pytorch.org/tutorials/intermediate/ddp_tutorial.html).
|
|
|
65 |
|
66 |
+
#### Override the `train` config to execute evaluation with the trained model:
|
67 |
|
68 |
```
|
69 |
python -m monai.bundle run evaluating --meta_file configs/metadata.json --config_file "['configs/train.json','configs/evaluate.json']" --logging_file configs/logging.conf
|
70 |
```
|
71 |
|
72 |
+
#### Override the `train` config and `evaluate` config to execute multi-GPU evaluation:
|
73 |
|
74 |
```
|
75 |
torchrun --standalone --nnodes=1 --nproc_per_node=2 -m monai.bundle run evaluating --meta_file configs/metadata.json --config_file "['configs/train.json','configs/evaluate.json','configs/multi_gpu_evaluate.json']" --logging_file configs/logging.conf
|
76 |
```
|
77 |
|
78 |
+
#### Execute inference:
|
79 |
|
80 |
```
|
81 |
python -m monai.bundle run evaluating --meta_file configs/metadata.json --config_file configs/inference.json --logging_file configs/logging.conf
|
82 |
```
|
83 |
|
|
|
|
|
|
|
84 |
# References
|
85 |
[1] Xia, Yingda, et al. "3D Semi-Supervised Learning with Uncertainty-Aware Multi-View Co-Training." arXiv preprint arXiv:1811.12506 (2018). https://arxiv.org/abs/1811.12506.
|
86 |
|