Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Data Augmentation in Tensorflow Object Detection API

In config file, we are given the default Augmentation option as shown below.

data_augmentation_options {
    random_horizontal_flip {
    }
  }

But I wondered how it works with the bounding box(ground truth box) values given with the training images. so I looked at preprocessor.py, random_horizontal_flip() takes 'boxes=None' parameter. Since no argument is given in the config file, I assume this flip does not account bounding box when it does the random horizontal flip.

My question is what arguments do I use to add the value of bounding box in the config file in the code snippet section shown above.

like image 274
snowyBunny Avatar asked Jan 25 '26 12:01

snowyBunny


1 Answers

The boxes will get flipped too. If you look down in the preprocessor file, you'll notice a map that defines what inputs of the tensor dictionary will get passed into the preprocessing function. The groundtruth boxes are passed into random_horizontal_flip.

like image 146
Derek Chow Avatar answered Jan 27 '26 01:01

Derek Chow



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!