问题描述
在配置文件中,我们给出了默认的增强选项,如下所示.
In config file, we are given the default Augmentation option as shown below.
data_augmentation_options {
random_horizontal_flip {
}
}
但我想知道它如何与训练图像给出的边界框(地面实况框)值一起工作.所以我查看了 preprocessor.py, random_horizontal_flip() 采用 'boxes=None' 参数.由于配置文件中没有给出参数,我假设这个翻转在进行随机水平翻转时不考虑边界框.
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.
推荐答案
盒子也会被翻转.如果您查看预处理器文件,您会注意到一个映射,该映射定义了张量字典的哪些输入将被传递到预处理函数中.地面实况框被传递到 random_horizontal_flip.
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.
这篇关于Tensorflow 对象检测 API 中的数据增强的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!