Augmentation yolo

The output of the coco dataset has a bounding in it. If I augment the images during the training then the output bounding box won’t match the image and the result will get false. How to do such an augmentation where the output bounding box also changes with the augmentation.

Its tricky thing to do, but just an idea here if you draw the bounding box on the image before augmentation, augmentation should also affect the bounding box. But still certain image modifications may alter the position of the bounding box in such way that its not a ground truth anymore.

When working with the Berkeley Driving Data, I manually recomputed the bounding box coordinates for all spatial transformations.

I discovered through trial and error that most labeled datasets produce very sparse training inputs for YOLO detectors. By that I mean the labelled objects tend to be in the middle of an image. But that means most of the detector locations will always have all 0 values for their training inputs, which means they aren’t useful in production. If the training data doesn’t have labelled objects that are well distributed in the image, one must perform spatial augmentation to account for it and adjust the bounding box coordinates accordingly. Cheers

1 Like

Very interesting point, it seems even the position of the object is an important parameter in image detection. I would now say the NN network is learning from every pixel not just where label is and needs the data to be sorted carefully to have a good practical system. Hence also the importance of data-centric ML.

I suppose you could do augmentations like adding rain background / brightness and use that to cover cases of rain and low light. These augmentations don’t change the position / shape of the detected object.