If you don't have enough train data to train, you might use this algorithm to generate new train images using existing train images.
json = {}
json['version'] = "4.1.1"
json['flags'] = {}
json['shapes'] = []
json['imagePath'] = fname
json['imageData'] = imagedata.imagedata(path).decode('utf-8')
json['imageHeight'] = height
json['imageWidth'] = width
json['lineColor'] = [0,255,0,128]
json['fillColor'] = [255,0,0,128]
- Python == 3.6x
- Set up the environment using one of the following methods:
conda install pillow
conda install opencv
Sometimes if you want to use png file, you may need to change RGBA to RGB Especially when you making train set for YOLACT.
- You can use
RGBA2RGB.py