efficientdet_d0.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. architecture: EfficientDet
  2. max_iters: 281250
  3. use_gpu: true
  4. pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/EfficientNetB0_pretrained.tar
  5. weights: output/efficientdet_d0/model_final
  6. log_iter: 20
  7. snapshot_iter: 10000
  8. metric: COCO
  9. save_dir: output
  10. num_classes: 81
  11. use_ema: true
  12. ema_decay: 0.9998
  13. EfficientDet:
  14. backbone: EfficientNet
  15. fpn: BiFPN
  16. efficient_head: EfficientHead
  17. anchor_grid: AnchorGrid
  18. box_loss_weight: 50.
  19. EfficientNet:
  20. # norm_type: sync_bn
  21. # TODO
  22. norm_type: bn
  23. scale: b0
  24. use_se: true
  25. BiFPN:
  26. num_chan: 64
  27. repeat: 3
  28. levels: 5
  29. EfficientHead:
  30. repeat: 3
  31. num_chan: 64
  32. prior_prob: 0.01
  33. num_anchors: 9
  34. gamma: 1.5
  35. alpha: 0.25
  36. delta: 0.1
  37. output_decoder:
  38. score_thresh: 0.05 # originally 0.
  39. nms_thresh: 0.5
  40. pre_nms_top_n: 1000 # originally 5000
  41. detections_per_im: 100
  42. nms_eta: 1.0
  43. AnchorGrid:
  44. anchor_base_scale: 4
  45. num_scales: 3
  46. aspect_ratios: [[1, 1], [1.4, 0.7], [0.7, 1.4]]
  47. LearningRate:
  48. base_lr: 0.16
  49. schedulers:
  50. - !CosineDecayWithSkip
  51. total_steps: 281250
  52. skip_steps: 938
  53. - !LinearWarmup
  54. start_factor: 0.05
  55. steps: 938
  56. OptimizerBuilder:
  57. clip_grad_by_norm: 10.
  58. optimizer:
  59. momentum: 0.9
  60. type: Momentum
  61. regularizer:
  62. factor: 0.00004
  63. type: L2
  64. TrainReader:
  65. inputs_def:
  66. fields: ['image', 'im_id', 'fg_num', 'gt_label', 'gt_target']
  67. dataset:
  68. !COCODataSet
  69. image_dir: train2017
  70. anno_path: annotations/instances_train2017.json
  71. dataset_dir: dataset/coco
  72. sample_transforms:
  73. - !DecodeImage
  74. to_rgb: true
  75. - !RandomFlipImage
  76. prob: 0.5
  77. - !NormalizeImage
  78. is_channel_first: false
  79. is_scale: true
  80. mean: [0.485,0.456,0.406]
  81. std: [0.229, 0.224,0.225]
  82. - !RandomScaledCrop
  83. target_dim: 512
  84. scale_range: [.1, 2.]
  85. interp: 1
  86. - !Permute
  87. to_bgr: false
  88. channel_first: true
  89. - !TargetAssign
  90. image_size: 512
  91. batch_size: 16
  92. shuffle: true
  93. worker_num: 32
  94. bufsize: 16
  95. use_process: true
  96. drop_empty: false
  97. EvalReader:
  98. inputs_def:
  99. fields: ['image', 'im_info', 'im_id']
  100. dataset:
  101. !COCODataSet
  102. image_dir: val2017
  103. anno_path: annotations/instances_val2017.json
  104. dataset_dir: dataset/coco
  105. sample_transforms:
  106. - !DecodeImage
  107. to_rgb: true
  108. with_mixup: false
  109. - !NormalizeImage
  110. is_channel_first: false
  111. is_scale: true
  112. mean: [0.485,0.456,0.406]
  113. std: [0.229, 0.224,0.225]
  114. - !ResizeAndPad
  115. target_dim: 512
  116. interp: 1
  117. - !Permute
  118. channel_first: true
  119. to_bgr: false
  120. drop_empty: false
  121. batch_size: 16
  122. shuffle: false
  123. worker_num: 2
  124. TestReader:
  125. inputs_def:
  126. fields: ['image', 'im_info', 'im_id']
  127. image_shape: [3, 512, 512]
  128. dataset:
  129. !ImageFolder
  130. anno_path: annotations/instances_val2017.json
  131. sample_transforms:
  132. - !DecodeImage
  133. to_rgb: true
  134. with_mixup: false
  135. - !NormalizeImage
  136. is_channel_first: false
  137. is_scale: true
  138. mean: [0.485,0.456,0.406]
  139. std: [0.229, 0.224,0.225]
  140. - !ResizeAndPad
  141. target_dim: 512
  142. interp: 1
  143. - !Permute
  144. channel_first: true
  145. to_bgr: false
  146. batch_size: 16
  147. shuffle: false