PaddleOCR/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec.yml

112 lines
2.1 KiB
YAML
Raw Normal View History

2021-06-02 16:37:07 +08:00
Global:
debug: false
use_gpu: true
epoch_num: 800
log_smooth_window: 20
print_batch_step: 10
save_model_dir: ./output/rec_mobile_pp-OCRv2
2021-06-02 16:37:07 +08:00
save_epoch_step: 3
2021-06-03 13:30:43 +08:00
eval_batch_step: [0, 2000]
2021-06-02 16:37:07 +08:00
cal_metric_during_train: true
2021-06-05 14:52:45 +08:00
pretrained_model:
checkpoints:
save_inference_dir:
2021-06-02 16:37:07 +08:00
use_visualdl: false
infer_img: doc/imgs_words/ch/word_1.jpg
character_dict_path: ppocr/utils/ppocr_keys_v1.txt
character_type: ch
max_text_length: 25
infer_mode: false
use_space_char: true
2021-06-02 16:37:07 +08:00
distributed: true
save_res_path: ./output/rec/predicts_mobile_pp-OCRv2.txt
2021-06-02 16:37:07 +08:00
Optimizer:
name: Adam
beta1: 0.9
beta2: 0.999
lr:
name: Piecewise
decay_epochs : [700, 800]
values : [0.001, 0.0001]
2021-06-02 16:37:07 +08:00
warmup_epoch: 5
regularizer:
name: L2
factor: 2.0e-05
2021-06-02 16:37:07 +08:00
Architecture:
model_type: rec
algorithm: CRNN
Transform:
Backbone:
name: MobileNetV1Enhance
scale: 0.5
Neck:
name: SequenceEncoder
encoder_type: rnn
hidden_size: 64
Head:
name: CTCHead
mid_channels: 96
fc_decay: 0.00002
2021-06-02 16:37:07 +08:00
Loss:
name: CTCLoss
2021-06-02 16:37:07 +08:00
PostProcess:
name: CTCLabelDecode
2021-06-03 13:30:43 +08:00
2021-06-02 16:37:07 +08:00
Metric:
name: RecMetric
2021-06-02 16:37:07 +08:00
main_indicator: acc
2021-06-03 13:30:43 +08:00
2021-06-02 16:37:07 +08:00
Train:
dataset:
name: SimpleDataSet
data_dir: ./train_data/
label_file_list:
- ./train_data/train_list.txt
transforms:
- DecodeImage:
img_mode: BGR
channel_first: false
2021-06-05 14:52:45 +08:00
- RecAug:
- CTCLabelEncode:
2021-06-02 16:37:07 +08:00
- RecResizeImg:
2021-06-03 13:30:43 +08:00
image_shape: [3, 32, 320]
2021-06-02 16:37:07 +08:00
- KeepKeys:
keep_keys:
- image
- label
- length
loader:
shuffle: true
batch_size_per_card: 128
drop_last: true
num_workers: 8
Eval:
dataset:
name: SimpleDataSet
data_dir: ./train_data
label_file_list:
- ./train_data/val_list.txt
transforms:
- DecodeImage:
img_mode: BGR
channel_first: false
2021-06-05 14:52:45 +08:00
- CTCLabelEncode:
2021-06-02 16:37:07 +08:00
- RecResizeImg:
2021-06-03 13:30:43 +08:00
image_shape: [3, 32, 320]
2021-06-02 16:37:07 +08:00
- KeepKeys:
keep_keys:
- image
- label
- length
loader:
shuffle: false
drop_last: false
batch_size_per_card: 128
num_workers: 8