From 13f0b561ae243eb98eb73119a77035c5afa6fdf8 Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Tue, 26 Jan 2021 20:20:33 +0800 Subject: [PATCH] fix background_label in nms (#2125) --- dygraph/configs/fcos/_base_/fcos_r50_fpn.yml | 1 - dygraph/configs/ppyolo/_base_/ppyolo_r50vd_dcn.yml | 1 - dygraph/configs/yolov3/_base_/yolov3_darknet53.yml | 1 - dygraph/configs/yolov3/_base_/yolov3_mobilenet_v1.yml | 1 - dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_large.yml | 1 - dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_small.yml | 1 - dygraph/ppdet/engine/trainer.py | 2 +- 7 files changed, 1 insertion(+), 7 deletions(-) diff --git a/dygraph/configs/fcos/_base_/fcos_r50_fpn.yml b/dygraph/configs/fcos/_base_/fcos_r50_fpn.yml index 70065955d..02ae32a4d 100644 --- a/dygraph/configs/fcos/_base_/fcos_r50_fpn.yml +++ b/dygraph/configs/fcos/_base_/fcos_r50_fpn.yml @@ -57,4 +57,3 @@ FCOSPostProcess: keep_top_k: 100 score_threshold: 0.025 nms_threshold: 0.6 - background_label: -1 diff --git a/dygraph/configs/ppyolo/_base_/ppyolo_r50vd_dcn.yml b/dygraph/configs/ppyolo/_base_/ppyolo_r50vd_dcn.yml index fe64a3082..3bc6af116 100644 --- a/dygraph/configs/ppyolo/_base_/ppyolo_r50vd_dcn.yml +++ b/dygraph/configs/ppyolo/_base_/ppyolo_r50vd_dcn.yml @@ -67,4 +67,3 @@ BBoxPostProcess: post_threshold: 0.01 nms_top_k: -1 normalized: false - background_label: -1 diff --git a/dygraph/configs/yolov3/_base_/yolov3_darknet53.yml b/dygraph/configs/yolov3/_base_/yolov3_darknet53.yml index c5615fb0a..c094ba71c 100644 --- a/dygraph/configs/yolov3/_base_/yolov3_darknet53.yml +++ b/dygraph/configs/yolov3/_base_/yolov3_darknet53.yml @@ -42,4 +42,3 @@ BBoxPostProcess: nms_threshold: 0.45 nms_top_k: 1000 normalized: false - background_label: -1 diff --git a/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v1.yml b/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v1.yml index 226e35c50..c2fa0e931 100644 --- a/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v1.yml +++ b/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v1.yml @@ -43,4 +43,3 @@ BBoxPostProcess: nms_threshold: 0.45 nms_top_k: 1000 normalized: false - background_label: -1 diff --git a/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_large.yml b/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_large.yml index 0dc8188c4..d9085fafb 100644 --- a/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_large.yml +++ b/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_large.yml @@ -44,4 +44,3 @@ BBoxPostProcess: nms_threshold: 0.45 nms_top_k: 1000 normalized: false - background_label: -1 diff --git a/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_small.yml b/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_small.yml index 87dd0a7a0..a6f0ecb3d 100644 --- a/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_small.yml +++ b/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_small.yml @@ -44,4 +44,3 @@ BBoxPostProcess: nms_threshold: 0.45 nms_top_k: 1000 normalized: false - background_label: -1 diff --git a/dygraph/ppdet/engine/trainer.py b/dygraph/ppdet/engine/trainer.py index a349a2015..62f23038a 100644 --- a/dygraph/ppdet/engine/trainer.py +++ b/dygraph/ppdet/engine/trainer.py @@ -54,7 +54,7 @@ class Trainer(object): self.model = create(cfg.architecture) # model slim build - if cfg.slim: + if 'slim' in cfg and cfg.slim: if self.mode == 'train': self.load_weights(cfg.pretrain_weights, cfg.weight_type) slim = create(cfg.slim) -- GitLab