Skip to content

Commit

Permalink
Update to use MONAI v1.3 (#524)
Browse files Browse the repository at this point in the history
Part of #509.

### Status
**Ready**

### Please ensure all the checkboxes:
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Codeformat tests passed locally by running `./runtests.sh
--codeformat`.
- [ ] In-line docstrings updated.
- [x] Update `version` and `changelog` in `metadata.json` if changing an
existing bundle.
- [ ] Please ensure the naming rules in config files meet our
requirements (please refer to: `CONTRIBUTING.md`).
- [ ] Ensure versions of packages such as `monai`, `pytorch` and `numpy`
are correct in `metadata.json`.
- [ ] Descriptions should be consistent with the content, such as
`eval_metrics` of the provided weights and TorchScript modules.
- [ ] Files larger than 25MB are excluded and replaced by providing
download links in `large_file.yml`.
- [ ] Avoid using path that contains personal information within config
files (such as use `/home/your_name/` for `"bundle_root"`).

---------

Signed-off-by: KumoLiu <[email protected]>
Co-authored-by: Wenqi Li <[email protected]>
  • Loading branch information
KumoLiu and wyli authored Oct 16, 2023
1 parent e7affeb commit 1cff8b7
Show file tree
Hide file tree
Showing 19 changed files with 52 additions and 42 deletions.
5 changes: 3 additions & 2 deletions models/endoscopic_tool_segmentation/configs/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
"version": "0.5.5",
"version": "0.5.6",
"changelog": {
"0.5.6": "update to use monai 1.3.0",
"0.5.5": "update AddChanneld with EnsureChannelFirstd and set image_only to False",
"0.5.4": "fix the wrong GPU index issue of multi-node",
"0.5.3": "remove error dollar symbol in readme",
Expand All @@ -26,7 +27,7 @@
"0.1.0": "complete the first version model package",
"0.0.1": "initialize the model package structure"
},
"monai_version": "1.3.0rc1",
"monai_version": "1.3.0",
"pytorch_version": "1.13.1",
"numpy_version": "1.22.2",
"optional_packages_version": {
Expand Down
3 changes: 2 additions & 1 deletion models/pathology_nuclick_annotation/configs/inference.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
{
"_target_": "LoadImaged",
"keys": "image",
"dtype": "uint8"
"dtype": "uint8",
"image_only": false
},
{
"_target_": "EnsureChannelFirstd",
Expand Down
5 changes: 3 additions & 2 deletions models/pathology_nuclick_annotation/configs/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
"version": "0.1.5",
"version": "0.1.6",
"changelog": {
"0.1.6": "set image_only to False",
"0.1.5": "add support for TensorRT conversion and inference",
"0.1.4": "fix the wrong GPU index issue of multi-node",
"0.1.3": "remove error dollar symbol in readme",
Expand All @@ -18,7 +19,7 @@
"0.0.2": "Update The Torch Vision Transform",
"0.0.1": "initialize the model package structure"
},
"monai_version": "1.2.0",
"monai_version": "1.3.0",
"pytorch_version": "1.13.1",
"numpy_version": "1.22.2",
"optional_packages_version": {
Expand Down
6 changes: 4 additions & 2 deletions models/pathology_nuclick_annotation/configs/train.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
"image",
"label"
],
"dtype": "uint8"
"dtype": "uint8",
"image_only": false
},
{
"_target_": "EnsureChannelFirstd",
Expand Down Expand Up @@ -207,7 +208,8 @@
"image",
"label"
],
"dtype": "uint8"
"dtype": "uint8",
"image_only": false
},
{
"_target_": "EnsureChannelFirstd",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"vein",
"excret",
"label"
]
],
"image_only": false
},
{
"_target_": "EnsureChannelFirstd",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
"version": "0.1.0",
"version": "0.2.0",
"changelog": {
"0.2.0": "set image_only to False",
"0.1.0": "complete the model package"
},
"monai_version": "1.2.0",
"monai_version": "1.3.0",
"pytorch_version": "1.13.1",
"numpy_version": "1.24.3",
"optional_packages_version": {
Expand Down
5 changes: 3 additions & 2 deletions models/renalStructures_CECT_segmentation/configs/train.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
"reader": null,
"overwriting": false,
"dtype": "float32",
"as_closest_canonical": true
"as_closest_canonical": true,
"image_only": false
},
{
"_target_": "EnsureChannelFirstd",
Expand Down Expand Up @@ -284,7 +285,7 @@
]
},
{
"_target_": "SplitChanneld",
"_target_": "SplitDimd",
"keys": [
"pred",
"label"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
"keys": "image"
},
{
"_target_": "AddChanneld",
"keys": "image"
"_target_": "EnsureChannelFirstd",
"keys": "image",
"channel_dim": "no_channel"
},
{
"_target_": "Orientationd",
Expand Down Expand Up @@ -90,7 +91,6 @@
"keys": "pred",
"transform": "@preprocessing",
"orig_keys": "image",
"meta_key_postfix": "meta_dict",
"nearest_interp": false,
"to_tensor": true
},
Expand All @@ -102,7 +102,6 @@
{
"_target_": "SaveImaged",
"keys": "pred",
"meta_keys": "pred_meta_dict",
"output_dir": "@output_dir"
}
]
Expand Down
11 changes: 6 additions & 5 deletions models/renalStructures_UNEST_segmentation/configs/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
"version": "0.2.2",
"version": "0.2.3",
"changelog": {
"0.2.3": "update AddChanneld with EnsureChannelFirstd and remove meta_dict",
"0.2.2": "add name tag",
"0.2.1": "fix license Copyright error",
"0.2.0": "update license files",
Expand All @@ -10,16 +11,16 @@
"0.1.1": "fixed the model state dict name",
"0.1.0": "complete the model package"
},
"monai_version": "1.0.0",
"pytorch_version": "1.10.0",
"numpy_version": "1.21.2",
"monai_version": "1.3.0",
"pytorch_version": "1.13.1",
"numpy_version": "1.22.2",
"optional_packages_version": {
"nibabel": "3.2.1",
"pytorch-ignite": "0.4.8",
"einops": "0.4.1",
"fire": "0.4.0",
"timm": "0.6.7",
"torchvision": "0.11.1"
"torchvision": "0.14.1"
},
"name": "Renal structures UNEST segmentation",
"task": "Renal segmentation",
Expand Down
5 changes: 3 additions & 2 deletions models/spleen_deepedit_annotation/configs/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
"version": "0.5.2",
"version": "0.5.3",
"changelog": {
"0.5.3": "update to use monai 1.3.0",
"0.5.2": "update the checkpoint loader logic for inference",
"0.5.1": "add option to validate at training start, and I/O param entries",
"0.5.0": "enable finetune and early stop",
Expand Down Expand Up @@ -29,7 +30,7 @@
"0.1.0": "complete the model package",
"0.0.1": "initialize the model package structure"
},
"monai_version": "1.3.0rc5",
"monai_version": "1.3.0",
"pytorch_version": "1.13.1",
"numpy_version": "1.22.2",
"optional_packages_version": {
Expand Down
2 changes: 1 addition & 1 deletion models/swin_unetr_btcv_segmentation/configs/evaluate.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"metric_details": [
"val_mean_dice"
],
"batch_transform": "$monai.handlers.from_engine(['image_meta_dict'])",
"batch_transform": "$lambda x: [xx['image'].meta for xx in x]",
"summary_ops": "*"
}
],
Expand Down
2 changes: 0 additions & 2 deletions models/swin_unetr_btcv_segmentation/configs/inference.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
"keys": "pred",
"transform": "@preprocessing",
"orig_keys": "image",
"meta_key_postfix": "meta_dict",
"nearest_interp": false,
"to_tensor": true
},
Expand All @@ -107,7 +106,6 @@
{
"_target_": "SaveImaged",
"keys": "pred",
"meta_keys": "pred_meta_dict",
"output_dir": "@output_dir"
}
]
Expand Down
5 changes: 3 additions & 2 deletions models/swin_unetr_btcv_segmentation/configs/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
"version": "0.5.0",
"version": "0.5.1",
"changelog": {
"0.5.1": "remove meta_dict usage",
"0.5.0": "fix the wrong GPU index issue of multi-node",
"0.4.9": "remove error dollar symbol in readme",
"0.4.8": "add RAM usage with CacheDataset",
Expand All @@ -27,7 +28,7 @@
"0.1.0": "complete the model package",
"0.0.1": "initialize the model package structure"
},
"monai_version": "1.2.0",
"monai_version": "1.3.0",
"pytorch_version": "1.13.1",
"numpy_version": "1.22.2",
"optional_packages_version": {
Expand Down
3 changes: 2 additions & 1 deletion models/ventricular_short_axis_3label/configs/inference.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"transforms": [
{
"_target_": "LoadImaged",
"keys": "image"
"keys": "image",
"image_only": false
},
{
"_target_": "EnsureChannelFirstd",
Expand Down
5 changes: 3 additions & 2 deletions models/ventricular_short_axis_3label/configs/metadata.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
"version": "0.3.2",
"version": "0.3.3",
"changelog": {
"0.3.3": "update AddChanneld with EnsureChannelFirstd",
"0.3.2": "add name tag",
"0.3.1": "modify dataset key name",
"0.3.0": "update license files",
"0.2.0": "unify naming",
"0.1.0": "Initial version"
},
"monai_version": "1.0.1",
"monai_version": "1.3.0",
"pytorch_version": "1.13.0",
"numpy_version": "1.21.2",
"optional_packages_version": {
Expand Down
13 changes: 7 additions & 6 deletions models/ventricular_short_axis_3label/configs/train.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@
"keys": "image"
},
{
"_target_": "AddChanneld",
"keys": "@both_keys"
"_target_": "EnsureChannelFirstd",
"keys": "@both_keys",
"channel_dim": "no_channel"
},
{
"_target_": "RandAxisFlipd",
Expand Down Expand Up @@ -98,8 +99,7 @@
"translate_range": 50,
"scale_range": 0.25,
"padding_mode": "$monai.utils.GridSamplePadMode.ZEROS",
"mode": "$(monai.utils.GridSampleMode.BILINEAR,monai.utils.GridSampleMode.NEAREST)",
"as_tensor_output": false
"mode": "$(monai.utils.GridSampleMode.BILINEAR,monai.utils.GridSampleMode.NEAREST)"
},
{
"_target_": "RandSmoothFieldAdjustContrastd",
Expand Down Expand Up @@ -167,8 +167,9 @@
"keys": "image"
},
{
"_target_": "AddChanneld",
"keys": "@both_keys"
"_target_": "EnsureChannelFirstd",
"keys": "@both_keys",
"channel_dim": "no_channel"
},
{
"_target_": "EnsureTyped",
Expand Down
2 changes: 1 addition & 1 deletion models/wholeBody_ct_segmentation/configs/evaluate.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"metric_details": [
"val_mean_dice"
],
"batch_transform": "$monai.handlers.from_engine(['image_meta_dict'])",
"batch_transform": "$lambda x: [xx['image'].meta for xx in x]",
"summary_ops": "*"
}
],
Expand Down
2 changes: 0 additions & 2 deletions models/wholeBody_ct_segmentation/configs/inference.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,12 @@
"keys": "pred",
"transform": "@preprocessing",
"orig_keys": "image",
"meta_key_postfix": "meta_dict",
"nearest_interp": true,
"to_tensor": true
},
{
"_target_": "SaveImaged",
"keys": "pred",
"meta_keys": "pred_meta_dict",
"output_dir": "@output_dir"
}
]
Expand Down
5 changes: 3 additions & 2 deletions models/wholeBody_ct_segmentation/configs/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
"version": "0.2.0",
"version": "0.2.1",
"changelog": {
"0.2.1": "remove meta_dict usage",
"0.2.0": "add support for TensorRT conversion and inference",
"0.1.9": "fix the wrong GPU index issue of multi-node",
"0.1.8": "Update evalaute doc, GPU usage details, and dataset preparation instructions",
Expand All @@ -15,7 +16,7 @@
"0.1.0": "complete the model package",
"0.0.1": "initialize the model package structure"
},
"monai_version": "1.2.0",
"monai_version": "1.3.0",
"pytorch_version": "1.13.1",
"numpy_version": "1.22.2",
"optional_packages_version": {
Expand Down

0 comments on commit 1cff8b7

Please sign in to comment.