进行模型预测时出现 KeyError: 2
Created by: A-xiong
我是一个新手,当我使用tools/infer.py进行多张图片模型预测时,出现以下错误:
2020-05-19 21:43:34,885-INFO: Infer iter 24
Traceback (most recent call last):
File "tools/infer.py", line 304, in <module>
main()
File "tools/infer.py", line 205, in main
x1y1x2y2_result,bbox_results = bbox2out([res], clsid2catid, is_bbox_normalized)
File "/home/aistudio/PaddleDetection/ppdet/utils/coco_eval.py", line 270, in bbox2out
catid = (clsid2catid[int(clsid)])
KeyError: 2
这是为什么呢,我暂时找不到原因。要是能帮到我,我真的非常感谢。