2

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.

Moritz
  • 322
  • 3
  • 15

1 Answers1

0

You can do it with OpenCV as preprocessing.

The algorithm follows:

  1. Choose a combination of a natural scene image and a sign image randomly.
  2. Sample random position in the natural scene image where the sign image is pasted.
  3. Paste the sign image at the position.
  4. 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
  • 334
  • 2
  • 9