rec_mv3_none_bilstm_ctc.yml 2.2 KB
Newer Older
L
LDOUBLEV 已提交
1
Global:
D
dyning 已提交
2 3
  use_gpu: true
  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 5000 iterations after the 4000th iteration
D
dyning 已提交
9
  eval_batch_step: [0, 1000]
W
WenmuZhou 已提交
10 11 12
  # if pretrained_model is saved in static mode, load_static_weights must set to True
  cal_metric_during_train: True
  pretrained_model:
W
WenmuZhou 已提交
13
  checkpoints:
14
  save_inference_dir:
W
WenmuZhou 已提交
15 16 17
  use_visualdl: False
  infer_img: doc/imgs_words/ch/word_1.jpg
  # for data or label process
D
dyning 已提交
18 19 20 21
  character_dict_path: 
  character_type: en
  max_text_length: 25
  loss_type: ctc
W
WenmuZhou 已提交
22
  infer_mode: False
D
dyning 已提交
23 24 25
#   use_space_char: True

#   use_tps: False
W
WenmuZhou 已提交
26

L
LDOUBLEV 已提交
27 28

Optimizer:
W
WenmuZhou 已提交
29
  name: Adam
L
LDOUBLEV 已提交
30 31
  beta1: 0.9
  beta2: 0.999
W
WenmuZhou 已提交
32 33
  lr:
    learning_rate: 0.0005
W
WenmuZhou 已提交
34 35 36 37 38
  regularizer:
    name: 'L2'
    factor: 0.00001

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

Loss:
  name: CTCLoss

PostProcess:
  name: CTCLabelDecode

Metric:
  name: RecMetric
  main_indicator: acc

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

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