首页 Paddle框架 帖子详情
YOLOv5评估自定义数据集报错:IndexError: list index out of range
收藏
快速回复
Paddle框架 问答深度学习 67 0
YOLOv5评估自定义数据集报错:IndexError: list index out of range
收藏
快速回复
Paddle框架 问答深度学习 67 0
使用PaddleYOLO中的yolov5_s_60e_voc模型,数据集是自己使用labelme标注的SAR舰船尾迹数据集。训练阶段如果加上--eval就会报错。单独训练完成后进行评估也会报错。
 
!python tools/eval.py -c configs/voc/yolov5_s_60e_voc.yml\
                      -o weights=output/yolov5_s_60e_voc/model_final.pdparams

W0530 22:08:12.939270 208075 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 12.0, Runtime API Version: 11.8
W0530 22:08:12.940363 208075 gpu_resources.cc:164] device: 0, cuDNN Version: 8.9.
[05/30 22:08:15] ppdet.utils.checkpoint INFO: Finish loading model weights: output/yolov5_s_60e_voc/model_final.pdparams
[05/30 22:08:15] ppdet.engine INFO: Eval loader length is 58, eval batch_size is 4.
[05/30 22:08:15] ppdet.engine INFO: Starting evaluation ......

Traceback (most recent call last):
File "/home/aistudio/PaddleYOLO/tools/eval.py", line 203, in
main()
File "/home/aistudio/PaddleYOLO/tools/eval.py", line 199, in main
run(FLAGS, cfg)
File "/home/aistudio/PaddleYOLO/tools/eval.py", line 154, in run
trainer.evaluate()
File "/home/aistudio/PaddleYOLO/ppdet/engine/trainer.py", line 570, in evaluate
self._eval_with_loader(self.loader)
File "/home/aistudio/PaddleYOLO/ppdet/engine/trainer.py", line 539, in _eval_with_loader
metric.update(data, outs)
File "/home/aistudio/PaddleYOLO/ppdet/metrics/metrics.py", line 264, in update
self.detection_map.update(bbox, score, label, gt_box, gt_label,
File "/home/aistudio/PaddleYOLO/ppdet/metrics/map_utils.py", line 156, in update
self.class_gt_counts[int(np.array(gtl))] += 1
IndexError: list index out of range

0
收藏
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户