Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CenterCrop during testing #1

Open
1 task done
naga-karthik opened this issue Jan 24, 2023 · 2 comments
Open
1 task done

Remove CenterCrop during testing #1

naga-karthik opened this issue Jan 24, 2023 · 2 comments

Comments

@naga-karthik
Copy link
Member

naga-karthik commented Jan 24, 2023

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:

  • Disable CenterCrop during testing and report findings here
@naga-karthik
Copy link
Member Author

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.

@jcohenadad
Copy link
Member

jcohenadad commented Jan 25, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants