ppyolov2_r50vd_dcn_365e_lvjian1_640.yml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. architecture: YOLOv3
  2. pretrain_weights: https://paddledet.bj.bcebos.com/models/ppyolov2_r50vd_dcn_365e_coco.pdparams
  3. norm_type: sync_bn
  4. use_ema: true
  5. ema_decay: 0.9998
  6. use_gpu: true
  7. use_xpu: false
  8. log_iter: 100
  9. save_dir: output
  10. metric: COCO
  11. num_classes: 5
  12. TrainDataset:
  13. !COCODataSet
  14. image_dir: images
  15. anno_path: train.json
  16. dataset_dir: dataset/slice_lvjian1_data/train
  17. data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd']
  18. EvalDataset:
  19. !COCODataSet
  20. image_dir: images
  21. anno_path: val.json
  22. dataset_dir: dataset/slice_lvjian1_data/eval
  23. TestDataset:
  24. !ImageFolder
  25. anno_path: val.json
  26. dataset_dir: dataset/slice_lvjian1_data/eval
  27. epoch: 20
  28. LearningRate:
  29. base_lr: 0.0002
  30. schedulers:
  31. - !PiecewiseDecay
  32. gamma: 0.1
  33. milestones:
  34. - 80
  35. - !LinearWarmup
  36. start_factor: 0.
  37. steps: 1000
  38. snapshot_epoch: 3
  39. worker_num: 2
  40. TrainReader:
  41. inputs_def:
  42. num_max_boxes: 100
  43. sample_transforms:
  44. - Decode: {}
  45. - RandomDistort: {}
  46. - RandomExpand: {fill_value: [123.675, 116.28, 103.53]}
  47. - RandomCrop: {}
  48. - RandomFlip: {}
  49. batch_transforms:
  50. - BatchRandomResize: {target_size: [576, 608, 640, 672, 704], random_size: True, random_interp: True, keep_ratio: False}
  51. - NormalizeBox: {}
  52. - PadBox: {num_max_boxes: 100}
  53. - BboxXYXY2XYWH: {}
  54. - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
  55. - Permute: {}
  56. - Gt2YoloTarget: {anchor_masks: [[6, 7, 8], [3, 4, 5], [0, 1, 2]], anchors: [[8, 7], [24, 12], [14, 25], [37, 35], [30, 140], [89, 52], [93, 189], [226, 99], [264, 352]], downsample_ratios: [32, 16, 8]}
  57. batch_size: 2
  58. shuffle: true
  59. drop_last: true
  60. use_shared_memory: true
  61. EvalReader:
  62. sample_transforms:
  63. - Decode: {}
  64. - Resize: {target_size: [640, 640], keep_ratio: False, interp: 2}
  65. - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
  66. - Permute: {}
  67. batch_size: 8
  68. TestReader:
  69. inputs_def:
  70. image_shape: [3, 640, 640]
  71. sample_transforms:
  72. - Decode: {}
  73. - Resize: {target_size: [640, 640], keep_ratio: False, interp: 2}
  74. - NormalizeImage: {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225], is_scale: True}
  75. - Permute: {}
  76. batch_size: 1
  77. OptimizerBuilder:
  78. clip_grad_by_norm: 35.
  79. optimizer:
  80. momentum: 0.9
  81. type: Momentum
  82. regularizer:
  83. factor: 0.0005
  84. type: L2
  85. YOLOv3:
  86. backbone: ResNet
  87. neck: PPYOLOPAN
  88. yolo_head: YOLOv3Head
  89. post_process: BBoxPostProcess
  90. ResNet:
  91. depth: 50
  92. variant: d
  93. return_idx: [1, 2, 3]
  94. dcn_v2_stages: [3]
  95. freeze_at: -1
  96. freeze_norm: false
  97. norm_decay: 0.
  98. PPYOLOPAN:
  99. drop_block: true
  100. block_size: 3
  101. keep_prob: 0.9
  102. spp: true
  103. YOLOv3Head:
  104. anchors: [[8, 7], [24, 12], [14, 25],
  105. [37, 35], [30, 140], [89, 52],
  106. [93, 189], [226, 99], [264, 352]]
  107. anchor_masks: [[6, 7, 8], [3, 4, 5], [0, 1, 2]]
  108. loss: YOLOv3Loss
  109. iou_aware: true
  110. iou_aware_factor: 0.5
  111. YOLOv3Loss:
  112. ignore_thresh: 0.7
  113. downsample: [32, 16, 8]
  114. label_smooth: false
  115. scale_x_y: 1.05
  116. iou_loss: IouLoss
  117. iou_aware_loss: IouAwareLoss
  118. IouLoss:
  119. loss_weight: 2.5
  120. loss_square: true
  121. IouAwareLoss:
  122. loss_weight: 1.0
  123. BBoxPostProcess:
  124. decode:
  125. name: YOLOBox
  126. conf_thresh: 0.01
  127. downsample_ratio: 32
  128. clip_bbox: true
  129. scale_x_y: 1.05
  130. nms:
  131. name: MatrixNMS
  132. keep_top_k: 100
  133. score_threshold: 0.01
  134. post_threshold: 0.01
  135. nms_top_k: -1
  136. background_label: -1