WongKinYiu / ScaledYOLOv4

Scaled-YOLOv4: Scaling Cross Stage Partial Network
GNU General Public License v3.0
2.02k stars 572 forks source link

Too many values to unpack? how to solve this? #283

Open ghost opened 3 years ago

ghost commented 3 years ago

transferred 78/660 items from weights/yolov4-p7.pt Optimizer groups: 111 .bias, 115 conv.weight, 108 other Scanning images: 100%|███████████████| 272999/272999 [00:17<00:00, 15244.44it/s] Scanning labels /home/hammad/Competition/dataset/labels/train.cache (272999 foun Caching images (83.0GB): 100%|█████████| 272999/272999 [28:49<00:00, 157.81it/s] Traceback (most recent call last): File "train.py", line 443, in train(hyp, opt, device, tb_writer) File "train.py", line 160, in train testloader = create_dataloader(test_path, imgsz_test, batch_size, gs, opt, hyp=hyp, augment=False, File "/home/hammad/Competition/ScaledYOLOv4/utils/datasets.py", line 53, in create_dataloader dataset = LoadImagesAndLabels(path, imgsz, batch_size, File "/home/hammad/Competition/ScaledYOLOv4/utils/datasets.py", line 344, in init labels, shapes = zip(*[cache[x] for x in self.img_files]) ValueError: too many values to unpack (expected 2)

maxh2010 commented 3 years ago

I had this issue too. My label.cache is not match with the --cache parameter. You can delete cache file and try again