PaddlePaddle / Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
http://www.paddlepaddle.org/
Apache License 2.0
22.1k stars 5.55k forks source link

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

Open RadioWaverider opened 3 months ago

RadioWaverider commented 3 months ago

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

ForFishes commented 3 months ago

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

RadioWaverider commented 3 months ago

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

请问具体怎样操作呢

RadioWaverider commented 3 months ago

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

请问具体怎样操作呢