-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implemented VoxelMorph #7178
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
Implemented VoxelMorph #7178
Conversation
Signed-off-by: kaibo <ktang@unc.edu>
Signed-off-by: kaibo <ktang@unc.edu>
Signed-off-by: kaibo <ktang@unc.edu>
Signed-off-by: kaibo <ktang@unc.edu>
…r some big models configs and big inputs Signed-off-by: kaibo <ktang@unc.edu>
…script to even smaller to avoid process end with code 139 Signed-off-by: kaibo <ktang@unc.edu>
Signed-off-by: kaibo <ktang@unc.edu>
/black CCing @ebrahimebrahim @brudfors @nvahmadi in case you have comments/suggestions here.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, it looks good to me in general, have you used this to train some baseline successfully? also please help make the test cases smaller if possible (like input size (2, 1, 96, 96, 48)?), so they can run with minimal system resources of the github runner.
Thanks for tagging me, @wyli and congrats @kvttt - this looks like a valuable contribution, awesome in fact! Thanks a lot! :) Some thoughts on this PR:
Apart form that though, as said, I think this is a very welcome addition to MONAI Core. I would recommend to also create an accompanying tutorial. We could use the OASIS subtask from the Learn2Reg challenge as a dataset. Feel free to DM me to sync on this, we are working on this as well, would be great to collaborate on this to avoid duplicate efforts - ideally we could even use your new VoxelMorph class. :) |
Thanks @kvttt! I agree with @nvahmadi that it would be preferable to make use of the networks that are already in MONAI, so that there are not multiple implementations of a UNet let's say. Looking at the Paired Lung CT 3d Registration tutorial; another way of including a VoxelMorph model in MONAI could be to simply add a new tutorial to MONAI, similar to the Lung CT 3d Registration, but replacing the |
…ks more carefully, and changed all 3d test cases to have smaller sizes Signed-off-by: kaibo <ktang@unc.edu>
in the current implementation there's already my_convnet = MyConvNet(...)
model = VoxelMorph(backbone=my_convnet, ...) |
Thanks, @wyli for the instructions. I have not tried running a baseline yet. But I can set up one right now using the Learn2Reg OASIS subtask as @nvahmadi mentioned. As a response to @nvahmadi's second question: I did not use the existing MONAI/monai/networks/nets/unet.py Lines 200 to 204 in c3f9914
And MONAI/monai/networks/nets/unet.py Lines 275 to 277 in c3f9914
I have not looked at
I think this probably would be easier to implement and more intuitive to use, where one is given the option to specify which backbone they want. One can then opt to use the vanilla VoxelMorph or specify any other networks as suggested by @nvahmadi. |
Thanks @kvttt, good point, the UNets in MONAI are all based on convolution for down-/upsampling, whereas VoxelMorph was still relying on pooling. It's a good idea to keep your implementation as the "original VoxelMorph", but offering to pass a different backbone, as @wyli suggested. Great to hear that you're supportive of this idea. :) This will be a very nice and flexible addition. |
This looks amazing! And I agree with earlier comments about have an "original voxelmorph mode" and a "provide your own backbone" mode, including decoupling the current construction of the my_convnet = VoxelMorphConvNet(in_channels, ...)
model = VoxelMorph(backbone=my_convnet, ...`) |
…work), rewrote some of the docstrings, and modified the unit tests accordingly. Specifically, in the voxelmorph framework class, made a few assertions to make sure data line up well with the specified backbone, and added corresponding illegal cases in unit test. Signed-off-by: kaibo <ktang@unc.edu>
In response to @wyli's comment
and @ebrahimebrahim's comment,
I made the distinction clear in my code between |
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
/build |
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
/build |
/build |
Fixes Project-MONAI#5484. ### Description Implemented VoxelMorph and added some docstrings. Checked coding style locally. ### 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). - [x] 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`. - [x] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: kaibo <ktang@unc.edu> Signed-off-by: Mark Graham <markgraham539@gmail.com>
Fixes Project-MONAI#5484. ### Description Implemented VoxelMorph and added some docstrings. Checked coding style locally. ### 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). - [x] 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`. - [x] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: kaibo <ktang@unc.edu> Signed-off-by: Yu0610 <612410030@alum.ccu.edu.tw>
Fixes #5484.
Description
Implemented VoxelMorph and added some docstrings. Checked coding style locally.
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.