rec_resnet_stn_bilstm_att.yml 2.3 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 17 18
  # for data or label process
  character_dict_path: 
  character_type: EN_symbol
T
tink2123 已提交
19
  max_text_length: 100
T
tink2123 已提交
20 21
  infer_mode: False
  use_space_char: False
T
tink2123 已提交
22 23
  eval_filter: True
  save_res_path: ./output/rec/predicts_seed.txt
T
tink2123 已提交
24 25 26


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

T
tink2123 已提交
38 39

Architecture:
T
tink2123 已提交
40
  model_type: seed
T
tink2123 已提交
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
  algorithm: ASTER
  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 已提交
61
  name: SEEDLabelDecode
T
tink2123 已提交
62 63 64 65

Metric:
  name: RecMetric
  main_indicator: acc
T
tink2123 已提交
66
  is_filter: True
T
tink2123 已提交
67 68 69

Train:
  dataset:
T
tink2123 已提交
70 71
    name: LMDBDataSet
    data_dir: ./train_data/data_lmdb_release/training/
T
tink2123 已提交
72
    transforms:
T
tink2123 已提交
73 74
      - Fasttext:
          path: "./cc.en.300.bin"
T
tink2123 已提交
75 76 77
      - DecodeImage: # load image
          img_mode: BGR
          channel_first: False
T
tink2123 已提交
78 79 80
      - SEEDLabelEncode: # Class handling label
      - SEEDResize:
          image_shape: [3, 64, 256]
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 98 99
      - SEEDLabelEncode: # Class handling label
      - SEEDResize:
          image_shape: [3, 64, 256]
T
tink2123 已提交
100 101 102 103
      - KeepKeys:
          keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
  loader:
    shuffle: False
T
tink2123 已提交
104 105 106
    drop_last: True
    batch_size_per_card: 256
    num_workers: 4