Paddle YOLOv5训练自定义SAR舰船尾迹数据集时评估阶段报错:IndexError: list index out of range

vjhs03f7  于 5个月前  发布在  其他
关注(0)|答案(3)|浏览(61)

bug描述 Describe the Bug

使用PaddleYOLO中的yolov5_s_60e_voc.yml训练自己使用labelme标注的SAR舰船尾迹数据集。在训练阶段如果命令行中添加--eval就会报错,单独训练则没有问题,训练完成后单独进行评估还是报错。

!python tools/eval.py -c configs/voc/yolov5_s_60e_voc.yml\

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

其他补充信息 Additional Supplementary Information

No response

hjzp0vay

hjzp0vay1#

您好,从报错看,是gtl中,有数值超过了class_gt_counts的长度,看看是否debug一下数据输入。

a7qyws3x

a7qyws3x2#

您好,从报错看,是gtl中,有数值超过了class_gt_counts的长度,看看是否debug一下数据输入。

请问具体怎样操作呢

8nuwlpux

8nuwlpux3#

您好,从报错看,是gtl中,有数值超过了class_gt_counts的长度,看看是否debug一下数据输入。

请问具体怎样操作呢

相关问题