matterport / Mask_RCNN

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Other
24.57k stars 11.69k forks source link

Is the network training on bounding boxes or polygon masks? #1816

Open HjalteMann opened 4 years ago

HjalteMann commented 4 years ago

I have some training data annotated with polygons tightly around the objects of interest, but I also have access to (much) more training data annotated with bounding boxes (although less tightly around objects). As fas as I can read in the readme, polygon annotations are actually converted to bounding boxes and the network is trained on these and not the polygon masks. Is that correct? If so, does that mean I could just train the network on my bounding box annotations? (E.g. by converting my bounding box annotations to polygons with four corners).

Thanks! /HM

kamathbakshay commented 4 years ago

trained on polygon masks not using bounding box

HjalteMann commented 4 years ago

Thanks, @kamathbakshay. If that is the case, what does this paragraph mean in the Differences from the Official Paper-section of the the readme?

Bounding Boxes: Some datasets provide bounding boxes and some provide masks only. To support training on multiple datasets we opted to ignore the bounding boxes that come with the dataset and generate them on the fly instead. We pick the smallest box that encapsulates all the pixels of the mask as the bounding box. This simplifies the implementation and also makes it easy to apply image augmentations that would otherwise be harder to apply to bounding boxes, such as image rotation.

sohinimallick commented 3 years ago

Hey @HjalteMann dis you figure tbis out?