rec_icdar15_train.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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/ic15/
  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: ppocr/utils/en_dict.txt
  18. max_text_length: 25
  19. infer_mode: False
  20. use_space_char: False
  21. save_res_path: ./output/rec/predicts_ic15.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: CRNN
  34. Transform:
  35. Backbone:
  36. name: MobileNetV3
  37. scale: 0.5
  38. model_name: large
  39. Neck:
  40. name: SequenceEncoder
  41. encoder_type: rnn
  42. hidden_size: 96
  43. Head:
  44. name: CTCHead
  45. fc_decay: 0
  46. Loss:
  47. name: CTCLoss
  48. PostProcess:
  49. name: CTCLabelDecode
  50. Metric:
  51. name: RecMetric
  52. main_indicator: acc
  53. Train:
  54. dataset:
  55. name: SimpleDataSet
  56. data_dir: ./train_data/ic15_data/
  57. label_file_list: ["./train_data/ic15_data/rec_gt_train.txt"]
  58. transforms:
  59. - DecodeImage: # load image
  60. img_mode: BGR
  61. channel_first: False
  62. - CTCLabelEncode: # Class handling label
  63. - RecResizeImg:
  64. image_shape: [3, 32, 100]
  65. - KeepKeys:
  66. keep_keys: ['image', 'label', 'length'] # dataloader will return list in this order
  67. loader:
  68. shuffle: True
  69. batch_size_per_card: 256
  70. drop_last: True
  71. num_workers: 8
  72. use_shared_memory: False
  73. Eval:
  74. dataset:
  75. name: SimpleDataSet
  76. data_dir: ./train_data/ic15_data
  77. label_file_list: ["./train_data/ic15_data/rec_gt_test.txt"]
  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
  92. use_shared_memory: False