diff --git a/README.md b/README.md index 6e3b1c6..32850f4 100644 --- a/README.md +++ b/README.md @@ -629,9 +629,9 @@ data/boxes_gradcam/ ### 模型与增强的取舍 -- **选 YOLOv8 而不是 v11/v12**:CLAUDE.md 限定只用 convolution 模型,而 YOLO11 骨架里有 - C2PSA(position-sensitive attention)、YOLO12 更是以注意力为主。YOLOv8 的 C2f + SPPF 是纯卷积。 - `s` 是精度/速度折中——数据只有 1.1 万张且标签是弱监督的,模型再大容易把标注噪声一起学进去。 +- **默认 YOLO26 的 `n` 档**:CLAUDE.md 的"只用 convolution 模型"只约束聚类与数据集生成阶段, + 检测这一步不受限,所以用最新的 YOLO26——它是端到端的(NMS-free),推理侧少一道后处理。 + 选最小的 `n`:数据只有 1.1 万张且标签是弱监督的,模型再大容易把标注噪声一起学进去。 - **关掉 mosaic / mixup**:它们把四张图拼一起,而我们每张图只有一个弱监督框,拼接后小目标被 缩得更小,对 `blackdot`/`whitedot` 这类本就只占千分之几面积的类别是净伤害。 - **关掉 hsv_h**:薄膜图近乎单色,色相扰动没有意义。翻转照旧开着(缺陷没有固定朝向)。 diff --git a/configs/detect/film.yaml b/configs/detect/film.yaml index 5730b15..cd06931 100644 --- a/configs/detect/film.yaml +++ b/configs/detect/film.yaml @@ -17,11 +17,10 @@ data: yaml: data/boxes_shap/data.yaml model: - # 选 v8 而不是 v11/v12:CLAUDE.md 限定只用 convolution 模型, - # 而 YOLO11 的骨架里有 C2PSA(position-sensitive attention)、YOLO12 更是以注意力为主。 - # YOLOv8 的 C2f + SPPF 是纯卷积。 - # s 是精度/速度的折中;数据只有 1.1 万张且标签是弱监督的,再大容易把标注噪声也学进去。 - weights: yolov8s.pt + # CLAUDE.md 的"只用 convolution 模型"只约束聚类与数据集生成阶段,检测这一步不受限, + # 所以用最新的 YOLO26。它是端到端的(NMS-free),推理侧少一道后处理。 + # n 是最小的一档:数据只有 1.1 万张且标签是弱监督的,模型大了容易把标注噪声也学进去。 + weights: yolo26n.pt train: epochs: 100 diff --git a/tests/test_config.py b/tests/test_config.py index 1c6915b..eef6cde 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -140,11 +140,9 @@ def test_every_shipped_config_builds_its_components(config_path): # 分类配置 model_cfg = cfg.get("model") if model_cfg and "weights" in model_cfg: - # 检测配置:model 是 ultralytics 的权重名(yolov8s.pt),不走本仓库的注册表。 - # 只校验它是纯卷积的那一档——CLAUDE.md 限定只用 convolution 模型, - # YOLO11 的 C2PSA 与 YOLO12 都带注意力。 - assert "yolo11" not in model_cfg["weights"] - assert "yolo12" not in model_cfg["weights"] + # 检测配置:model 是 ultralytics 的权重名(yolo26n.pt),不走本仓库的注册表, + # 这里只确认它确实是个权重文件名。 + assert model_cfg["weights"].endswith(".pt") elif model_cfg: import torch