I have trained a yolov8 model in order to detect handwritten digits on paper with MNIST dataset. The problem is that the images on the dataset are 416x416 and once the model is trained it gets really good metrics on everything. However when I tray to inference my model on an image (which is not 416x416, for example, a white paper with handwritten digits) it is not detecting anything. Does this mean that in YOLO models, when we train to detect something in images, it must then be inferred with that model in images of the same size? This would not make much sense, since for example yolov8 is able to detect dogs, and I am sure that if I introduce an image with a different size containing a dog, it will detect it.
The images I have used for training are like this one: enter image description here
And the inference image I tried to was: enter image description here