Need Help with 1:1 Image Resizing During Training on YOLOv8

Just to be clear, you’re looking to have your model trained using images that are 1920 x 1920 where the image is stretched instead of padded (to maintain aspect ratio)? There is no stretch argument available for the training method, but I think what you mean is that you’re manually doing something with the LetterBox class.

It’s going to be helpful to understand why. Advice on asking for Support was written to explain the reason for this.

I’m not sure why you’d want to train on stretched images. If the images aren’t stretched like this in the final application, then you should not train using stretched images. If the images are stretched in your final application, then it raises additional questions:

  1. Why not correct the stretching?
  2. How are the images you’re using for training not stretched? If you have a custom application you need to train for, collecting images from where the model will be deployed is going to be the best way to train the model.

The training code will resize and pad your images as needed for training and inference. This is done automatically, so there’s not thing extra to do here for model compatibility sake. All of this comes back to the point of knowing why you’re looking to do this specifically?