PaddlePaddle / PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Apache License 2.0
12.84k stars 2.89k forks source link

推理时第一个类别检测不了 #782

Closed diligentpeng closed 4 years ago

diligentpeng commented 4 years ago

打印信息: The 'num_classes'(number of classes) you set is 29, and 'with_background' in 'dataset' sets False. So please note the actual number of categories is 29.

config文件中设置: metric: VOC num_classes: 29 以及 use_default_label: true with_background: false

PaddleDetection/ppdet/data/source/voc.py文件中的类别也改为了对应的29类

jerrywgz commented 4 years ago

请问下使用的是什么模型呢,另外训练使用的num_classes也是29吗

diligentpeng commented 4 years ago

模型是:faster_rcnn_r50_fpn_1x 训练使用的num_classes是29

rchitecture: FasterRCNN max_iters: 30000 use_gpu: true snapshot_iter: 6000 log_smooth_window: 100 log_iter: 100 save_dir: output pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_cos_pretrained.tar metric: VOC map_type: 11point weights: output/faster_rcnn_r50_fpn_1x_2/model_final num_classes: 29

jerrywgz commented 4 years ago

rcnn系列模型会输出背景类,因此num_classes增加背景类,同时with_ground也设置为True,后续我们提供下rcnn在voc数据集上的配置文件以便参考

diligentpeng commented 4 years ago

好的,谢谢