akms
akms

Reputation: 51

Is it right to do inference different patch size than training patch size with segmentation?

I'm training a satellite model with high-resolution images(Higher than 8GB). I generate smaller patches to handle the huge images. Is it right to do inference with a different patch size than training patch size?

exp: Training patch size is 512*512

Inference patch size is 2048*2048 (It's decreasing the processing time and results seems not bad)

*No resizing

Upvotes: 3

Views: 1199

Answers (1)

Shai
Shai

Reputation: 114866

It depends on your model.

If your model is a fully convolutional one, then it has an underlying translation-equivariance property. The prediction of the network is not affected by things outside its receptive field, thus increasing the input size (without resizing) should not affect the prediction.

However, if your model is based on Transformers/Attention then you no longer have translation equivariance, and the receptive field of your network becomes the entire input. Thus, changing the input size will result in a different prediction.

Know your model.

Upvotes: 7

Related Questions