ppyoloe_plus_crn_s_80e_contrast_pcb.yml 1.7 KB
Newer Older
T
Taojerxi 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
_BASE_: [
  '../datasets/coco_detection.yml',
  '../runtime.yml',
  './_base_/optimizer_80e.yml',
  './_base_/ppyoloe_plus_crn.yml',
  './_base_/ppyoloe_plus_reader.yml',
]

log_iter: 100
snapshot_epoch: 10
weights: output/ppyoloe_plus_crn_s_80e_contrast_pcb/model_final

pretrain_weights: https://bj.bcebos.com/v1/paddledet/models/pretrained/ppyoloe_crn_s_obj365_pretrained.pdparams
depth_mult: 0.33
width_mult: 0.50

epoch: 80

LearningRate:
  base_lr: 0.0001
  schedulers:
    - !CosineDecay
      max_epochs: 96
    - !LinearWarmup
      start_factor: 0.
      epochs: 5

YOLOv3:
  backbone: CSPResNet
  neck: CustomCSPPAN
  yolo_head: PPYOLOEContrastHead
  post_process: ~

PPYOLOEContrastHead:
  fpn_strides: [32, 16, 8]
  grid_cell_scale: 5.0
  grid_cell_offset: 0.5
  static_assigner_epoch: 100
  use_varifocal_loss: True
  loss_weight: {class: 1.0, iou: 2.5, dfl: 0.5, contrast: 0.2}
  static_assigner:
    name: ATSSAssigner
    topk: 9
  assigner:
    name: TaskAlignedAssigner
    topk: 13
    alpha: 1.0
    beta: 6.0
  contrast_loss:
    name: SupContrast
    temperature: 100
    sample_num: 2048
    thresh: 0.75
  nms:
    name: MultiClassNMS
    nms_top_k: 1000
    keep_top_k: 300
    score_threshold: 0.01
    nms_threshold: 0.7

num_classes: 6
metric: COCO
map_type: integral

TrainDataset:
  !COCODataSet
    image_dir: images
    anno_path: pcb_cocoanno/train_shots30.json
    dataset_dir: dataset/pcb
    data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd']

EvalDataset:
  !COCODataSet
    image_dir: images
    anno_path: pcb_cocoanno/val.json
    dataset_dir: dataset/pcb

TestDataset:
  !ImageFolder
    anno_path: pcb_cocoanno/val.json
    dataset_dir: dataset/pcb