rec_mv3_none_bilstm_ctc.yml 2.1 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
littletomatodonkey's avatar
littletomatodonkey 已提交
22
  save_res_path: ./output/rec/predicts_mv3_none_bilstm_ctc.txt
W
WenmuZhou 已提交
23

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

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

Loss:
  name: CTCLoss

PostProcess:
  name: CTCLabelDecode

Metric:
  name: RecMetric
  main_indicator: acc

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

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