更换文档检测模型
This commit is contained in:
19
paddle_detection/configs/solov2/_base_/optimizer_1x.yml
Normal file
19
paddle_detection/configs/solov2/_base_/optimizer_1x.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
epoch: 12
|
||||
|
||||
LearningRate:
|
||||
base_lr: 0.01
|
||||
schedulers:
|
||||
- !PiecewiseDecay
|
||||
gamma: 0.1
|
||||
milestones: [8, 11]
|
||||
- !LinearWarmup
|
||||
start_factor: 0.
|
||||
steps: 1000
|
||||
|
||||
OptimizerBuilder:
|
||||
optimizer:
|
||||
momentum: 0.9
|
||||
type: Momentum
|
||||
regularizer:
|
||||
factor: 0.0001
|
||||
type: L2
|
||||
@@ -0,0 +1,47 @@
|
||||
worker_num: 2
|
||||
TrainReader:
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- Poly2Mask: {}
|
||||
- RandomDistort: {}
|
||||
- RandomCrop: {}
|
||||
- RandomResize: {interp: 1,
|
||||
target_size: [[352, 852], [384, 852], [416, 852], [448, 852], [480, 852], [512, 852]],
|
||||
keep_ratio: True}
|
||||
- RandomFlip: {}
|
||||
- NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
|
||||
- Permute: {}
|
||||
batch_transforms:
|
||||
- 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
|
||||
shuffle: true
|
||||
drop_last: true
|
||||
|
||||
|
||||
EvalReader:
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
|
||||
- Resize: {interp: 1, target_size: [512, 852], keep_ratio: True}
|
||||
- Permute: {}
|
||||
batch_transforms:
|
||||
- PadBatch: {pad_to_stride: 32}
|
||||
batch_size: 1
|
||||
shuffle: false
|
||||
drop_last: false
|
||||
|
||||
|
||||
TestReader:
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
|
||||
- Resize: {interp: 1, target_size: [512, 852], keep_ratio: True}
|
||||
- Permute: {}
|
||||
batch_transforms:
|
||||
- PadBatch: {pad_to_stride: 32}
|
||||
batch_size: 1
|
||||
shuffle: false
|
||||
drop_last: false
|
||||
40
paddle_detection/configs/solov2/_base_/solov2_r50_fpn.yml
Normal file
40
paddle_detection/configs/solov2/_base_/solov2_r50_fpn.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
architecture: SOLOv2
|
||||
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/ResNet50_cos_pretrained.pdparams
|
||||
|
||||
SOLOv2:
|
||||
backbone: ResNet
|
||||
neck: FPN
|
||||
solov2_head: SOLOv2Head
|
||||
mask_head: SOLOv2MaskHead
|
||||
|
||||
ResNet:
|
||||
depth: 50
|
||||
freeze_at: 0
|
||||
return_idx: [0,1,2,3]
|
||||
num_stages: 4
|
||||
|
||||
FPN:
|
||||
out_channel: 256
|
||||
|
||||
SOLOv2Head:
|
||||
seg_feat_channels: 512
|
||||
stacked_convs: 4
|
||||
num_grids: [40, 36, 24, 16, 12]
|
||||
kernel_out_channels: 256
|
||||
solov2_loss: SOLOv2Loss
|
||||
mask_nms: MaskMatrixNMS
|
||||
|
||||
SOLOv2MaskHead:
|
||||
mid_channels: 128
|
||||
out_channels: 256
|
||||
start_level: 0
|
||||
end_level: 3
|
||||
|
||||
SOLOv2Loss:
|
||||
ins_loss_weight: 3.0
|
||||
focal_loss_gamma: 2.0
|
||||
focal_loss_alpha: 0.25
|
||||
|
||||
MaskMatrixNMS:
|
||||
pre_nms_top_n: 500
|
||||
post_nms_top_n: 100
|
||||
43
paddle_detection/configs/solov2/_base_/solov2_reader.yml
Normal file
43
paddle_detection/configs/solov2/_base_/solov2_reader.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
worker_num: 8
|
||||
TrainReader:
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- Poly2Mask: {}
|
||||
- Resize: {interp: 1, target_size: [800, 1333], keep_ratio: True}
|
||||
- RandomFlip: {}
|
||||
- NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
|
||||
- Permute: {}
|
||||
batch_transforms:
|
||||
- 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
|
||||
shuffle: true
|
||||
drop_last: true
|
||||
|
||||
|
||||
EvalReader:
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
|
||||
- Resize: {interp: 1, target_size: [800, 1333], keep_ratio: True}
|
||||
- Permute: {}
|
||||
batch_transforms:
|
||||
- PadBatch: {pad_to_stride: 32}
|
||||
batch_size: 1
|
||||
shuffle: false
|
||||
drop_last: false
|
||||
|
||||
|
||||
TestReader:
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
|
||||
- Resize: {interp: 1, target_size: [800, 1333], keep_ratio: True}
|
||||
- Permute: {}
|
||||
batch_transforms:
|
||||
- PadBatch: {pad_to_stride: 32}
|
||||
batch_size: 1
|
||||
shuffle: false
|
||||
drop_last: false
|
||||
Reference in New Issue
Block a user