det_r50_vd_east.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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_r50_vd/
  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/ResNet50_vd_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: ResNet_vd
  23. layers: 50
  24. Neck:
  25. name: EASTFPN
  26. model_name: large
  27. Head:
  28. name: EASTHead
  29. model_name: large
  30. Loss:
  31. name: EASTLoss
  32. Optimizer:
  33. name: Adam
  34. beta1: 0.9
  35. beta2: 0.999
  36. lr:
  37. # name: Cosine
  38. learning_rate: 0.001
  39. # warmup_epoch: 0
  40. regularizer:
  41. name: 'L2'
  42. factor: 0
  43. PostProcess:
  44. name: EASTPostProcess
  45. score_thresh: 0.8
  46. cover_thresh: 0.1
  47. nms_thresh: 0.2
  48. Metric:
  49. name: DetMetric
  50. main_indicator: hmean
  51. Train:
  52. dataset:
  53. name: SimpleDataSet
  54. data_dir: ./train_data/icdar2015/text_localization/
  55. label_file_list:
  56. - ./train_data/icdar2015/text_localization/train_icdar2015_label.txt
  57. ratio_list: [1.0]
  58. transforms:
  59. - DecodeImage: # load image
  60. img_mode: BGR
  61. channel_first: False
  62. - DetLabelEncode: # Class handling label
  63. - EASTProcessTrain:
  64. image_shape: [512, 512]
  65. background_ratio: 0.125
  66. min_crop_side_ratio: 0.1
  67. min_text_size: 10
  68. - KeepKeys:
  69. keep_keys: ['image', 'score_map', 'geo_map', 'training_mask'] # dataloader will return list in this order
  70. loader:
  71. shuffle: True
  72. drop_last: False
  73. batch_size_per_card: 8
  74. num_workers: 8
  75. Eval:
  76. dataset:
  77. name: SimpleDataSet
  78. data_dir: ./train_data/icdar2015/text_localization/
  79. label_file_list:
  80. - ./train_data/icdar2015/text_localization/test_icdar2015_label.txt
  81. transforms:
  82. - DecodeImage: # load image
  83. img_mode: BGR
  84. channel_first: False
  85. - DetLabelEncode: # Class handling label
  86. - DetResizeForTest:
  87. limit_side_len: 2400
  88. limit_type: max
  89. - NormalizeImage:
  90. scale: 1./255.
  91. mean: [0.485, 0.456, 0.406]
  92. std: [0.229, 0.224, 0.225]
  93. order: 'hwc'
  94. - ToCHWImage:
  95. - KeepKeys:
  96. keep_keys: ['image', 'shape', 'polys', 'ignore_tags']
  97. loader:
  98. shuffle: False
  99. drop_last: False
  100. batch_size_per_card: 1 # must be 1
  101. num_workers: 2