更换文档检测模型

This commit is contained in:
2024-08-27 14:42:45 +08:00
parent aea6f19951
commit 1514e09c40
2072 changed files with 254336 additions and 4967 deletions

View File

@@ -0,0 +1,19 @@
epoch: 120
LearningRate:
base_lr: 0.015
schedulers:
- !PiecewiseDecay
gamma: 0.1
milestones: [80, 110]
- !LinearWarmup
start_factor: 0.2
steps: 500
OptimizerBuilder:
optimizer:
momentum: 0.9
type: Momentum
regularizer:
factor: 0.0004
type: L2

View File

@@ -0,0 +1,19 @@
epoch: 12
LearningRate:
base_lr: 0.015
schedulers:
- !PiecewiseDecay
gamma: 0.1
milestones: [8, 11]
- !LinearWarmup
start_factor: 0.2
steps: 500
OptimizerBuilder:
optimizer:
momentum: 0.9
type: Momentum
regularizer:
factor: 0.0004
type: L2

View File

@@ -0,0 +1,20 @@
epoch: 240
LearningRate:
base_lr: 0.015
schedulers:
- !PiecewiseDecay
gamma: 0.1
milestones: [160, 220]
- !LinearWarmup
start_factor: 0.2
steps: 1000
OptimizerBuilder:
clip_grad_by_norm: 35
optimizer:
momentum: 0.9
type: Momentum
regularizer:
factor: 0.0004
type: L2

View File

@@ -0,0 +1,40 @@
architecture: TTFNet
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/ResNet50_vd_ssld_pretrained.pdparams
norm_type: sync_bn
use_ema: true
ema_decay: 0.9998
TTFNet:
backbone: ResNet
neck: TTFFPN
ttf_head: TTFHead
post_process: BBoxPostProcess
ResNet:
depth: 50
variant: d
return_idx: [0, 1, 2, 3]
freeze_at: -1
norm_decay: 0.
dcn_v2_stages: [1, 2, 3]
TTFFPN:
planes: [256, 128, 64]
shortcut_num: [3, 2, 1]
TTFHead:
dcn_head: true
hm_loss:
name: CTFocalLoss
loss_weight: 1.
wh_loss:
name: GIoULoss
loss_weight: 5.
reduction: sum
BBoxPostProcess:
decode:
name: TTFBox
max_per_img: 100
score_thresh: 0.01
down_ratio: 4

View File

@@ -0,0 +1,44 @@
architecture: TTFNet
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/MobileNetV3_large_x1_0_ssld_pretrained.pdparams
norm_type: sync_bn
TTFNet:
backbone: MobileNetV3
neck: TTFFPN
ttf_head: TTFHead
post_process: BBoxPostProcess
MobileNetV3:
scale: 1.0
model_name: large
feature_maps: [5, 8, 14, 17]
with_extra_blocks: true
lr_mult_list: [0.25, 0.25, 0.5, 0.5, 0.75]
conv_decay: 0.00001
norm_decay: 0.0
extra_block_filters: []
TTFFPN:
planes: [96, 48, 24]
shortcut_num: [2, 2, 1]
lite_neck: true
fusion_method: concat
TTFHead:
hm_head_planes: 48
wh_head_planes: 24
lite_head: true
hm_loss:
name: CTFocalLoss
loss_weight: 1.
wh_loss:
name: GIoULoss
loss_weight: 5.
reduction: sum
BBoxPostProcess:
decode:
name: TTFBox
max_per_img: 100
score_thresh: 0.01
down_ratio: 4

View File

@@ -0,0 +1,37 @@
worker_num: 2
TrainReader:
sample_transforms:
- Decode: {}
- RandomDistort: {brightness: [-32., 32., 0.5], random_apply: False, random_channel: True}
- RandomExpand: {fill_value: [123.675, 116.28, 103.53]}
- RandomCrop: {aspect_ratio: NULL, cover_all_box: True}
- RandomFlip: {}
- GridMask: {upper_iter: 300000}
batch_transforms:
- BatchRandomResize: {target_size: [320, 352, 384, 416, 448, 480, 512], random_interp: True, keep_ratio: False}
- NormalizeImage: {mean: [123.675, 116.28, 103.53], std: [58.395, 57.12, 57.375], is_scale: false}
- Permute: {}
- Gt2TTFTarget: {down_ratio: 4}
- PadBatch: {pad_to_stride: 32}
batch_size: 12
shuffle: true
drop_last: true
use_shared_memory: true
EvalReader:
sample_transforms:
- Decode: {}
- Resize: {interp: 1, target_size: [320, 320], keep_ratio: False}
- NormalizeImage: {is_scale: false, mean: [123.675, 116.28, 103.53], std: [58.395, 57.12, 57.375]}
- Permute: {}
batch_size: 1
drop_last: false
TestReader:
sample_transforms:
- Decode: {}
- Resize: {interp: 1, target_size: [320, 320], keep_ratio: False}
- NormalizeImage: {is_scale: false, mean: [123.675, 116.28, 103.53], std: [58.395, 57.12, 57.375]}
- Permute: {}
batch_size: 1
drop_last: false

