Skip to content

predictor access of coordinates in sliding_window_inference #6794

Closed
@wyli

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions