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

Add MedNeXt model architectures within MONAI #7786

Closed
surajpaib opened this issue May 21, 2024 · 8 comments · Fixed by #8004
Closed

Add MedNeXt model architectures within MONAI #7786

surajpaib opened this issue May 21, 2024 · 8 comments · Fixed by #8004

Comments

@surajpaib
Copy link
Contributor

Is your feature request related to a problem? Please describe.
There seems to be some demand for ConvNeXt based architectures #4798 implemented in MONAI. Having a ConvNeXt-based segmentation model could be quite useful as it seems to perform very convincingly, based on results from this paper https://arxiv.org/abs/2404.09556

Describe the solution you'd like
Provide an implementation of the MedNeXt model architecture in MONAI

Additional context
I've implemented and benchmarked an implementation of MedNeXt, heavily based on code (https://github.com/MIC-DKFZ/MedNeXt) from the original authors. This implementation has support for dynamic configuration of blocks and follows an API very similar to SegResNetDS and was benchmarked through MONAI bundle config.

Happy to contribute this to MONAI (with the proper source attribution) if there is interest.

@KumoLiu
Copy link
Contributor

KumoLiu commented May 22, 2024

Hi @surajpaib, welcome to the contribution, and if you like you can also add a bundle with your benchmark result into the model zoo repo and tutorial in the tutorial repo! Thanks!

@surajpaib
Copy link
Contributor Author

Hi @KumoLiu, great!

I will make a PR first into the core and then I can probably spend some time later making it a zoo supported bundle, right now I am using lighter with the MONAI bundle config structure and it might need some tweaks.

@rcremese
Copy link
Contributor

Hello @surajpaib,
I'm also interested by implementing MedNeXt in the MONAI core library as a first participation in an open-source project.
So I just wonder where you are with it so far and if you need help for integration.

@surajpaib
Copy link
Contributor Author

Hi @rcremese

I've got the mednext code repurposed from the original repo to a very MONAI SegResNet like interface. I'll need to make the push to my MONAI fork. I'm currently busy on a work trip. I'll hopefully push it over the next week. It would be great to have some help with testing and simple performance benchmarks if that interests you

@rcremese
Copy link
Contributor

rcremese commented Aug 5, 2024

Well, it's my turn to be in hollidays. But sure I would be interested to help on that issue. Just tell me what kind of benchmark you want me to test and wich branch of your fork I should use to test your implementation.

@surajpaib
Copy link
Contributor Author

surajpaib commented Aug 8, 2024

Hi @rcremese,

I've made an early PR for the mednext implementation and added some basic tests similar to the segresnet.

I've tested this version on a training loop as well and it seems to perform well - I ran this a while ago and it seems like I've purged my results.

If you could also run a quick training loop, that would be really nice I think. Nothing else really comes to mind.

@surajpaib
Copy link
Contributor Author

As @KumoLiu suggested, we could also work together to add a tutorial, model bundle and put the test results there

@rcremese
Copy link
Contributor

rcremese commented Aug 13, 2024

Hi @surajpaib ,
I saw your pull request and try to work on it. I can defenitely try to run a training loop with your model.
Can you just tell me where I'm supposed to write my code ?

KumoLiu added a commit that referenced this issue Nov 13, 2024
Fixes #7786 

### Description
Added MedNext architectures implementation for MONAI.

Since a lot of the code is heavily sourced from the original MedNext
repo, https://github.com/MIC-DKFZ/MedNeXt, I wanted to check if there is
an attribution policy with regarded to borrowed source code. I've added
a derivative notice bellow the monai copyright comment. Let me know if
this needs to be changed.

The blocks have been taken almost as is but the network implementation
has been changed largely to allow flexible blocks and follow MONAI
segresnet styling.

### 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.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: Suraj Pai <[email protected]>
Signed-off-by: Robin CREMESE <[email protected]>
Co-authored-by: Robin CREMESE <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: YunLiu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants