PaddleDetection icon indicating copy to clipboard operation
PaddleDetection copied to clipboard

使用PaddleDetection2.5训练自己的数据集,训练时正常,评估时报错

Open chnejing88 opened this issue 2 years ago • 2 comments

问题确认 Search before asking

  • [X] 我已经搜索过问题,但是没有找到解答。I have searched the question and found no related answer.

请提出你的问题 Please ask your question

报错截图如下,还望大佬给指正,这个KeyError: 3是什么意思,是哪出问题了 EOMFC~ TSNO$S4VD6F%(SXI

chnejing88 avatar Feb 09 '23 06:02 chnejing88

可以debug进去看下 label_to_cat_id_map 这个字典符合预期嘛,和你训练时候的类别一致不

https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.5/ppdet/metrics/json_results.py#L30

lyuwenyu avatar Feb 09 '23 06:02 lyuwenyu

你使用的是自己的数据集么,数据集只有5类的话吧对应的configs/datasets/xxx.yml里的num_classes修改成5

huangye123 avatar May 19 '23 15:05 huangye123