I'm trying to train a custom object detection model using YOLOv7. I've prepared my dataset with images and corresponding annotation files in YOLO format. I created train.txt and val.txt files listing the paths to the images and their associated annotations. However, when I attempt to run the training script, I encounter the following error:
Exception: train: Error loading data from /content/dataset_yolov7/train.txt: train: No images found See https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data
Here's a summary of what I've done:
1.Cloned the YOLOv7 repository from https://github.com/WongKinYiu/yolov7 and installed the necessary requirements. 2.Downloaded my dataset, which contains images and YOLO-format annotation files. 3.Created train.txt and val.txt files listing the paths to the images and annotations. 4.Specified the paths to the custom.yaml configuration file and yolov7.pt weights file. 5.Started the training using the following command:
python train.py --batch 32 --cfg /content/yolov7/cfg/training/custom_yolov7.yaml --epochs 25 --data /content/yolov7/data/custom.yaml --weights 'yolov7.pt' --device 0
I've double-checked the paths and the format of my annotation files, and everything seems correct. However, I'm still encountering this error. What could be causing this issue, and how can I resolve it?
Any insights or suggestions would be greatly appreciated.