WongKinYiu / yolov7

Implementation of paper - YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors
GNU General Public License v3.0
13.34k stars 4.21k forks source link

Label files not found #1516

Closed Surajj4837-th closed 1 year ago

Surajj4837-th commented 1 year ago

I m testing the model on a KITTI dataset. There are 1946 images in the set. For that, I have created a Test.txt file in which the content is arranged as an image path followed by a corresponding label path. eg:

/media/ADAS1/ADAS_LiDAR/KITTI/Extracted_Data/training/image_2/000001.png /media/ADAS1/ADAS_LiDAR/KITTI/Extracted_Data/training/label_2/000001.txt /media/ADAS1/ADAS_LiDAR/KITTI/Extracted_Data/training/image_2/000002.png /media/ADAS1/ADAS_LiDAR/KITTI/Extracted_Data/training/label_2/000002.txt . ......

While testing, the following line in datasets.py is sshowing all label file paths: self.label_files = img2label_paths(self.img_files)

But a few lines down: nf, nm, ne, nc, n = cache.pop('results')

where, nm = 1946 (missing number)

Also, the command prompt shows missing labels: image

What am I doing wrong?

Surajj4837-th commented 1 year ago

Found it, the label format was KITTI inside the given files. Converted the KITTI format to COCO format and gave the paths for the same. It worked.