det_mv3_east.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. Global:
  2. use_gpu: true
  3. epoch_num: 10000
  4. log_smooth_window: 20
  5. print_batch_step: 2
  6. save_model_dir: ./output/east_mv3/
  7. save_epoch_step: 1000
  8. # evaluation is run every 5000 iterations after the 4000th iteration
  9. eval_batch_step: [4000, 5000]
  10. cal_metric_during_train: False
  11. pretrained_model: ./pretrain_models/MobileNetV3_large_x0_5_pretrained
  12. checkpoints:
  13. save_inference_dir:
  14. use_visualdl: False
  15. infer_img:
  16. save_res_path: ./output/det_east/predicts_east.txt
  17. Architecture:
  18. model_type: det
  19. algorithm: EAST
  20. Transform:
  21. Backbone:
  22. name: MobileNetV3
  23. scale: 0.5
  24. model_name: large
  25. Neck:
  26. name: EASTFPN
  27. model_name: small
  28. Head:
  29. name: EASTHead
  30. model_name: small
  31. Loss:
  32. name: EASTLoss
  33. Optimizer:
  34. name: Adam
  35. beta1: 0.9
  36. beta2: 0.999
  37. lr:
  38. # name: Cosine
  39. learning_rate: 0.001
  40. # warmup_epoch: 0
  41. regularizer:
  42. name: 'L2'
  43. factor: 0
  44. PostProcess:
  45. name: EASTPostProcess
  46. score_thresh: 0.8
  47. cover_thresh: 0.1
  48. nms_thresh: 0.2
  49. Metric:
  50. name: DetMetric
  51. main_indicator: hmean
  52. Train:
  53. dataset:
  54. name: SimpleDataSet
  55. data_dir: ./train_data/icdar2015/text_localization/
  56. label_file_list:
  57. - ./train_data/icdar2015/text_localization/train_icdar2015_label.txt
  58. ratio_list: [1.0]
  59. transforms:
  60. - DecodeImage: # load image
  61. img_mode: BGR
  62. channel_first: False
  63. - DetLabelEncode: # Class handling label
  64. - EASTProcessTrain:
  65. image_shape: [512, 512]
  66. background_ratio: 0.125
  67. min_crop_side_ratio: 0.1
  68. min_text_size: 10
  69. - KeepKeys:
  70. keep_keys: ['image', 'score_map', 'geo_map', 'training_mask'] # dataloader will return list in this order
  71. loader:
  72. shuffle: True
  73. drop_last: False
  74. batch_size_per_card: 16
  75. num_workers: 8
  76. Eval:
  77. dataset:
  78. name: SimpleDataSet
  79. data_dir: ./train_data/icdar2015/text_localization/
  80. label_file_list:
  81. - ./train_data/icdar2015/text_localization/test_icdar2015_label.txt
  82. transforms:
  83. - DecodeImage: # load image
  84. img_mode: BGR
  85. channel_first: False
  86. - DetLabelEncode: # Class handling label
  87. - DetResizeForTest:
  88. limit_side_len: 2400
  89. limit_type: max
  90. - NormalizeImage:
  91. scale: 1./255.
  92. mean: [0.485, 0.456, 0.406]
  93. std: [0.229, 0.224, 0.225]
  94. order: 'hwc'
  95. - ToCHWImage:
  96. - KeepKeys:
  97. keep_keys: ['image', 'shape', 'polys', 'ignore_tags']
  98. loader:
  99. shuffle: False
  100. drop_last: False
  101. batch_size_per_card: 1 # must be 1
  102. num_workers: 2