rec_r34_vd_tps_bilstm_ctc.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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/r34_vd_tps_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_r34_vd_tps_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: STARNet
  34. Transform:
  35. name: TPS
  36. num_fiducial: 20
  37. loc_lr: 0.1
  38. model_name: large
  39. Backbone:
  40. name: ResNet
  41. layers: 34
  42. Neck:
  43. name: SequenceEncoder
  44. encoder_type: rnn
  45. hidden_size: 256
  46. Head:
  47. name: CTCHead
  48. fc_decay: 0
  49. Loss:
  50. name: CTCLoss
  51. PostProcess:
  52. name: CTCLabelDecode
  53. Metric:
  54. name: RecMetric
  55. main_indicator: acc
  56. Train:
  57. dataset:
  58. name: LMDBDataSet
  59. data_dir: ./train_data/data_lmdb_release/training/
  60. transforms:
  61. - DecodeImage: # load image
  62. img_mode: BGR
  63. channel_first: False
  64. - CTCLabelEncode: # Class handling label
  65. - RecResizeImg:
  66. image_shape: [3, 32, 100]
  67. - KeepKeys:
  68. keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
  69. loader:
  70. shuffle: True
  71. batch_size_per_card: 256
  72. drop_last: True
  73. num_workers: 8
  74. Eval:
  75. dataset:
  76. name: LMDBDataSet
  77. data_dir: ./train_data/data_lmdb_release/validation/
  78. transforms:
  79. - DecodeImage: # load image
  80. img_mode: BGR
  81. channel_first: False
  82. - CTCLabelEncode: # Class handling label
  83. - RecResizeImg:
  84. image_shape: [3, 32, 100]
  85. - KeepKeys:
  86. keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
  87. loader:
  88. shuffle: False
  89. drop_last: False
  90. batch_size_per_card: 256
  91. num_workers: 4