AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.77k stars 7.96k forks source link

YOLO Annotation #573

Open pnambiar opened 6 years ago

pnambiar commented 6 years ago

I am getting some weird results after training with yolo. I am now trying to verify that my annotation is correct Exemplar data: X_min=601 X_max= 827 Y_min=225 Y_max =624 width(Image)=1068 height(Image)=712 class_no 0.6685 0.5962 0.2116 0.5604

AvenSun commented 6 years ago

read readme carefully.

<object-class> - integer number of object from 0 to (classes-1)
<x> <y> <width> <height> - float values relative to width and height of image, it can be equal from (0.0 to 1.0]
for example: <x> = <absolute_x> / <image_width> or <height> = <absolute_height> / <image_height>
atention: <x> <y> - are center of rectangle (are not top-left corner)
pnambiar commented 6 years ago
= (X_min+X_max)/(2*width) =0.6685 = (Y_max+Y_min)/(2*height) = 0.5962 = (X_max-X_min)/(width) = 0.2116 = (Y_max-Y_min)/(height) = 0.5604
AlexeyAB commented 6 years ago

It seems your annotation is correct. Also you can check all you annotations using this tool on Windows/Linux: https://github.com/AlexeyAB/Yolo_mark