resnet45_trans_abinet_lang.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. Global:
  2. device: gpu
  3. epoch_num: 20
  4. log_smooth_window: 20
  5. print_batch_step: 10
  6. output_dir: ./output/rec/u14m_filter/resnet45_trans_abinet_lang/
  7. eval_epoch_step: [0, 1]
  8. eval_batch_step: [0, 500]
  9. cal_metric_during_train: True
  10. pretrained_model:
  11. # ./openocr_nolang_abinet_lang.pth
  12. checkpoints:
  13. use_tensorboard: false
  14. infer_img:
  15. # for data or label process
  16. character_dict_path: ./tools/utils/EN_symbol_dict.txt
  17. max_text_length: 25
  18. use_space_char: False
  19. save_res_path: ./output/rec/u14m_filter/predicts_resnet45_trans_abinet_lang.txt
  20. grad_clip_val: 20
  21. use_amp: True
  22. Optimizer:
  23. name: Adam
  24. lr: 0.000267
  25. weight_decay: 0.0
  26. filter_bias_and_bn: False
  27. LRScheduler:
  28. name: MultiStepLR
  29. milestones: [12]
  30. gamma: 0.1
  31. Architecture:
  32. model_type: rec
  33. algorithm: ABINet
  34. Transform:
  35. Encoder:
  36. name: ResNet45
  37. in_channels: 3
  38. strides: [2, 1, 2, 1, 1]
  39. Decoder:
  40. name: ABINetDecoder
  41. iter_size: 3
  42. Loss:
  43. name: ABINetLoss
  44. PostProcess:
  45. name: ABINetLabelDecode
  46. Metric:
  47. name: RecMetric
  48. main_indicator: acc
  49. is_filter: True
  50. Train:
  51. dataset:
  52. name: LMDBDataSet
  53. data_dir: ../Union14M-L-LMDB-Filtered
  54. transforms:
  55. - DecodeImagePIL: # load image
  56. img_mode: RGB
  57. - PARSeqAugPIL:
  58. - ABINetLabelEncode:
  59. - RecTVResize:
  60. image_shape: [32, 128]
  61. padding: False
  62. - KeepKeys:
  63. keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
  64. loader:
  65. shuffle: True
  66. batch_size_per_card: 256
  67. drop_last: True
  68. num_workers: 4
  69. Eval:
  70. dataset:
  71. name: LMDBDataSet
  72. data_dir: ../evaluation
  73. transforms:
  74. - DecodeImagePIL: # load image
  75. img_mode: RGB
  76. - ABINetLabelEncode:
  77. - RecTVResize:
  78. image_shape: [32, 128]
  79. padding: False
  80. - KeepKeys:
  81. keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
  82. loader:
  83. shuffle: False
  84. drop_last: False
  85. batch_size_per_card: 256
  86. num_workers: 2