refactor: prepare_label_studio.py 的内容改动(补上 a3e08a9 漏掉的部分)

a3e08a9 只提交了 git mv 的改名,内容修改因 git add 的路径报错没有进入暂存区。
本提交补上:

- 缺省输出 runs/<source>_label_studio/,不再写到 data/;该目录同时是 Label Studio
  的 DOCUMENT_ROOT,打印的导入步骤里提醒复核期间不要删除或 --overwrite。
- 总是生成 tasks.json 与 labeling config,去掉 --label-studio 开关。
- 不再写 data.yaml:复核材料不是训练集,没有 data.yaml 就不会被误拿去训练,
  原先"train 与 val 相同"的告警也随之移除(detect.py 里的同类告警保留)。
- detect.py、configs/detect/film.yaml、README 里对旧脚本的引用改为新流程。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Shaun Zhou
2026-09-15 17:26:22 +08:00
co-authored by Claude Opus 5
parent a3e08a9bbc
commit 891f930de2
5 changed files with 145 additions and 158 deletions
+4 -3
View File
@@ -1,8 +1,9 @@
# 在 Grad-CAM / SHAP 生成的弱监督框上训练 YOLO 检测模型。
# 在人工修正过的弱监督框上训练 YOLO 检测模型。
#
# 前置步骤:
# uv run python scripts/generate_boxes.py --config ... --method gradcam # 产出 runs/boxes_gradcam
# uv run python scripts/prepare_yolo_dataset.py --source runs/boxes_gradcam
# uv run python scripts/generate_boxes.py --method shap --out runs/boxes_shap # 生成弱监督框
# uv run python scripts/prepare_label_studio.py --source runs/boxes_shap # 复核材料
# 在 Label Studio 里修正标签,导出并划分 train/val 到 data/boxes_shap/
#
# 用法:
# uv run python detect.py --config configs/detect/film.yaml