Search code examples
conv-neural-networkobject-detectionyolomultilabel-classificationdarknet

Is labelling images with polygon better than square?


I aim to make an object detection model and I labelled data with a square box If I label the images with polygon, will it be better than square?

(labelling on image of people wearing safety helmet or not)

I did try label with polygon shape on a few images and after export txt file for YOLO why it has only 4 points in the text file as same as labelled with a square shape how those points will represent an area that I label accurately?

1 0.573748 0.018953 0.045332 0.036101
1 0.944520 0.098375 0.108931 0.167870

Solution

  • You have labeled your object in a polygonial format, but when you had made a conversion to YOLO-format the information in the labelings has reduced. The picture below shows how I suppose has happend; enter image description here

    ...where you have done polygon shape annotation (black shape). But, the conversion has "searched" the smallest x-value from the polygonial coordinate points and smallest y-value from corresponding polygonial coordinate points. And, those are the "first two" values of your YOLO-format. The same logic has happend with the "width" and "heigth" -parameters.

    A good description about the idea behind the labelling and dataset is shown in https://www.youtube.com/watch?v=h6s61a_pqfM.

    In short; for your purpose (for efficiency) I propose you make fast & convenient annotation using rectangles only - no time consuming polygon annotation.