Object detection using the Polygon Tool

Hi there!

I’m a little unclear as to what the Polygon tool is for when labelling data. I have images of a soccer field and I’m labelling the soccer ball and the soccer net as shown below. I have used the box tool for the ball and the polygon tool for the net. I export the data as Yolov8. However two things I’m noticing are, when I go to train the model on task=detect I get the following warning/message letting me know the below message.

Secondly and more important, the reason I’m bringing this up is because I noticed something odd with the results and I think it is with the way I am labelling. When a ball is alone in an image without any net visible, the model is able to detect the ball fine, but when the ball and net are visible the model always detects the ball as a huge rectangle as shown in the image below.

Any help at all would be very much appreciated! Thank you in advance :slight_smile:

Message I get:

WARNING ⚠️ Box and segment counts should be equal, but got len(segments) = 2571, len(boxes) = 2903. To resolve this only boxes will be used and all segments will be removed. To avoid this please supply either a detect or segment dataset, not a detect-segment mixed dataset.

How I am labelling:

Result when the ball and net are both in the image:

Hi @Noor_Hashem!
The polygon tool is to provide pixel-level precision for your annotations, allowing you to tightly outline irregularly shaped objects like buildings, animals, or fracture lines. I can confirm that YOLOv8 format maintains the polygon annotations.

I apologize, since you’re training locally I’m unable to conduct the deep dive necessary to help you pinpoint the issue with your models detections.

I noticed the two camera angles are different in your provided images. Out of curiosity, what does the split between the two angles look like in your training data?