-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Extension for cross-dimensional inference with SlidingWindowInferer #3458
Description
Is your feature request related to a problem? Please describe.
The request is to have an addition for the SlidingWindowInferer to support inference on, for example, 3D CT scans on a slice-by-slice basis using a 2D model.
Describe the solution you'd like
A simple solution exists ofcourse, where the model is run using SimpleInferer on a slice-by-slice basis and then collected. However, adding this support to SlidingWindowInferer will allow it to be more generalized. A single interface can handle the inference for a 3D volume both with 2D and 3D models.
Describe alternatives you've considered
I've implemented a naive version here: https://github.com/ganslate-team/ganslate/blob/master/ganslate/utils/sliding_window_inferer.py
which looks at the roi_size and the inputs and adds a network_wrapper over the 2D model
Additional context
I would be happy to contribute a better solution if this is interesting to a larger set of user.