I am using Yolo to train custom object detection while training i am getting following error
Wrong annotation: class_id = 1. But class_id should be [from 0 to 0], file: data/obj/20210221_112732.txt
Here's a review of the YOLO label format:
<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
It seems like you have put classes=1
in your data
file. That means your class id
should be 0
in the labels. Edit the class id
in your labels to 0
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With