I have been trying to match accuracy for models converted to ONNX with Fastai model. I not able to reproduce same number. There problems is difference in preprocessing done by Fastai and what I have been doing for ONNX input.
For FastAI v2, I am doing the following for simple 2 class image classification task, :
- Image read, open and covert to RGB Image.open().covert(‘RGB’)
- Image resize to 224 keeping media ratio same, with resample mode 2
- Image normalized by dividing 255
I want to replicate default preprocessing done by Fastai without using fastai in production.