dvlab-research / SA-AutoAug

Scale-aware Automatic Augmentation for Object Detection (CVPR 2021)
Other
196 stars 22 forks source link

Question about bounding boxes augmentation #4

Closed Jasonlee1995 closed 3 years ago

Jasonlee1995 commented 3 years ago

https://github.com/dvlab-research/SA-AutoAug/blob/master/FCOS/fcos_core/augmentations/box_level_augs/geometric_augs.py#L24

I saw the bounding box augmentation codes and I think there are some differences with AutoAugment-Det codes.

https://github.com/tensorflow/tpu/blob/3679ca6b979349dde6da7156be2528428b000c7c/models/official/detection/utils/autoaugment_utils.py#L505

What I understand is AutoAugment-Det implement translate_only_bbox as translate image patch with bounding box unchanged, but SA-AutoAug implement translate bounding boxes also image patches (there may be some redundant object cause of paste)

And just curious why just paste the image patches rather than translate the image patch?

There could be visual artifacts cause of paste on translation

yukang2017 commented 3 years ago

Thanks for your good question. We do this for the following reasons:

  1. If we only translate the image patch, there will leave a blank area on the original image patch, which might be harmful. Thus, we choose to keep the original image patch remained and paste a new one.
  2. There will be more objects/samples for training, if we paste the image patches, which is beneficial.