Files
vrsub/workflows/ocr-subtitle.json
T
cat-shark e98f90e164 fix: llm-filter 默认关闭 LLM 分类层,误删真实对话从 73 条降为 0
逐类人工审查真实任务 run_ac7f480a3ccb(1666 条 OCR 输出)后确认
LLM 五类分类层性价比为负:

- 规则层删除 782 条(47%),几乎全对(---/HTML/___/编号等);
- LLM 层额外删除 131 条,其中 **73 条(56%)是真实对话**,
  如"好好教育她一番吧""腿不要合上""这家医院 为VIP患者提供了特殊服务";
- 它真正抓住而规则层抓不到的仅 58 条且大半可正则化;
- repeat 类别 67 条判定、0 条删除,形同虚设;
- 长文本保护/上下文净化/去重/429 退避/断点存档等机制全是在给
  不稳定的分类器兜底,误删量超过净收益。

改动:
1. 规则层下沉原 LLM 层抓到的确定性模式:水印编号(SPHO-1/PHO一号馆)、
   日期与数值(2011-11-27/4.0)、VLM 提示回显(no text is visible)、
   角色标注((出演))。刻意不删(北冈果林)这类演员名括号——无法与
   (小声)不要啊 可靠区分,且其本身是无害字幕文本;
2. 新增 use_llm 参数并**默认关闭** LLM 分类层,需要旧行为时显式开启;
   ocr-subtitle 工作流显式声明 use_llm=0 并附 _note_use_llm 理由。

真实数据实测:保留 863 条(旧 588)、误删真对话 0 条(旧 73)、
LLM 调用 0 次(旧 680 次/52 秒)。
2026-09-13 10:15:41 +08:00

71 lines
2.4 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"id": "ocr-subtitle",
"name": "字幕OCR提取",
"description": "抽帧并 OCR 提取视频烧录字幕,经 LLM 过滤无意义内容后生成带时间轴的 SRT 基准数据。",
"version": 7,
"definition": {
"name": "字幕OCR提取",
"version": 7,
"nodes": [
{
"id": "extract",
"node_type": "frame-extract",
"params": {
"interval_seconds": 0.5,
"crop": [
0,
0.75,
1,
0.25
]
},
"inputs": {
"video_uri": "input.video_uri"
}
},
{
"id": "ocr",
"node_type": "subtitle-ocr",
"params": {
"prompt": "提取图像中的文字,不要描述图片中的内容",
"pool_min_workers": 1,
"pool_max_workers": 20
},
"inputs": {
"frames_manifest": "extract.frames_manifest"
}
},
{
"id": "filter",
"node_type": "llm-filter",
"params": {
"pool_min_workers": 1,
"pool_max_workers": 20,
"pool_fast_threshold": 1,
"use_llm": "0",
"_note_use_llm": "0(默认,2026-09 起):只跑确定性规则层,不做 LLM 五类分类。实测(run_ac7f480a3ccb 1666 条真实 OCRLLM 层额外删除的 131 条中 56%(73 条)是真实对话('好好教育她一番吧'/'腿不要合上'/'这家医院 为VIP患者提供了特殊服务'),而它真正抓住而规则层抓不到的仅 58 条且大半已下沉为规则(水印编号/日期/VLM 提示回显/角色标注),repeat 类别 67 条判定零删除——净收益为负。关闭后保留 863 条(旧 588 条)、误删真对话 0 条(旧 73 条)、无 LLM 调用(0.00s vs 52s)。正例:规则层删掉 '---'/'HTML'/'___'/'SPHO-1'/'2011-11-27' 等确定性垃圾,同时保留全部真实对白。反例:设为 1 会把 '差不多想要肉棒了吧'、'应该已经察觉到 至今为止的一切了吧' 等真对话当 garbage 删掉。需要旧行为时置为 1(pool_* 参数随之生效)。"
},
"inputs": {
"srt_uri": "ocr.srt_uri"
}
}
],
"edges": [
{
"from": "extract",
"to": "ocr"
},
{
"from": "ocr",
"to": "filter"
}
],
"entry_inputs": {
"video_uri": "file"
},
"final_outputs": {
"srt": "filter.srt_uri"
}
}
}