ppyolo_r18vd.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. architecture: YOLOv3
  2. use_gpu: true
  3. max_iters: 250000
  4. log_iter: 20
  5. save_dir: output
  6. snapshot_iter: 10000
  7. metric: COCO
  8. pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet18_vd_pretrained.tar
  9. weights: output/ppyolo_tiny/model_final
  10. num_classes: 80
  11. use_fine_grained_loss: true
  12. use_ema: true
  13. ema_decay: 0.9998
  14. YOLOv3:
  15. backbone: ResNet
  16. yolo_head: YOLOv3Head
  17. use_fine_grained_loss: true
  18. ResNet:
  19. norm_type: sync_bn
  20. freeze_at: 0
  21. freeze_norm: false
  22. norm_decay: 0.
  23. depth: 18
  24. feature_maps: [4, 5]
  25. variant: d
  26. YOLOv3Head:
  27. anchor_masks: [[3, 4, 5], [0, 1, 2]]
  28. anchors: [[10, 14], [23, 27], [37, 58],
  29. [81, 82], [135, 169], [344, 319]]
  30. norm_decay: 0.
  31. conv_block_num: 0
  32. scale_x_y: 1.05
  33. yolo_loss: YOLOv3Loss
  34. nms: MatrixNMS
  35. drop_block: true
  36. YOLOv3Loss:
  37. ignore_thresh: 0.7
  38. scale_x_y: 1.05
  39. label_smooth: false
  40. use_fine_grained_loss: true
  41. iou_loss: IouLoss
  42. IouLoss:
  43. loss_weight: 2.5
  44. max_height: 608
  45. max_width: 608
  46. MatrixNMS:
  47. background_label: -1
  48. keep_top_k: 100
  49. normalized: false
  50. score_threshold: 0.01
  51. post_threshold: 0.01
  52. LearningRate:
  53. base_lr: 0.004
  54. schedulers:
  55. - !PiecewiseDecay
  56. gamma: 0.1
  57. milestones:
  58. - 150000
  59. - 200000
  60. - !LinearWarmup
  61. start_factor: 0.
  62. steps: 4000
  63. OptimizerBuilder:
  64. optimizer:
  65. momentum: 0.9
  66. type: Momentum
  67. regularizer:
  68. factor: 0.0005
  69. type: L2
  70. _READER_: 'ppyolo_reader.yml'
  71. TrainReader:
  72. inputs_def:
  73. fields: ['image', 'gt_bbox', 'gt_class', 'gt_score']
  74. num_max_boxes: 50
  75. dataset:
  76. !COCODataSet
  77. image_dir: train2017
  78. anno_path: annotations/instances_train2017.json
  79. dataset_dir: train_data/dataset/coco
  80. with_background: false
  81. sample_transforms:
  82. - !DecodeImage
  83. to_rgb: True
  84. with_mixup: True
  85. - !MixupImage
  86. alpha: 1.5
  87. beta: 1.5
  88. - !ColorDistort {}
  89. - !RandomExpand
  90. fill_value: [123.675, 116.28, 103.53]
  91. - !RandomCrop {}
  92. - !RandomFlipImage
  93. is_normalized: false
  94. - !NormalizeBox {}
  95. - !PadBox
  96. num_max_boxes: 50
  97. - !BboxXYXY2XYWH {}
  98. batch_transforms:
  99. - !RandomShape
  100. sizes: [320, 352, 384, 416, 448, 480, 512, 544, 576, 608]
  101. random_inter: True
  102. - !NormalizeImage
  103. mean: [0.485, 0.456, 0.406]
  104. std: [0.229, 0.224, 0.225]
  105. is_scale: True
  106. is_channel_first: false
  107. - !Permute
  108. to_bgr: false
  109. channel_first: True
  110. # Gt2YoloTarget is only used when use_fine_grained_loss set as true,
  111. # this operator will be deleted automatically if use_fine_grained_loss
  112. # is set as false
  113. - !Gt2YoloTarget
  114. anchor_masks: [[3, 4, 5], [0, 1, 2]]
  115. anchors: [[10, 14], [23, 27], [37, 58],
  116. [81, 82], [135, 169], [344, 319]]
  117. downsample_ratios: [32, 16]
  118. batch_size: 32
  119. shuffle: true
  120. mixup_epoch: 500
  121. drop_last: true
  122. worker_num: 16
  123. bufsize: 8
  124. use_process: true