ch_PP-OCRv3_det_student_tw_card.yml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. Global:
  2. debug: false
  3. use_gpu: false
  4. epoch_num: 500
  5. log_smooth_window: 20
  6. print_batch_step: 10
  7. save_model_dir: ./output/ch_PP-OCR_V3_det_front/
  8. save_epoch_step: 100
  9. eval_batch_step:
  10. - 0
  11. - 400
  12. cal_metric_during_train: false
  13. pretrained_model: ./ch_PP-OCRv3_det_distill_train/student.pdparams
  14. checkpoints: null
  15. save_inference_dir: null
  16. use_visualdl: false
  17. infer_img: /home/aistudio/work/PaddleOCR/images/tw_01.png
  18. save_res_path: ./jerome/det_db/predicts_db.txt
  19. distributed: true
  20. label_list: /home/aistudio/work/PaddleOCR/configs/det/ch_PP-OCRv3/label_list.txt
  21. num_classes: 14
  22. Architecture:
  23. model_type: det
  24. algorithm: DB
  25. Transform:
  26. Backbone:
  27. name: MobileNetV3
  28. scale: 0.5
  29. model_name: large
  30. disable_se: True
  31. Neck:
  32. name: RSEFPN
  33. out_channels: 96
  34. shortcut: True
  35. Head:
  36. name: DBHead
  37. k: 50
  38. Loss:
  39. name: DBLoss
  40. balance_loss: true
  41. main_loss_type: DiceLoss
  42. alpha: 5
  43. beta: 10
  44. ohem_ratio: 3
  45. Optimizer:
  46. name: Adam
  47. beta1: 0.9
  48. beta2: 0.999
  49. lr:
  50. name: Cosine
  51. learning_rate: 0.0001
  52. warmup_epoch: 2
  53. regularizer:
  54. name: L2
  55. factor: 5.0e-05
  56. PostProcess:
  57. name: DBPostProcess
  58. thresh: 0.3
  59. box_thresh: 0.6
  60. max_candidates: 1000
  61. unclip_ratio: 1.5
  62. Metric:
  63. name: DetMetric
  64. main_indicator: hmean
  65. Train:
  66. dataset:
  67. name: SimpleDataSet
  68. data_dir: /home/aistudio/data/data181819/tw_idcard_det_front_1000/
  69. label_file_list:
  70. - /home/aistudio/data/data181819/tw_idcard_det_front_1000/Label.txt
  71. ratio_list: [1.0]
  72. transforms:
  73. - DecodeImage:
  74. img_mode: BGR
  75. channel_first: false
  76. - DetLabelEncode: null
  77. - IaaAugment:
  78. augmenter_args:
  79. - type: Fliplr
  80. args:
  81. p: 0.5
  82. - type: Affine
  83. args:
  84. rotate:
  85. - -10
  86. - 10
  87. - type: Resize
  88. args:
  89. size:
  90. - 0.5
  91. - 3
  92. - EastRandomCropData:
  93. size:
  94. - 960
  95. - 960
  96. max_tries: 50
  97. keep_ratio: true
  98. - MakeBorderMap:
  99. shrink_ratio: 0.4
  100. thresh_min: 0.3
  101. thresh_max: 0.7
  102. - MakeShrinkMap:
  103. shrink_ratio: 0.4
  104. min_text_size: 8
  105. - NormalizeImage:
  106. scale: 1./255.
  107. mean:
  108. - 0.485
  109. - 0.456
  110. - 0.406
  111. std:
  112. - 0.229
  113. - 0.224
  114. - 0.225
  115. order: hwc
  116. - ToCHWImage: null
  117. - KeepKeys:
  118. keep_keys:
  119. - image
  120. - threshold_map
  121. - threshold_mask
  122. - shrink_map
  123. - shrink_mask
  124. - class_mask
  125. loader:
  126. shuffle: true
  127. drop_last: false
  128. batch_size_per_card: 8
  129. num_workers: 4
  130. Eval:
  131. dataset:
  132. name: SimpleDataSet
  133. data_dir: /home/aistudio/data/data181819/tw_idcard_det_front_1000/
  134. label_file_list:
  135. - /home/aistudio/data/data181819/tw_idcard_det_front_1000/Label.txt
  136. transforms:
  137. - DecodeImage:
  138. img_mode: BGR
  139. channel_first: false
  140. - DetLabelEncode: null
  141. - DetResizeForTest:
  142. resize_long: 960
  143. - NormalizeImage:
  144. scale: 1./255.
  145. mean:
  146. - 0.485
  147. - 0.456
  148. - 0.406
  149. std:
  150. - 0.229
  151. - 0.224
  152. - 0.225
  153. order: hwc
  154. - ToCHWImage: null
  155. - KeepKeys:
  156. keep_keys:
  157. - image
  158. - shape
  159. - polys
  160. - ignore_tags
  161. loader:
  162. shuffle: false
  163. drop_last: false
  164. batch_size_per_card: 1
  165. num_workers: 2