I’m having some issues with applying transformations to items that have a bounding box.
In this image no transformations were applied and the bounding boxes are applied correctly
Also couldn’t figure out how to use show_batch with the same images but after having a look at a few samples this seems like a legit issue.
Any help would be appreciated.
Thanks
The issue comes from RandomResizedCrop without it the bounding boxes are in the correct place even when using other transforms.
I can’t find any documentation around what transforms can be used with bounding boxes
I think what you need to do is move FlipItem and RandomResizedCrop to item_tfms.
Also fyi RandomResizedCrop might cut out some of your bounding boxes entirely. I tried this approach out with the COCO_TINY dataset and it seems to be working, though that dataset has some weird annotations so it’s hard to tell. Share back what you find by moving those two transforms to item_tfms as I’m curious to see if it works!
I can confirm that moving FlipItem and RandomResizedCrop to item transformations works fine.
It’s a shame that can’t be done on a batch level but from what I can see it makes sense since the BBs are applied per item transformations that change the item position can’t be done on a batch level