Skip to content

Commit

Permalink
Using EnsureChannelFirst in endoscopic_tool_segmentation (#510)
Browse files Browse the repository at this point in the history
Fixes Project-MONAI/MONAI#7036.

### Description
Using `EnsureChannelFirst` in `endoscopic_tool_segmentation`.

### 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]>
  • Loading branch information
KumoLiu authored Sep 25, 2023
1 parent bdd183e commit a8ec71e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
12 changes: 5 additions & 7 deletions models/endoscopic_tool_segmentation/configs/inference.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@
"transforms": [
{
"_target_": "LoadImaged",
"keys": [
"image"
]
"keys": "image",
"image_only": false
},
{
"_target_": "AsChannelFirstd",
"keys": [
"image"
]
"_target_": "EnsureChannelFirstd",
"keys": "image",
"channel_dim": -1
},
{
"_target_": "Resized",
Expand Down
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.4",
"version": "0.5.5",
"changelog": {
"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",
"0.5.2": "remove the CheckpointLoader from the train.json",
Expand All @@ -25,7 +26,7 @@
"0.1.0": "complete the first version model package",
"0.0.1": "initialize the model package structure"
},
"monai_version": "1.2.0",
"monai_version": "1.3.0rc1",
"pytorch_version": "1.13.1",
"numpy_version": "1.22.2",
"optional_packages_version": {
Expand Down
13 changes: 8 additions & 5 deletions models/endoscopic_tool_segmentation/configs/train.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,18 @@
"keys": [
"image",
"label"
]
],
"image_only": false
},
{
"_target_": "AsChannelFirstd",
"keys": "image"
"_target_": "EnsureChannelFirstd",
"keys": "image",
"channel_dim": -1
},
{
"_target_": "AddChanneld",
"keys": "label"
"_target_": "EnsureChannelFirstd",
"keys": "label",
"channel_dim": "no_channel"
},
{
"_target_": "Resized",
Expand Down

0 comments on commit a8ec71e

Please sign in to comment.