2020-05-10 16:26:57 +08:00
|
|
|
Global:
|
2020-11-04 20:43:27 +08:00
|
|
|
use_gpu: true
|
|
|
|
epoch_num: 72
|
2020-05-10 16:26:57 +08:00
|
|
|
log_smooth_window: 20
|
|
|
|
print_batch_step: 10
|
2020-10-20 17:38:24 +08:00
|
|
|
save_model_dir: ./output/rec/mv3_none_bilstm_ctc/
|
2020-11-04 20:43:27 +08:00
|
|
|
save_epoch_step: 3
|
2020-10-13 17:13:33 +08:00
|
|
|
# evaluation is run every 5000 iterations after the 4000th iteration
|
2020-11-06 19:12:07 +08:00
|
|
|
eval_batch_step: [0, 2000]
|
2020-10-13 17:13:33 +08:00
|
|
|
# if pretrained_model is saved in static mode, load_static_weights must set to True
|
|
|
|
cal_metric_during_train: True
|
|
|
|
pretrained_model:
|
2020-10-20 17:38:24 +08:00
|
|
|
checkpoints:
|
2020-05-13 16:05:00 +08:00
|
|
|
save_inference_dir:
|
2020-10-13 17:13:33 +08:00
|
|
|
use_visualdl: False
|
|
|
|
infer_img: doc/imgs_words/ch/word_1.jpg
|
|
|
|
# for data or label process
|
2020-11-04 20:43:27 +08:00
|
|
|
character_dict_path:
|
|
|
|
character_type: en
|
|
|
|
max_text_length: 25
|
2020-10-13 17:13:33 +08:00
|
|
|
infer_mode: False
|
2020-11-06 19:12:07 +08:00
|
|
|
use_space_char: False
|
2020-10-13 17:13:33 +08:00
|
|
|
|
2020-05-10 16:26:57 +08:00
|
|
|
|
|
|
|
Optimizer:
|
2020-10-13 17:13:33 +08:00
|
|
|
name: Adam
|
2020-05-10 16:26:57 +08:00
|
|
|
beta1: 0.9
|
|
|
|
beta2: 0.999
|
2020-11-05 20:47:16 +08:00
|
|
|
lr:
|
|
|
|
learning_rate: 0.0005
|
2020-10-13 17:13:33 +08:00
|
|
|
regularizer:
|
|
|
|
name: 'L2'
|
2020-11-06 19:12:07 +08:00
|
|
|
factor: 0
|
2020-10-13 17:13:33 +08:00
|
|
|
|
|
|
|
Architecture:
|
2020-11-04 20:43:27 +08:00
|
|
|
model_type: rec
|
2020-10-13 17:13:33 +08:00
|
|
|
algorithm: CRNN
|
|
|
|
Transform:
|
|
|
|
Backbone:
|
|
|
|
name: MobileNetV3
|
|
|
|
scale: 0.5
|
2020-11-04 20:43:27 +08:00
|
|
|
model_name: large
|
2020-10-13 17:13:33 +08:00
|
|
|
Neck:
|
|
|
|
name: SequenceEncoder
|
2020-11-04 20:43:27 +08:00
|
|
|
encoder_type: rnn
|
2020-10-13 17:13:33 +08:00
|
|
|
hidden_size: 96
|
|
|
|
Head:
|
2020-11-04 20:43:27 +08:00
|
|
|
name: CTCHead
|
2020-11-06 19:12:07 +08:00
|
|
|
fc_decay: 0
|
2020-10-13 17:13:33 +08:00
|
|
|
|
|
|
|
Loss:
|
|
|
|
name: CTCLoss
|
|
|
|
|
|
|
|
PostProcess:
|
|
|
|
name: CTCLabelDecode
|
|
|
|
|
|
|
|
Metric:
|
|
|
|
name: RecMetric
|
|
|
|
main_indicator: acc
|
|
|
|
|
2020-11-04 20:43:27 +08:00
|
|
|
Train:
|
2020-10-13 17:13:33 +08:00
|
|
|
dataset:
|
2020-11-04 20:43:27 +08:00
|
|
|
name: LMDBDateSet
|
|
|
|
data_dir: ./train_data/data_lmdb_release/training/
|
2020-10-13 17:13:33 +08:00
|
|
|
transforms:
|
|
|
|
- DecodeImage: # load image
|
|
|
|
img_mode: BGR
|
|
|
|
channel_first: False
|
|
|
|
- CTCLabelEncode: # Class handling label
|
|
|
|
- RecResizeImg:
|
2020-11-04 20:43:27 +08:00
|
|
|
image_shape: [3, 32, 100]
|
|
|
|
- KeepKeys:
|
|
|
|
keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
|
2020-10-13 17:13:33 +08:00
|
|
|
loader:
|
2020-11-10 12:45:25 +08:00
|
|
|
shuffle: False
|
2020-11-04 20:43:27 +08:00
|
|
|
batch_size_per_card: 256
|
2020-10-13 17:13:33 +08:00
|
|
|
drop_last: True
|
2020-10-16 16:38:56 +08:00
|
|
|
num_workers: 8
|
2020-10-13 17:13:33 +08:00
|
|
|
|
2020-11-04 20:43:27 +08:00
|
|
|
Eval:
|
2020-10-13 17:13:33 +08:00
|
|
|
dataset:
|
2020-11-04 20:43:27 +08:00
|
|
|
name: LMDBDateSet
|
|
|
|
data_dir: ./train_data/data_lmdb_release/validation/
|
2020-10-13 17:13:33 +08:00
|
|
|
transforms:
|
|
|
|
- DecodeImage: # load image
|
|
|
|
img_mode: BGR
|
|
|
|
channel_first: False
|
|
|
|
- CTCLabelEncode: # Class handling label
|
|
|
|
- RecResizeImg:
|
2020-11-04 20:43:27 +08:00
|
|
|
image_shape: [3, 32, 100]
|
|
|
|
- KeepKeys:
|
|
|
|
keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
|
2020-10-13 17:13:33 +08:00
|
|
|
loader:
|
|
|
|
shuffle: False
|
|
|
|
drop_last: False
|
2020-11-04 20:43:27 +08:00
|
|
|
batch_size_per_card: 256
|
2020-11-06 19:12:07 +08:00
|
|
|
num_workers: 4
|