# 入孔检测权重 > **改这个目录之前先读 [`../README.md`](../README.md)**(权重模块的规则)。 用于"把孔当框来检测"的模型(`hole_detect.backend: yolo`)。 当前现场用的是 `two_stage`(两阶段)后端,它用的是**工件**权重 (`hole_detect.workpiece_weights`,指向 `models/yolo/` 里的模型), 本目录的模型并不是每次都会用到。 ## 现状 - `detect_best_1.onnx` —— 工件检测模型,被 `hole_detect.workpiece_weights` 使用。 ## 历史遗留(已知问题) `config/site.yaml` 的这两处仍指向一个**不存在**的文件 `models/hole_insert/best.pt`: ```yaml paths: hole_weights: ".../models/hole_insert/best.pt" # ← 文件不存在 hole_detect: weights: ".../models/hole_insert/best.pt" # ← 文件不存在 ``` `backend: two_stage` 时这两处不会被读,所以现在不影响运行;但一旦切成 `backend: yolo` 就会启动失败。用 `bash ~/ros2/scripts/weights.sh doctor` 能查出来。要么把真实权重按命名规则放进本目录,要么把这两处配置删掉。 ## 加新模型 / 看标签 和 `models/yolo/` 完全一样,只是分组名换成 `hole_insert`: ```bash bash ~/ros2/scripts/weights.sh convert staging/xxx.onnx --name hole_detect --group hole_insert bash ~/ros2/scripts/weights.sh labels detect_best_1 --group hole_insert ```