Naoya Yamaguchi 65bbb127bd Update draw_label in labelme2voc.py il y a 6 ans
..
.readme 4d4d26ef04 Update README.md il y a 6 ans
data_annotated 4f2e652483 Add examples/instance_segmentation il y a 7 ans
data_dataset_voc c1a5a5ca78 Save pixel-wise labels as PNG file il y a 6 ans
README.md 4d4d26ef04 Update README.md il y a 6 ans
labelme2voc.py 65bbb127bd Update draw_label in labelme2voc.py il y a 6 ans
labels.txt 4f2e652483 Add examples/instance_segmentation il y a 7 ans

README.md

Instance Segmentation Example

Annotation

labelme data_annotated --labels labels.txt --nodata

Convert to VOC-like 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 labels.txt data_annotated data_dataset_voc


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

Note that the reason why the label file is mostly black is it 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