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

predictor access of coordinates in sliding_window_inference #6794

Closed
wyli opened this issue Jul 29, 2023 · 0 comments · Fixed by #6795
Closed

predictor access of coordinates in sliding_window_inference #6794

wyli opened this issue Jul 29, 2023 · 0 comments · Fixed by #6795
Assignees
Labels
enhancement New feature or request Feature request

Comments

@wyli
Copy link
Contributor

wyli commented Jul 29, 2023

Is your feature request related to a problem? Please describe.

if sw_batch_size > 1:
win_data = torch.cat([inputs[win_slice] for win_slice in unravel_slice]).to(sw_device)
else:
win_data = inputs[unravel_slice[0]].to(sw_device)
seg_prob_out = predictor(win_data, *args, **kwargs) # batched patch

predictor currently takes a batch of image windows as the primary input, it has no access to the relative position information of the windows with respect to the input whole volume. would be great to add an option to send unravel_slice to predictor.

cc @heyufan1995

@wyli wyli added enhancement New feature or request Feature request labels Jul 29, 2023
@wyli wyli self-assigned this Jul 29, 2023
wyli added a commit that referenced this issue Sep 21, 2023
…6795)

Fixes #6794 


### 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: Wenqi Li <wenqil@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant