diff --git a/dygraph/configs/cascade_rcnn/_base_/cascade_mask_rcnn_r50_fpn.yml b/dygraph/configs/cascade_rcnn/_base_/cascade_mask_rcnn_r50_fpn.yml index f133703622d782375f66f3487ab8e038b7d02116..460b88c2c9cd9dba9d54adc2618ae7f594766609 100644 --- a/dygraph/configs/cascade_rcnn/_base_/cascade_mask_rcnn_r50_fpn.yml +++ b/dygraph/configs/cascade_rcnn/_base_/cascade_mask_rcnn_r50_fpn.yml @@ -76,7 +76,6 @@ BBoxPostProcess: keep_top_k: 100 score_threshold: 0.05 nms_threshold: 0.5 - normalized: true MaskHead: diff --git a/dygraph/configs/cascade_rcnn/_base_/cascade_rcnn_r50_fpn.yml b/dygraph/configs/cascade_rcnn/_base_/cascade_rcnn_r50_fpn.yml index 155f5f50096a199ff07af587029dd9e6b40fccfd..24548315398408a27578cc89805ba9c0a29c7103 100644 --- a/dygraph/configs/cascade_rcnn/_base_/cascade_rcnn_r50_fpn.yml +++ b/dygraph/configs/cascade_rcnn/_base_/cascade_rcnn_r50_fpn.yml @@ -74,4 +74,3 @@ BBoxPostProcess: keep_top_k: 100 score_threshold: 0.05 nms_threshold: 0.5 - normalized: true diff --git a/dygraph/configs/faster_rcnn/_base_/faster_rcnn_r50.yml b/dygraph/configs/faster_rcnn/_base_/faster_rcnn_r50.yml index 630b9aa09d9eee6aa10b532c097a15500a5ba6d4..43a9dba90e19690f0b6103cadbe565ab97c67e25 100644 --- a/dygraph/configs/faster_rcnn/_base_/faster_rcnn_r50.yml +++ b/dygraph/configs/faster_rcnn/_base_/faster_rcnn_r50.yml @@ -65,4 +65,3 @@ BBoxPostProcess: keep_top_k: 100 score_threshold: 0.05 nms_threshold: 0.5 - normalized: true diff --git a/dygraph/configs/faster_rcnn/_base_/faster_rcnn_r50_fpn.yml b/dygraph/configs/faster_rcnn/_base_/faster_rcnn_r50_fpn.yml index f846e544f4f1646b68a616eee18d73212f04ccfa..62b5704b36bf09a492a6ba5a93de364b20e75316 100644 --- a/dygraph/configs/faster_rcnn/_base_/faster_rcnn_r50_fpn.yml +++ b/dygraph/configs/faster_rcnn/_base_/faster_rcnn_r50_fpn.yml @@ -72,4 +72,3 @@ BBoxPostProcess: keep_top_k: 100 score_threshold: 0.05 nms_threshold: 0.5 - normalized: true diff --git a/dygraph/configs/hrnet/_base_/faster_rcnn_hrnetv2p_w18.yml b/dygraph/configs/hrnet/_base_/faster_rcnn_hrnetv2p_w18.yml index ee2476800bf4e84579c6f9711ffcfb579d78dabb..cc6cec5b05ea36e3d1bbdbb225a44acd994217c1 100644 --- a/dygraph/configs/hrnet/_base_/faster_rcnn_hrnetv2p_w18.yml +++ b/dygraph/configs/hrnet/_base_/faster_rcnn_hrnetv2p_w18.yml @@ -67,4 +67,3 @@ BBoxPostProcess: keep_top_k: 100 score_threshold: 0.05 nms_threshold: 0.5 - normalized: true diff --git a/dygraph/configs/mask_rcnn/_base_/mask_rcnn_r50.yml b/dygraph/configs/mask_rcnn/_base_/mask_rcnn_r50.yml index 49f03610356c354c7928bcc4b51c77e7a9ff14ea..fc2694a06cb68ae791e05b6c4638ad3c2d74e7f0 100644 --- a/dygraph/configs/mask_rcnn/_base_/mask_rcnn_r50.yml +++ b/dygraph/configs/mask_rcnn/_base_/mask_rcnn_r50.yml @@ -67,7 +67,6 @@ BBoxPostProcess: keep_top_k: 100 score_threshold: 0.05 nms_threshold: 0.5 - normalized: true MaskHead: head: MaskFeat diff --git a/dygraph/configs/mask_rcnn/_base_/mask_rcnn_r50_fpn.yml b/dygraph/configs/mask_rcnn/_base_/mask_rcnn_r50_fpn.yml index 1be1f22fed8bdfa2aa2fb37ad7c8f29f03c293bc..e0ee9355f111fcdacf18e3916db70f60e18a016d 100644 --- a/dygraph/configs/mask_rcnn/_base_/mask_rcnn_r50_fpn.yml +++ b/dygraph/configs/mask_rcnn/_base_/mask_rcnn_r50_fpn.yml @@ -71,7 +71,6 @@ BBoxPostProcess: keep_top_k: 100 score_threshold: 0.05 nms_threshold: 0.5 - normalized: true MaskHead: head: MaskFeat diff --git a/dygraph/configs/ppyolo/_base_/ppyolo_mbv3_large.yml b/dygraph/configs/ppyolo/_base_/ppyolo_mbv3_large.yml index 7b96fa9d7a3cf2ef6df1253e591d62227ee1640a..65ff63bbc8efab5f89987d1dd8ef0bb4ca10ed37 100644 --- a/dygraph/configs/ppyolo/_base_/ppyolo_mbv3_large.yml +++ b/dygraph/configs/ppyolo/_base_/ppyolo_mbv3_large.yml @@ -55,4 +55,3 @@ BBoxPostProcess: nms_threshold: 0.45 nms_top_k: 1000 score_threshold: 0.005 - normalized: false diff --git a/dygraph/configs/ppyolo/_base_/ppyolo_mbv3_small.yml b/dygraph/configs/ppyolo/_base_/ppyolo_mbv3_small.yml index edbf6a45c2982de1aeb88b321614fe2911ffb67c..76eb5b5bb82918583b9ba8f72feb5d7b5758d2fd 100644 --- a/dygraph/configs/ppyolo/_base_/ppyolo_mbv3_small.yml +++ b/dygraph/configs/ppyolo/_base_/ppyolo_mbv3_small.yml @@ -55,4 +55,3 @@ BBoxPostProcess: nms_threshold: 0.45 nms_top_k: 1000 score_threshold: 0.005 - normalized: false diff --git a/dygraph/configs/ppyolo/_base_/ppyolo_r18vd.yml b/dygraph/configs/ppyolo/_base_/ppyolo_r18vd.yml index 6a7bf0962d239d53c0688ee53cac600c77999085..e1caea7884e39896e27f73c092133c687a7af596 100644 --- a/dygraph/configs/ppyolo/_base_/ppyolo_r18vd.yml +++ b/dygraph/configs/ppyolo/_base_/ppyolo_r18vd.yml @@ -56,5 +56,4 @@ BBoxPostProcess: score_threshold: 0.01 post_threshold: 0.01 nms_top_k: -1 - normalized: false background_label: -1 diff --git a/dygraph/configs/ppyolo/_base_/ppyolo_r50vd_dcn.yml b/dygraph/configs/ppyolo/_base_/ppyolo_r50vd_dcn.yml index 186251ca381995c57719e067aa7e7bca9123bb4e..2afcf80533cc01d355706c3b6c40cff78429a967 100644 --- a/dygraph/configs/ppyolo/_base_/ppyolo_r50vd_dcn.yml +++ b/dygraph/configs/ppyolo/_base_/ppyolo_r50vd_dcn.yml @@ -64,5 +64,4 @@ BBoxPostProcess: score_threshold: 0.01 post_threshold: 0.01 nms_top_k: -1 - normalized: false background_label: -1 diff --git a/dygraph/configs/ssd/README.md b/dygraph/configs/ssd/README.md index 44daebf5b68efbe198640b8a213fe3ab7f36944c..9340e7e812986bbcc427f27a485b2ca9f376e50d 100644 --- a/dygraph/configs/ssd/README.md +++ b/dygraph/configs/ssd/README.md @@ -6,8 +6,8 @@ | 骨架网络 | 网络类型 | 每张GPU图片个数 | 学习率策略 |推理时间(fps) | Box AP | 下载 | 配置文件 | | :-------------- | :------------- | :-----: | :-----: | :------------: | :-----: | :-----------------------------------------------------: | :-----: | -| VGG | SSD | 8 | 240e | ---- | 78.2 | [下载链接](https://paddledet.bj.bcebos.com/models/ssd_vgg16_300_240e_voc.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/master/dygraph/configs/ssd/ssd_vgg16_300_240e_voc.yml) | -| MobileNet v1 | SSD | 32 | 120e | ---- | 73.3 | [下载链接](https://paddledet.bj.bcebos.com/models/ssd_mobilenet_v1_300_120e_voc.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/master/dygraph/configs/ssd/ssd_mobilenet_v1_300_120e_voc.yml) | +| VGG | SSD | 8 | 240e | ---- | 77.8 | [下载链接](https://paddledet.bj.bcebos.com/models/ssd_vgg16_300_240e_voc.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/master/dygraph/configs/ssd/ssd_vgg16_300_240e_voc.yml) | +| MobileNet v1 | SSD | 32 | 120e | ---- | 73.8 | [下载链接](https://paddledet.bj.bcebos.com/models/ssd_mobilenet_v1_300_120e_voc.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/master/dygraph/configs/ssd/ssd_mobilenet_v1_300_120e_voc.yml) | **注意:** SSD-VGG使用4GPU在总batch size为32下训练240个epoch。SSD-MobileNetv1使用2GPU在总batch size为64下训练120周期。 diff --git a/dygraph/configs/vehicle/vehicle_yolov3_darknet.yml b/dygraph/configs/vehicle/vehicle_yolov3_darknet.yml index 31ab431b728702eff0c90b3eedb42dea36d30aba..17f401ac15480fa76e9ffa8b9e21aad35459c3ce 100644 --- a/dygraph/configs/vehicle/vehicle_yolov3_darknet.yml +++ b/dygraph/configs/vehicle/vehicle_yolov3_darknet.yml @@ -21,7 +21,6 @@ BBoxPostProcess: score_threshold: 0.005 nms_threshold: 0.45 nms_top_k: 400 - normalized: false num_classes: 6 diff --git a/dygraph/configs/yolov3/_base_/yolov3_darknet53.yml b/dygraph/configs/yolov3/_base_/yolov3_darknet53.yml index 0f91cf030ea7cd00757b615e44e957a50cd48482..ec1200e69eb614a180a2ff2607cae66be70121f9 100644 --- a/dygraph/configs/yolov3/_base_/yolov3_darknet53.yml +++ b/dygraph/configs/yolov3/_base_/yolov3_darknet53.yml @@ -40,4 +40,3 @@ BBoxPostProcess: score_threshold: 0.01 nms_threshold: 0.45 nms_top_k: 1000 - normalized: false diff --git a/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v1.yml b/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v1.yml index 5e4a5b04f8e2510b91fc2930cd460588c8bff805..e82d155608f61f1a6477e9de7fa8865baf8aa035 100644 --- a/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v1.yml +++ b/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v1.yml @@ -42,4 +42,3 @@ BBoxPostProcess: score_threshold: 0.01 nms_threshold: 0.45 nms_top_k: 1000 - normalized: false diff --git a/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_large.yml b/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_large.yml index c95ec77a0a471dcbce4cc0aefc4fa18e83c5a0e8..8c299f373e9fa5a226404e6653ec0945079e8944 100644 --- a/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_large.yml +++ b/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_large.yml @@ -43,4 +43,3 @@ BBoxPostProcess: score_threshold: 0.01 nms_threshold: 0.45 nms_top_k: 1000 - normalized: false diff --git a/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_small.yml b/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_small.yml index 88291b22dd1ae2e88d46e5df27bd0f14c5061d43..8ddf2965c9d2917a637f44672cc4f01aeef45981 100644 --- a/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_small.yml +++ b/dygraph/configs/yolov3/_base_/yolov3_mobilenet_v3_small.yml @@ -43,4 +43,3 @@ BBoxPostProcess: score_threshold: 0.01 nms_threshold: 0.45 nms_top_k: 1000 - normalized: false diff --git a/dygraph/configs/yolov3/_base_/yolov3_r50vd_dcn.yml b/dygraph/configs/yolov3/_base_/yolov3_r50vd_dcn.yml index f122cc365234d744fb87c93a95cf1b11a775efa3..1c4e0dc68082622cc449aabebf481c2c6916a701 100644 --- a/dygraph/configs/yolov3/_base_/yolov3_r50vd_dcn.yml +++ b/dygraph/configs/yolov3/_base_/yolov3_r50vd_dcn.yml @@ -44,4 +44,3 @@ BBoxPostProcess: score_threshold: 0.01 nms_threshold: 0.45 nms_top_k: 1000 - normalized: false diff --git a/dygraph/ppdet/data/transform/operators.py b/dygraph/ppdet/data/transform/operators.py index 653a2ad00205cd2354b741952b1422c6e4b3d14e..b07ee0cba1dfa22b7114f0054d3844df614a500e 100644 --- a/dygraph/ppdet/data/transform/operators.py +++ b/dygraph/ppdet/data/transform/operators.py @@ -214,8 +214,8 @@ class RandomErasingImage(BaseOperator): continue x1, y1, x2, y2 = gt_bbox[idx, :] - w_bbox = x2 - x1 + 1 - h_bbox = y2 - y1 + 1 + w_bbox = x2 - x1 + h_bbox = y2 - y1 area = w_bbox * h_bbox target_area = random.uniform(self.lower, self.higher) * area diff --git a/dygraph/ppdet/modeling/layers.py b/dygraph/ppdet/modeling/layers.py index 55fb657681c4e007d715102b81c945924755a237..a35bc6273f6aa4512282cbb86d5110dc5b90ae33 100644 --- a/dygraph/ppdet/modeling/layers.py +++ b/dygraph/ppdet/modeling/layers.py @@ -363,7 +363,7 @@ class MultiClassNMS(object): nms_top_k=-1, keep_top_k=100, nms_threshold=.5, - normalized=False, + normalized=True, nms_eta=1.0, return_rois_num=True): super(MultiClassNMS, self).__init__()