rec_mv3_tps_bilstm_ctc.yml 2.2 KB

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