Search code examples
tensorflowmachine-learningdeep-learningdata-annotationsobject-detection

Is it possible to use polygon data annotation to perform tensorflow object detection?


My problem is not exactly annotate data using polygon, circle or line, it's how to use these annotated data to gerenate a ".tfrecord" file and perform an object detection. The tutorials I saw use rectangle annotation, like these: taylor swift detection raccon detection

It would be a great one for me if the objects I want to detect (pipelines) were not too close.

Example of rectangle drawn in PASCAL VOC format:

<bndbox>
    <xmin>82</xmin>
    <xmax>172</xmax>
    <ymin>108</ymin>
    <ymax>146</ymax>
</bndbox>

Is there a way to add a "mask" to highlight some part of this bounding box?

If it's something unclear, please let me know.


Solution

  • You can go for instance segmentation instead of object detection if your objects are very close to each other, there you can use polygons to generate masks and bounding boxes to train the model.

    Consider this well presented and easy to use repository for mask-rcnn(kind of instance segmentation)

    https://github.com/matterport/Mask_RCNN

    check this for lite weight mask-rcnn