ssd_vgg16_300.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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_300/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]
  25. MultiBoxHead:
  26. base_size: 300
  27. aspect_ratios: [[2.], [2., 3.], [2., 3.], [2., 3.], [2.], [2.]]
  28. min_ratio: 15
  29. max_ratio: 90
  30. min_sizes: [30.0, 60.0, 111.0, 162.0, 213.0, 264.0]
  31. max_sizes: [60.0, 111.0, 162.0, 213.0, 264.0, 315.0]
  32. steps: [8, 16, 32, 64, 100, 300]
  33. offset: 0.5
  34. flip: true
  35. kernel_size: 3
  36. pad: 1
  37. LearningRate:
  38. base_lr: 0.001
  39. schedulers:
  40. - !PiecewiseDecay
  41. gamma: 0.1
  42. milestones: [280000, 360000]
  43. - !LinearWarmup
  44. start_factor: 0.3333333333333333
  45. steps: 500
  46. OptimizerBuilder:
  47. optimizer:
  48. momentum: 0.9
  49. type: Momentum
  50. regularizer:
  51. factor: 0.0005
  52. type: L2
  53. TrainReader:
  54. inputs_def:
  55. image_shape: [3, 300, 300]
  56. fields: ['image', 'gt_bbox', 'gt_class']
  57. dataset:
  58. !COCODataSet
  59. image_dir: train2017
  60. anno_path: annotations/instances_train2017.json
  61. dataset_dir: dataset/coco
  62. sample_transforms:
  63. - !DecodeImage
  64. to_rgb: true
  65. - !RandomDistort
  66. brightness_lower: 0.875
  67. brightness_upper: 1.125
  68. is_order: true
  69. - !RandomExpand
  70. fill_value: [104, 117, 123]
  71. - !RandomCrop
  72. allow_no_crop: true
  73. - !NormalizeBox {}
  74. - !ResizeImage
  75. interp: 1
  76. target_size: 300
  77. use_cv2: false
  78. - !RandomFlipImage
  79. is_normalized: true
  80. - !Permute
  81. to_bgr: false
  82. - !NormalizeImage
  83. is_scale: false
  84. mean: [104, 117, 123]
  85. std: [1, 1, 1]
  86. batch_size: 8
  87. shuffle: true
  88. worker_num: 8
  89. bufsize: 16
  90. use_process: true
  91. drop_empty: true
  92. EvalReader:
  93. inputs_def:
  94. image_shape: [3, 300, 300]
  95. fields: ['image', 'gt_bbox', 'gt_class', 'im_shape', 'im_id']
  96. dataset:
  97. !COCODataSet
  98. image_dir: val2017
  99. anno_path: annotations/instances_val2017.json
  100. dataset_dir: dataset/coco
  101. sample_transforms:
  102. - !DecodeImage
  103. to_rgb: true
  104. with_mixup: false
  105. - !NormalizeBox {}
  106. - !ResizeImage
  107. interp: 1
  108. target_size: 300
  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: 16
  117. worker_num: 8
  118. bufsize: 16
  119. TestReader:
  120. inputs_def:
  121. image_shape: [3,300,300]
  122. fields: ['image', 'im_id', 'im_shape']
  123. dataset:
  124. !ImageFolder
  125. anno_path: annotations/instances_val2017.json
  126. sample_transforms:
  127. - !DecodeImage
  128. to_rgb: true
  129. with_mixup: false
  130. - !ResizeImage
  131. interp: 1
  132. max_size: 0
  133. target_size: 300
  134. use_cv2: true
  135. - !Permute
  136. to_bgr: false
  137. - !NormalizeImage
  138. is_scale: false
  139. mean: [104, 117, 123]
  140. std: [1, 1, 1]
  141. batch_size: 1