rec_mv3_none_none_ctc.yml 2.0 KB

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