Skip to content

Commit

Permalink
support rec v4
Browse files Browse the repository at this point in the history
  • Loading branch information
WenmuZhou committed Aug 28, 2023
1 parent af16309 commit aa0cc49
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions configs/rec/PP-OCRv4/ch_PP-OCRv4_rec.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,33 @@
Global:
debug: false
use_gpu: true
device: gpu
epoch_num: 200
log_smooth_window: 20
print_batch_step: 10
output_dir: ./output/rec_ppocr_v4
save_epoch_step: 10
eval_batch_step: [0, 2000]
eval_epoch_step: [0, 1]
cal_metric_during_train: true
pretrained_model:
checkpoints:
save_inference_dir:
use_visualdl: false
use_tensorboard: false
infer_img: doc/imgs_words/ch/word_1.jpg
character_dict_path: ppocr/utils/ppocr_keys_v1.txt
character_dict_path: &character_dict_path ppocr/utils/ppocr_keys_v1.txt
max_text_length: &max_text_length 25
infer_mode: false
use_space_char: true
distributed: true
save_res_path: ./output/rec/predicts_ppocrv3.txt
use_space_char: &use_space_char true

Export:
export_dir:
export_shape: [ 1, 3, 48, 320 ]
dynamic_axes: [ 0, 2, 3 ]

Optimizer:
name: Adam
beta1: 0.9
beta2: 0.999
lr:
name: Cosine
learning_rate: 0.001
warmup_epoch: 5
regularizer:
name: L2
factor: 3.0e-05
lr: 0.001
weight_decay: 3.0e-05

LRScheduler:
name: CosineAnnealingLR
warmup_epoch: 5

Architecture:
model_type: rec
Expand Down Expand Up @@ -66,6 +61,8 @@ Loss:

PostProcess:
name: CTCLabelDecode
character_dict_path: *character_dict_path
use_space_char: *use_space_char

Metric:
name: RecMetric
Expand Down Expand Up @@ -109,7 +106,7 @@ Train:
shuffle: true
batch_size_per_card: *bs
drop_last: true
num_workers: 8
num_workers: 0
Eval:
dataset:
name: SimpleDataSet
Expand Down

0 comments on commit aa0cc49

Please sign in to comment.