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