Open Maioy97 opened 1 year ago
@Maioy97 你解决这个问题了吗?我现在也是这个但是不知道怎么解决
I encountered the same issue, but I found that YOLOv7 automatically generates a labels.cache file. I training by deleting it first. Btw, I only placed the images and labels in the same folder without adding an additional labels.txt. FYR
Hello I'm trying to use the train.py yo train a model for the second time the code doesn't see my labels the labels are organised next to the images and I did confirm that all the labels are there it gives me this error :
AssertionError: train: No labels in /content/yolov7/dataset/annotations/train_list.cache. Can not train without labels. See https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data
I believe it might be related to the train.txt having a \n at the end of each line but i made sure there's only 1 \n this same code that generates the labels was used for a model I trained a month ago the list file looks like
" /content/yolov7/dataset/images/train_0.jpg /content/yolov7/dataset/images/train_1.jpg /content/yolov7/dataset/images/train_10.jpg /content/yolov7/dataset/images/train_100.jpg
. . . . "
here's an example of the image list before it went in the file
I tried it without the \n, everything was in the same line and the labels themselves are in the yolo format