'Yolo training displays Wrong annotaion: x = 0,y = 0
I am training a hand detector in yolo. I downloaded the OID dataset and converted labels into .txt files. There is no classes.txt file in the obj folder where all these image and txt files are located.
The following colab notebook is training butt during training it shows following error.
71: 1103.611938, 1592.691406 avg loss, 0.000000 rate, 50.474687 seconds, 4544 images, 34.616345 hours left Loaded: 0.000100 seconds
Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/obj/2933ef25f4c578ee.txt
Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/obj/09848088f423c5ce.txt
Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/obj/c21c73b84a01595c.txt
Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/obj/9ee7440dbe46b8f8.txt
Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/obj/09848088f423c5ce.txt v3 (mse loss, Normalizer: (iou: 0.75, obj: 1.00, cls: 1.00) Region 82 Avg (IOU: 0.000000), count: 1, class_loss = 175.932907, iou_loss = 0.000000, total_loss = 175.932907 v3 (mse loss, Normalizer: (iou: 0.75, obj: 1.00, cls: 1.00) Region 94 Avg (IOU: 0.000000), count: 1, class_loss = 538.309937, iou_loss = 0.000000, total_loss = 538.309937
Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/obj/b8294ff3c2be6fbe.txt
Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/obj/9ee7440dbe46b8f8.txt
Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/obj/a94e1658b7d9ff0a.txt
Link to my colab notebook. https://colab.research.google.com/drive/1p1rtNUACaGWve3lqdz8fe0gEYPkSNzWe?usp=sharing
Solution 1:[1]
Let's review YOLO's bounding box label format, and refer to this image as a reference:
<class id> <Xo/X> <Yo/Y> <W/X> <H/Y>
Where:
<class id>, label index of the class, integer object number from 0 to (classes-1)
<Xo/X>, coordinate of the bounding box’s center
<Yo/Y>, coordinate of the bounding box’s center
W, Width of the bounding box
H, Height of the bounding box
X, Width of the image
Y, Height of the image
Now, you have the error:
Wrong annotation: x = 0, y = 0, < 0 or > 1
In other words, it means <Xo/X> = 0, <Yo/Y> = 0, < 0 or > 1
This means that a part of your labels are outside the borders of your images.
Please inspect your images with "bad" labels at bad_label.list
Solution 2:[2]
i am facing the same issue previous 2 months. Reason: i am doing wrong annotation,values of x and y should be between 0 and 1. Solution: I was using bbox tool to annotate my dataset but this gives an error but now i am using makesense.ai which gives normalize values and my error is resoved now.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Umaie Ali |
