rec_mv3_none_bilstm_ctc.yml 2.0 KB
Newer Older
L
LDOUBLEV 已提交
1
Global:
T
tink2123 已提交
2
  use_gpu: True
D
dyning 已提交
3
  epoch_num: 72
L
LDOUBLEV 已提交
4 5
  log_smooth_window: 20
  print_batch_step: 10
W
WenmuZhou 已提交
6
  save_model_dir: ./output/rec/mv3_none_bilstm_ctc/
D
dyning 已提交
7
  save_epoch_step: 3
W
WenmuZhou 已提交
8
  # evaluation is run every 2000 iterations
W
WenmuZhou 已提交
9
  eval_batch_step: [0, 2000]
W
WenmuZhou 已提交
10 11
  cal_metric_during_train: True
  pretrained_model:
W
WenmuZhou 已提交
12
  checkpoints:
13
  save_inference_dir:
W
WenmuZhou 已提交
14
  use_visualdl: False
W
WenmuZhou 已提交
15
  infer_img: doc/imgs_words_en/word_10.png
W
WenmuZhou 已提交
16
  # for data or label process
D
dyning 已提交
17 18 19
  character_dict_path: 
  character_type: en
  max_text_length: 25
W
WenmuZhou 已提交
20
  infer_mode: False
W
WenmuZhou 已提交
21
  use_space_char: False
W
WenmuZhou 已提交
22

L
LDOUBLEV 已提交
23
Optimizer:
W
WenmuZhou 已提交
24
  name: Adam
L
LDOUBLEV 已提交
25 26
  beta1: 0.9
  beta2: 0.999
W
WenmuZhou 已提交
27 28
  lr:
    learning_rate: 0.0005
W
WenmuZhou 已提交
29 30
  regularizer:
    name: 'L2'
W
WenmuZhou 已提交
31
    factor: 0
W
WenmuZhou 已提交
32 33

Architecture:
D
dyning 已提交
34
  model_type: rec
W
WenmuZhou 已提交
35 36 37 38 39
  algorithm: CRNN
  Transform:
  Backbone:
    name: MobileNetV3
    scale: 0.5
D
dyning 已提交
40
    model_name: large
W
WenmuZhou 已提交
41 42
  Neck:
    name: SequenceEncoder
D
dyning 已提交
43
    encoder_type: rnn
W
WenmuZhou 已提交
44 45
    hidden_size: 96
  Head:
D
dyning 已提交
46
    name: CTCHead
W
WenmuZhou 已提交
47
    fc_decay: 0
W
WenmuZhou 已提交
48 49 50 51 52 53 54 55 56 57 58

Loss:
  name: CTCLoss

PostProcess:
  name: CTCLabelDecode

Metric:
  name: RecMetric
  main_indicator: acc

D
dyning 已提交
59
Train:
W
WenmuZhou 已提交
60
  dataset:
T
tink2123 已提交
61
    name: LMDBDataSet
D
dyning 已提交
62
    data_dir: ./train_data/data_lmdb_release/training/
W
WenmuZhou 已提交
63 64 65 66 67 68
    transforms:
      - DecodeImage: # load image
          img_mode: BGR
          channel_first: False
      - CTCLabelEncode: # Class handling label
      - RecResizeImg:
D
dyning 已提交
69 70 71
          image_shape: [3, 32, 100]
      - KeepKeys:
          keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
W
WenmuZhou 已提交
72
  loader:
W
WenmuZhou 已提交
73
    shuffle: False
D
dyning 已提交
74
    batch_size_per_card: 256
W
WenmuZhou 已提交
75
    drop_last: True
W
WenmuZhou 已提交
76
    num_workers: 8
W
WenmuZhou 已提交
77

D
dyning 已提交
78
Eval:
W
WenmuZhou 已提交
79
  dataset:
T
tink2123 已提交
80
    name: LMDBDataSet
D
dyning 已提交
81
    data_dir: ./train_data/data_lmdb_release/validation/
W
WenmuZhou 已提交
82 83 84 85 86 87
    transforms:
      - DecodeImage: # load image
          img_mode: BGR
          channel_first: False
      - CTCLabelEncode: # Class handling label
      - RecResizeImg:
D
dyning 已提交
88 89 90
          image_shape: [3, 32, 100]
      - KeepKeys:
          keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
W
WenmuZhou 已提交
91 92 93
  loader:
    shuffle: False
    drop_last: False
D
dyning 已提交
94
    batch_size_per_card: 256
W
WenmuZhou 已提交
95
    num_workers: 4