alexander-pv / maskrcnn_tf2

Mask R-CNN for object detection and instance segmentation with Keras and TensorFlow V2 and ONNX and TensorRT optimization support.
Other
40 stars 11 forks source link

About the create_mask method in preprocess.py #18

Open Raingel opened 2 years ago

Raingel commented 2 years ago

When I am using the balloon dataset

I visualized the masks_array as follows image

I'm wondering if it's right that each mask should present a separate area.

If the code on line 158

instance_masks_list.append(cv2.fillPoly(mask_template, points, (class_id)))

is changed to

instance_masks_list.append(cv2.fillPoly(mask_template.copy(), points, (class_id)))

masks_array will look like this, is this the correct one? image