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

nnUNetPredictor available in newest nnUNetv2 pip package #38

Closed
hermancollin opened this issue Oct 12, 2023 · 5 comments · Fixed by #39
Closed

nnUNetPredictor available in newest nnUNetv2 pip package #38

hermancollin opened this issue Oct 12, 2023 · 5 comments · Fixed by #39

Comments

@hermancollin
Copy link
Contributor

# ---------------------------------------------------------------
# OPTION 1: Currently, pip install nnUNetv2 does not have the latest version of nnUNet's inference
# which is defined in OPTION 2. Hence, this method
# ---------------------------------------------------------------

Just want to point out that option 2 is now usable with the newest nnUNetv2 pip package (v2.2, released 3 weeks ago)

@valosekj
Copy link
Member

valosekj commented Oct 13, 2023

Nice! Thanks for letting us know!

TODO:

  • update the script

@naga-karthik
Copy link
Member

Thanks @hermancollin for opening the issue! I updated the inference code to follow the latest nnunet version

For run_nnunet_inference.py -- refer to commit f66d627
For run_inference_single_subject.py -- refer to commit 7c46dd9

@hermancollin can you please try testing one of these inference scripts and let me know if it works? Thanks!

@hermancollin
Copy link
Contributor Author

@naga-karthik sure I can test this. Only thing to look out for is that v2.2 requires python >= 3.9 (I know it caused some issues for Mathieu). Maybe this should be specified somewhere.

Also, @valosekj is there a specific reason why the requirements file is a .py file? I thought it was a typo so I renamed the file but if there is a reason for this we can always change it back. Nevertheless, we also need to bump the nnunetv2 version here:

I pushed a patch for this.

Apart from this, there were problems with the script and I was not able to segment images, both with --path-dataset and --path-images. I fixed some obvious typos in variable names but it still doesn't work on my side. I will take a closer look at this tomorrow.

@valosekj
Copy link
Member

valosekj commented Nov 6, 2023

Also, @valosekj is there a specific reason why the requirements file is a .py file? I thought it was a typo so I renamed the file but if there is a reason for this we can always change it back.

Good catch! You're right, it is a typo.

@hermancollin
Copy link
Contributor Author

I fixed some minor stuff in #39. It's possible that run_inference_single_subject is not affected by this change because the user does not have the option to use a folder for segmentation.

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 a pull request may close this issue.

3 participants