rec_mv3_tps_bilstm_att.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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/rec_mv3_tps_bilstm_att/
  7. save_epoch_step: 3
  8. # evaluation is run every 5000 iterations after the 4000th iteration
  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/ch/word_1.jpg
  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_tps_bilstm_att.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.00001
  31. Architecture:
  32. model_type: rec
  33. algorithm: RARE
  34. Transform:
  35. name: TPS
  36. num_fiducial: 20
  37. loc_lr: 0.1
  38. model_name: small
  39. Backbone:
  40. name: MobileNetV3
  41. scale: 0.5
  42. model_name: large
  43. Neck:
  44. name: SequenceEncoder
  45. encoder_type: rnn
  46. hidden_size: 96
  47. Head:
  48. name: AttentionHead
  49. hidden_size: 96
  50. Loss:
  51. name: AttentionLoss
  52. PostProcess:
  53. name: AttnLabelDecode
  54. Metric:
  55. name: RecMetric
  56. main_indicator: acc
  57. Train:
  58. dataset:
  59. name: LMDBDataSet
  60. data_dir: ./train_data/data_lmdb_release/training/
  61. transforms:
  62. - DecodeImage: # load image
  63. img_mode: BGR
  64. channel_first: False
  65. - AttnLabelEncode: # Class handling label
  66. - RecResizeImg:
  67. image_shape: [3, 32, 100]
  68. - KeepKeys:
  69. keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
  70. loader:
  71. shuffle: True
  72. batch_size_per_card: 256
  73. drop_last: True
  74. num_workers: 8
  75. Eval:
  76. dataset:
  77. name: LMDBDataSet
  78. data_dir: ./train_data/data_lmdb_release/validation/
  79. transforms:
  80. - DecodeImage: # load image
  81. img_mode: BGR
  82. channel_first: False
  83. - AttnLabelEncode: # Class handling label
  84. - RecResizeImg:
  85. image_shape: [3, 32, 100]
  86. - KeepKeys:
  87. keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
  88. loader:
  89. shuffle: False
  90. drop_last: False
  91. batch_size_per_card: 256
  92. num_workers: 1