Segmentations to COCO Annotation
When there are many files, it is recommended to write to the file every time a picture is processed
Usage
seg2coco.py
-
inst_dir
: The directory of instance segmentation images. -
sem_dir
: The directory of semantic segmentation images. -
categories
: Assign category according to the value in semantic segmentation.categories = [ {"id": 1, "name": "cube", "supercategory": "object"}, {"id": 2, "name": "monkey", "supercategory": "object"}, ]
-
json_filepath
: Result annotations in json.Find Contours
-
skimage.measure.find_contours
: Highest accuracy, but takes up a lot of space. -
cv2.findContours
Method Detail
-