ppyoloe_plus_crn_s_80e_contrast_pcb.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. _BASE_: [
  2. '../datasets/coco_detection.yml',
  3. '../runtime.yml',
  4. './_base_/optimizer_80e.yml',
  5. './_base_/ppyoloe_plus_crn.yml',
  6. './_base_/ppyoloe_plus_reader.yml',
  7. ]
  8. log_iter: 100
  9. snapshot_epoch: 10
  10. weights: output/ppyoloe_plus_crn_s_80e_contrast_pcb/model_final
  11. pretrain_weights: https://bj.bcebos.com/v1/paddledet/models/pretrained/ppyoloe_crn_s_obj365_pretrained.pdparams
  12. depth_mult: 0.33
  13. width_mult: 0.50
  14. epoch: 80
  15. LearningRate:
  16. base_lr: 0.0001
  17. schedulers:
  18. - !CosineDecay
  19. max_epochs: 96
  20. - !LinearWarmup
  21. start_factor: 0.
  22. epochs: 5
  23. YOLOv3:
  24. backbone: CSPResNet
  25. neck: CustomCSPPAN
  26. yolo_head: PPYOLOEContrastHead
  27. post_process: ~
  28. PPYOLOEContrastHead:
  29. fpn_strides: [32, 16, 8]
  30. grid_cell_scale: 5.0
  31. grid_cell_offset: 0.5
  32. static_assigner_epoch: 100
  33. use_varifocal_loss: True
  34. loss_weight: {class: 1.0, iou: 2.5, dfl: 0.5, contrast: 0.2}
  35. static_assigner:
  36. name: ATSSAssigner
  37. topk: 9
  38. assigner:
  39. name: TaskAlignedAssigner
  40. topk: 13
  41. alpha: 1.0
  42. beta: 6.0
  43. contrast_loss:
  44. name: SupContrast
  45. temperature: 100
  46. sample_num: 2048
  47. thresh: 0.75
  48. nms:
  49. name: MultiClassNMS
  50. nms_top_k: 1000
  51. keep_top_k: 300
  52. score_threshold: 0.01
  53. nms_threshold: 0.7
  54. num_classes: 6
  55. metric: COCO
  56. map_type: integral
  57. TrainDataset:
  58. !COCODataSet
  59. image_dir: images
  60. anno_path: pcb_cocoanno/train_shots30.json
  61. dataset_dir: dataset/pcb
  62. data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd']
  63. EvalDataset:
  64. !COCODataSet
  65. image_dir: images
  66. anno_path: pcb_cocoanno/val.json
  67. dataset_dir: dataset/pcb
  68. TestDataset:
  69. !ImageFolder
  70. anno_path: pcb_cocoanno/val.json
  71. dataset_dir: dataset/pcb