ppyolov2_r101vd_dcn_365e_renche_640.yml 3.4 KB

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