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

nnunet inference speed up #2504

Closed
xieweiyi opened this issue Sep 16, 2024 · 1 comment
Closed

nnunet inference speed up #2504

xieweiyi opened this issue Sep 16, 2024 · 1 comment
Assignees
Labels
stale No activity in a long time

Comments

@xieweiyi
Copy link

Hi,

using the command: nnUNet_compile=True nnUNetv2_predict with options -npp 6 -nps 6. now my GPU memory is occupied only half. As far as I understod, this inference code basically runs sliding-window with overlapping tiles, meaning that it processes windows in batches. How could I increase the batch size so that the inference runs faster and my GPU is fully occupied. I tried to increase the -npp and -nps but it seems not having an affect. Am i looking into the right options to tune?

@ykirchhoff
Copy link
Member

Hi @xieweiyi,

nnUNet does not use batch inference but only predicts one patch at a time. Potential speed ups from batch inference are rather small and it's rather complicated to implement for the sliding window approach. There is an open pull request #2153 to process TTA batch wise, which makes much more sense, but speed ups are also rather small and I am not sure how up-to-date that pull request is.

Best,
Yannick

@ykirchhoff ykirchhoff added the stale No activity in a long time label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale No activity in a long time
Projects
None yet
Development

No branches or pull requests

2 participants