experiencor / keras-yolo2

Easy training on custom dataset. Various backends (MobileNet and SqueezeNet) supported. A YOLO demo to detect raccoon run entirely in brower is accessible at https://git.io/vF7vI (not on Windows).
MIT License
1.73k stars 784 forks source link

Default augmentation can translate images but not boxes. #446

Open Fafa87 opened 4 years ago

Fafa87 commented 4 years ago

sometimes(iaa.Affine(...)) is used in default augmentation in master which can rotate and translating the image. Boxes stay on the same place with is bad (especially if you have small boxes).

The fix is to use imaug to move bboxes as well. See https://github.com/experiencor/keras-yolo2/issues/107 or Rodrigo fork https://github.com/rodrigo2019/keras_yolo2 (however mind https://github.com/rodrigo2019/keras_yolo2/issues/20).

AIWintermuteAI commented 4 years ago

Hi! I have noticed this problem as well. Augmentation has been fixed in https://github.com/experiencor/keras-yolo3 or alternatively in my project https://github.com/AIWintermuteAI/aXeleRate which also supports other network types(classifier and segnet). You can check dataset augmentation in colab notebook https://colab.research.google.com/github/AIWintermuteAI/aXeleRate/blob/master/resources/aXeleRate_test_detector.ipynb by executing visualize_dataset(img_folder='aXeleRate/sample_datasets/detector/imgs', ann_folder='aXeleRate/sample_datasets/detector/anns', img_size=None, jitter=True)