Merge same instance, same image sub-masks into final categorical mask
Summary
Masks currently download as individual class instances for the same image. Would like to have 1 mask per class segmented.
Steps to reproduce
OS: macOS High Sierra, version: Labelbox-Utils v.0.0.3 from local fork repo,
Called labelbox_export_json
with .json downloaded from LapUS segmentation labelbox.
What is the current bug behavior?
Multiple labels per category per image are downloaded into the created directories, eg: ./241_1562576210064153856_vessel_0.bmp ./241_1562576210064153856_vessel_1.bmp...
What is the expected correct behavior?
Merge same image, same class instances into 1 mask.
Possible fixes
- Extract list of image instances.
- For each image, read labels for different class instances.
- Use or operator to create single mask for class in image.
- save as .png.