yolov4_cspdarknet.yml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. architecture: YOLOv4
  2. use_gpu: true
  3. max_iters: 500200
  4. log_iter: 20
  5. save_dir: output
  6. snapshot_iter: 10000
  7. metric: COCO
  8. pretrain_weights: https://paddlemodels.bj.bcebos.com/object_detection/yolov4_cspdarknet.pdparams
  9. weights: output/yolov4_cspdarknet/model_final
  10. num_classes: 80
  11. use_fine_grained_loss: true
  12. save_prediction_only: True
  13. YOLOv4:
  14. backbone: CSPDarkNet
  15. yolo_head: YOLOv4Head
  16. CSPDarkNet:
  17. norm_type: sync_bn
  18. norm_decay: 0.
  19. depth: 53
  20. YOLOv4Head:
  21. anchors: [[12, 16], [19, 36], [40, 28], [36, 75], [76, 55],
  22. [72, 146], [142, 110], [192, 243], [459, 401]]
  23. anchor_masks: [[0, 1, 2], [3, 4, 5], [6, 7, 8]]
  24. nms:
  25. background_label: -1
  26. keep_top_k: -1
  27. nms_threshold: 0.45
  28. nms_top_k: -1
  29. normalized: true
  30. score_threshold: 0.001
  31. downsample: [8,16,32]
  32. scale_x_y: [1.2, 1.1, 1.05]
  33. YOLOv3Loss:
  34. ignore_thresh: 0.7
  35. label_smooth: true
  36. downsample: [8,16,32]
  37. scale_x_y: [1.2, 1.1, 1.05]
  38. iou_loss: IouLoss
  39. match_score: true
  40. IouLoss:
  41. loss_weight: 0.07
  42. max_height: 608
  43. max_width: 608
  44. ciou_term: true
  45. loss_square: false
  46. LearningRate:
  47. base_lr: 0.0001
  48. schedulers:
  49. - !PiecewiseDecay
  50. gamma: 0.1
  51. milestones:
  52. - 400000
  53. - 450000
  54. - !LinearWarmup
  55. start_factor: 0.
  56. steps: 1000
  57. OptimizerBuilder:
  58. clip_grad_by_norm: 10.
  59. optimizer:
  60. momentum: 0.949
  61. type: Momentum
  62. regularizer:
  63. factor: 0.0005
  64. type: L2
  65. _READER_: '../yolov3_reader.yml'
  66. EvalReader:
  67. inputs_def:
  68. fields: ['image', 'im_size', 'im_id']
  69. num_max_boxes: 90
  70. dataset:
  71. !COCODataSet
  72. image_dir: test2017
  73. anno_path: annotations/image_info_test-dev2017.json
  74. dataset_dir: dataset/coco
  75. with_background: false
  76. sample_transforms:
  77. - !DecodeImage
  78. to_rgb: True
  79. - !ResizeImage
  80. target_size: 608
  81. interp: 1
  82. - !NormalizeImage
  83. mean: [0., 0., 0.]
  84. std: [1., 1., 1.]
  85. is_scale: True
  86. is_channel_first: false
  87. - !Permute
  88. to_bgr: false
  89. channel_first: True
  90. batch_size: 1
  91. TestReader:
  92. dataset:
  93. !ImageFolder
  94. use_default_label: true
  95. with_background: false
  96. sample_transforms:
  97. - !DecodeImage
  98. to_rgb: True
  99. - !ResizeImage
  100. target_size: 608
  101. interp: 1
  102. - !NormalizeImage
  103. mean: [0., 0., 0.]
  104. std: [1., 1., 1.]
  105. is_scale: True
  106. is_channel_first: false
  107. - !Permute
  108. to_bgr: false
  109. channel_first: True