Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable swinunetr-v2 #6203

Merged
merged 12 commits into from
Mar 22, 2023
Merged

Enable swinunetr-v2 #6203

merged 12 commits into from
Mar 22, 2023

Conversation

heyufan1995
Copy link
Member

Fixes #6183 .

Description

Added a "use_v2" option in swinunetr initialization. Default is false will not affect the original swinunetr.
Once changed to true, will become swinunetr-v2 with 4 additional convolution block.
Tested running from auto3dseg bundles, no change needed for original swinunetr, and works for swinunetr-v2
Tested running from monai research contribution repo for swinuntr, no change needed for original swinunetr, and works for swinunetr-v2
Tested TensorRT, compiled .ts file successfully.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@wyli
Copy link
Contributor

wyli commented Mar 22, 2023

/black

Signed-off-by: monai-bot <[email protected]>
@tangy5
Copy link
Contributor

tangy5 commented Mar 22, 2023

The V2 implementation is great, one more thing to discuss here.
If we use this branching options format, there will be more challenges to use torch.jit.script for torchscript conversion, but now we do not have the plan to support scriptable conversion. Jit.trace should be good enough. Wenqi may have more insights. Thanks!

Copy link
Contributor

@wyli wyli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for confirming @tangy5, I'm merging this for now, and I think for future extensions we should start new classes instead of adding more logic to this class...

@wyli
Copy link
Contributor

wyli commented Mar 22, 2023

/build

@wyli wyli enabled auto-merge (squash) March 22, 2023 17:17
@wyli wyli changed the title Enble swinunetr-v2 Enable swinunetr-v2 Mar 22, 2023
@wyli
Copy link
Contributor

wyli commented Mar 22, 2023

/build

@wyli wyli merged commit 4f8bc59 into Project-MONAI:dev Mar 22, 2023
jak0bw pushed a commit to jak0bw/MONAI that referenced this pull request Mar 28, 2023
Fixes Project-MONAI#6183 .

### Description
Added a "use_v2" option in swinunetr initialization. Default is false
will not affect the original swinunetr.
Once changed to true, will become swinunetr-v2 with 4 additional
convolution block.
Tested running from auto3dseg bundles, no change needed for original
swinunetr, and works for swinunetr-v2
Tested running from monai research contribution repo for swinuntr, no
change needed for original swinunetr, and works for swinunetr-v2
Tested TensorRT, compiled .ts file successfully.

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: heyufan1995 <[email protected]>
jak0bw pushed a commit to jak0bw/MONAI that referenced this pull request Mar 28, 2023
Fixes Project-MONAI#6183 .

### Description
Added a "use_v2" option in swinunetr initialization. Default is false
will not affect the original swinunetr.
Once changed to true, will become swinunetr-v2 with 4 additional
convolution block.
Tested running from auto3dseg bundles, no change needed for original
swinunetr, and works for swinunetr-v2
Tested running from monai research contribution repo for swinuntr, no
change needed for original swinunetr, and works for swinunetr-v2
Tested TensorRT, compiled .ts file successfully.

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: heyufan1995 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve SwinUNETR pipeline by adding SwinUNETR-V2
7 participants