yolov2_config.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # YOLOv2 Config
  2. yolov2_cfg = {
  3. # ---------------- Model config ----------------
  4. ## Backbone
  5. 'backbone': 'darknet19',
  6. 'pretrained': True,
  7. 'stride': 32, # P5
  8. 'max_stride': 32,
  9. ## Neck
  10. 'neck': 'sppf',
  11. 'neck_act': 'lrelu',
  12. 'neck_norm': 'BN',
  13. 'neck_depthwise': False,
  14. 'expand_ratio': 0.5,
  15. 'pooling_size': 5,
  16. ## Head
  17. 'head': 'decoupled_head',
  18. 'head_act': 'lrelu',
  19. 'head_norm': 'BN',
  20. 'num_cls_head': 2,
  21. 'num_reg_head': 2,
  22. 'head_depthwise': False,
  23. 'anchor_size': [[17, 25],
  24. [55, 75],
  25. [92, 206],
  26. [202, 21],
  27. [289, 311]], # 416 scale
  28. # ---------------- Data process config ----------------
  29. ## Input
  30. 'multi_scale': [0.5, 1.5], # 320 -> 960
  31. 'trans_type': 'ssd',
  32. # ---------------- Matcher config ----------------
  33. 'iou_thresh': 0.5,
  34. # ---------------- Loss config ----------------
  35. 'loss_obj_weight': 1.0,
  36. 'loss_cls_weight': 1.0,
  37. 'loss_box_weight': 5.0,
  38. # ---------------- Trainer config ----------------
  39. 'trainer_type': 'yolo',
  40. }