Chris-hughes10 / Yolov7-training

A clean, modular implementation of the Yolov7 model family, which uses the official pretrained weights, with utilities for training the model on custom (non-COCO) tasks.
GNU General Public License v3.0
116 stars 35 forks source link

Transforms throw errors on non-square images #21

Open d-colwell opened 9 months ago

d-colwell commented 9 months ago

Given 2 images with inverted aspect ratios (image 1: 1000x500, image 2: 500x1000), and a desired image size of 1000x500, the transform A.LongestMaxSize will not pad either image, resulting in a non-batchable image batch. To resolve this, the images should be resized to the largest size that fits within the given dimensions.