update numbers
Browse files- README.md +5 -5
- configs/evaluate.json +4 -2
- configs/inference.json +6 -4
- configs/metadata.json +9 -7
- configs/multi_gpu_train.json +8 -4
- configs/train.json +6 -4
- docs/README.md +5 -5
README.md
CHANGED
@@ -59,7 +59,7 @@ The training as performed with the following:
|
|
59 |
- 13: Left adrenal gland
|
60 |
|
61 |
## Performance
|
62 |
-
Dice score was used for evaluating the performance of the model. This model achieves a mean dice score of 0.
|
63 |
|
64 |
#### Training Loss
|
65 |
![The figure shows the training loss curve for 10K iterations.](https://developer.download.nvidia.com/assets/Clara/Images/monai_swin_unetr_btcv_segmentation_trainloss_v1.png)
|
@@ -76,13 +76,13 @@ For more details usage instructions, visit the [MONAI Bundle Configuration Page]
|
|
76 |
#### Execute training:
|
77 |
|
78 |
```
|
79 |
-
python -m monai.bundle run
|
80 |
```
|
81 |
|
82 |
#### Override the `train` config to execute multi-GPU training:
|
83 |
|
84 |
```
|
85 |
-
torchrun --standalone --nnodes=1 --nproc_per_node=2 -m monai.bundle run
|
86 |
```
|
87 |
|
88 |
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).
|
@@ -90,13 +90,13 @@ Please note that the distributed training-related options depend on the actual r
|
|
90 |
#### Override the `train` config to execute evaluation with the trained model:
|
91 |
|
92 |
```
|
93 |
-
python -m monai.bundle run
|
94 |
```
|
95 |
|
96 |
#### Execute inference:
|
97 |
|
98 |
```
|
99 |
-
python -m monai.bundle run
|
100 |
```
|
101 |
|
102 |
#### Export checkpoint to TorchScript file:
|
|
|
59 |
- 13: Left adrenal gland
|
60 |
|
61 |
## Performance
|
62 |
+
Dice score was used for evaluating the performance of the model. This model achieves a mean dice score of 0.8120
|
63 |
|
64 |
#### Training Loss
|
65 |
![The figure shows the training loss curve for 10K iterations.](https://developer.download.nvidia.com/assets/Clara/Images/monai_swin_unetr_btcv_segmentation_trainloss_v1.png)
|
|
|
76 |
#### Execute training:
|
77 |
|
78 |
```
|
79 |
+
python -m monai.bundle run --config_file configs/train.json
|
80 |
```
|
81 |
|
82 |
#### Override the `train` config to execute multi-GPU training:
|
83 |
|
84 |
```
|
85 |
+
torchrun --standalone --nnodes=1 --nproc_per_node=2 -m monai.bundle run --config_file "['configs/train.json','configs/multi_gpu_train.json']"
|
86 |
```
|
87 |
|
88 |
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).
|
|
|
90 |
#### Override the `train` config to execute evaluation with the trained model:
|
91 |
|
92 |
```
|
93 |
+
python -m monai.bundle run --config_file "['configs/train.json','configs/evaluate.json']"
|
94 |
```
|
95 |
|
96 |
#### Execute inference:
|
97 |
|
98 |
```
|
99 |
+
python -m monai.bundle run --config_file configs/inference.json
|
100 |
```
|
101 |
|
102 |
#### Export checkpoint to TorchScript file:
|
configs/evaluate.json
CHANGED
@@ -70,8 +70,10 @@
|
|
70 |
"summary_ops": "*"
|
71 |
}
|
72 |
],
|
73 |
-
"
|
74 |
-
"$setattr(torch.backends.cudnn, 'benchmark', True)"
|
|
|
|
|
75 |
"$@validate#evaluator.run()"
|
76 |
]
|
77 |
}
|
|
|
70 |
"summary_ops": "*"
|
71 |
}
|
72 |
],
|
73 |
+
"initialize": [
|
74 |
+
"$setattr(torch.backends.cudnn, 'benchmark', True)"
|
75 |
+
],
|
76 |
+
"run": [
|
77 |
"$@validate#evaluator.run()"
|
78 |
]
|
79 |
}
|
configs/inference.json
CHANGED
@@ -3,9 +3,9 @@
|
|
3 |
"$import glob",
|
4 |
"$import os"
|
5 |
],
|
6 |
-
"bundle_root": "
|
7 |
"output_dir": "$@bundle_root + '/eval'",
|
8 |
-
"dataset_dir": "/
|
9 |
"datalist": "$list(sorted(glob.glob(@dataset_dir + '/imagesTs/*.nii.gz')))",
|
10 |
"device": "$torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')",
|
11 |
"network_def": {
|
@@ -135,8 +135,10 @@
|
|
135 |
"val_handlers": "@handlers",
|
136 |
"amp": true
|
137 |
},
|
138 |
-
"
|
139 |
-
"$setattr(torch.backends.cudnn, 'benchmark', True)"
|
|
|
|
|
140 |
"$@evaluator.run()"
|
141 |
]
|
142 |
}
|
|
|
3 |
"$import glob",
|
4 |
"$import os"
|
5 |
],
|
6 |
+
"bundle_root": ".",
|
7 |
"output_dir": "$@bundle_root + '/eval'",
|
8 |
+
"dataset_dir": "/workspace/data/RawData/",
|
9 |
"datalist": "$list(sorted(glob.glob(@dataset_dir + '/imagesTs/*.nii.gz')))",
|
10 |
"device": "$torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')",
|
11 |
"network_def": {
|
|
|
135 |
"val_handlers": "@handlers",
|
136 |
"amp": true
|
137 |
},
|
138 |
+
"initialize": [
|
139 |
+
"$setattr(torch.backends.cudnn, 'benchmark', True)"
|
140 |
+
],
|
141 |
+
"run": [
|
142 |
"$@evaluator.run()"
|
143 |
]
|
144 |
}
|
configs/metadata.json
CHANGED
@@ -1,7 +1,9 @@
|
|
1 |
{
|
2 |
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
|
3 |
-
"version": "0.4.
|
4 |
"changelog": {
|
|
|
|
|
5 |
"0.4.2": "fix train params of use_checkpoint",
|
6 |
"0.4.1": "update params to supprot torch.jit.trace torchscript conversion",
|
7 |
"0.4.0": "add name tag",
|
@@ -19,12 +21,12 @@
|
|
19 |
"0.1.0": "complete the model package",
|
20 |
"0.0.1": "initialize the model package structure"
|
21 |
},
|
22 |
-
"monai_version": "1.
|
23 |
-
"pytorch_version": "1.13.
|
24 |
-
"numpy_version": "1.
|
25 |
"optional_packages_version": {
|
26 |
-
"nibabel": "
|
27 |
-
"pytorch-ignite": "0.4.
|
28 |
"einops": "0.4.1"
|
29 |
},
|
30 |
"name": "Swin UNETR BTCV segmentation",
|
@@ -38,7 +40,7 @@
|
|
38 |
"label_classes": "multi-channel data,0:background,1:spleen, 2:Right Kidney, 3:Left Kideny, 4:Gallbladder, 5:Esophagus, 6:Liver, 7:Stomach, 8:Aorta, 9:IVC, 10:Portal and Splenic Veins, 11:Pancreas, 12:Right adrenal gland, 13:Left adrenal gland",
|
39 |
"pred_classes": "14 channels OneHot data, 0:background,1:spleen, 2:Right Kidney, 3:Left Kideny, 4:Gallbladder, 5:Esophagus, 6:Liver, 7:Stomach, 8:Aorta, 9:IVC, 10:Portal and Splenic Veins, 11:Pancreas, 12:Right adrenal gland, 13:Left adrenal gland",
|
40 |
"eval_metrics": {
|
41 |
-
"mean_dice": 0.
|
42 |
},
|
43 |
"intended_use": "This is an example, not to be used for diagnostic purposes",
|
44 |
"references": [
|
|
|
1 |
{
|
2 |
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
|
3 |
+
"version": "0.4.4",
|
4 |
"changelog": {
|
5 |
+
"0.4.4": "update numbers",
|
6 |
+
"0.4.3": "adapt to BundleWorkflow interface",
|
7 |
"0.4.2": "fix train params of use_checkpoint",
|
8 |
"0.4.1": "update params to supprot torch.jit.trace torchscript conversion",
|
9 |
"0.4.0": "add name tag",
|
|
|
21 |
"0.1.0": "complete the model package",
|
22 |
"0.0.1": "initialize the model package structure"
|
23 |
},
|
24 |
+
"monai_version": "1.2.0rc3",
|
25 |
+
"pytorch_version": "1.13.1",
|
26 |
+
"numpy_version": "1.22.2",
|
27 |
"optional_packages_version": {
|
28 |
+
"nibabel": "4.0.1",
|
29 |
+
"pytorch-ignite": "0.4.9",
|
30 |
"einops": "0.4.1"
|
31 |
},
|
32 |
"name": "Swin UNETR BTCV segmentation",
|
|
|
40 |
"label_classes": "multi-channel data,0:background,1:spleen, 2:Right Kidney, 3:Left Kideny, 4:Gallbladder, 5:Esophagus, 6:Liver, 7:Stomach, 8:Aorta, 9:IVC, 10:Portal and Splenic Veins, 11:Pancreas, 12:Right adrenal gland, 13:Left adrenal gland",
|
41 |
"pred_classes": "14 channels OneHot data, 0:background,1:spleen, 2:Right Kidney, 3:Left Kideny, 4:Gallbladder, 5:Esophagus, 6:Liver, 7:Stomach, 8:Aorta, 9:IVC, 10:Portal and Splenic Veins, 11:Pancreas, 12:Right adrenal gland, 13:Left adrenal gland",
|
42 |
"eval_metrics": {
|
43 |
+
"mean_dice": 0.812
|
44 |
},
|
45 |
"intended_use": "This is an example, not to be used for diagnostic purposes",
|
46 |
"references": [
|
configs/multi_gpu_train.json
CHANGED
@@ -24,13 +24,17 @@
|
|
24 |
},
|
25 |
"validate#dataloader#sampler": "@validate#sampler",
|
26 |
"validate#evaluator#val_handlers": "$None if dist.get_rank() > 0 else @validate#handlers",
|
27 |
-
"
|
28 |
"$import torch.distributed as dist",
|
29 |
-
"$dist.init_process_group(backend='nccl')",
|
30 |
"$torch.cuda.set_device(@device)",
|
31 |
"$monai.utils.set_determinism(seed=123)",
|
32 |
-
"$setattr(torch.backends.cudnn, 'benchmark', True)"
|
33 |
-
|
|
|
|
|
|
|
|
|
34 |
"$dist.destroy_process_group()"
|
35 |
]
|
36 |
}
|
|
|
24 |
},
|
25 |
"validate#dataloader#sampler": "@validate#sampler",
|
26 |
"validate#evaluator#val_handlers": "$None if dist.get_rank() > 0 else @validate#handlers",
|
27 |
+
"initialize": [
|
28 |
"$import torch.distributed as dist",
|
29 |
+
"$dist.is_initialized() or dist.init_process_group(backend='nccl')",
|
30 |
"$torch.cuda.set_device(@device)",
|
31 |
"$monai.utils.set_determinism(seed=123)",
|
32 |
+
"$setattr(torch.backends.cudnn, 'benchmark', True)"
|
33 |
+
],
|
34 |
+
"run": [
|
35 |
+
"$@train#trainer.run()"
|
36 |
+
],
|
37 |
+
"finalize": [
|
38 |
"$dist.destroy_process_group()"
|
39 |
]
|
40 |
}
|
configs/train.json
CHANGED
@@ -4,10 +4,10 @@
|
|
4 |
"$import os",
|
5 |
"$import ignite"
|
6 |
],
|
7 |
-
"bundle_root": "
|
8 |
"ckpt_dir": "$@bundle_root + '/models'",
|
9 |
"output_dir": "$@bundle_root + '/eval'",
|
10 |
-
"dataset_dir": "/
|
11 |
"images": "$list(sorted(glob.glob(@dataset_dir + '/imagesTr/*.nii.gz')))",
|
12 |
"labels": "$list(sorted(glob.glob(@dataset_dir + '/labelsTr/*.nii.gz')))",
|
13 |
"val_interval": 5,
|
@@ -318,9 +318,11 @@
|
|
318 |
"amp": true
|
319 |
}
|
320 |
},
|
321 |
-
"
|
322 |
"$monai.utils.set_determinism(seed=123)",
|
323 |
-
"$setattr(torch.backends.cudnn, 'benchmark', True)"
|
|
|
|
|
324 |
"$@train#trainer.run()"
|
325 |
]
|
326 |
}
|
|
|
4 |
"$import os",
|
5 |
"$import ignite"
|
6 |
],
|
7 |
+
"bundle_root": ".",
|
8 |
"ckpt_dir": "$@bundle_root + '/models'",
|
9 |
"output_dir": "$@bundle_root + '/eval'",
|
10 |
+
"dataset_dir": "/workspace/data/RawData/",
|
11 |
"images": "$list(sorted(glob.glob(@dataset_dir + '/imagesTr/*.nii.gz')))",
|
12 |
"labels": "$list(sorted(glob.glob(@dataset_dir + '/labelsTr/*.nii.gz')))",
|
13 |
"val_interval": 5,
|
|
|
318 |
"amp": true
|
319 |
}
|
320 |
},
|
321 |
+
"initialize": [
|
322 |
"$monai.utils.set_determinism(seed=123)",
|
323 |
+
"$setattr(torch.backends.cudnn, 'benchmark', True)"
|
324 |
+
],
|
325 |
+
"run": [
|
326 |
"$@train#trainer.run()"
|
327 |
]
|
328 |
}
|
docs/README.md
CHANGED
@@ -52,7 +52,7 @@ The training as performed with the following:
|
|
52 |
- 13: Left adrenal gland
|
53 |
|
54 |
## Performance
|
55 |
-
Dice score was used for evaluating the performance of the model. This model achieves a mean dice score of 0.
|
56 |
|
57 |
#### Training Loss
|
58 |
![The figure shows the training loss curve for 10K iterations.](https://developer.download.nvidia.com/assets/Clara/Images/monai_swin_unetr_btcv_segmentation_trainloss_v1.png)
|
@@ -69,13 +69,13 @@ For more details usage instructions, visit the [MONAI Bundle Configuration Page]
|
|
69 |
#### Execute training:
|
70 |
|
71 |
```
|
72 |
-
python -m monai.bundle run
|
73 |
```
|
74 |
|
75 |
#### Override the `train` config to execute multi-GPU training:
|
76 |
|
77 |
```
|
78 |
-
torchrun --standalone --nnodes=1 --nproc_per_node=2 -m monai.bundle run
|
79 |
```
|
80 |
|
81 |
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).
|
@@ -83,13 +83,13 @@ Please note that the distributed training-related options depend on the actual r
|
|
83 |
#### Override the `train` config to execute evaluation with the trained model:
|
84 |
|
85 |
```
|
86 |
-
python -m monai.bundle run
|
87 |
```
|
88 |
|
89 |
#### Execute inference:
|
90 |
|
91 |
```
|
92 |
-
python -m monai.bundle run
|
93 |
```
|
94 |
|
95 |
#### Export checkpoint to TorchScript file:
|
|
|
52 |
- 13: Left adrenal gland
|
53 |
|
54 |
## Performance
|
55 |
+
Dice score was used for evaluating the performance of the model. This model achieves a mean dice score of 0.8120
|
56 |
|
57 |
#### Training Loss
|
58 |
![The figure shows the training loss curve for 10K iterations.](https://developer.download.nvidia.com/assets/Clara/Images/monai_swin_unetr_btcv_segmentation_trainloss_v1.png)
|
|
|
69 |
#### Execute training:
|
70 |
|
71 |
```
|
72 |
+
python -m monai.bundle run --config_file configs/train.json
|
73 |
```
|
74 |
|
75 |
#### Override the `train` config to execute multi-GPU training:
|
76 |
|
77 |
```
|
78 |
+
torchrun --standalone --nnodes=1 --nproc_per_node=2 -m monai.bundle run --config_file "['configs/train.json','configs/multi_gpu_train.json']"
|
79 |
```
|
80 |
|
81 |
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).
|
|
|
83 |
#### Override the `train` config to execute evaluation with the trained model:
|
84 |
|
85 |
```
|
86 |
+
python -m monai.bundle run --config_file "['configs/train.json','configs/evaluate.json']"
|
87 |
```
|
88 |
|
89 |
#### Execute inference:
|
90 |
|
91 |
```
|
92 |
+
python -m monai.bundle run --config_file configs/inference.json
|
93 |
```
|
94 |
|
95 |
#### Export checkpoint to TorchScript file:
|