qqwweee / keras-yolo3

A Keras implementation of YOLOv3 (Tensorflow backend)
MIT License
7.14k stars 3.45k forks source link

Error in loading annotaion labels while training #786

Open naveenvj25 opened 1 year ago

naveenvj25 commented 1 year ago

I have created the train.txt file in the format specified in the step 1 of training headline in the format path/to/img1.jpg 50,100,150,200,0 30,50,200,120,3 Create 6 permanent cpu-threads Cannot load image /content/gdrive/MyDrive/Custom_data/train/261.jpg 116.0,43.000181,158.0,92.00013899999999,0 99.0,279.9999125,171.0,338.9997835,0

Error in load_data_detection() - OpenCV Cannot load image /content/gdrive/MyDrive/Custom_data/train/638.jpg 97.00016,127.99986849999999,154.00016,185.9997055,0

Error in load_data_detection() - OpenCV Cannot load image /content/gdrive/MyDrive/Custom_data/train/966.jpg 115.99984,156.00018,192.99984,233.00023600000003,0

Error in load_data_detection() - OpenCV This is the error I am getting. Actually the training works if I remove these yolo box coorodinate labels from the train.text file but I get MAP value as zero and precision zero. So could you pls tell how should I create the training .tex file..?

Dhruv-Bajaj-code commented 9 months ago

YOLO expects the file to be in a specific format, and it seems like there might be a problem with the coordinates or the way they are specified.

To resolve this issue, ensure that your train.txt file follows the correct format

Example:-

50,100,150,200,0 30,50,200,120,3 60,110,160,210,1 40,60,210,130,2 Make sure that the coordinates and class labels are separated by spaces, and each line corresponds to one image.