Open Cazual opened 2 years ago
This feature would be very helpful for work I am trying to do too (training a Mask-RCNN model). Are there any alternatives to generating both bounding boxes and segmentation masks for training?
Edit: this is a viable solution https://github.com/facebookresearch/detectron2/issues/485#issuecomment-1107898221
What should it be in segmentation in case of bboxes? LS can export PolygonLabels to COCO as segmentation.
You can calculate the bounding boxes by having the min and max of the coordinates from the masks.
@kodecreer do you have examples with similar coco exports?
The same process from the PyTorch object detection tutorials if you are able to extract just each mask from the image into a black and white photo like traditional Mask-R CNN
pos = np.where(mask)
xmin = np.min(pos[1])
xmax = np.max(pos[1])
ymin = np.min(pos[0])
ymax = np.max(pos[0])
boxes.append([xmin, ymin, xmax, ymax])
@kodecreer Maybe you could contribute this?
Is your feature request related to a problem? Please describe. I am unable to train my Mask-RCNN using bounding box annotations created in Label Studio. This is because there are no masks created when using the RectangleLabels to annotate. There is also no mask export happening when using COCO export.
Describe the solution you'd like I previously used a different tool called COCO Annotator that allowed me to annotate using bounding boxes and export annotations that had both bboxes and segmentation components of the COCO data format. Label studio exports do not have segmentation components when exporting in COCO format.
Describe alternatives you've considered My alternative is at this point to switch to a Faster-RCNN that doesnt utilize masking. It should be fine but I would like to be able to do either.
Additional context Annotation produced using label-studio:
Annotation produced using COCO Annotator: