After segmentation, if the image contains only one class, this is the effective tool to generate multiple training sample for deep learning model. (ex. yolo)
input
|-- image1.jpg
|-- image2.jpg
|-- ...
python yolo_auto_gen.py --input {input mask dir} --output {output save dir} --type {class of object}
output
|-- image1.txt
|-- image2.txt
|-- ...
If you have multiple classes in an image, you should manually change the class in the text.
python check_box.py --label {label dir} --image {raw image dir} --save {saving dir}