PicoDet_layout_1x_table.yaml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. # Runtime
  2. epoch: 50
  3. log_iter: 1
  4. find_unused_parameters: true
  5. use_gpu: true
  6. use_xpu: false
  7. use_mlu: false
  8. use_npu: false
  9. use_ema: true
  10. save_dir: output
  11. snapshot_epoch: 1
  12. cycle_epoch: 10
  13. print_flops: false
  14. print_params: false
  15. # Dataset
  16. metric: COCO
  17. num_classes: 1
  18. worker_num: 8
  19. TrainDataset:
  20. name: COCODetDataset
  21. image_dir: images
  22. anno_path: annotations/instance_train.json
  23. dataset_dir: datasets/COCO
  24. data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd']
  25. EvalDataset:
  26. name: COCODetDataset
  27. image_dir: images
  28. anno_path: annotations/instance_val.json
  29. dataset_dir: datasets/COCO
  30. allow_empty: true
  31. TestDataset:
  32. name: ImageFolder
  33. anno_path: annotations/instance_val.json
  34. dataset_dir: datasets/COCO
  35. TrainReader:
  36. sample_transforms:
  37. - Decode: {}
  38. - RandomCrop: {}
  39. - RandomFlip: {prob: 0.5}
  40. - RandomDistort: {}
  41. batch_transforms:
  42. - BatchRandomResize: {target_size: [[768, 576], [800, 608], [832, 640]], random_size: True, random_interp: True, keep_ratio: False}
  43. - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
  44. - Permute: {}
  45. batch_size: 24
  46. shuffle: true
  47. drop_last: true
  48. collate_batch: false
  49. EvalReader:
  50. sample_transforms:
  51. - Decode: {}
  52. - Resize: {interp: 2, target_size: [800, 608], keep_ratio: False}
  53. - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
  54. - Permute: {}
  55. batch_transforms:
  56. - PadBatch: {pad_to_stride: 32}
  57. batch_size: 8
  58. shuffle: false
  59. TestReader:
  60. inputs_def:
  61. image_shape: [3, 800, 608]
  62. sample_transforms:
  63. - Decode: {}
  64. - Resize: {interp: 2, target_size: [800, 608], keep_ratio: False}
  65. - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]}
  66. - Permute: {}
  67. batch_transforms:
  68. - PadBatch: {pad_to_stride: 32}
  69. batch_size: 1
  70. shuffle: false
  71. # Model
  72. architecture: PicoDet
  73. pretrain_weights: https://paddleocr.bj.bcebos.com/ppstructure/models/layout/picodet_lcnet_x1_0_fgd_layout.pdparams
  74. PicoDet:
  75. backbone: LCNet
  76. neck: CSPPAN
  77. head: PicoHead
  78. nms_cpu: true
  79. LCNet:
  80. scale: 1.0
  81. feature_maps: [3, 4, 5]
  82. CSPPAN:
  83. out_channels: 128
  84. use_depthwise: True
  85. num_csp_blocks: 1
  86. num_features: 4
  87. PicoHead:
  88. conv_feat:
  89. name: PicoFeat
  90. feat_in: 128
  91. feat_out: 128
  92. num_convs: 4
  93. num_fpn_stride: 4
  94. norm_type: bn
  95. share_cls_reg: True
  96. fpn_stride: [8, 16, 32, 64]
  97. feat_in_chan: 128
  98. prior_prob: 0.01
  99. reg_max: 7
  100. cell_offset: 0.5
  101. loss_class:
  102. name: VarifocalLoss
  103. use_sigmoid: True
  104. iou_weighted: True
  105. loss_weight: 1.0
  106. loss_dfl:
  107. name: DistributionFocalLoss
  108. loss_weight: 0.25
  109. loss_bbox:
  110. name: GIoULoss
  111. loss_weight: 2.0
  112. assigner:
  113. name: SimOTAAssigner
  114. candidate_topk: 10
  115. iou_weight: 6
  116. nms:
  117. name: MultiClassNMS
  118. nms_top_k: 1000
  119. keep_top_k: 100
  120. score_threshold: 0.025
  121. nms_threshold: 0.6
  122. # Optimizer
  123. LearningRate:
  124. base_lr: 0.4
  125. schedulers:
  126. - name: CosineDecay
  127. max_epochs: 100
  128. - name: LinearWarmup
  129. start_factor: 0.1
  130. steps: 100
  131. OptimizerBuilder:
  132. optimizer:
  133. momentum: 0.9
  134. type: Momentum
  135. regularizer:
  136. factor: 0.00004
  137. type: L2
  138. # Export
  139. export:
  140. post_process: true
  141. nms: true
  142. benchmark: false
  143. fuse_conv_bn: false