Open naga-karthik opened 1 year ago
It appears that CenterCrop must be used during inference, because without it, we run into this RuntimeError. This is because for inputs with variable sizes, we cannot evenly divide the input volume into multiple sub-volumes hence raising this error.
I expected this error because dealing with variable input sizes during testing is a common problem and CenterCrop is essentially used to make sure that all inputs are uniformly-sized before feeding it to the model for inference.
It appears that CenterCrop must be used during inference
Not necessarily. We've successfully explored inputting larger images at test time, see for example:
Additional digging would be welcome.
As suggested in this comment, the CenterCrop parameters used during training might not work for test images as some might be larger than that. To avoid this, it is best to remove center cropping for testing and check if we still get good predictions.
TODO: