diff --git a/dygraph/configs/ssd/README.md b/dygraph/configs/ssd/README.md index 442fa2c0bc1af4d62feaf4bad78830dc268002da..b62eb9dcc6709dbd6bfcd911b6a828e6d6a35a8f 100644 --- a/dygraph/configs/ssd/README.md +++ b/dygraph/configs/ssd/README.md @@ -7,7 +7,7 @@ | 骨架网络 | 网络类型 | 每张GPU图片个数 | 学习率策略 |推理时间(fps) | Box AP | 下载 | 配置文件 | | :-------------- | :------------- | :-----: | :-----: | :------------: | :-----: | :-----------------------------------------------------: | :-----: | | VGG | SSD | 8 | 240e | ---- | 78.2 | [下载链接](https://paddlemodels.bj.bcebos.com/object_detection/dygraph/ssd_vgg16_300_240e_voc.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/master/dygraph/configs/ssd_vgg16_300_240e_voc.yml) | -| MobileNet v1 | SSD | 32 | 120e | ---- | 73.3 | [下载链接](https://paddlemodels.bj.bcebos.com/object_detection/dygraph/ssd_mobilenet_v1_300_120e_voc.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/master/dygraph/configs/ssd_mobilenet_v1_300_120e_voc.yml) | +| MobileNet v1 | SSD | 32 | 120e | ---- | 73.1 | [下载链接](https://paddlemodels.bj.bcebos.com/object_detection/dygraph/ssd_mobilenet_v1_300_120e_voc.pdparams) | [配置文件](https://github.com/PaddlePaddle/PaddleDetection/tree/master/dygraph/configs/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/ssd/_base_/optimizer_120e.yml b/dygraph/configs/ssd/_base_/optimizer_120e.yml index 0625b6694bc32afc5522d9ac6e3a6fd58b5346e0..908745c6c8f9fb68ddb548bb952ed1a2f6c69bc1 100644 --- a/dygraph/configs/ssd/_base_/optimizer_120e.yml +++ b/dygraph/configs/ssd/_base_/optimizer_120e.yml @@ -10,8 +10,8 @@ LearningRate: OptimizerBuilder: optimizer: - momentum: 0.0 - type: RMSProp + momentum: 0.9 + type: Momentum regularizer: - factor: 0.00005 + factor: 0.0005 type: L2 diff --git a/dygraph/configs/ssd/_base_/ssd_mobilenet_reader.yml b/dygraph/configs/ssd/_base_/ssd_mobilenet_reader.yml index 087ea7e68d353ccbfe2348def3e9fffb8b4f249f..b43d97d1898db2414e714f026b4b024963906ed9 100644 --- a/dygraph/configs/ssd/_base_/ssd_mobilenet_reader.yml +++ b/dygraph/configs/ssd/_base_/ssd_mobilenet_reader.yml @@ -2,18 +2,21 @@ worker_num: 8 TrainReader: inputs_def: num_max_boxes: 90 + sample_transforms: - DecodeOp: {} - RandomDistortOp: {brightness: [0.5, 1.125, 0.875], random_apply: False} - RandomExpandOp: {fill_value: [127.5, 127.5, 127.5]} - RandomCropOp: {allow_no_crop: Fasle} - RandomFlipOp: {} - - ResizeOp: {target_size: [300, 300], keep_ratio: False, interp: 1} - NormalizeBoxOp: {} + - ResizeImage: {target_size: 300, interp: 1, use_cv2: false} - PadBoxOp: {num_max_boxes: 90} + batch_transforms: - NormalizeImageOp: {mean: [127.5, 127.5, 127.5], std: [127.502231, 127.502231, 127.502231], is_scale: false} - - Permute: {} + - Permute: {to_bgr: true} + batch_size: 32 shuffle: true drop_last: true @@ -24,7 +27,7 @@ EvalReader: - DecodeOp: {} - ResizeOp: {target_size: [300, 300], keep_ratio: False, interp: 1} - NormalizeImageOp: {mean: [127.5, 127.5, 127.5], std: [127.502231, 127.502231, 127.502231], is_scale: false} - - Permute: {} + - Permute: {to_bgr: true} batch_size: 1 drop_empty: false @@ -36,5 +39,5 @@ TestReader: - DecodeOp: {} - ResizeOp: {target_size: [300, 300], keep_ratio: False, interp: 1} - NormalizeImageOp: {mean: [127.5, 127.5, 127.5], std: [127.502231, 127.502231, 127.502231], is_scale: false} - - Permute: {} + - Permute: {to_bgr: true} batch_size: 1 diff --git a/dygraph/configs/ssd/_base_/ssdlite300_reader.yml b/dygraph/configs/ssd/_base_/ssdlite300_reader.yml index c4f3095b6fcf4fbe865d24bff7a708fa5695f545..bbce81b315d54e8f5e683b04c2b1cb9520128587 100644 --- a/dygraph/configs/ssd/_base_/ssdlite300_reader.yml +++ b/dygraph/configs/ssd/_base_/ssdlite300_reader.yml @@ -8,8 +8,8 @@ TrainReader: - RandomExpandOp: {fill_value: [123.675, 116.28, 103.53]} - RandomCropOp: {allow_no_crop: Fasle} - RandomFlipOp: {} - - ResizeOp: {target_size: [300, 300], keep_ratio: False, interp: 1} - NormalizeBoxOp: {} + - ResizeImage: {target_size: 300, interp: 1, use_cv2: false} - PadBoxOp: {num_max_boxes: 90} batch_transforms: - NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: true} diff --git a/dygraph/configs/ssd/_base_/ssdlite320_reader.yml b/dygraph/configs/ssd/_base_/ssdlite320_reader.yml index 7c206a933e7216fc5818e001a7eac969dd2f080e..dd7a0f3bf8682465df22132120e0d3a69841aaa8 100644 --- a/dygraph/configs/ssd/_base_/ssdlite320_reader.yml +++ b/dygraph/configs/ssd/_base_/ssdlite320_reader.yml @@ -8,8 +8,8 @@ TrainReader: - RandomExpandOp: {fill_value: [123.675, 116.28, 103.53]} - RandomCropOp: {allow_no_crop: Fasle} - RandomFlipOp: {} - - ResizeOp: {target_size: [320, 320], keep_ratio: False, interp: 1} - NormalizeBoxOp: {} + - ResizeImage: {target_size: 320, interp: 1, use_cv2: false} - PadBoxOp: {num_max_boxes: 90} batch_transforms: - NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: true} diff --git a/dygraph/ppdet/engine/export_utils.py b/dygraph/ppdet/engine/export_utils.py index 938288d7234c6a86ec840674b0435efa2973d3b3..d724f179a8000e5d7420c2c73188f2142bb92f08 100644 --- a/dygraph/ppdet/engine/export_utils.py +++ b/dygraph/ppdet/engine/export_utils.py @@ -28,13 +28,13 @@ logger = setup_logger(__name__) # Global dictionary TRT_MIN_SUBGRAPH = { 'YOLO': 3, - 'SSD': 40, + 'SSD': 3, 'RCNN': 40, 'RetinaNet': 40, 'EfficientDet': 40, 'Face': 3, - 'TTFNet': 40, - 'FCOS': 40, + 'TTFNet': 3, + 'FCOS': 3, 'SOLOv2': 60, }