Skip to content

predictor access of coordinates in sliding_window_inference #6794

Closed

Description

@wyli

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

Activity

  1. self-assigned this
    on Jul 29, 2023
  2. added a commit that references this issue on Sep 21, 2023
    f3200b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions