rec_mv3_none_bilstm_ctc.yml 2.1 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
W
WenmuZhou 已提交
9
  eval_batch_step: [0, 2000]
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
  character_dict_path: 
  character_type: en
  max_text_length: 25
W
WenmuZhou 已提交
21
  infer_mode: False
W
WenmuZhou 已提交
22
  use_space_char: False
W
WenmuZhou 已提交
23

L
LDOUBLEV 已提交
24 25

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

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

Loss:
  name: CTCLoss

PostProcess:
  name: CTCLabelDecode

Metric:
  name: RecMetric
  main_indicator: acc

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

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