cgnorthcutt/benchmarking-keras-pytorch

Image scaling for Inception model in PyTorch incorrect

rwightman opened this issue · 0 comments

For 299 size image you still resize the image to 256 before cropping to 299. You should resize to img_size / 0.875 before cropping. Some of the inception models can get a little better pushing closer to 0.9 for the ratio.

https://github.com/cgnorthcutt/benchmarking-keras-pytorch/blob/master/imagenet_pytorch_get_predictions.py#L95

In the past I've benchmarked Inception v3 weights in PyTorch at prec@1 77.436 prec@5 93.476