yolov2_config.py 895 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. # YOLOv2 Config
  2. yolov2_cfg = {
  3. # input
  4. 'trans_type': 'ssd',
  5. 'multi_scale': [0.5, 1.5],
  6. # model
  7. 'backbone': 'darknet19',
  8. 'pretrained': True,
  9. 'stride': 32, # P5
  10. 'max_stride': 32,
  11. # neck
  12. 'neck': 'sppf',
  13. 'expand_ratio': 0.5,
  14. 'pooling_size': 5,
  15. 'neck_act': 'lrelu',
  16. 'neck_norm': 'BN',
  17. 'neck_depthwise': False,
  18. # head
  19. 'head': 'decoupled_head',
  20. 'head_act': 'lrelu',
  21. 'head_norm': 'BN',
  22. 'num_cls_head': 2,
  23. 'num_reg_head': 2,
  24. 'head_depthwise': False,
  25. 'anchor_size': [[17, 25],
  26. [55, 75],
  27. [92, 206],
  28. [202, 21],
  29. [289, 311]], # 416
  30. # matcher
  31. 'iou_thresh': 0.5,
  32. # loss weight
  33. 'loss_obj_weight': 1.0,
  34. 'loss_cls_weight': 1.0,
  35. 'loss_box_weight': 5.0,
  36. # training configuration
  37. 'trainer_type': 'yolov8',
  38. }