View File

@@ -0,0 +1,36 @@
worker_num: 2
TrainReader:
sample_transforms:
- Decode: {}
- RandomDistort: {brightness: [-32., 32., 0.5], random_apply: false, random_channel: true}
- RandomExpand: {fill_value: [123.675, 116.28, 103.53]}
- RandomCrop: {aspect_ratio: NULL, cover_all_box: True}
- RandomFlip: {prob: 0.5}
batch_transforms:
- BatchRandomResize: {target_size: [416, 448, 480, 512, 544, 576, 608, 640, 672], keep_ratio: false}
- NormalizeImage: {mean: [123.675, 116.28, 103.53], std: [58.395, 57.12, 57.375], is_scale: false}
- Permute: {}
- Gt2TTFTarget: {down_ratio: 4}
- PadBatch: {pad_to_stride: 32}
batch_size: 18
shuffle: true
drop_last: true
use_shared_memory: true
EvalReader:
sample_transforms:
- Decode: {}
- Resize: {interp: 1, target_size: [512, 512], keep_ratio: False}
- NormalizeImage: {is_scale: false, mean: [123.675, 116.28, 103.53], std: [58.395, 57.12, 57.375]}
- Permute: {}
batch_size: 1
drop_last: false
TestReader:
sample_transforms:
- Decode: {}
- Resize: {interp: 1, target_size: [512, 512], keep_ratio: False}
- NormalizeImage: {is_scale: false, mean: [123.675, 116.28, 103.53], std: [58.395, 57.12, 57.375]}
- Permute: {}
batch_size: 1
drop_last: false

View File

@@ -0,0 +1,35 @@
architecture: TTFNet
pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/DarkNet53_pretrained.pdparams
TTFNet:
backbone: DarkNet
neck: TTFFPN
ttf_head: TTFHead
post_process: BBoxPostProcess
DarkNet:
depth: 53
freeze_at: 0
return_idx: [1, 2, 3, 4]
norm_type: bn
norm_decay: 0.0004
TTFFPN:
planes: [256, 128, 64]
shortcut_num: [3, 2, 1]
TTFHead:
hm_loss:
name: CTFocalLoss
loss_weight: 1.
wh_loss:
name: GIoULoss
loss_weight: 5.
reduction: sum
BBoxPostProcess:
decode:
name: TTFBox
max_per_img: 100
score_thresh: 0.01
down_ratio: 4

View File

@@ -0,0 +1,33 @@
worker_num: 2
TrainReader:
sample_transforms:
- Decode: {}
- RandomFlip: {prob: 0.5}
- Resize: {interp: 1, target_size: [512, 512], keep_ratio: False}
- NormalizeImage: {mean: [123.675, 116.28, 103.53], std: [58.395, 57.12, 57.375], is_scale: false}
- Permute: {}
batch_transforms:
- Gt2TTFTarget: {down_ratio: 4}
- PadBatch: {pad_to_stride: 32}
batch_size: 12
shuffle: true
drop_last: true
use_shared_memory: true
EvalReader:
sample_transforms:
- Decode: {}
- Resize: {interp: 1, target_size: [512, 512], keep_ratio: False}
- NormalizeImage: {is_scale: false, mean: [123.675, 116.28, 103.53], std: [58.395, 57.12, 57.375]}
- Permute: {}
batch_size: 1
drop_last: false
TestReader:
sample_transforms:
- Decode: {}
- Resize: {interp: 1, target_size: [512, 512], keep_ratio: False}
- NormalizeImage: {is_scale: false, mean: [123.675, 116.28, 103.53], std: [58.395, 57.12, 57.375]}
- Permute: {}
batch_size: 1
drop_last: false