未验证 提交 0127fe3e 编写于 作者: W wangxinxin08 提交者: GitHub

unify data transform (#2239)

上级 52b8e3fb
worker_num: 2 worker_num: 2
TrainReader: TrainReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- RandomResizeOp: {target_size: [[640, 1333], [672, 1333], [704, 1333], [736, 1333], [768, 1333], [800, 1333]], interp: 2, keep_ratio: True} - RandomResize: {target_size: [[640, 1333], [672, 1333], [704, 1333], [736, 1333], [768, 1333], [800, 1333]], interp: 2, keep_ratio: True}
- RandomFlipOp: {prob: 0.5} - RandomFlip: {prob: 0.5}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 32, pad_gt: true} - PadBatch: {pad_to_stride: 32, pad_gt: true}
batch_size: 1 batch_size: 1
shuffle: true shuffle: true
drop_last: true drop_last: true
...@@ -15,12 +15,12 @@ TrainReader: ...@@ -15,12 +15,12 @@ TrainReader:
EvalReader: EvalReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {interp: 2, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 2, target_size: [800, 1333], keep_ratio: True}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 32, pad_gt: false} - PadBatch: {pad_to_stride: 32, pad_gt: false}
batch_size: 1 batch_size: 1
shuffle: false shuffle: false
drop_last: false drop_last: false
...@@ -29,12 +29,12 @@ EvalReader: ...@@ -29,12 +29,12 @@ EvalReader:
TestReader: TestReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {interp: 2, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 2, target_size: [800, 1333], keep_ratio: True}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 32, pad_gt: false} - PadBatch: {pad_to_stride: 32, pad_gt: false}
batch_size: 1 batch_size: 1
shuffle: false shuffle: false
drop_last: false drop_last: false
worker_num: 2 worker_num: 2
TrainReader: TrainReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- RandomResizeOp: {target_size: [[640, 1333], [672, 1333], [704, 1333], [736, 1333], [768, 1333], [800, 1333]], interp: 2, keep_ratio: True} - RandomResize: {target_size: [[640, 1333], [672, 1333], [704, 1333], [736, 1333], [768, 1333], [800, 1333]], interp: 2, keep_ratio: True}
- RandomFlipOp: {prob: 0.5} - RandomFlip: {prob: 0.5}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 32, pad_gt: true} - PadBatch: {pad_to_stride: 32, pad_gt: true}
batch_size: 1 batch_size: 1
shuffle: true shuffle: true
drop_last: true drop_last: true
...@@ -15,12 +15,12 @@ TrainReader: ...@@ -15,12 +15,12 @@ TrainReader:
EvalReader: EvalReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {interp: 2, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 2, target_size: [800, 1333], keep_ratio: True}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 32, pad_gt: false} - PadBatch: {pad_to_stride: 32, pad_gt: false}
batch_size: 1 batch_size: 1
shuffle: false shuffle: false
drop_last: false drop_last: false
...@@ -29,12 +29,12 @@ EvalReader: ...@@ -29,12 +29,12 @@ EvalReader:
TestReader: TestReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {interp: 2, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 2, target_size: [800, 1333], keep_ratio: True}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 32, pad_gt: false} - PadBatch: {pad_to_stride: 32, pad_gt: false}
batch_size: 1 batch_size: 1
shuffle: false shuffle: false
drop_last: false drop_last: false
worker_num: 2 worker_num: 2
TrainReader: TrainReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- RandomResizeOp: {target_size: [[640, 1333], [672, 1333], [704, 1333], [736, 1333], [768, 1333], [800, 1333]], interp: 2, keep_ratio: True} - RandomResize: {target_size: [[640, 1333], [672, 1333], [704, 1333], [736, 1333], [768, 1333], [800, 1333]], interp: 2, keep_ratio: True}
- RandomFlipOp: {prob: 0.5} - RandomFlip: {prob: 0.5}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 32, pad_gt: true} - PadBatch: {pad_to_stride: 32, pad_gt: true}
batch_size: 1 batch_size: 1
shuffle: true shuffle: true
drop_last: true drop_last: true
...@@ -15,12 +15,12 @@ TrainReader: ...@@ -15,12 +15,12 @@ TrainReader:
EvalReader: EvalReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {interp: 2, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 2, target_size: [800, 1333], keep_ratio: True}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 32, pad_gt: false} - PadBatch: {pad_to_stride: 32, pad_gt: false}
batch_size: 1 batch_size: 1
shuffle: false shuffle: false
drop_last: false drop_last: false
...@@ -29,12 +29,12 @@ EvalReader: ...@@ -29,12 +29,12 @@ EvalReader:
TestReader: TestReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {interp: 2, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 2, target_size: [800, 1333], keep_ratio: True}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 32, pad_gt: false} - PadBatch: {pad_to_stride: 32, pad_gt: false}
batch_size: 1 batch_size: 1
shuffle: false shuffle: false
drop_last: false drop_last: false
worker_num: 2 worker_num: 2
TrainReader: TrainReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- RandomResizeOp: {target_size: [[640, 1333], [672, 1333], [704, 1333], [736, 1333], [768, 1333], [800, 1333]], interp: 2, keep_ratio: True} - RandomResize: {target_size: [[640, 1333], [672, 1333], [704, 1333], [736, 1333], [768, 1333], [800, 1333]], interp: 2, keep_ratio: True}
- RandomFlipOp: {prob: 0.5} - RandomFlip: {prob: 0.5}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: -1., pad_gt: true} - PadBatch: {pad_to_stride: -1., pad_gt: true}
batch_size: 1 batch_size: 1
shuffle: true shuffle: true
drop_last: true drop_last: true
...@@ -15,12 +15,12 @@ TrainReader: ...@@ -15,12 +15,12 @@ TrainReader:
EvalReader: EvalReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {interp: 2, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 2, target_size: [800, 1333], keep_ratio: True}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: -1., pad_gt: false} - PadBatch: {pad_to_stride: -1., pad_gt: false}
batch_size: 1 batch_size: 1
shuffle: false shuffle: false
drop_last: false drop_last: false
...@@ -29,12 +29,12 @@ EvalReader: ...@@ -29,12 +29,12 @@ EvalReader:
TestReader: TestReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {interp: 2, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 2, target_size: [800, 1333], keep_ratio: True}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: -1., pad_gt: false} - PadBatch: {pad_to_stride: -1., pad_gt: false}
batch_size: 1 batch_size: 1
shuffle: false shuffle: false
drop_last: false drop_last: false
worker_num: 2 worker_num: 2
TrainReader: TrainReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- RandomFlipOp: {prob: 0.5} - RandomFlip: {prob: 0.5}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- ResizeImage: {target_size: 800, max_size: 1333, interp: 1, use_cv2: true} - Resize: {target_size: [800, 1333], keep_ratio: true, interp: 1}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 128} - PadBatch: {pad_to_stride: 128}
- Gt2FCOSTarget: - Gt2FCOSTarget:
object_sizes_boundary: [64, 128, 256, 512] object_sizes_boundary: [64, 128, 256, 512]
center_sampling_radius: 1.5 center_sampling_radius: 1.5
...@@ -20,23 +20,23 @@ TrainReader: ...@@ -20,23 +20,23 @@ TrainReader:
EvalReader: EvalReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- ResizeOp: {interp: 1, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 1, target_size: [800, 1333], keep_ratio: True}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 128} - PadBatch: {pad_to_stride: 128}
batch_size: 1 batch_size: 1
shuffle: false shuffle: false
TestReader: TestReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- ResizeOp: {interp: 1, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 1, target_size: [800, 1333], keep_ratio: True}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 128} - PadBatch: {pad_to_stride: 128}
batch_size: 1 batch_size: 1
shuffle: false shuffle: false
worker_num: 2 worker_num: 2
TrainReader: TrainReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- RandomResizeOp: {target_size: [[640, 1333], [672, 1333], [704, 1333], [736, 1333], [768, 1333], [800, 1333]], interp: 2, keep_ratio: True} - RandomResize: {target_size: [[640, 1333], [672, 1333], [704, 1333], [736, 1333], [768, 1333], [800, 1333]], interp: 2, keep_ratio: True}
- RandomFlipOp: {prob: 0.5} - RandomFlip: {prob: 0.5}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 32, pad_gt: true} - PadBatch: {pad_to_stride: 32, pad_gt: true}
batch_size: 1 batch_size: 1
shuffle: true shuffle: true
drop_last: true drop_last: true
EvalReader: EvalReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {interp: 2, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 2, target_size: [800, 1333], keep_ratio: True}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 32, pad_gt: false} - PadBatch: {pad_to_stride: 32, pad_gt: false}
batch_size: 1 batch_size: 1
shuffle: false shuffle: false
drop_last: false drop_last: false
...@@ -28,12 +28,12 @@ EvalReader: ...@@ -28,12 +28,12 @@ EvalReader:
TestReader: TestReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {interp: 2, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 2, target_size: [800, 1333], keep_ratio: True}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 32, pad_gt: false} - PadBatch: {pad_to_stride: 32, pad_gt: false}
batch_size: 1 batch_size: 1
shuffle: false shuffle: false
drop_last: false drop_last: false
worker_num: 2 worker_num: 2
TrainReader: TrainReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- RandomResizeOp: {target_size: [[640, 1333], [672, 1333], [704, 1333], [736, 1333], [768, 1333], [800, 1333]], interp: 2, keep_ratio: True} - RandomResize: {target_size: [[640, 1333], [672, 1333], [704, 1333], [736, 1333], [768, 1333], [800, 1333]], interp: 2, keep_ratio: True}
- RandomFlipOp: {prob: 0.5} - RandomFlip: {prob: 0.5}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: -1., pad_gt: true} - PadBatch: {pad_to_stride: -1., pad_gt: true}
batch_size: 1 batch_size: 1
shuffle: true shuffle: true
drop_last: true drop_last: true
...@@ -15,12 +15,12 @@ TrainReader: ...@@ -15,12 +15,12 @@ TrainReader:
EvalReader: EvalReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {interp: 2, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 2, target_size: [800, 1333], keep_ratio: True}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: -1., pad_gt: false} - PadBatch: {pad_to_stride: -1., pad_gt: false}
batch_size: 1 batch_size: 1
shuffle: false shuffle: false
drop_last: false drop_last: false
...@@ -29,12 +29,12 @@ EvalReader: ...@@ -29,12 +29,12 @@ EvalReader:
TestReader: TestReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {interp: 2, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 2, target_size: [800, 1333], keep_ratio: True}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: -1., pad_gt: false} - PadBatch: {pad_to_stride: -1., pad_gt: false}
batch_size: 1 batch_size: 1
shuffle: false shuffle: false
drop_last: false drop_last: false
......
...@@ -3,20 +3,20 @@ TrainReader: ...@@ -3,20 +3,20 @@ TrainReader:
inputs_def: inputs_def:
num_max_boxes: 50 num_max_boxes: 50
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- MixupOp: {alpha: 1.5, beta: 1.5} - Mixup: {alpha: 1.5, beta: 1.5}
- RandomDistortOp: {} - RandomDistort: {}
- RandomExpandOp: {fill_value: [123.675, 116.28, 103.53]} - RandomExpand: {fill_value: [123.675, 116.28, 103.53]}
- RandomCropOp: {} - RandomCrop: {}
- RandomFlipOp: {} - RandomFlip: {}
batch_transforms: batch_transforms:
- BatchRandomResizeOp: {target_size: [320, 352, 384, 416, 448, 480, 512, 544, 576, 608], random_size: True, random_interp: True, keep_ratio: False} - BatchRandomResize: {target_size: [320, 352, 384, 416, 448, 480, 512, 544, 576, 608], random_size: True, random_interp: True, keep_ratio: False}
- NormalizeBoxOp: {} - NormalizeBox: {}
- PadBoxOp: {num_max_boxes: 50} - PadBox: {num_max_boxes: 50}
- BboxXYXY2XYWHOp: {} - BboxXYXY2XYWH: {}
- NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
- PermuteOp: {} - Permute: {}
- Gt2YoloTargetOp: {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]} - 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]}
batch_size: 24 batch_size: 24
shuffle: true shuffle: true
drop_last: true drop_last: true
...@@ -25,10 +25,10 @@ TrainReader: ...@@ -25,10 +25,10 @@ TrainReader:
EvalReader: EvalReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {target_size: [608, 608], keep_ratio: False, interp: 2} - Resize: {target_size: [608, 608], keep_ratio: False, interp: 2}
- NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
- PermuteOp: {} - Permute: {}
batch_size: 8 batch_size: 8
drop_empty: false drop_empty: false
...@@ -36,8 +36,8 @@ TestReader: ...@@ -36,8 +36,8 @@ TestReader:
inputs_def: inputs_def:
image_shape: [3, 608, 608] image_shape: [3, 608, 608]
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {target_size: [608, 608], keep_ratio: False, interp: 2} - Resize: {target_size: [608, 608], keep_ratio: False, interp: 2}
- NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
- PermuteOp: {} - Permute: {}
batch_size: 1 batch_size: 1
worker_num: 2 worker_num: 2
TrainReader: TrainReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- Poly2Mask: {} - Poly2Mask: {}
- ResizeOp: {interp: 1, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 1, target_size: [800, 1333], keep_ratio: True}
- RandomFlipOp: {} - RandomFlip: {}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 32} - PadBatch: {pad_to_stride: 32}
- Gt2Solov2TargetOp: {num_grids: [40, 36, 24, 16, 12], - Gt2Solov2Target: {num_grids: [40, 36, 24, 16, 12],
scale_ranges: [[1, 96], [48, 192], [96, 384], [192, 768], [384, 2048]], scale_ranges: [[1, 96], [48, 192], [96, 384], [192, 768], [384, 2048]],
coord_sigma: 0.2} coord_sigma: 0.2}
batch_size: 2 batch_size: 2
...@@ -19,12 +19,12 @@ TrainReader: ...@@ -19,12 +19,12 @@ TrainReader:
EvalReader: EvalReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- ResizeOp: {interp: 1, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 1, target_size: [800, 1333], keep_ratio: True}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 32} - PadBatch: {pad_to_stride: 32}
batch_size: 1 batch_size: 1
shuffle: false shuffle: false
drop_last: false drop_last: false
...@@ -33,12 +33,12 @@ EvalReader: ...@@ -33,12 +33,12 @@ EvalReader:
TestReader: TestReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- NormalizeImageOp: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
- ResizeOp: {interp: 1, target_size: [800, 1333], keep_ratio: True} - Resize: {interp: 1, target_size: [800, 1333], keep_ratio: True}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- PadBatchOp: {pad_to_stride: 32} - PadBatch: {pad_to_stride: 32}
batch_size: 1 batch_size: 1
shuffle: false shuffle: false
drop_last: false drop_last: false
...@@ -3,17 +3,17 @@ TrainReader: ...@@ -3,17 +3,17 @@ TrainReader:
inputs_def: inputs_def:
num_max_boxes: 90 num_max_boxes: 90
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- RandomDistortOp: {brightness: [0.5, 1.125, 0.875], random_apply: False} - RandomDistort: {brightness: [0.5, 1.125, 0.875], random_apply: False}
- RandomExpandOp: {fill_value: [127.5, 127.5, 127.5]} - RandomExpand: {fill_value: [127.5, 127.5, 127.5]}
- RandomCropOp: {allow_no_crop: Fasle} - RandomCrop: {allow_no_crop: Fasle}
- RandomFlipOp: {} - RandomFlip: {}
- ResizeOp: {target_size: [300, 300], keep_ratio: False, interp: 1} - Resize: {target_size: [300, 300], keep_ratio: False, interp: 1}
- NormalizeBoxOp: {} - NormalizeBox: {}
- PadBoxOp: {num_max_boxes: 90} - PadBox: {num_max_boxes: 90}
batch_transforms: batch_transforms:
- NormalizeImageOp: {mean: [127.5, 127.5, 127.5], std: [127.502231, 127.502231, 127.502231], is_scale: false} - NormalizeImage: {mean: [127.5, 127.5, 127.5], std: [127.502231, 127.502231, 127.502231], is_scale: false}
- PermuteOp: {} - Permute: {}
batch_size: 32 batch_size: 32
shuffle: true shuffle: true
drop_last: true drop_last: true
...@@ -21,10 +21,10 @@ TrainReader: ...@@ -21,10 +21,10 @@ TrainReader:
EvalReader: EvalReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {target_size: [300, 300], keep_ratio: False, interp: 1} - Resize: {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} - NormalizeImage: {mean: [127.5, 127.5, 127.5], std: [127.502231, 127.502231, 127.502231], is_scale: false}
- PermuteOp: {} - Permute: {}
batch_size: 1 batch_size: 1
drop_empty: false drop_empty: false
...@@ -33,8 +33,8 @@ TestReader: ...@@ -33,8 +33,8 @@ TestReader:
inputs_def: inputs_def:
image_shape: [3, 300, 300] image_shape: [3, 300, 300]
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {target_size: [300, 300], keep_ratio: False, interp: 1} - Resize: {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} - NormalizeImage: {mean: [127.5, 127.5, 127.5], std: [127.502231, 127.502231, 127.502231], is_scale: false}
- PermuteOp: {} - Permute: {}
batch_size: 1 batch_size: 1
...@@ -4,18 +4,18 @@ TrainReader: ...@@ -4,18 +4,18 @@ TrainReader:
num_max_boxes: 90 num_max_boxes: 90
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- RandomDistortOp: {brightness: [0.5, 1.125, 0.875], random_apply: False} - RandomDistort: {brightness: [0.5, 1.125, 0.875], random_apply: False}
- RandomExpandOp: {fill_value: [104., 117., 123.]} - RandomExpand: {fill_value: [104., 117., 123.]}
- RandomCropOp: {allow_no_crop: true} - RandomCrop: {allow_no_crop: true}
- RandomFlipOp: {} - RandomFlip: {}
- ResizeOp: {target_size: [300, 300], keep_ratio: False, interp: 1} - Resize: {target_size: [300, 300], keep_ratio: False, interp: 1}
- NormalizeBoxOp: {} - NormalizeBox: {}
- PadBoxOp: {num_max_boxes: 90} - PadBox: {num_max_boxes: 90}
batch_transforms: batch_transforms:
- NormalizeImageOp: {mean: [104., 117., 123.], std: [1., 1., 1.], is_scale: false} - NormalizeImage: {mean: [104., 117., 123.], std: [1., 1., 1.], is_scale: false}
- PermuteOp: {} - Permute: {}
batch_size: 8 batch_size: 8
shuffle: true shuffle: true
...@@ -24,10 +24,10 @@ TrainReader: ...@@ -24,10 +24,10 @@ TrainReader:
EvalReader: EvalReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {target_size: [300, 300], keep_ratio: False, interp: 1} - Resize: {target_size: [300, 300], keep_ratio: False, interp: 1}
- NormalizeImageOp: {mean: [104., 117., 123.], std: [1., 1., 1.], is_scale: false} - NormalizeImage: {mean: [104., 117., 123.], std: [1., 1., 1.], is_scale: false}
- PermuteOp: {} - Permute: {}
batch_size: 1 batch_size: 1
drop_empty: false drop_empty: false
...@@ -35,8 +35,8 @@ TestReader: ...@@ -35,8 +35,8 @@ TestReader:
inputs_def: inputs_def:
image_shape: [3, 300, 300] image_shape: [3, 300, 300]
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {target_size: [300, 300], keep_ratio: False, interp: 1} - Resize: {target_size: [300, 300], keep_ratio: False, interp: 1}
- NormalizeImageOp: {mean: [104., 117., 123.], std: [1., 1., 1.], is_scale: false} - NormalizeImage: {mean: [104., 117., 123.], std: [1., 1., 1.], is_scale: false}
- PermuteOp: {} - Permute: {}
batch_size: 1 batch_size: 1
...@@ -3,17 +3,17 @@ TrainReader: ...@@ -3,17 +3,17 @@ TrainReader:
inputs_def: inputs_def:
num_max_boxes: 90 num_max_boxes: 90
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- RandomDistortOp: {brightness: [0.5, 1.125, 0.875], random_apply: False} - RandomDistort: {brightness: [0.5, 1.125, 0.875], random_apply: False}
- RandomExpandOp: {fill_value: [123.675, 116.28, 103.53]} - RandomExpand: {fill_value: [123.675, 116.28, 103.53]}
- RandomCropOp: {allow_no_crop: Fasle} - RandomCrop: {allow_no_crop: Fasle}
- RandomFlipOp: {} - RandomFlip: {}
- ResizeOp: {target_size: [300, 300], keep_ratio: False, interp: 1} - Resize: {target_size: [300, 300], keep_ratio: False, interp: 1}
- NormalizeBoxOp: {} - NormalizeBox: {}
- PadBoxOp: {num_max_boxes: 90} - PadBox: {num_max_boxes: 90}
batch_transforms: batch_transforms:
- NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: true} - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: true}
- PermuteOp: {} - Permute: {}
batch_size: 64 batch_size: 64
shuffle: true shuffle: true
drop_last: true drop_last: true
...@@ -21,10 +21,10 @@ TrainReader: ...@@ -21,10 +21,10 @@ TrainReader:
EvalReader: EvalReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {target_size: [300, 300], keep_ratio: False, interp: 1} - Resize: {target_size: [300, 300], keep_ratio: False, interp: 1}
- NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: true} - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: true}
- PermuteOp: {} - Permute: {}
batch_size: 1 batch_size: 1
drop_empty: false drop_empty: false
...@@ -33,8 +33,8 @@ TestReader: ...@@ -33,8 +33,8 @@ TestReader:
inputs_def: inputs_def:
image_shape: [3, 300, 300] image_shape: [3, 300, 300]
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {target_size: [300, 300], keep_ratio: False, interp: 1} - Resize: {target_size: [300, 300], keep_ratio: False, interp: 1}
- NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: true} - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: true}
- PermuteOp: {} - Permute: {}
batch_size: 1 batch_size: 1
...@@ -3,17 +3,17 @@ TrainReader: ...@@ -3,17 +3,17 @@ TrainReader:
inputs_def: inputs_def:
num_max_boxes: 90 num_max_boxes: 90
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- RandomDistortOp: {brightness: [0.5, 1.125, 0.875], random_apply: False} - RandomDistort: {brightness: [0.5, 1.125, 0.875], random_apply: False}
- RandomExpandOp: {fill_value: [123.675, 116.28, 103.53]} - RandomExpand: {fill_value: [123.675, 116.28, 103.53]}
- RandomCropOp: {allow_no_crop: Fasle} - RandomCrop: {allow_no_crop: Fasle}
- RandomFlipOp: {} - RandomFlip: {}
- ResizeOp: {target_size: [320, 320], keep_ratio: False, interp: 1} - Resize: {target_size: [320, 320], keep_ratio: False, interp: 1}
- NormalizeBoxOp: {} - NormalizeBox: {}
- PadBoxOp: {num_max_boxes: 90} - PadBox: {num_max_boxes: 90}
batch_transforms: batch_transforms:
- NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: true} - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: true}
- PermuteOp: {} - Permute: {}
batch_size: 64 batch_size: 64
shuffle: true shuffle: true
drop_last: true drop_last: true
...@@ -21,10 +21,10 @@ TrainReader: ...@@ -21,10 +21,10 @@ TrainReader:
EvalReader: EvalReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {target_size: [320, 320], keep_ratio: False, interp: 1} - Resize: {target_size: [320, 320], keep_ratio: False, interp: 1}
- NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: true} - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: true}
- PermuteOp: {} - Permute: {}
batch_size: 1 batch_size: 1
drop_empty: false drop_empty: false
...@@ -33,8 +33,8 @@ TestReader: ...@@ -33,8 +33,8 @@ TestReader:
inputs_def: inputs_def:
image_shape: [3, 320, 320] image_shape: [3, 320, 320]
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {target_size: [320, 320], keep_ratio: False, interp: 1} - Resize: {target_size: [320, 320], keep_ratio: False, interp: 1}
- NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: true} - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: true}
- PermuteOp: {} - Permute: {}
batch_size: 1 batch_size: 1
worker_num: 2 worker_num: 2
TrainReader: TrainReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- RandomFlipOp: {prob: 0.5} - RandomFlip: {prob: 0.5}
- ResizeOp: {interp: 1, target_size: [512, 512], keep_ratio: False} - Resize: {interp: 1, target_size: [512, 512], keep_ratio: False}
- NormalizeImageOp: {mean: [123.675, 116.28, 103.53], std: [58.395, 57.12, 57.375], is_scale: false} - NormalizeImage: {mean: [123.675, 116.28, 103.53], std: [58.395, 57.12, 57.375], is_scale: false}
- PermuteOp: {} - Permute: {}
batch_transforms: batch_transforms:
- Gt2TTFTargetOp: {down_ratio: 4} - Gt2TTFTarget: {down_ratio: 4}
- PadBatchOp: {pad_to_stride: 32, pad_gt: true} - PadBatch: {pad_to_stride: 32, pad_gt: true}
batch_size: 12 batch_size: 12
shuffle: true shuffle: true
drop_last: true drop_last: true
EvalReader: EvalReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {interp: 1, target_size: [512, 512], keep_ratio: False} - Resize: {interp: 1, target_size: [512, 512], keep_ratio: False}
- NormalizeImageOp: {is_scale: false, mean: [123.675, 116.28, 103.53], std: [58.395, 57.12, 57.375]} - NormalizeImage: {is_scale: false, mean: [123.675, 116.28, 103.53], std: [58.395, 57.12, 57.375]}
- PermuteOp: {} - Permute: {}
batch_size: 1 batch_size: 1
drop_last: false drop_last: false
drop_empty: false drop_empty: false
TestReader: TestReader:
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {interp: 1, target_size: [512, 512], keep_ratio: False} - Resize: {interp: 1, target_size: [512, 512], keep_ratio: False}
- NormalizeImageOp: {is_scale: false, mean: [123.675, 116.28, 103.53], std: [58.395, 57.12, 57.375]} - NormalizeImage: {is_scale: false, mean: [123.675, 116.28, 103.53], std: [58.395, 57.12, 57.375]}
- PermuteOp: {} - Permute: {}
batch_size: 1 batch_size: 1
drop_last: false drop_last: false
drop_empty: false drop_empty: false
...@@ -3,20 +3,20 @@ TrainReader: ...@@ -3,20 +3,20 @@ TrainReader:
inputs_def: inputs_def:
num_max_boxes: 50 num_max_boxes: 50
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- MixupOp: {alpha: 1.5, beta: 1.5} - Mixup: {alpha: 1.5, beta: 1.5}
- RandomDistortOp: {} - RandomDistort: {}
- RandomExpandOp: {fill_value: [123.675, 116.28, 103.53]} - RandomExpand: {fill_value: [123.675, 116.28, 103.53]}
- RandomCropOp: {} - RandomCrop: {}
- RandomFlipOp: {} - RandomFlip: {}
batch_transforms: batch_transforms:
- BatchRandomResizeOp: {target_size: [320, 352, 384, 416, 448, 480, 512, 544, 576, 608], random_size: True, random_interp: True, keep_ratio: False} - BatchRandomResize: {target_size: [320, 352, 384, 416, 448, 480, 512, 544, 576, 608], random_size: True, random_interp: True, keep_ratio: False}
- NormalizeBoxOp: {} - NormalizeBox: {}
- PadBoxOp: {num_max_boxes: 50} - PadBox: {num_max_boxes: 50}
- BboxXYXY2XYWHOp: {} - BboxXYXY2XYWH: {}
- NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
- PermuteOp: {} - Permute: {}
- Gt2YoloTargetOp: {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]} - 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]}
batch_size: 8 batch_size: 8
shuffle: true shuffle: true
drop_last: true drop_last: true
...@@ -27,10 +27,10 @@ EvalReader: ...@@ -27,10 +27,10 @@ EvalReader:
inputs_def: inputs_def:
num_max_boxes: 50 num_max_boxes: 50
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {target_size: [608, 608], keep_ratio: False, interp: 2} - Resize: {target_size: [608, 608], keep_ratio: False, interp: 2}
- NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
- PermuteOp: {} - Permute: {}
batch_size: 1 batch_size: 1
drop_empty: false drop_empty: false
...@@ -38,8 +38,8 @@ TestReader: ...@@ -38,8 +38,8 @@ TestReader:
inputs_def: inputs_def:
image_shape: [3, 608, 608] image_shape: [3, 608, 608]
sample_transforms: sample_transforms:
- DecodeOp: {} - Decode: {}
- ResizeOp: {target_size: [608, 608], keep_ratio: False, interp: 2} - Resize: {target_size: [608, 608], keep_ratio: False, interp: 2}
- NormalizeImageOp: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True} - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
- PermuteOp: {} - Permute: {}
batch_size: 1 batch_size: 1
...@@ -14,14 +14,9 @@ ...@@ -14,14 +14,9 @@
from . import operators from . import operators
from . import batch_operators from . import batch_operators
from . import operator
from . import batch_operator
# TODO: operators and batch_operators will be replaced by operator and batch_operator
from .operators import * from .operators import *
from .operator import *
from .batch_operators import * from .batch_operators import *
from .batch_operator import *
__all__ = [] __all__ = []
__all__ += registered_ops __all__ += registered_ops
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册