You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an IndexError: list index out of range when running the val.py script with the yolov9-c-converted.pt weights file. The error occurs during the COCO-JSON dictionary saving process. Below are the details of the error and the steps to reproduce it.
Fusing layers...
gelan-c summary: 467 layers, 25472640 parameters, 64944 gradients, 102.8 GFLOPs
val: Scanning /workspace/yolov9/datasets/coco/val2017.cache... 4952 images, 48 backgrounds, 0 corrupt: 100%|██████████| 5000/5000 00:00
Class Images Instances P R mAP50 mAP50-95: 0%| | 0/625 00:00
Traceback (most recent call last):
File "val.py", line 389, in
main(opt)
File "val.py", line 362, in main
run(**vars(opt))
File "/opt/conda/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
return func(*args, **kwargs)
File "val.py", line 244, in run
save_one_json(predn, jdict, path, class_map) # append to COCO-JSON dictionary
File "val.py", line 46, in save_one_json
'category_id': class_map[int(p[5])],
IndexError: list index out of range
The text was updated successfully, but these errors were encountered:
I am encountering an
IndexError: list index out of range
when running theval.py
script with theyolov9-c-converted.pt
weights file. The error occurs during the COCO-JSON dictionary saving process. Below are the details of the error and the steps to reproduce it.##Environment:
##Command
python3 val.py --img 640 --batch 8 --conf 0.001 --iou 0.7 --device 0 --data /workspace/yolov9/data/coco.yaml --weights /workspace/yolov9color/weights/yolov9-c-converted.pt
##Error log
val: data=/workspace/yolov9/data/coco.yaml, weights=['/workspace/yolov9color/weights/yolov9-c-converted.pt'], batch_size=8, imgsz=640, conf_thres=0.001, iou_thres=0.7, max_det=300, task=val, device=0, workers=8, single_cls=False, augment=False, verbose=False, save_txt=False, save_hybrid=False, save_conf=False, save_json=True, project=runs/val, name=exp, exist_ok=False, half=False, dnn=False, min_items=0
YOLOv5 🚀 1e33dbb Python-3.8.12 torch-1.11.0a0+b6df043 CUDA:0 (NVIDIA RTX A6000, 48677MiB)
Fusing layers...
gelan-c summary: 467 layers, 25472640 parameters, 64944 gradients, 102.8 GFLOPs
val: Scanning /workspace/yolov9/datasets/coco/val2017.cache... 4952 images, 48 backgrounds, 0 corrupt: 100%|██████████| 5000/5000 00:00
Class Images Instances P R mAP50 mAP50-95: 0%| | 0/625 00:00
Traceback (most recent call last):
File "val.py", line 389, in
main(opt)
File "val.py", line 362, in main
run(**vars(opt))
File "/opt/conda/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
return func(*args, **kwargs)
File "val.py", line 244, in run
save_one_json(predn, jdict, path, class_map) # append to COCO-JSON dictionary
File "val.py", line 46, in save_one_json
'category_id': class_map[int(p[5])],
IndexError: list index out of range
The text was updated successfully, but these errors were encountered: