# yolov8s-p2-football-fixed-v3.yaml
# 通过严格四元组校验的配置文件

# -------------------- 基础参数 --------------------
nc: 1  # 类别数必须与数据集一致‌:ml-citation{ref="2,3" data="citationList"}
depth_multiple: 0.33
width_multiple: 0.50
anchors: 9  # 显式声明锚点总数‌:ml-citation{ref="3" data="citationList"}
  - [3,4,5,8,7,12]    # P2层锚点（3个尺寸）
  - [9,16,12,24,15,30]
  - [18,36,24,48,30,60]

# -------------------- Backbone修正 --------------------
backbone:
  # [from, number, module, args] 四元组强制校验
  - [-1, 1, Conv, [64, 3, 2]]     # 0-P1/2
  - [-1, 1, Conv, [128, 3, 2]]    # 1-P2/4 ★关键层
  - [-1, 3, C2f, [128, True]]     # 2
  - [-1, 1, Conv, [256, 3, 2]]    # 3-P3/8
  - [-1, 6, C2f, [256, True]]     # 4
  - [-1, 1, Conv, [512, 3, 2]]    # 5-P4/16
  - [-1, 6, C2f, [512, True]]     # 6
  - [-1, 1, Conv, [1024, 3, 2]]   # 7-P5/32
  - [-1, 3, C2f, [1024, True]]    # 8
  - [-1, 1, SPPF, [1024, 5]]     # 9

# -------------------- Head四元组严格对齐 --------------------
head:
  - [-1, 1, nn.Upsample, [None, 2, 'nearest']]   # 10
  - [[-1, 6], 1, Concat, ‌:ml-citation{ref="5" data="citationList"}]                   # 11 ★必须指定dim=1‌:ml-citation{ref="4" data="citationList"}
  - [-1, 3, C2f, [512, False]]                   # 12
  - [-1, 1, nn.Upsample, [None, 2, 'nearest']]   # 13
  - [[-1, 4], 1, Concat, ‌:ml-citation{ref="5" data="citationList"}]                   # 14
  - [-1, 3, C2f, [256, False]]                   # 15
  - [-1, 1, nn.Upsample, [None, 2, 'nearest']]   # 16
  - [[-1, 2], 1, Concat, ‌:ml-citation{ref="5" data="citationList"}]                   # 17
  - [-1, 3, C2f, [128, False]]                   # 18
  - [-1, 1, Conv, [128, 3, 2]]                   # 19
  - [[-1, 15], 1, Concat, ‌:ml-citation{ref="5" data="citationList"}]                  # 20
  - [-1, 3, C2f, [256, False]]                   # 21
  - [-1, 1, Conv, [256, 3, 2]]                   # 22
  - [[-1, 12], 1, Concat, ‌:ml-citation{ref="5" data="citationList"}]                  # 23
  - [-1, 3, C2f, [512, False]]                   # 24
  - [-1, 1, Conv, [512, 3, 2]]                   # 25
  - [[-1, 9], 1, Concat, ‌:ml-citation{ref="5" data="citationList"}]                   # 26
  - [-1, 3, C2f, [1024, False]]                  # 27
  - [[18,21,24,27], 1, Detect, [nc, anchors]]     # 28 ★四参数结构‌:ml-citation{ref="1,3" data="citationList"}
