cnn-image-utility v0.0.1
This utility is intended to help generate images for training and test datasets for your neural network to learn from.
What does it do?
It will load all images from the InputImages directory and will generate X copies of that image. In this program X is represented by the variable 'copiesNeeded'. This variable has a default of 800. This utility uses GraphicsMagick to add flaws/features to the images. If you would like to not add flaws/features to the training images, there is a variable called 'addFlaws', just set it to false.
If you choose to leave 'addFlaws' enabled, the utility will draw a black line within a predefined region of the image. The lines are defined by two ordered pairs representing x,y coordinates inside of the image. The values for (x1,y1) and (x2, y2) are randomized with the following ranges:
`x1, x2: 480 - 800
y1, y2: 580 - 1500`
These are defined in the variables 'xOptions' and 'yOptions'.
Finally, the copies are saved to the folder OutputImages. Before running the utility, delete the 'tmp.png' image out out of the InputImages and OutputImages directories. These are just placeholders.
Roadmap Items
I will parameterize the following variables:
copiesNeeded, addFlaws, xOptions, yOptions, inputPath, outputPath
I will also be updating the utility to add flaws/features other than just a line of a fixed width and variable length.
If you have any comments, questions or requests for additional functionality, feel free to reach out to me!
Happy Learning!
8 years ago