-1

When training a YOLOv5s model by specifying the image size, the image size should be the actual size of the images in the dataset or the size to which you want to resize before inputting them to the network?

I have images that have different sizes and I would like to resize them to 640, which would be the size of yolov5's input. This is already done automatically here https://github.com/ultralytics/yolov5 or not?

ing inf
  • 1
  • 1

1 Answers1

0

basically it refer the size to which you want to resize before inputting them to the network. external resizing of images is unnecessary. By specifying the desired image size as a parameter, the system automatically handles resizing and feed into the model.

also please keep in mind yolo doesn't do any changes in the ratio, for example if you image is 1920x1920 and you put imgsz parameter as 640, then it will resize the image to 640x640. but if you input the 1920 x 1080 (16:9), It takes the longest edge, and fit scales it to 640 and fits it in a box. and keep the ratio as it is. in this case 1920 will be reduce to 640, and 1080 will be 360. and finally this 640 x 360 image going to be overlay on a 640 x 640 gray scale surface.

nadhir hasan
  • 124
  • 3