rec_mv3_none_bilstm_ctc.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. Global:
  2. use_gpu: True
  3. epoch_num: 72
  4. log_smooth_window: 20
  5. print_batch_step: 10
  6. save_model_dir: ./output/rec/mv3_none_bilstm_ctc/
  7. save_epoch_step: 3
  8. # evaluation is run every 2000 iterations
  9. eval_batch_step: [0, 2000]
  10. cal_metric_during_train: True
  11. pretrained_model:
  12. checkpoints:
  13. save_inference_dir:
  14. use_visualdl: False
  15. infer_img: doc/imgs_words_en/word_10.png
  16. # for data or label process
  17. character_dict_path:
  18. max_text_length: 25
  19. infer_mode: False
  20. use_space_char: False
  21. save_res_path: ./output/rec/predicts_mv3_none_bilstm_ctc.txt
  22. Optimizer:
  23. name: Adam
  24. beta1: 0.9
  25. beta2: 0.999
  26. lr:
  27. learning_rate: 0.0005
  28. regularizer:
  29. name: 'L2'
  30. factor: 0
  31. Architecture:
  32. model_type: rec
  33. algorithm: CRNN
  34. Transform:
  35. Backbone:
  36. name: MobileNetV3
  37. scale: 0.5
  38. model_name: large
  39. Neck:
  40. name: SequenceEncoder
  41. encoder_type: rnn
  42. hidden_size: 96
  43. Head:
  44. name: CTCHead
  45. fc_decay: 0
  46. Loss:
  47. name: CTCLoss
  48. PostProcess:
  49. name: CTCLabelDecode
  50. Metric:
  51. name: RecMetric
  52. main_indicator: acc
  53. Train:
  54. dataset:
  55. name: LMDBDataSet
  56. data_dir: ./train_data/data_lmdb_release/training/
  57. transforms:
  58. - DecodeImage: # load image
  59. img_mode: BGR
  60. channel_first: False
  61. - CTCLabelEncode: # Class handling label
  62. - RecResizeImg:
  63. image_shape: [3, 32, 100]
  64. - KeepKeys:
  65. keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
  66. loader:
  67. shuffle: False
  68. batch_size_per_card: 256
  69. drop_last: True
  70. num_workers: 8
  71. Eval:
  72. dataset:
  73. name: LMDBDataSet
  74. data_dir: ./train_data/data_lmdb_release/validation/
  75. transforms:
  76. - DecodeImage: # load image
  77. img_mode: BGR
  78. channel_first: False
  79. - CTCLabelEncode: # Class handling label
  80. - RecResizeImg:
  81. image_shape: [3, 32, 100]
  82. - KeepKeys:
  83. keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
  84. loader:
  85. shuffle: False
  86. drop_last: False
  87. batch_size_per_card: 256
  88. num_workers: 4