From 72b7f9ef644d0b7dc9cb3c3c96eb8d26b8d61cc3 Mon Sep 17 00:00:00 2001 From: wangxinxin08 <69842442+wangxinxin08@users.noreply.github.com> Date: Tue, 23 Feb 2021 21:30:12 +0800 Subject: [PATCH] modify transform op of yolo and solo configs (#2260) --- .../fcos/fcos_r50_fpn_multiscale_2x_coco.yml | 16 +++---- .../configs/ppyolo/ppyolo_mbv3_large_coco.yml | 42 +++++++++---------- .../configs/ppyolo/ppyolo_mbv3_small_coco.yml | 42 +++++++++---------- dygraph/configs/ppyolo/ppyolo_r18vd_coco.yml | 42 +++++++++---------- .../configs/solov2/solov2_r50_fpn_3x_coco.yml | 14 +++---- .../yolov3/yolov3_mobilenet_v1_270e_voc.yml | 26 ++++++------ .../yolov3/yolov3_mobilenet_v1_roadsign.yml | 26 ++++++------ .../yolov3_mobilenet_v3_large_270e_voc.yml | 26 ++++++------ 8 files changed, 115 insertions(+), 119 deletions(-) diff --git a/dygraph/configs/fcos/fcos_r50_fpn_multiscale_2x_coco.yml b/dygraph/configs/fcos/fcos_r50_fpn_multiscale_2x_coco.yml index c841fd001..291f8d8e9 100644 --- a/dygraph/configs/fcos/fcos_r50_fpn_multiscale_2x_coco.yml +++ b/dygraph/configs/fcos/fcos_r50_fpn_multiscale_2x_coco.yml @@ -10,17 +10,13 @@ weights: output/fcos_r50_fpn_multiscale_2x_coco/model_final TrainReader: sample_transforms: - - DecodeOp: {} - - RandomFlipOp: {prob: 0.5} - - NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - - ResizeImage: - target_size: [640, 672, 704, 736, 768, 800] - max_size: 1333 - interp: 1 - use_cv2: true - - PermuteOp: {} + - Decode: {} + - RandomFlip: {prob: 0.5} + - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} + - RandomResize: {target_size: [[640, 1333], [672, 1333], [704, 1333], [736, 1333], [768, 1333], [800, 1333]], keep_ratio: true, interp: 1} + - Permute: {} batch_transforms: - - PadBatchOp: {pad_to_stride: 128} + - PadBatch: {pad_to_stride: 128} - Gt2FCOSTarget: object_sizes_boundary: [64, 128, 256, 512] center_sampling_radius: 1.5 diff --git a/dygraph/configs/ppyolo/ppyolo_mbv3_large_coco.yml b/dygraph/configs/ppyolo/ppyolo_mbv3_large_coco.yml index b6f00b741..d51696d63 100644 --- a/dygraph/configs/ppyolo/ppyolo_mbv3_large_coco.yml +++ b/dygraph/configs/ppyolo/ppyolo_mbv3_large_coco.yml @@ -13,24 +13,24 @@ TrainReader: inputs_def: num_max_boxes: 90 sample_transforms: - - DecodeOp: {} - - MixupOp: {alpha: 1.5, beta: 1.5} - - RandomDistortOp: {} - - RandomExpandOp: {fill_value: [123.675, 116.28, 103.53]} - - RandomCropOp: {} - - RandomFlipOp: {} + - Decode: {} + - Mixup: {alpha: 1.5, beta: 1.5} + - RandomDistort: {} + - RandomExpand: {fill_value: [123.675, 116.28, 103.53]} + - RandomCrop: {} + - RandomFlip: {} batch_transforms: - - BatchRandomResizeOp: + - BatchRandomResize: target_size: [224, 256, 288, 320, 352, 384, 416, 448, 480, 512] random_size: True random_interp: True keep_ratio: False - - NormalizeBoxOp: {} - - PadBoxOp: {num_max_boxes: 90} - - BboxXYXY2XYWHOp: {} - - NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - - PermuteOp: {} - - Gt2YoloTargetOp: + - NormalizeBox: {} + - PadBox: {num_max_boxes: 90} + - BboxXYXY2XYWH: {} + - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} + - Permute: {} + - Gt2YoloTarget: anchor_masks: [[3, 4, 5], [0, 1, 2]] anchors: [[11, 18], [34, 47], [51, 126], [115, 71], [120, 195], [254, 235]] downsample_ratios: [32, 16] @@ -42,10 +42,10 @@ TrainReader: EvalReader: sample_transforms: - - DecodeOp: {} - - ResizeOp: {target_size: [320, 320], keep_ratio: False, interp: 2} - - NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - - PermuteOp: {} + - Decode: {} + - Resize: {target_size: [320, 320], keep_ratio: False, interp: 2} + - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} + - Permute: {} batch_size: 8 drop_empty: false @@ -53,10 +53,10 @@ TestReader: inputs_def: image_shape: [3, 320, 320] sample_transforms: - - DecodeOp: {} - - ResizeOp: {target_size: [320, 320], keep_ratio: False, interp: 2} - - NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - - PermuteOp: {} + - Decode: {} + - Resize: {target_size: [320, 320], keep_ratio: False, interp: 2} + - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} + - Permute: {} batch_size: 1 epoch: 270 diff --git a/dygraph/configs/ppyolo/ppyolo_mbv3_small_coco.yml b/dygraph/configs/ppyolo/ppyolo_mbv3_small_coco.yml index 1cdfe6dea..6dba29769 100644 --- a/dygraph/configs/ppyolo/ppyolo_mbv3_small_coco.yml +++ b/dygraph/configs/ppyolo/ppyolo_mbv3_small_coco.yml @@ -13,24 +13,24 @@ TrainReader: inputs_def: num_max_boxes: 90 sample_transforms: - - DecodeOp: {} - - MixupOp: {alpha: 1.5, beta: 1.5} - - RandomDistortOp: {} - - RandomExpandOp: {fill_value: [123.675, 116.28, 103.53]} - - RandomCropOp: {} - - RandomFlipOp: {} + - Decode: {} + - Mixup: {alpha: 1.5, beta: 1.5} + - RandomDistort: {} + - RandomExpand: {fill_value: [123.675, 116.28, 103.53]} + - RandomCrop: {} + - RandomFlip: {} batch_transforms: - - BatchRandomResizeOp: + - BatchRandomResize: target_size: [224, 256, 288, 320, 352, 384, 416, 448, 480, 512] random_size: True random_interp: True keep_ratio: False - - NormalizeBoxOp: {} - - PadBoxOp: {num_max_boxes: 90} - - BboxXYXY2XYWHOp: {} - - NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - - PermuteOp: {} - - Gt2YoloTargetOp: + - NormalizeBox: {} + - PadBox: {num_max_boxes: 90} + - BboxXYXY2XYWH: {} + - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} + - Permute: {} + - Gt2YoloTarget: anchor_masks: [[3, 4, 5], [0, 1, 2]] anchors: [[11, 18], [34, 47], [51, 126], [115, 71], [120, 195], [254, 235]] downsample_ratios: [32, 16] @@ -42,10 +42,10 @@ TrainReader: EvalReader: sample_transforms: - - DecodeOp: {} - - ResizeOp: {target_size: [320, 320], keep_ratio: False, interp: 2} - - NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - - PermuteOp: {} + - Decode: {} + - Resize: {target_size: [320, 320], keep_ratio: False, interp: 2} + - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} + - Permute: {} batch_size: 8 drop_empty: false @@ -53,10 +53,10 @@ TestReader: inputs_def: image_shape: [3, 320, 320] sample_transforms: - - DecodeOp: {} - - ResizeOp: {target_size: [320, 320], keep_ratio: False, interp: 2} - - NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - - PermuteOp: {} + - Decode: {} + - Resize: {target_size: [320, 320], keep_ratio: False, interp: 2} + - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} + - Permute: {} batch_size: 1 epoch: 270 diff --git a/dygraph/configs/ppyolo/ppyolo_r18vd_coco.yml b/dygraph/configs/ppyolo/ppyolo_r18vd_coco.yml index e89dbb842..c15800ec6 100644 --- a/dygraph/configs/ppyolo/ppyolo_r18vd_coco.yml +++ b/dygraph/configs/ppyolo/ppyolo_r18vd_coco.yml @@ -11,27 +11,27 @@ weights: output/ppyolo_r18vd_coco/model_final TrainReader: sample_transforms: - - DecodeOp: {} - - MixupOp: {alpha: 1.5, beta: 1.5} - - RandomDistortOp: {} - - RandomExpandOp: {fill_value: [123.675, 116.28, 103.53]} - - RandomCropOp: {} - - RandomFlipOp: {} + - Decode: {} + - Mixup: {alpha: 1.5, beta: 1.5} + - RandomDistort: {} + - RandomExpand: {fill_value: [123.675, 116.28, 103.53]} + - RandomCrop: {} + - RandomFlip: {} batch_transforms: - - BatchRandomResizeOp: + - BatchRandomResize: target_size: [320, 352, 384, 416, 448, 480, 512, 544, 576, 608] random_size: True random_interp: True keep_ratio: False - - NormalizeBoxOp: {} - - PadBoxOp: {num_max_boxes: 50} - - BboxXYXY2XYWHOp: {} - - NormalizeImageOp: + - NormalizeBox: {} + - PadBox: {num_max_boxes: 50} + - BboxXYXY2XYWH: {} + - NormalizeImage: mean: [0.485, 0.456, 0.406] std: [0.229, 0.224, 0.225] is_scale: True - - PermuteOp: {} - - Gt2YoloTargetOp: + - Permute: {} + - Gt2YoloTarget: anchor_masks: [[3, 4, 5], [0, 1, 2]] anchors: [[10, 14], [23, 27], [37, 58], [81, 82], [135, 169], [344, 319]] downsample_ratios: [32, 16] @@ -42,10 +42,10 @@ TrainReader: EvalReader: sample_transforms: - - DecodeOp: {} - - ResizeOp: {target_size: [512, 512], keep_ratio: False, interp: 2} - - NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - - PermuteOp: {} + - Decode: {} + - Resize: {target_size: [512, 512], keep_ratio: False, interp: 2} + - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} + - Permute: {} batch_size: 8 drop_empty: false @@ -53,10 +53,10 @@ TestReader: inputs_def: image_shape: [3, 512, 512] sample_transforms: - - DecodeOp: {} - - ResizeOp: {target_size: [512, 512], keep_ratio: False, interp: 2} - - NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - - PermuteOp: {} + - Decode: {} + - Resize: {target_size: [512, 512], keep_ratio: False, interp: 2} + - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} + - Permute: {} batch_size: 1 epoch: 270 diff --git a/dygraph/configs/solov2/solov2_r50_fpn_3x_coco.yml b/dygraph/configs/solov2/solov2_r50_fpn_3x_coco.yml index abda7711c..6ffff46bb 100644 --- a/dygraph/configs/solov2/solov2_r50_fpn_3x_coco.yml +++ b/dygraph/configs/solov2/solov2_r50_fpn_3x_coco.yml @@ -20,17 +20,17 @@ LearningRate: TrainReader: sample_transforms: - - DecodeOp: {} + - Decode: {} - Poly2Mask: {} - - RandomResizeOp: {interp: 1, + - RandomResize: {interp: 1, target_size: [[640, 1333], [672, 1333], [704, 1333], [736, 1333], [768, 1333], [800, 1333]], keep_ratio: True} - - RandomFlipOp: {} - - NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - - PermuteOp: {} + - RandomFlip: {} + - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} + - Permute: {} batch_transforms: - - PadBatchOp: {pad_to_stride: 32} - - Gt2Solov2TargetOp: {num_grids: [40, 36, 24, 16, 12], + - PadBatch: {pad_to_stride: 32} + - Gt2Solov2Target: {num_grids: [40, 36, 24, 16, 12], scale_ranges: [[1, 96], [48, 192], [96, 384], [192, 768], [384, 2048]], coord_sigma: 0.2} batch_size: 2 diff --git a/dygraph/configs/yolov3/yolov3_mobilenet_v1_270e_voc.yml b/dygraph/configs/yolov3/yolov3_mobilenet_v1_270e_voc.yml index df44e9262..a6b2303f9 100644 --- a/dygraph/configs/yolov3/yolov3_mobilenet_v1_270e_voc.yml +++ b/dygraph/configs/yolov3/yolov3_mobilenet_v1_270e_voc.yml @@ -13,24 +13,24 @@ TrainReader: inputs_def: num_max_boxes: 50 sample_transforms: - - DecodeOp: {} - - MixupOp: {alpha: 1.5, beta: 1.5} - - RandomDistortOp: {} - - RandomExpandOp: {fill_value: [123.675, 116.28, 103.53]} - - RandomCropOp: {} - - RandomFlipOp: {} + - Decode: {} + - Mixup: {alpha: 1.5, beta: 1.5} + - RandomDistort: {} + - RandomExpand: {fill_value: [123.675, 116.28, 103.53]} + - RandomCrop: {} + - RandomFlip: {} batch_transforms: - - BatchRandomResizeOp: + - BatchRandomResize: target_size: [320, 352, 384, 416, 448, 480, 512, 544, 576, 608] random_size: True random_interp: True keep_ratio: False - - NormalizeBoxOp: {} - - PadBoxOp: {num_max_boxes: 50} - - BboxXYXY2XYWHOp: {} - - NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - - PermuteOp: {} - - Gt2YoloTargetOp: + - NormalizeBox: {} + - PadBox: {num_max_boxes: 50} + - BboxXYXY2XYWH: {} + - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} + - Permute: {} + - Gt2YoloTarget: anchor_masks: [[6, 7, 8], [3, 4, 5], [0, 1, 2]] anchors: [[10, 13], [16, 30], [33, 23], [30, 61], [62, 45], [59, 119], [116, 90], [156, 198], [373, 326]] downsample_ratios: [32, 16, 8] diff --git a/dygraph/configs/yolov3/yolov3_mobilenet_v1_roadsign.yml b/dygraph/configs/yolov3/yolov3_mobilenet_v1_roadsign.yml index 2f548dcc4..f5048c2f7 100644 --- a/dygraph/configs/yolov3/yolov3_mobilenet_v1_roadsign.yml +++ b/dygraph/configs/yolov3/yolov3_mobilenet_v1_roadsign.yml @@ -19,24 +19,24 @@ TrainReader: inputs_def: num_max_boxes: 50 sample_transforms: - - DecodeOp: {} - - MixupOp: {alpha: 1.5, beta: 1.5} - - RandomDistortOp: {} - - RandomExpandOp: {fill_value: [123.675, 116.28, 103.53]} - - RandomCropOp: {} - - RandomFlipOp: {} + - Decode: {} + - Mixup: {alpha: 1.5, beta: 1.5} + - RandomDistort: {} + - RandomExpand: {fill_value: [123.675, 116.28, 103.53]} + - RandomCrop: {} + - RandomFlip: {} batch_transforms: - - BatchRandomResizeOp: + - BatchRandomResize: target_size: [320, 352, 384, 416, 448, 480, 512, 544, 576, 608] random_size: True random_interp: True keep_ratio: False - - NormalizeBoxOp: {} - - PadBoxOp: {num_max_boxes: 50} - - BboxXYXY2XYWHOp: {} - - NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - - PermuteOp: {} - - Gt2YoloTargetOp: + - NormalizeBox: {} + - PadBox: {num_max_boxes: 50} + - BboxXYXY2XYWH: {} + - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} + - Permute: {} + - Gt2YoloTarget: anchor_masks: [[6, 7, 8], [3, 4, 5], [0, 1, 2]] anchors: [[10, 13], [16, 30], [33, 23], [30, 61], [62, 45], [59, 119], [116, 90], [156, 198], [373, 326]] downsample_ratios: [32, 16, 8] diff --git a/dygraph/configs/yolov3/yolov3_mobilenet_v3_large_270e_voc.yml b/dygraph/configs/yolov3/yolov3_mobilenet_v3_large_270e_voc.yml index 4b459415a..5725accb7 100644 --- a/dygraph/configs/yolov3/yolov3_mobilenet_v3_large_270e_voc.yml +++ b/dygraph/configs/yolov3/yolov3_mobilenet_v3_large_270e_voc.yml @@ -13,24 +13,24 @@ TrainReader: inputs_def: num_max_boxes: 50 sample_transforms: - - DecodeOp: {} - - MixupOp: {alpha: 1.5, beta: 1.5} - - RandomDistortOp: {} - - RandomExpandOp: {fill_value: [123.675, 116.28, 103.53]} - - RandomCropOp: {} - - RandomFlipOp: {} + - Decode: {} + - Mixup: {alpha: 1.5, beta: 1.5} + - RandomDistort: {} + - RandomExpand: {fill_value: [123.675, 116.28, 103.53]} + - RandomCrop: {} + - RandomFlip: {} batch_transforms: - - BatchRandomResizeOp: + - BatchRandomResize: target_size: [320, 352, 384, 416, 448, 480, 512, 544, 576, 608] random_size: True random_interp: True keep_ratio: False - - NormalizeBoxOp: {} - - PadBoxOp: {num_max_boxes: 50} - - BboxXYXY2XYWHOp: {} - - NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - - PermuteOp: {} - - Gt2YoloTargetOp: + - NormalizeBox: {} + - PadBox: {num_max_boxes: 50} + - BboxXYXY2XYWH: {} + - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} + - Permute: {} + - Gt2YoloTarget: anchor_masks: [[6, 7, 8], [3, 4, 5], [0, 1, 2]] anchors: [[10, 13], [16, 30], [33, 23], [30, 61], [62, 45], [59, 119], [116, 90], [156, 198], [373, 326]] downsample_ratios: [32, 16, 8] -- GitLab