更换文档检测模型
This commit is contained in:
48
paddle_detection/configs/fcos/_base_/fcos_r50_fpn.yml
Normal file
48
paddle_detection/configs/fcos/_base_/fcos_r50_fpn.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
architecture: FCOS
|
||||
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/ResNet50_cos_pretrained.pdparams
|
||||
|
||||
FCOS:
|
||||
backbone: ResNet
|
||||
neck: FPN
|
||||
fcos_head: FCOSHead
|
||||
|
||||
ResNet:
|
||||
depth: 50
|
||||
variant: 'b'
|
||||
norm_type: bn
|
||||
freeze_at: 0 # res2
|
||||
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
|
||||
|
||||
FCOSHead:
|
||||
fcos_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
|
||||
norm_reg_targets: True
|
||||
centerness_on_reg: True
|
||||
num_shift: 0.5
|
||||
fcos_loss:
|
||||
name: FCOSLoss
|
||||
loss_alpha: 0.25
|
||||
loss_gamma: 2.0
|
||||
iou_loss_type: "giou"
|
||||
reg_weights: 1.0
|
||||
nms:
|
||||
name: MultiClassNMS
|
||||
nms_top_k: 1000
|
||||
keep_top_k: 100
|
||||
score_threshold: 0.025
|
||||
nms_threshold: 0.6
|
||||
42
paddle_detection/configs/fcos/_base_/fcos_reader.yml
Normal file
42
paddle_detection/configs/fcos/_base_/fcos_reader.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
worker_num: 2
|
||||
TrainReader:
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- Resize: {target_size: [800, 1333], keep_ratio: True, interp: 1}
|
||||
- NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
|
||||
- RandomFlip: {}
|
||||
batch_transforms:
|
||||
- Permute: {}
|
||||
- PadBatch: {pad_to_stride: 128}
|
||||
- Gt2FCOSTarget:
|
||||
object_sizes_boundary: [64, 128, 256, 512]
|
||||
center_sampling_radius: 1.5
|
||||
downsample_ratios: [8, 16, 32, 64, 128]
|
||||
norm_reg_targets: True
|
||||
batch_size: 2
|
||||
shuffle: True
|
||||
drop_last: True
|
||||
use_shared_memory: True
|
||||
|
||||
|
||||
EvalReader:
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- Resize: {target_size: [800, 1333], keep_ratio: True, interp: 1}
|
||||
- NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
|
||||
- Permute: {}
|
||||
batch_transforms:
|
||||
- PadBatch: {pad_to_stride: 128}
|
||||
batch_size: 1
|
||||
|
||||
|
||||
TestReader:
|
||||
sample_transforms:
|
||||
- Decode: {}
|
||||
- Resize: {target_size: [800, 1333], keep_ratio: True, interp: 1}
|
||||
- NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
|
||||
- Permute: {}
|
||||
batch_transforms:
|
||||
- PadBatch: {pad_to_stride: 128}
|
||||
batch_size: 1
|
||||
fuse_normalize: True
|
||||
19
paddle_detection/configs/fcos/_base_/optimizer_1x.yml
Normal file
19
paddle_detection/configs/fcos/_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.3333333333333333
|
||||
steps: 500
|
||||
|
||||
OptimizerBuilder:
|
||||
optimizer:
|
||||
momentum: 0.9
|
||||
type: Momentum
|
||||
regularizer:
|
||||
factor: 0.0001
|
||||
type: L2
|
||||
Reference in New Issue
Block a user