File size: 3,560 Bytes
edf9459
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
Global:
  debug: false
  use_gpu: true
  epoch_num: 25
  log_smooth_window: 20
  print_batch_step: 50
  save_model_dir: ./output/final_e25
  save_epoch_step: 14
  eval_batch_step:
  - 0
  - 697
  cal_metric_during_train: true
  pretrained_model: ./models/latin_PP-OCRv3_rec_train/best_accuracy
  checkpoints: null
  save_inference_dir: ./inference/final
  use_visualdl: false
  infer_img: doc/imgs_words/ch/word_1.jpg
  character_dict_path: ppocr/utils/dict/latin_dict.txt
  max_text_length: 25
  infer_mode: false
  use_space_char: true
  distributed: true
  save_res_path: ./output/rec/predicts_ppocrv3.txt
  seed: 42
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
Architecture:
  model_type: rec
  algorithm: SVTR
  Transform: null
  Backbone:
    name: MobileNetV1Enhance
    scale: 0.5
    last_conv_stride:
    - 1
    - 2
    last_pool_type: avg
  Head:
    name: MultiHead
    head_list:
    - CTCHead:
        Neck:
          name: svtr
          dims: 64
          depth: 2
          hidden_dims: 120
          use_guide: true
        Head:
          fc_decay: 1.0e-05
    - SARHead:
        enc_dim: 512
        max_text_length: 25
Loss:
  name: MultiLoss
  loss_config_list:
  - CTCLoss: null
  - SARLoss: null
PostProcess:
  name: CTCLabelDecode
Metric:
  name: RecMetric
  main_indicator: acc
  keep_space: false
Train:
  dataset:
    name: SimpleDataSet
    data_dir: /data/AIDA/iter4/rivikuvat
    label_file_list:
    - /data/AIDA/iter4/annot/train_kone_best_iter2_14_02_24.txt
    - /data/AIDA/iter4/annot/train_kone_best_iter3_04_03_24.txt
    - /data/AIDA/iter4/annot/train_sini3_2_19_03_kone_best.txt
    - /data/AIDA/iter4/annot/train_kasi_best_iter2_14_2_24.txt
    - /data/AIDA/iter4/annot/train_kasi_best_iter3_04_03_24.txt
    - /data/AIDA/iter4/annot/train_sini3_2_19_03_kasi_best.txt
    - /data/AIDA/iter4/annot/normaali_16k_train.txt
    - /data/AIDA/iter4/annot/shaken_train.txt
    - /data/AIDA/iter4/annot/noise_k5_train.txt
    - /data/AIDA/iter4/annot/noise_k5_sin_train.txt
    transforms:
    - DecodeImage:
        img_mode: BGR
        channel_first: false
    - RecAug:
        reverse_prob: 0.25
        noise_prob: 0.25
        blur_prob: 0.25
        hsv_aug_prob: 0.25
    - MultiLabelEncode: null
    - SARRecResizeImg:
        image_shape:
        - 3
        - 48
        - 48
        - 320
        width_downsample_ratio: 0.25
        mode: v3
    - KeepKeys:
        keep_keys:
        - image
        - label_ctc
        - label_sar
        - length
        - valid_ratio
  loader:
    shuffle: true
    batch_size_per_card: 128
    drop_last: true
    num_workers: 22
Eval:
  dataset:
    name: SimpleDataSet
    data_dir: /data/AIDA/iter4/rivikuvat
    label_file_list:
    - /data/AIDA/iter4/annot/valid_kone_best_iter2_filttered_14_2_24.txt
    - /data/AIDA/iter4/annot/valid_kone_best_iter3_04_03_24.txt
    - /data/AIDA/iter4/annot/valid_sini3_2_19_03_kone_best.txt
    transforms:
    - DecodeImage:
        img_mode: BGR
        channel_first: false
    - MultiLabelEncode: null
    - SARRecResizeImg:
        image_shape:
        - 3
        - 48
        - 48
        - 320
        width_downsample_ratio: 0.25
        mode: v3
    - KeepKeys:
        keep_keys:
        - image
        - label_ctc
        - label_sar
        - length
        - valid_ratio
  loader:
    shuffle: false
    drop_last: false
    batch_size_per_card: 128
    num_workers: 16
profiler_options: null