i would like to train a CNN for detection and classification of any kind of signs (mainly laboratory and safety markers) using tensorflow. While I can gather enough training data for the classification training set, using e.g. The Bing API, Iām struggeling to think about a solution to get enough images for the object detection training set. 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.
Asked
Active
Viewed 173 times
2
-
Are you looking for a way to do so with TensorFlow? Or is it OK with any other library like OpenCV? ā T. Ogawa Nov 07 '18 at 20:44
-
Sorry, I would be completely fine with OpenCV. Thanks for your comment ā Moritz Nov 07 '18 at 20:45
1 Answers
0
You can do it with OpenCV as preprocessing.
The algorithm follows:
- Choose a combination of a natural scene image and a sign image randomly.
- Sample random position in the natural scene image where the sign image is pasted.
- Paste the sign image at the position.
- Obtain the pasted image and the position as a part of training data.
Step1 and 2 is done with python standard random
module or numpy
.
Step3 is done with opencv-python. See overlay a smaller image on a larger image python OpenCv .

T. Ogawa
- 364
- 1
- 2
- 13