ppyolo_test.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. # NOTE: this config file is only used for evaluation on COCO test2019 set,
  2. # for training or evaluationg on COCO val2017, please use ppyolo.yml
  3. architecture: YOLOv3
  4. use_gpu: true
  5. max_iters: 500000
  6. log_iter: 100
  7. save_dir: output
  8. snapshot_iter: 10000
  9. metric: COCO
  10. pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_vd_ssld_pretrained.tar
  11. weights: output/ppyolo/model_final
  12. num_classes: 80
  13. use_fine_grained_loss: true
  14. use_ema: true
  15. ema_decay: 0.9998
  16. save_prediction_only: True
  17. YOLOv3:
  18. backbone: ResNet
  19. yolo_head: YOLOv3Head
  20. use_fine_grained_loss: true
  21. ResNet:
  22. norm_type: sync_bn
  23. freeze_at: 0
  24. freeze_norm: false
  25. norm_decay: 0.
  26. depth: 50
  27. feature_maps: [3, 4, 5]
  28. variant: d
  29. dcn_v2_stages: [5]
  30. YOLOv3Head:
  31. anchor_masks: [[6, 7, 8], [3, 4, 5], [0, 1, 2]]
  32. anchors: [[10, 13], [16, 30], [33, 23],
  33. [30, 61], [62, 45], [59, 119],
  34. [116, 90], [156, 198], [373, 326]]
  35. norm_decay: 0.
  36. coord_conv: true
  37. iou_aware: true
  38. iou_aware_factor: 0.4
  39. scale_x_y: 1.05
  40. spp: true
  41. yolo_loss: YOLOv3Loss
  42. nms: MatrixNMS
  43. drop_block: true
  44. YOLOv3Loss:
  45. ignore_thresh: 0.7
  46. scale_x_y: 1.05
  47. label_smooth: false
  48. use_fine_grained_loss: true
  49. iou_loss: IouLoss
  50. iou_aware_loss: IouAwareLoss
  51. IouLoss:
  52. loss_weight: 2.5
  53. max_height: 608
  54. max_width: 608
  55. IouAwareLoss:
  56. loss_weight: 1.0
  57. max_height: 608
  58. max_width: 608
  59. MatrixNMS:
  60. background_label: -1
  61. keep_top_k: 100
  62. normalized: false
  63. score_threshold: 0.01
  64. post_threshold: 0.01
  65. LearningRate:
  66. base_lr: 0.00333
  67. schedulers:
  68. - !PiecewiseDecay
  69. gamma: 0.1
  70. milestones:
  71. - 400000
  72. - 450000
  73. - !LinearWarmup
  74. start_factor: 0.
  75. steps: 4000
  76. OptimizerBuilder:
  77. optimizer:
  78. momentum: 0.9
  79. type: Momentum
  80. regularizer:
  81. factor: 0.0005
  82. type: L2
  83. _READER_: 'ppyolo_reader.yml'
  84. EvalReader:
  85. inputs_def:
  86. fields: ['image', 'im_size', 'im_id']
  87. num_max_boxes: 90
  88. dataset:
  89. !COCODataSet
  90. image_dir: test2017
  91. anno_path: annotations/image_info_test-dev2017.json
  92. dataset_dir: dataset/coco
  93. with_background: false
  94. sample_transforms:
  95. - !DecodeImage
  96. to_rgb: True
  97. - !ResizeImage
  98. target_size: 608
  99. interp: 1
  100. - !NormalizeImage
  101. mean: [0.485, 0.456, 0.406]
  102. std: [0.229, 0.224, 0.225]
  103. is_scale: True
  104. is_channel_first: false
  105. - !Permute
  106. to_bgr: false
  107. channel_first: True
  108. batch_size: 1
  109. TestReader:
  110. dataset:
  111. !ImageFolder
  112. use_default_label: true
  113. with_background: false
  114. sample_transforms:
  115. - !DecodeImage
  116. to_rgb: True
  117. - !ResizeImage
  118. target_size: 608
  119. interp: 1
  120. - !NormalizeImage
  121. mean: [0.485, 0.456, 0.406]
  122. std: [0.229, 0.224, 0.225]
  123. is_scale: True
  124. is_channel_first: false
  125. - !Permute
  126. to_bgr: false
  127. channel_first: True