DataAugmentation
DataAugmentation copied to clipboard
Image data augmentation tool for training of image recognition algorithm
DataAugmentation ver1.0 2018/10/18 takuya minagawa
- Introduction This program transform input images with rotation, slide, blur, and noise to create training data of image recognition. This tool generate random parameters for these transformations. This image transform proceed in the following order:
- change aspect ratio
- slide
- rotation around Z axis (yaw angle)
- rotation around Y axis (pitch angle)
- rotation around X axis (roll angle)
- Gauss noise
- Gauss blur
- Image flip (horizontal)
- Image flip (vertical)
The coordinate system is that X axis is horizontal, Y axis is vertical, and Z axis = optical axis of camera in an image.
- Install You need boost and OpenCV for build.
boost http://www.boost.org/
OpenCV http://opencv.org/
You can use pre-compiled version of windows. Extract DataAugmentation.zip and start "exe" file. If it does not work, you may need to install VC++2017 runtime. You can download it at: https://go.microsoft.com/fwlink/?LinkId=746572
- How to use Here is the way to use this program:
DataAugmentation
You can indicate image file, directory/folder, or annotation file as input. This program automatically judge which type input is. - Image file can be JPEG, PNG, BMP, PPM, PGM format, etc. - Directory can include several image files. This program automatically finds all image files. - Annotation file must be a text file which has the same format as OpenCV train_cascade uses: =======================================For instance, there are two objects in image file "20100915-1/0000004.jpg" and the coordinates are (x,y,w,h)=(10,14,100,120), (141,151,100,120). Then annotation text must have the following line:
20100915-1/0000004.jpg 2 10 14 100 120 141 151 100 120
"Change aspect ratio" and "slide" work only in case that is an annotation file and a target object has enough margin around its label.