Can Segmentation Labels be Used in an Object Detection Model?

I plan to utilize the YOLO model for both object detection and segmentation tasks. Initially, I intend to label images with polygons. Once labeling is complete, is it possible to use these labels for both an object detection model and a segmentation model? Or is it necessary to re-label all images with bounding boxes for object detection?

Yes, it is possible to use polygon annotations for both object detection and segmentation tasks. In the context of YOLO models, polygon annotations can be used to train different YOLO formats, including YOLOv5 and likely YOLOv8 as well, as mentioned in a forum post by a Roboflow support agent.

When you open an image in the Roboflow Annotate interface, you can create bounding boxes, segmentation masks, classification labels, and polygon annotations, depending on your project type. For an object detection project, you can create either bounding box or polygon annotations. This is applicable for various YOLO models including YOLOv4 PyTorch, YOLOv5, YOLOS, and YOLO-NAS.

Therefore, it is not necessary to re-label all images with bounding boxes for object detection if you have already labeled them with polygons. You can use the same polygon-labeled images for both object detection and segmentation tasks.


Hi! I’m Roboflow’s AI powered bot. This is an automated response powered using AI with knowledge from our docs, blog, and forum. If this solves your issue, please mark it as the solution using the checkbox icon. If this doesn’t solve your issue, please follow up with what you’ve tried/why, and the community will continue to chime in as usual.

Yes, you can use polygons for training object detection and segmentation models. Here’s an example post showing a similar project: Improve Accuracy: Polygon Annotations for Object Detection

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.