Kentaro Wada 612b40df6f Update labelme2voc.py and labelme2coco.py accordingly пре 5 година
..
.readme 01f10365f4 Update README.md пре 6 година
data_annotated 9a191df998 Colorize shapes according to uniqLabelList пре 5 година
data_dataset_coco c1b1543e86 Fix labelme2coco.py to parse with pycocotools пре 6 година
data_dataset_voc 0644d0c6b5 Update examples/**/data_dataset_voc пре 5 година
README.md b3c67fec36 Add --validatelabel to labelme пре 5 година
labelme2coco.py 612b40df6f Update labelme2voc.py and labelme2coco.py accordingly пре 5 година
labelme2voc.py 612b40df6f Update labelme2voc.py and labelme2coco.py accordingly пре 5 година
labels.txt 4f2e652483 Add examples/instance_segmentation пре 7 година

README.md

Instance Segmentation Example

Annotation

labelme data_annotated --labels labels.txt --nodata --validatelabel instance
labelme data_annotated --labels labels.txt --nodata --labelflags '{.*: [occluded, truncated], person-\d+: [male]}'

Convert to VOC-format Dataset

# It generates:
#   - data_dataset_voc/JPEGImages
#   - data_dataset_voc/SegmentationClass
#   - data_dataset_voc/SegmentationClassVisualization
#   - data_dataset_voc/SegmentationObject
#   - data_dataset_voc/SegmentationObjectVisualization
./labelme2voc.py data_annotated data_dataset_voc --labels labels.txt


Fig 1. JPEG image (left), JPEG class label visualization (center), JPEG instance label visualization (right)

Note that the label file contains only very low label values (ex. 0, 4, 14), and 255 indicates the __ignore__ label value (-1 in the npy file).
You can see the label PNG file by following.

labelme_draw_label_png data_dataset_voc/SegmentationClassPNG/2011_000003.png   # left
labelme_draw_label_png data_dataset_voc/SegmentationObjectPNG/2011_000003.png  # right

Convert to COCO-format Dataset

# It generates:
#   - data_dataset_coco/JPEGImages
#   - data_dataset_coco/annotations.json
./labelme2coco.py data_annotated data_dataset_coco --labels labels.txt