det_r50_vd_dcn_fce_ctw.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. Global:
  2. use_gpu: true
  3. epoch_num: 1500
  4. log_smooth_window: 20
  5. print_batch_step: 20
  6. save_model_dir: ./output/det_r50_dcn_fce_ctw/
  7. save_epoch_step: 100
  8. # evaluation is run every 835 iterations
  9. eval_batch_step: [0, 835]
  10. cal_metric_during_train: False
  11. pretrained_model: ./pretrain_models/ResNet50_vd_ssld_pretrained
  12. checkpoints:
  13. save_inference_dir:
  14. use_visualdl: False
  15. infer_img: doc/imgs_en/img_10.jpg
  16. save_res_path: ./output/det_fce/predicts_fce.txt
  17. Architecture:
  18. model_type: det
  19. algorithm: FCE
  20. Transform:
  21. Backbone:
  22. name: ResNet_vd
  23. layers: 50
  24. dcn_stage: [False, True, True, True]
  25. out_indices: [1,2,3]
  26. Neck:
  27. name: FCEFPN
  28. out_channels: 256
  29. has_extra_convs: False
  30. extra_stage: 0
  31. Head:
  32. name: FCEHead
  33. fourier_degree: 5
  34. Loss:
  35. name: FCELoss
  36. fourier_degree: 5
  37. num_sample: 50
  38. Optimizer:
  39. name: Adam
  40. beta1: 0.9
  41. beta2: 0.999
  42. lr:
  43. learning_rate: 0.0001
  44. regularizer:
  45. name: 'L2'
  46. factor: 0
  47. PostProcess:
  48. name: FCEPostProcess
  49. scales: [8, 16, 32]
  50. alpha: 1.0
  51. beta: 1.0
  52. fourier_degree: 5
  53. box_type: 'poly'
  54. Metric:
  55. name: DetFCEMetric
  56. main_indicator: hmean
  57. Train:
  58. dataset:
  59. name: SimpleDataSet
  60. data_dir: ./train_data/ctw1500/imgs/
  61. label_file_list:
  62. - ./train_data/ctw1500/imgs/training.txt
  63. transforms:
  64. - DecodeImage: # load image
  65. img_mode: BGR
  66. channel_first: False
  67. ignore_orientation: True
  68. - DetLabelEncode: # Class handling label
  69. - ColorJitter:
  70. brightness: 0.142
  71. saturation: 0.5
  72. contrast: 0.5
  73. - RandomScaling:
  74. - RandomCropFlip:
  75. crop_ratio: 0.5
  76. - RandomCropPolyInstances:
  77. crop_ratio: 0.8
  78. min_side_ratio: 0.3
  79. - RandomRotatePolyInstances:
  80. rotate_ratio: 0.5
  81. max_angle: 30
  82. pad_with_fixed_color: False
  83. - SquareResizePad:
  84. target_size: 800
  85. pad_ratio: 0.6
  86. - IaaAugment:
  87. augmenter_args:
  88. - { 'type': Fliplr, 'args': { 'p': 0.5 } }
  89. - FCENetTargets:
  90. fourier_degree: 5
  91. - NormalizeImage:
  92. scale: 1./255.
  93. mean: [0.485, 0.456, 0.406]
  94. std: [0.229, 0.224, 0.225]
  95. order: 'hwc'
  96. - ToCHWImage:
  97. - KeepKeys:
  98. keep_keys: ['image', 'p3_maps', 'p4_maps', 'p5_maps'] # dataloader will return list in this order
  99. loader:
  100. shuffle: True
  101. drop_last: False
  102. batch_size_per_card: 6
  103. num_workers: 8
  104. Eval:
  105. dataset:
  106. name: SimpleDataSet
  107. data_dir: ./train_data/ctw1500/imgs/
  108. label_file_list:
  109. - ./train_data/ctw1500/imgs/test.txt
  110. transforms:
  111. - DecodeImage: # load image
  112. img_mode: BGR
  113. channel_first: False
  114. ignore_orientation: True
  115. - DetLabelEncode: # Class handling label
  116. - DetResizeForTest:
  117. limit_type: 'min'
  118. limit_side_len: 736
  119. - NormalizeImage:
  120. scale: 1./255.
  121. mean: [0.485, 0.456, 0.406]
  122. std: [0.229, 0.224, 0.225]
  123. order: 'hwc'
  124. - Pad:
  125. - ToCHWImage:
  126. - KeepKeys:
  127. keep_keys: ['image', 'shape', 'polys', 'ignore_tags']
  128. loader:
  129. shuffle: False
  130. drop_last: False
  131. batch_size_per_card: 1 # must be 1
  132. num_workers: 2