Polygons on 3d objects

I’ve only used polygons on 2d objects, so I’m wondering if the img below is a good example of when object detection would be better? Or should I draw the vertical edges of the box as well? Does it have to all be on one round (start → end poly drawing) or can we do multiple rounds to one object as we would need to in the example below? (And what about the package above? Would the same rules apply?)

1 Like

Great question Kelly! And, as always, the answer depends. But, generally I would say the example above is not the way I would recommend labeling objects with polygons*. I would, as you said, label the vertical edges in addition to the edges you already labeled. Or put another way, your polygon should follow the line defined as anywhere the pixels of your target touch the pixels of the background. This results in a polygon that perfectly encapsulates all of the pixels of a target. No background pixels should be inside the polygon and no target pixels should be outside of the polygon (see image below).

The problem gets a little more complicated when there is something obstructing your target in such a way that labeling it requires multiple separate polygons. Ideally, there would be a way to associate several polygons as a label for a single object. This is not currently supported by Roboflow but could be added in the future. Note, however, this is only relevant for instance segmentation. For semantic segmentation, there is no need to associate labels to specific targets, as labels are only class specific. @Jacobsolawetz has a great blog post that talks more about this..

*An exception would be if your specific use case was not pure object detection. For instance, in the example above, the goal might be to detect the tops of boxes for the purpose of reading the postage label. In that case, you would want the label as it is drawn in the image so that your model learns to detects the top surface of boxes.