Training fails if no bounding boxes remain in patch after affine transformation #844
Labels
API
This tag is used for small improvements to the readability and usability of the python API.
Feature Request
New feature or request
Using A.Affine like so:
When this transformation rotates all bounding boxes outside of the patch, leaving no boxes inside, training will result in an index error:
I've fixed this one at the dataset level by having a child dataset class repeat the transform until there is an image with a bounding box:
This could also be fixed by setting the target tensor dtype to int, but having negative samples severely degredates the perfomance on my dataset so I've done it this way.
The text was updated successfully, but these errors were encountered: