picodet_l_640_coco_lcnet_lvjian1.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. weights: output/picodet_l_640_coco_lcnet_lvjian1/model_final
  2. pretrain_weights: https://paddledet.bj.bcebos.com/models/picodet_l_640_coco_lcnet.pdparams
  3. worker_num: 2
  4. eval_height: &eval_height 640
  5. eval_width: &eval_width 640
  6. eval_size: &eval_size [*eval_height, *eval_width]
  7. metric: COCO
  8. num_classes: 5
  9. TrainDataset:
  10. !COCODataSet
  11. image_dir: images
  12. anno_path: train.json
  13. dataset_dir: /paddle/dataset/model-select/gongye/lvjian1/slice_lvjian1_data/train/
  14. data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd']
  15. EvalDataset:
  16. !COCODataSet
  17. image_dir: images
  18. anno_path: val.json
  19. dataset_dir: /paddle/dataset/model-select/gongye/lvjian1/slice_lvjian1_data/eval/
  20. TestDataset:
  21. !ImageFolder
  22. anno_path: val.json
  23. dataset_dir: dataset/slice_lvjian1_data/eval
  24. epoch: 50
  25. LearningRate:
  26. base_lr: 0.006
  27. schedulers:
  28. - !CosineDecay
  29. max_epochs: 50
  30. - !LinearWarmup
  31. start_factor: 0.001
  32. steps: 300
  33. TrainReader:
  34. sample_transforms:
  35. - Decode: {}
  36. - RandomCrop: {}
  37. - RandomFlip: {prob: 0.5}
  38. - RandomDistort: {}
  39. batch_transforms:
  40. - BatchRandomResize: {target_size: [576, 608, 640, 672, 704], random_size: True, random_interp: True, keep_ratio: False}
  41. - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
  42. - Permute: {}
  43. - PadGT: {}
  44. batch_size: 8
  45. shuffle: true
  46. drop_last: true
  47. EvalReader:
  48. sample_transforms:
  49. - Decode: {}
  50. - Resize: {interp: 2, target_size: *eval_size, keep_ratio: False}
  51. - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
  52. - Permute: {}
  53. batch_transforms:
  54. - PadBatch: {pad_to_stride: 32}
  55. batch_size: 8
  56. shuffle: false
  57. TestReader:
  58. inputs_def:
  59. image_shape: [1, 3, *eval_height, *eval_width]
  60. sample_transforms:
  61. - Decode: {}
  62. - Resize: {interp: 2, target_size: *eval_size, keep_ratio: False}
  63. - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
  64. - Permute: {}
  65. batch_size: 1
  66. use_gpu: true
  67. use_xpu: false
  68. log_iter: 100
  69. save_dir: output
  70. snapshot_epoch: 10
  71. print_flops: false
  72. find_unused_parameters: True
  73. use_ema: true
  74. # Exporting the model
  75. export:
  76. post_process: True # Whether post-processing is included in the network when export model.
  77. nms: True # Whether NMS is included in the network when export model.
  78. benchmark: False # It is used to testing model performance, if set `True`, post-process and NMS will not be exported.
  79. OptimizerBuilder:
  80. optimizer:
  81. momentum: 0.9
  82. type: Momentum
  83. regularizer:
  84. factor: 0.00004
  85. type: L2
  86. architecture: PicoDet
  87. PicoDet:
  88. backbone: LCNet
  89. neck: LCPAN
  90. head: PicoHeadV2
  91. LCNet:
  92. scale: 2.0
  93. feature_maps: [3, 4, 5]
  94. LCPAN:
  95. out_channels: 160
  96. use_depthwise: True
  97. num_features: 4
  98. PicoHeadV2:
  99. conv_feat:
  100. name: PicoFeat
  101. feat_in: 160
  102. feat_out: 160
  103. num_convs: 4
  104. num_fpn_stride: 4
  105. norm_type: bn
  106. share_cls_reg: True
  107. use_se: True
  108. fpn_stride: [8, 16, 32, 64]
  109. feat_in_chan: 160
  110. prior_prob: 0.01
  111. reg_max: 7
  112. cell_offset: 0.5
  113. grid_cell_scale: 5.0
  114. static_assigner_epoch: 100
  115. use_align_head: True
  116. static_assigner:
  117. name: ATSSAssigner
  118. topk: 9
  119. force_gt_matching: False
  120. assigner:
  121. name: TaskAlignedAssigner
  122. topk: 13
  123. alpha: 1.0
  124. beta: 6.0
  125. loss_class:
  126. name: VarifocalLoss
  127. use_sigmoid: False
  128. iou_weighted: True
  129. loss_weight: 1.0
  130. loss_dfl:
  131. name: DistributionFocalLoss
  132. loss_weight: 0.5
  133. loss_bbox:
  134. name: GIoULoss
  135. loss_weight: 2.5
  136. nms:
  137. name: MultiClassNMS
  138. nms_top_k: 1000
  139. keep_top_k: 100
  140. score_threshold: 0.025
  141. nms_threshold: 0.6