如何使用tensorflow对象检测api添加自定义增强?



目前,在使用TensorFlow对象检测API的预处理步骤中不支持裁剪图像增强。

我的问题是:

1。我如何添加一个自定义增强(切出在这种情况下)到TensorFlow对象检测预处理?

I tried follow:

https://github.com/tensorflow/models/commit/ec4b78f3e7030184b255099c369c52e9b404d71f

在这个pull请求之后,在protoc目录下运行protoc object_detection/protos/*.proto --python_out=.

并尝试使用我在训练对象检测器期间实现的切出增强,我得到以下错误:

google.protobuf.text_format.ParseError: 140:5 : Message type "object_detection.protos.PreprocessingStep" has no field named "CutOut".

另外,对于Cutout的实现,我使用https://www.tensorflow.org/addons/api_docs/python/tfa/image/cutout

任何帮助和指导,非常感谢!: -)

我在Tensorflow的对象检测API方面没有那么丰富的经验,但我认为您可以添加一个名为"random_black_patches"的增强功能,这类似于cutout。你可以在这里的原型中看到它。

如果您看到参数,您可以看到您控制补丁的数量,概率和长宽比。

我在我的pipeline.config中使用它如下:


train_config {
batch_size: 4
data_augmentation_options{
random_black_patches {
}
}
}

最新更新