ssd_vgg16_512.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. architecture: SSD
  2. use_gpu: true
  3. max_iters: 400000
  4. snapshot_iter: 10000
  5. log_iter: 20
  6. metric: COCO
  7. pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/VGG16_caffe_pretrained.tar
  8. save_dir: output
  9. weights: output/ssd_vgg16_512/model_final
  10. num_classes: 81
  11. SSD:
  12. backbone: VGG
  13. multi_box_head: MultiBoxHead
  14. output_decoder:
  15. background_label: 0
  16. keep_top_k: 200
  17. nms_eta: 1.0
  18. nms_threshold: 0.45
  19. nms_top_k: 400
  20. score_threshold: 0.01
  21. VGG:
  22. depth: 16
  23. with_extra_blocks: true
  24. normalizations: [20., -1, -1, -1, -1, -1, -1]
  25. extra_block_filters: [[256, 512, 1, 2, 3], [128, 256, 1, 2, 3], [128, 256, 1, 2, 3], [128, 256, 1, 2, 3], [128, 256, 1, 1, 4]]
  26. MultiBoxHead:
  27. base_size: 512
  28. aspect_ratios: [[2.], [2., 3.], [2., 3.], [2., 3.], [2., 3.], [2.], [2.]]
  29. min_ratio: 15
  30. max_ratio: 90
  31. min_sizes: [20.0, 51.0, 133.0, 215.0, 296.0, 378.0, 460.0]
  32. max_sizes: [51.0, 133.0, 215.0, 296.0, 378.0, 460.0, 542.0]
  33. steps: [8, 16, 32, 64, 128, 256, 512]
  34. offset: 0.5
  35. flip: true
  36. kernel_size: 3
  37. pad: 1
  38. LearningRate:
  39. base_lr: 0.001
  40. schedulers:
  41. - !PiecewiseDecay
  42. gamma: 0.1
  43. milestones: [280000, 360000]
  44. - !LinearWarmup
  45. start_factor: 0.3333333333333333
  46. steps: 500
  47. OptimizerBuilder:
  48. optimizer:
  49. momentum: 0.9
  50. type: Momentum
  51. regularizer:
  52. factor: 0.0005
  53. type: L2
  54. TrainReader:
  55. inputs_def:
  56. image_shape: [3, 512, 512]
  57. fields: ['image', 'gt_bbox', 'gt_class']
  58. dataset:
  59. !COCODataSet
  60. image_dir: train2017
  61. anno_path: annotations/instances_train2017.json
  62. dataset_dir: dataset/coco
  63. sample_transforms:
  64. - !DecodeImage
  65. to_rgb: true
  66. with_mixup: false
  67. - !RandomDistort
  68. brightness_lower: 0.875
  69. brightness_upper: 1.125
  70. is_order: true
  71. - !RandomExpand
  72. fill_value: [104, 117, 123]
  73. - !RandomCrop
  74. allow_no_crop: true
  75. - !NormalizeBox {}
  76. - !ResizeImage
  77. interp: 1
  78. target_size: 512
  79. use_cv2: false
  80. - !RandomFlipImage
  81. is_normalized: true
  82. - !Permute
  83. to_bgr: false
  84. - !NormalizeImage
  85. is_scale: false
  86. mean: [104, 117, 123]
  87. std: [1, 1, 1]
  88. batch_size: 8
  89. shuffle: true
  90. worker_num: 8
  91. bufsize: 16
  92. use_process: true
  93. EvalReader:
  94. inputs_def:
  95. image_shape: [3,512,512]
  96. fields: ['image', 'gt_bbox', 'gt_class', 'im_shape', 'im_id']
  97. dataset:
  98. !COCODataSet
  99. image_dir: val2017
  100. anno_path: annotations/instances_val2017.json
  101. dataset_dir: dataset/coco
  102. sample_transforms:
  103. - !DecodeImage
  104. to_rgb: true
  105. with_mixup: false
  106. - !ResizeImage
  107. interp: 1
  108. target_size: 512
  109. use_cv2: false
  110. - !Permute
  111. to_bgr: false
  112. - !NormalizeImage
  113. is_scale: false
  114. mean: [104, 117, 123]
  115. std: [1, 1, 1]
  116. batch_size: 8
  117. worker_num: 8
  118. bufsize: 16
  119. drop_empty: false
  120. TestReader:
  121. inputs_def:
  122. image_shape: [3,512,512]
  123. fields: ['image', 'im_id', 'im_shape']
  124. dataset:
  125. !ImageFolder
  126. anno_path: annotations/instances_val2017.json
  127. sample_transforms:
  128. - !DecodeImage
  129. to_rgb: true
  130. with_mixup: false
  131. - !ResizeImage
  132. interp: 1
  133. max_size: 0
  134. target_size: 512
  135. use_cv2: true
  136. - !Permute
  137. to_bgr: false
  138. - !NormalizeImage
  139. is_scale: false
  140. mean: [104, 117, 123]
  141. std: [1, 1, 1]
  142. batch_size: 1