更换文档检测模型
This commit is contained in:
51
paddle_detection/configs/gfl/_base_/gfl_r50_fpn.yml
Normal file
51
paddle_detection/configs/gfl/_base_/gfl_r50_fpn.yml
Normal file
@@ -0,0 +1,51 @@
|
||||
architecture: GFL
|
||||
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/ResNet50_cos_pretrained.pdparams
|
||||
|
||||
GFL:
|
||||
backbone: ResNet
|
||||
neck: FPN
|
||||
head: GFLHead
|
||||
|
||||
ResNet:
|
||||
depth: 50
|
||||
variant: b
|
||||
norm_type: bn
|
||||
freeze_at: 0
|
||||
return_idx: [1,2,3]
|
||||
num_stages: 4
|
||||
|
||||
FPN:
|
||||
out_channel: 256
|
||||
spatial_scales: [0.125, 0.0625, 0.03125]
|
||||
extra_stage: 2
|
||||
has_extra_convs: true
|
||||
use_c5: false
|
||||
|
||||
GFLHead:
|
||||
conv_feat:
|
||||
name: FCOSFeat
|
||||
feat_in: 256
|
||||
feat_out: 256
|
||||
num_convs: 4
|
||||
norm_type: "gn"
|
||||
use_dcn: false
|
||||
fpn_stride: [8, 16, 32, 64, 128]
|
||||
prior_prob: 0.01
|
||||
reg_max: 16
|
||||
loss_class:
|
||||
name: QualityFocalLoss
|
||||
use_sigmoid: True
|
||||
beta: 2.0
|
||||
loss_weight: 1.0
|
||||
loss_dfl:
|
||||
name: DistributionFocalLoss
|
||||
loss_weight: 0.25
|
||||
loss_bbox:
|
||||
name: GIoULoss
|
||||
loss_weight: 2.0
|
||||
nms:
|
||||
name: MultiClassNMS
|
||||
nms_top_k: 1000
|
||||
keep_top_k: 100
|
||||
score_threshold: 0.025
|
||||
nms_threshold: 0.6
|
||||
41
paddle_detection/configs/gfl/_base_/gfl_reader.yml
Normal file
41
paddle_detection/configs/gfl/_base_/gfl_reader.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
worker_num: 2
|
||||
TrainReader:
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- RandomFlip: {prob: 0.5}
|
||||
- Resize: {target_size: [800, 1333], keep_ratio: true, interp: 1}
|
||||
- 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}
|
||||
- Gt2GFLTarget:
|
||||
downsample_ratios: [8, 16, 32, 64, 128]
|
||||
grid_cell_scale: 8
|
||||
batch_size: 2
|
||||
shuffle: true
|
||||
drop_last: true
|
||||
use_shared_memory: True
|
||||
|
||||
|
||||
EvalReader:
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- Resize: {interp: 1, target_size: [800, 1333], keep_ratio: True}
|
||||
- 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}
|
||||
batch_size: 2
|
||||
shuffle: false
|
||||
|
||||
|
||||
TestReader:
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- Resize: {interp: 1, target_size: [800, 1333], keep_ratio: True}
|
||||
- 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}
|
||||
batch_size: 1
|
||||
shuffle: false
|
||||
56
paddle_detection/configs/gfl/_base_/gflv2_r50_fpn.yml
Normal file
56
paddle_detection/configs/gfl/_base_/gflv2_r50_fpn.yml
Normal file
@@ -0,0 +1,56 @@
|
||||
architecture: GFL
|
||||
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/ResNet50_cos_pretrained.pdparams
|
||||
|
||||
GFL:
|
||||
backbone: ResNet
|
||||
neck: FPN
|
||||
head: GFLHead
|
||||
|
||||
ResNet:
|
||||
depth: 50
|
||||
variant: b
|
||||
norm_type: bn
|
||||
freeze_at: 0
|
||||
return_idx: [1,2,3]
|
||||
num_stages: 4
|
||||
|
||||
FPN:
|
||||
out_channel: 256
|
||||
spatial_scales: [0.125, 0.0625, 0.03125]
|
||||
extra_stage: 2
|
||||
has_extra_convs: true
|
||||
use_c5: false
|
||||
|
||||
GFLHead:
|
||||
conv_feat:
|
||||
name: FCOSFeat
|
||||
feat_in: 256
|
||||
feat_out: 256
|
||||
num_convs: 4
|
||||
norm_type: "gn"
|
||||
use_dcn: false
|
||||
fpn_stride: [8, 16, 32, 64, 128]
|
||||
prior_prob: 0.01
|
||||
reg_max: 16
|
||||
dgqp_module:
|
||||
name: DGQP
|
||||
reg_topk: 4
|
||||
reg_channels: 64
|
||||
add_mean: True
|
||||
loss_class:
|
||||
name: QualityFocalLoss
|
||||
use_sigmoid: False
|
||||
beta: 2.0
|
||||
loss_weight: 1.0
|
||||
loss_dfl:
|
||||
name: DistributionFocalLoss
|
||||
loss_weight: 0.25
|
||||
loss_bbox:
|
||||
name: GIoULoss
|
||||
loss_weight: 2.0
|
||||
nms:
|
||||
name: MultiClassNMS
|
||||
nms_top_k: 1000
|
||||
keep_top_k: 100
|
||||
score_threshold: 0.025
|
||||
nms_threshold: 0.6
|
||||
19
paddle_detection/configs/gfl/_base_/optimizer_1x.yml
Normal file
19
paddle_detection/configs/gfl/_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.001
|
||||
steps: 500
|
||||
|
||||
OptimizerBuilder:
|
||||
optimizer:
|
||||
momentum: 0.9
|
||||
type: Momentum
|
||||
regularizer:
|
||||
factor: 0.0001
|
||||
type: L2
|
||||
Reference in New Issue
Block a user