[英]Automatically make a composite image for cnn training
i would like to train a CNN for detection and classification of any kind of signs (mainly laboratory and safety markers) using tensorflow. 我想训练一个CNN,以使用Tensorflow进行任何类型的标志(主要是实验室标志和安全标记)的检测和分类。 While I can gather enough training data for the classification training set, using eg The Bing API, I'm struggeling to think about a solution to get enough images for the object detection training set.
尽管我可以使用例如Bing API收集分类训练集的足够训练数据,但我仍在努力寻找一种解决方案,以为目标检测训练集获取足够的图像。 Since these markers are mostly not public available, I thought I could make a composite of a natrual scene image with the image of the marker itself, to get a training set.
由于这些标记大多数是不公开的,因此我认为我可以将自然场景图像与标记本身的图像进行合成,以获得训练集。 Is there any way to do that automatically?
有什么办法可以自动做到这一点? I looked at tensorflow data augmentation class, but it seems it only provides functionality for simpler data augmentation tasks.
我看过tensorflow数据增强类,但似乎它仅提供用于更简单的数据增强任务的功能。
You can do it with OpenCV as preprocessing. 您可以使用OpenCV作为预处理。
The algorithm follows: 该算法如下:
Step1 and 2 is done with python standard random
module or numpy
. 步骤1和2是使用python标准
random
模块或numpy
。
Step3 is done with opencv-python. 第3步使用opencv-python完成。 See overlay a smaller image on a larger image python OpenCv .
请参见在较大的图像python OpenCv上覆盖较小的图像 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.