rec_resnet_stn_bilstm_att.yml 2.4 KB
Newer Older
T
tink2123 已提交
1
Global:
T
tink2123 已提交
2
  use_gpu: True
T
tink2123 已提交
3 4 5
  epoch_num: 400
  log_smooth_window: 20
  print_batch_step: 10
T
tink2123 已提交
6
  save_model_dir: ./output/rec/seed
T
tink2123 已提交
7 8 9 10 11 12 13 14
  save_epoch_step: 3
  # evaluation is run every 5000 iterations after the 4000th iteration
  eval_batch_step: [0, 2000]
  cal_metric_during_train: True
  pretrained_model:
  checkpoints:
  save_inference_dir:
  use_visualdl: False
T
tink2123 已提交
15
  infer_img: doc/imgs_words_en/word_10.png
T
tink2123 已提交
16
  # for data or label process
T
tink2123 已提交
17
  character_dict_path: ppocr/utils/EN_symbol_dict.txt
T
tink2123 已提交
18
  max_text_length: 100
T
tink2123 已提交
19 20
  infer_mode: False
  use_space_char: False
T
tink2123 已提交
21
  save_res_path: ./output/rec/predicts_seed.txt
T
tink2123 已提交
22 23 24


Optimizer:
T
tink2123 已提交
25 26 27
  name: Adadelta
  weight_deacy: 0.0
  momentum: 0.9
T
tink2123 已提交
28
  lr:
T
tink2123 已提交
29 30 31
    name: Piecewise
    decay_epochs: [4,5,8]
    values: [1.0, 0.1, 0.01]
T
tink2123 已提交
32 33
  regularizer:
    name: 'L2'
T
tink2123 已提交
34 35
    factor: 2.0e-05

T
tink2123 已提交
36 37

Architecture:
T
tink2123 已提交
38
  model_type: rec
T
tink2123 已提交
39
  algorithm: SEED
T
tink2123 已提交
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
  Transform:
    name: STN_ON
    tps_inputsize: [32, 64]
    tps_outputsize: [32, 100]
    num_control_points: 20
    tps_margins: [0.05,0.05]
    stn_activation: none
  Backbone:
    name: ResNet_ASTER
  Head:
    name: AsterHead  # AttentionHead
    sDim: 512
    attDim: 512
    max_len_labels: 100

Loss:
  name: AsterLoss

PostProcess:
T
tink2123 已提交
59
  name: SEEDLabelDecode
T
tink2123 已提交
60 61 62 63

Metric:
  name: RecMetric
  main_indicator: acc
T
tink2123 已提交
64
  is_filter: True
T
tink2123 已提交
65 66 67

Train:
  dataset:
T
tink2123 已提交
68 69
    name: LMDBDataSet
    data_dir: ./train_data/data_lmdb_release/training/
T
tink2123 已提交
70
    transforms:
T
tink2123 已提交
71 72
      - Fasttext:
          path: "./cc.en.300.bin"
T
tink2123 已提交
73 74 75
      - DecodeImage: # load image
          img_mode: BGR
          channel_first: False
T
tink2123 已提交
76
      - SEEDLabelEncode: # Class handling label
T
tink2123 已提交
77
      - RecResizeImg:
T
tink2123 已提交
78
          character_dict_path:
T
tink2123 已提交
79
          image_shape: [3, 64, 256]
T
tink2123 已提交
80
          padding: False
T
tink2123 已提交
81
      - KeepKeys:
T
tink2123 已提交
82
          keep_keys: ['image', 'label', 'length', 'fast_label'] # dataloader will return list in this order
T
tink2123 已提交
83 84
  loader:
    shuffle: True
T
tink2123 已提交
85
    batch_size_per_card: 256
T
tink2123 已提交
86
    drop_last: True
T
tink2123 已提交
87
    num_workers: 6
T
tink2123 已提交
88 89 90

Eval:
  dataset:
T
tink2123 已提交
91 92
    name: LMDBDataSet
    data_dir: ./train_data/data_lmdb_release/evaluation/
T
tink2123 已提交
93 94 95 96
    transforms:
      - DecodeImage: # load image
          img_mode: BGR
          channel_first: False
T
tink2123 已提交
97
      - SEEDLabelEncode: # Class handling label
T
tink2123 已提交
98
      - RecResizeImg:
T
tink2123 已提交
99
          character_dict_path:
T
tink2123 已提交
100
          image_shape: [3, 64, 256]
T
tink2123 已提交
101
          padding: False
T
tink2123 已提交
102 103 104 105
      - KeepKeys:
          keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
  loader:
    shuffle: False
T
tink2123 已提交
106 107 108
    drop_last: True
    batch_size_per_card: 256
    num_workers: 4