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始,手里只有这两个 Hugging Face 仓库。
|
| 4 |
+
三个场景互相独立,按你当下要做的事直接跳到对应章节即可。
|
| 5 |
+
|
| 6 |
+
| 场景 | 需要下载 | 需要 GPU | 大致耗时 |
|
| 7 |
+
|---|---|---|---|
|
| 8 |
+
| **A. 继续写 paper、做图** | 包1(162 MB) | 不需要 | 下载 2 分钟 |
|
| 9 |
+
| **B. 把代码发到 GitHub** | 包2(63 MB) | 不需要 | 30 分钟 |
|
| 10 |
+
| **C. 跑 rebuttal 实验** | 看你要做哪种,见 C1 | 分情况 | 10 分钟到几天 |
|
| 11 |
+
|
| 12 |
+
两个包:
|
| 13 |
+
|
| 14 |
+
| 包 | 仓库 | 内容 |
|
| 15 |
+
|---|---|---|
|
| 16 |
+
| 包1 | `weitaikang/Weitaikang_method_paper` | 写 paper 和 rebuttal 的全部材料 |
|
| 17 |
+
| 包2 | `weitaikang/Weitaikang_method_github` | 可发布的代码库 + 预算好的选帧结果 |
|
| 18 |
+
|
| 19 |
+
两个包内容不重叠。代码只在包2,图和分析证据只在包1。
|
| 20 |
+
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
## 0. 先决条件:下载
|
| 24 |
+
|
| 25 |
+
### 0.1 装工具
|
| 26 |
+
|
| 27 |
+
```bash
|
| 28 |
+
python -m pip install -U "huggingface_hub[cli]"
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
### 0.2 登录
|
| 32 |
+
|
| 33 |
+
仓库是 public 的,理论上不登录也能下。但如果遇到限流,登录后会顺畅很多:
|
| 34 |
+
|
| 35 |
+
```bash
|
| 36 |
+
hf auth login
|
| 37 |
+
# 粘贴 https://huggingface.co/settings/tokens 生成的 token(read 权限即可)
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
### 0.3 下载
|
| 41 |
+
|
| 42 |
+
命令行版本:
|
| 43 |
+
|
| 44 |
+
```bash
|
| 45 |
+
# 包1:写 paper 用
|
| 46 |
+
hf download weitaikang/Weitaikang_method_paper \
|
| 47 |
+
--repo-type dataset --local-dir ./cuekfs_paper
|
| 48 |
+
|
| 49 |
+
# 包2:代码
|
| 50 |
+
hf download weitaikang/Weitaikang_method_github \
|
| 51 |
+
--repo-type dataset --local-dir ./cuekfs_code
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
**如果 `hf` 命令报 `AttributeError: 'Sentinel' object has no attribute 'strip'`**,
|
| 55 |
+
说明你装的 `typer` 和 `huggingface_hub` 版本冲突(我在 Workbench 上就撞到了这个)。
|
| 56 |
+
不用折腾版本,直接用 Python API,功能完全一样:
|
| 57 |
+
|
| 58 |
+
```bash
|
| 59 |
+
python - <<'EOF'
|
| 60 |
+
from huggingface_hub import snapshot_download
|
| 61 |
+
for repo, out in [("weitaikang/Weitaikang_method_paper", "./cuekfs_paper"),
|
| 62 |
+
("weitaikang/Weitaikang_method_github", "./cuekfs_code")]:
|
| 63 |
+
p = snapshot_download(repo, repo_type="dataset", local_dir=out,
|
| 64 |
+
max_workers=8)
|
| 65 |
+
print("OK ->", p)
|
| 66 |
+
EOF
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
### 0.4 验证下载完整
|
| 70 |
+
|
| 71 |
+
```bash
|
| 72 |
+
find ./cuekfs_paper -type f | wc -l # 应为 968 左右
|
| 73 |
+
find ./cuekfs_code -type f | wc -l # 应为 287 左右
|
| 74 |
+
du -sh ./cuekfs_paper ./cuekfs_code # 约 162 MB 和 63 MB
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
### 0.5 目录长什么样
|
| 78 |
+
|
| 79 |
+
```
|
| 80 |
+
cuekfs_paper/
|
| 81 |
+
├── README.md 总导航,先读这个
|
| 82 |
+
├── 00_source_of_truth/ 决定叙事的 slides + 你当初给 AI 的 prompt
|
| 83 |
+
├── 01_paper/ 主材料文档、LaTeX 初稿、图、结果表格
|
| 84 |
+
├── 02_rebuttal/ 逐题数据、分层分析、案例、分析脚本
|
| 85 |
+
└── 03_figure_toolkit/ 画图用的部件
|
| 86 |
+
|
| 87 |
+
cuekfs_code/
|
| 88 |
+
├── README_START_HERE.md 这个包怎么用
|
| 89 |
+
├── repo/ 可直接推 GitHub 的代码库
|
| 90 |
+
└── release_artifacts/ 122 个实验的选帧结果
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
---
|
| 94 |
+
|
| 95 |
+
# 场景 A:继续写 paper、做图
|
| 96 |
+
|
| 97 |
+
**只需要包1。不需要装 Python,不需要 GPU。** 一个文本编辑器就够了。
|
| 98 |
+
|
| 99 |
+
## A1. 先花 40 分钟建立全局认识
|
| 100 |
+
|
| 101 |
+
严格按这个顺序读,每一步都建立在上一步之上:
|
| 102 |
+
|
| 103 |
+
| 顺序 | 文件 | 为什么先读它 | 时长 |
|
| 104 |
+
|---|---|---|---|
|
| 105 |
+
| 1 | `00_source_of_truth/KFS_Final_Presentation.pdf` | **决定 narrative 的源头。** CueKFS 在前半部分(后半是另一个项目,跳过)。所有叙事分歧以它为准。 | 15 分钟 |
|
| 106 |
+
| 2 | `README.md` | 项目一页纸:任务是什么、bottleneck 是什么、方法三步是什么、结果多少 | 5 分钟 |
|
| 107 |
+
| 3 | `01_paper/SUBMISSION_MATERIALS.md` §1 术语表 | 20 多个术语的白话定义。后面所有文档都假设你读过 | 5 分钟 |
|
| 108 |
+
| 4 | `01_paper/SUBMISSION_MATERIALS.md` §2–§8 | 主材料。按 ICLR 的顺序组织:abstract 计划、intro、related work、method、结果、统计 | 15 分钟 |
|
| 109 |
+
|
| 110 |
+
**注意 slides 和 paper 的叙事手法不同。** slides 是慢慢拆解给听众看的,
|
| 111 |
+
paper 不能这么组织。`SUBMISSION_MATERIALS.md` 已经按 ICLR 结构重排过了,
|
| 112 |
+
写作时以它的结构为准、以 slides 的观点为准。
|
| 113 |
+
|
| 114 |
+
## A2. 初稿在哪、写到什么程度了
|
| 115 |
+
|
| 116 |
+
```
|
| 117 |
+
cuekfs_paper/01_paper/manuscript/
|
| 118 |
+
├── cuekfs_iclr2027.tex ← 初稿正文,560 行
|
| 119 |
+
├── cuekfs_iclr2027.pdf ← 当前编译出来的样子,先看这个
|
| 120 |
+
├── references.bib ← 参考文献
|
| 121 |
+
├── iclr2026_conference.sty/.bst ← ICLR 模板
|
| 122 |
+
├── math_commands.tex, fancyhdr.sty, natbib.sty
|
| 123 |
+
└── build.sh ← 编译脚本
|
| 124 |
+
```
|
| 125 |
+
|
| 126 |
+
**先打开 `cuekfs_iclr2027.pdf` 看现状**,再动 `.tex`。
|
| 127 |
+
|
| 128 |
+
初稿已有的章节结构(行号是 `.tex` 里的位置):
|
| 129 |
+
|
| 130 |
+
| 行 | 章节 | 状态 |
|
| 131 |
+
|---|---|---|
|
| 132 |
+
| 67 | Introduction | 有 |
|
| 133 |
+
| 82 | Related Work(3 个小节:相似度选帧 / 问题分解 / 评测) | 有 |
|
| 134 |
+
| 106 | Method(3 个小节对应你的三步) | 有 |
|
| 135 |
+
| 114 | · Cue Decomposition(第一步) | 有 |
|
| 136 |
+
| 162 | · Cue-Wave-Guided Refinement(第二步,最重要) | 有 |
|
| 137 |
+
| 220 | · Cue Budget Allocation(第三步) | 有 |
|
| 138 |
+
| 225 | Experiments(Setup / 主结果 / 消融与成本 / 超参 / 行为分析) | 有 |
|
| 139 |
+
| 529 | Conclusion | 有 |
|
| 140 |
+
| 544 | 附录:替代 refinement 设计的成本 | 有 |
|
| 141 |
+
| 552 | 附录:实现细节 | 有 |
|
| 142 |
+
|
| 143 |
+
**最明显的缺口:`.tex` 里一张图都还没插。** 全文 `\includegraphics` 数量为零。
|
| 144 |
+
这正好对应你自己在 slides 上画图的计划——画完导出,再插进来。
|
| 145 |
+
|
| 146 |
+
摘要没有单独的 `\section`,因为 ICLR 模板用 `\begin{abstract}`。
|
| 147 |
+
`SUBMISSION_MATERIALS.md` §2 给了摘要的九拍结构(背景 / 现状 / However / 贡献 /
|
| 148 |
+
三个子贡献 / 结果 / 分析),可以直接照着写。
|
| 149 |
+
|
| 150 |
+
## A3. 写作辅助材料
|
| 151 |
+
|
| 152 |
+
| 文件 | 什么时候用 |
|
| 153 |
+
|---|---|
|
| 154 |
+
| `01_paper/PAPER_GUIDE.md` | 写作计划和进度追踪,想知道"还差什么"时看 |
|
| 155 |
+
| `01_paper/POSITIONING_AGENTIC_QA.md` | 写 related work 时,如何跟 agentic video-QA 那一派划清界限 |
|
| 156 |
+
| `01_paper/results_tables/system_design_v4.md` | 审稿人问"你为什么不试 X",这里记着试过什么、为什么否掉 |
|
| 157 |
+
|
| 158 |
+
## A4. 每个数字去哪查
|
| 159 |
+
|
| 160 |
+
**唯一权威表是 `01_paper/results_tables/downstream_reader_results.md`。**
|
| 161 |
+
里面的"表七"是主表:3 个基准 × 3 个 reader × 3 个预算,CueKFS / WFS-SB / uniform 三方对比。
|
| 162 |
+
|
| 163 |
+
关键的几个数(已做分母修正):
|
| 164 |
+
|
| 165 |
+
| | k=8 | k=16 | k=32 | 均值 |
|
| 166 |
+
|---|--:|--:|--:|--:|
|
| 167 |
+
| VideoMME × gpt-5.5 × CueKFS | 80.67 | 83.30 | 84.15 | **82.70** |
|
| 168 |
+
| 对照 WFS-SB | 76.22 | 78.74 | 80.96 | 78.64 |
|
| 169 |
+
| 对照 uniform | 73.70 | 77.11 | 81.41 | 77.41 |
|
| 170 |
+
|
| 171 |
+
**这个文件的正文注释比表格本身更重要**,它记录了:哪些格子做了分母修正、
|
| 172 |
+
哪些故意没改、LongVideoBench 的 densify 是怎么回事、
|
| 173 |
+
以及 `MLVU × InternVL3` 那格复现差 +1.05 导致 caption 里
|
| 174 |
+
"reproduced within <1 point" 这句话不成立。写作时别只抄数字。
|
| 175 |
+
|
| 176 |
+
其余表格:
|
| 177 |
+
|
| 178 |
+
| 文件 | 内容 |
|
| 179 |
+
|---|---|
|
| 180 |
+
| `ablation_results_v4.md` | 完整消融计划与结果 |
|
| 181 |
+
| `abl_tables456.md` | 更深入的消融与分析表 |
|
| 182 |
+
| `split_analysis_videomme.md` | 按证据位置(单时刻/多时刻/整段)和锚点强弱两条轴的分层。结论:`where` 那条轴能区分方法,锚点那条不能 |
|
| 183 |
+
| `toolmerge_comparison.md`、`rawmax_results.md`、`h8_research.md` | 侧面对比与探针 |
|
| 184 |
+
| `v46_audit_report.md` | 独立审计 |
|
| 185 |
+
| `experiments_ledger.md` | 什么时候跑了什么的流水账 |
|
| 186 |
+
|
| 187 |
+
## A5. 画图:元素在哪、怎么用
|
| 188 |
+
|
| 189 |
+
你有**三层**素材,用途不同:
|
| 190 |
+
|
| 191 |
+
### 第一层:论文图的部件(最主要的,共 23 个 SVG)
|
| 192 |
+
|
| 193 |
+
`01_paper/figures/figN_*/` 每个目录里有三样东西:
|
| 194 |
+
|
| 195 |
+
- `full.png` —— 完整渲染图,**只作参考**,看这张图想表达什么
|
| 196 |
+
- `full.html` —— 同一张图的 HTML 版,想微调可以改
|
| 197 |
+
- `parts/*.svg` —— **矢量部件,这是你要拖进 slides 的东西**
|
| 198 |
+
|
| 199 |
+
八张图的部件清单:
|
| 200 |
+
|
| 201 |
+
| 图 | 主题 | 部件 |
|
| 202 |
+
|---|---|---|
|
| 203 |
+
| fig1 | Motivation | `a_question_wave` · `b_cue_waves` · `c_frozen_vs_loop` |
|
| 204 |
+
| fig2 | Pipeline 总览 | `a_input` · `b_stage1_decompose` · `c_stage2_refine` · `d_stage3_allocate` |
|
| 205 |
+
| fig3 | 第一步 Decompose | `a_segmentation` · `b_cue_generation` |
|
| 206 |
+
| fig4 | 第二步 CWGR | `a_wave_anatomy` · `b_batched_review` · `c_reprobe` |
|
| 207 |
+
| fig5 | 第三步 Allocate | `a_rank_dedup_allocate` · `b_final_frames` |
|
| 208 |
+
| fig6 | 主结果 | `a_budget_average` · `b_margin_by_budget` · `c_k32_competitors` |
|
| 209 |
+
| fig7 | 消融 | `a_additive_ladder` · `b_cost_frontier` |
|
| 210 |
+
| fig8 | 行为分析 | `a_action_rates` · `b_effect_per_action` · `c_coverage` · `d_uncovered_control` |
|
| 211 |
+
|
| 212 |
+
### 第二层:可复用的通用部件(42 个)
|
| 213 |
+
|
| 214 |
+
`03_figure_toolkit/elements/`:
|
| 215 |
+
|
| 216 |
+
- `el-*.png`(17 个)—— 概念图标:`el-question`、`el-decompose`、`el-vlm`、
|
| 217 |
+
`el-wave0/1/2`、`el-loop`、`el-coverage`、`el-select`、`el-answer`、`el-arrow`、
|
| 218 |
+
`el-chip0/1/2`、`el-strip`、`el-accumulate`、`el-covlabel`
|
| 219 |
+
- `stepA_*.svg`(5 个)—— 第一步的分镜:坐标轴、片段、采样、相似度、细节
|
| 220 |
+
- `stepB_*.svg`(6 个)—— 第二步的波形,含四种 cue 命运:`rewrite` ×3、`drop`、`keep`、主波形
|
| 221 |
+
- `stepC_*.svg`(4 个)—— 第三步:去重前后、证据排序 rank0–3
|
| 222 |
+
- `wave_*.png/.svg` —— 波形和覆盖率曲线,png/svg 双份
|
| 223 |
+
|
| 224 |
+
先看 `03_figure_toolkit/rendered_slides/elements_preview.png`,
|
| 225 |
+
一张图列出所有部件长什么样,比翻文件名快。
|
| 226 |
+
|
| 227 |
+
### 第三层:整页 slide 成品(参考排版)
|
| 228 |
+
|
| 229 |
+
`03_figure_toolkit/rendered_slides/`:`cuekfs_slide.png`、`cuekfs_slide_b.png`、
|
| 230 |
+
`cuekfs_slide_c.png`、`cuekfs_slide_ab.png`、`cuekfs_slide_bottleneck.png`、
|
| 231 |
+
`cuekfs_slide_exp.png`、`cuekfs_slide_related.png`、`contact_sheet.png`。
|
| 232 |
+
不是拿来直接用的,是看排版和配色。
|
| 233 |
+
|
| 234 |
+
另外 `03_figure_toolkit/related_work_figs/` 有 5 张别人论文的配图
|
| 235 |
+
(`otani_fig2/fig4`、`kfsbench_fig1`、`shotbench_fig1`、`song_fig1`),
|
| 236 |
+
写 related work 或者做对比图时参考。
|
| 237 |
+
|
| 238 |
+
### 导进 slides 的具体做法
|
| 239 |
+
|
| 240 |
+
SVG 是矢量的,导进去之后可以拆开改颜色改文字,这是它比 PNG 好用的地方:
|
| 241 |
+
|
| 242 |
+
- **Keynote**:直接把 `.svg` 拖进画布 → 右键 → 取消组合(可能要点两次)→ 单独改每个元素
|
| 243 |
+
- **PowerPoint**:插入 → 图片 → 选 `.svg` → 右键 → 转换为形状 → 就能改颜色和文字
|
| 244 |
+
- **Google Slides**:不支持 SVG。先用 Inkscape 或在线工具转成 EMF/PNG,或者直接用
|
| 245 |
+
`elements/` 里的 `.png`
|
| 246 |
+
- **想微调再导出**:`full.html` 用浏览器打开,改里面的 CSS/SVG,再截图或打印成 PDF
|
| 247 |
+
|
| 248 |
+
**用不到的:** `01_paper/figures/_build/` 和 `03_figure_toolkit/build_scripts/`
|
| 249 |
+
是当初生成这些图的 Python/JS 代码。你既然打算自己画,这两个目录可以完全无视。
|
| 250 |
+
|
| 251 |
+
## A6.(可选)编译 PDF
|
| 252 |
+
|
| 253 |
+
只有想看 LaTeX 改动效果时才需要。
|
| 254 |
+
|
| 255 |
+
```bash
|
| 256 |
+
# macOS
|
| 257 |
+
brew install --cask mactex-no-gui
|
| 258 |
+
# Ubuntu
|
| 259 |
+
sudo apt install texlive-full # 或者 texlive-latex-extra texlive-fonts-recommended latexmk
|
| 260 |
+
|
| 261 |
+
cd cuekfs_paper/01_paper/manuscript
|
| 262 |
+
bash build.sh
|
| 263 |
+
```
|
| 264 |
+
|
| 265 |
+
`build.sh` 跑的是 `latexmk -pdf`,会自动做 pdflatex → bibtex → pdflatex ×2。
|
| 266 |
+
成功时打印 `OK -> cuekfs_iclr2027.pdf (N pages)`。
|
| 267 |
+
失败就去 `cuekfs_iclr2027.log` 里找第一个 `:行号:` 错误。
|
| 268 |
+
`bash build.sh clean` 清理中间产物。
|
| 269 |
+
|
| 270 |
+
用 VS Code 的话装 LaTeX Workshop 扩展,存盘自动编译,比命令行方便。
|
| 271 |
+
|
| 272 |
+
---
|
| 273 |
+
|
| 274 |
+
# 场景 B:把代码发到 GitHub
|
| 275 |
+
|
| 276 |
+
**只需要包2。不需要 GPU。** 大约 30 分钟。
|
| 277 |
+
|
| 278 |
+
## B1. 先读
|
| 279 |
+
|
| 280 |
+
```bash
|
| 281 |
+
cd cuekfs_code
|
| 282 |
+
cat README_START_HERE.md # 这个包分两半,各自怎么处理
|
| 283 |
+
cat repo/README.md # 代码库主文档,别人看到的第一份东西
|
| 284 |
+
```
|
| 285 |
+
|
| 286 |
+
这个包是两部分:`repo/`(4.5 MB,推 GitHub)和 `release_artifacts/`(59 MB,
|
| 287 |
+
发成 HF dataset)。**不要把 `release_artifacts/` 提交进 git**——59 MB 的数据放进
|
| 288 |
+
git 历史,以后想删都删不掉。
|
| 289 |
+
|
| 290 |
+
## B2. 填 4 个占位符
|
| 291 |
+
|
| 292 |
+
### (1) 仓库 URL
|
| 293 |
+
|
| 294 |
+
```bash
|
| 295 |
+
cd cuekfs_code/repo
|
| 296 |
+
grep -rn "<this-repo>\|your-org\|yourusername\|example.com" README.md CITATION.cff pyproject.toml
|
| 297 |
+
```
|
| 298 |
+
|
| 299 |
+
把找到的占位符换成你的真实地址,例如 `https://github.com/weitaikang/cuekfs`。
|
| 300 |
+
|
| 301 |
+
### (2) 引用信息
|
| 302 |
+
|
| 303 |
+
论文有 venue 和 arXiv id 之后再填。现在 `README.md` 里是这样一段:
|
| 304 |
+
|
| 305 |
+
```bibtex
|
| 306 |
+
@inproceedings{cuekfs2027,
|
| 307 |
+
title = {CueKFS: Cue-Wave-Guided Keyframe Selection for Long-Video Question Answering},
|
| 308 |
+
booktitle = {International Conference on Learning Representations (ICLR)},
|
| 309 |
+
year = {2027}
|
| 310 |
+
}
|
| 311 |
+
```
|
| 312 |
+
|
| 313 |
+
同步改 `CITATION.cff`。
|
| 314 |
+
|
| 315 |
+
### (3) 版权署名
|
| 316 |
+
|
| 317 |
+
```bash
|
| 318 |
+
head -4 LICENSE
|
| 319 |
+
```
|
| 320 |
+
|
| 321 |
+
会看到:
|
| 322 |
+
|
| 323 |
+
```
|
| 324 |
+
Copyright (c) 2026 The CueKFS Authors
|
| 325 |
+
Copyright (c) 2025 BOLT Project Contributors
|
| 326 |
+
```
|
| 327 |
+
|
| 328 |
+
把第一行的 `The CueKFS Authors` 换成真实署名。
|
| 329 |
+
**第二行必须保留**——这个仓库派生自 MIT 协议的 BOLT 项目,MIT 要求保留上游声明。
|
| 330 |
+
`CITATION.cff` 里的 `The CueKFS Authors` 也一并改掉。
|
| 331 |
+
|
| 332 |
+
### (4) 数据下载地址
|
| 333 |
+
|
| 334 |
+
等你做完 B5 拿到真实 URL 再回来填:
|
| 335 |
+
|
| 336 |
+
```bash
|
| 337 |
+
grep -rn "release_artifacts" README.md scripts/ docs/
|
| 338 |
+
```
|
| 339 |
+
|
| 340 |
+
## B3. 推之前先自检
|
| 341 |
+
|
| 342 |
+
```bash
|
| 343 |
+
cd cuekfs_code/repo
|
| 344 |
+
|
| 345 |
+
# 语法检查:51 个 py 文件应该零错误
|
| 346 |
+
python - <<'EOF'
|
| 347 |
+
import ast, pathlib
|
| 348 |
+
bad, n = [], 0
|
| 349 |
+
for p in pathlib.Path(".").rglob("*.py"):
|
| 350 |
+
if "__pycache__" in str(p):
|
| 351 |
+
continue
|
| 352 |
+
n += 1
|
| 353 |
+
try:
|
| 354 |
+
ast.parse(p.read_text())
|
| 355 |
+
except SyntaxError as e:
|
| 356 |
+
bad.append((str(p), e.lineno, e.msg))
|
| 357 |
+
print(f"{n} files, {len(bad)} syntax errors")
|
| 358 |
+
for b in bad:
|
| 359 |
+
print(" ", b)
|
| 360 |
+
EOF
|
| 361 |
+
|
| 362 |
+
# 导入检查:核心模块应该全部 OK
|
| 363 |
+
python - <<'EOF'
|
| 364 |
+
import importlib, sys
|
| 365 |
+
sys.path.insert(0, ".")
|
| 366 |
+
mods = ["cuekfs", "cuekfs.config", "cuekfs.v4_wave", "cuekfs.v3_wave",
|
| 367 |
+
"cuekfs.data_contracts", "cuekfs.v2_embedding", "cuekfs.pipeline",
|
| 368 |
+
"cuekfs.vlm.prompts", "cuekfs.vlm.response_parser", "cuekfs.cache.cache_manager"]
|
| 369 |
+
for m in mods:
|
| 370 |
+
try:
|
| 371 |
+
importlib.import_module(m); print(" OK ", m)
|
| 372 |
+
except Exception as e:
|
| 373 |
+
print(" FAIL", m, type(e).__name__, e)
|
| 374 |
+
EOF
|
| 375 |
+
|
| 376 |
+
# 再确认一次没有内网信息漏出去(应该全是 0)
|
| 377 |
+
for p in netflix nflx mesh.netflix svip copilotdp metatron titus weitaik /root/ /efs/; do
|
| 378 |
+
printf "%-14s %s\n" "$p" "$(grep -ril -- "$p" --exclude-dir=__pycache__ . | wc -l)"
|
| 379 |
+
done
|
| 380 |
+
grep -rnoE "sk-[A-Za-z0-9_-]{16,}|hf_[A-Za-z0-9]{20,}" . | grep -v "sk-your-key"
|
| 381 |
+
```
|
| 382 |
+
|
| 383 |
+
最后一条应该没有输出。`examples/quickstart.md` 里的 `sk-your-key` 是占位符,正常。
|
| 384 |
+
|
| 385 |
+
我在上传前已经跑过这套检查、并清掉了 3 个明文 API key、88 处内网主机名和
|
| 386 |
+
一个含同事邮箱的文件。这里再跑一遍是因��你可能在 B2 里手动改过东西。
|
| 387 |
+
|
| 388 |
+
## B4. 推送
|
| 389 |
+
|
| 390 |
+
```bash
|
| 391 |
+
cd cuekfs_code/repo
|
| 392 |
+
git init
|
| 393 |
+
git add .
|
| 394 |
+
git status # 确认 release_artifacts 不在列表里(它本来就在包的上一层)
|
| 395 |
+
git commit -m "Initial public release of CueKFS"
|
| 396 |
+
git branch -M main
|
| 397 |
+
git remote add origin git@github.com:<你的账号>/cuekfs.git
|
| 398 |
+
git push -u origin main
|
| 399 |
+
```
|
| 400 |
+
|
| 401 |
+
## B5. 把选帧结果发成 HF dataset
|
| 402 |
+
|
| 403 |
+
```bash
|
| 404 |
+
cd cuekfs_code
|
| 405 |
+
hf upload <你的账号>/cuekfs-selections release_artifacts . --repo-type dataset
|
| 406 |
+
```
|
| 407 |
+
|
| 408 |
+
CLI 有问题的话用 Python:
|
| 409 |
+
|
| 410 |
+
```bash
|
| 411 |
+
python - <<'EOF'
|
| 412 |
+
from huggingface_hub import HfApi
|
| 413 |
+
api = HfApi()
|
| 414 |
+
rid = "<你的账号>/cuekfs-selections"
|
| 415 |
+
api.create_repo(rid, repo_type="dataset", exist_ok=True)
|
| 416 |
+
api.upload_folder(folder_path="release_artifacts", repo_id=rid, repo_type="dataset")
|
| 417 |
+
print("https://huggingface.co/datasets/" + rid)
|
| 418 |
+
EOF
|
| 419 |
+
```
|
| 420 |
+
|
| 421 |
+
## B6. 回填 URL 再推一次
|
| 422 |
+
|
| 423 |
+
```bash
|
| 424 |
+
cd cuekfs_code/repo
|
| 425 |
+
# 把 B2(4) 找到的占位符换成 B5 输出的真实地址
|
| 426 |
+
git add -A && git commit -m "Point the download script at the published selections"
|
| 427 |
+
git push
|
| 428 |
+
```
|
| 429 |
+
|
| 430 |
+
## B7. 建议顺手做的
|
| 431 |
+
|
| 432 |
+
- GitHub 仓库设置里加 topics:`keyframe-selection`、`video-question-answering`、
|
| 433 |
+
`long-video-understanding`、`training-free`
|
| 434 |
+
- 描述栏填一句话:*Training-free agentic keyframe selection for long-video QA*
|
| 435 |
+
- 论文接收后建一个 GitHub Release,tag `v1.0`
|
| 436 |
+
|
| 437 |
+
---
|
| 438 |
+
|
| 439 |
+
# 场景 C:跑 rebuttal 实验
|
| 440 |
+
|
| 441 |
+
## C1. 先判断:你到底需不需要 GPU
|
| 442 |
+
|
| 443 |
+
**大部分 rebuttal 问题不需要重跑任何东西。** 先对着这张表看你的问题落在哪一栏:
|
| 444 |
+
|
| 445 |
+
| 审稿人问的 | 走哪条路 | 需要什么 |
|
| 446 |
+
|---|---|---|
|
| 447 |
+
| 提升显著吗?做个 McNemar | **路线一** | 笔记本 + pandas |
|
| 448 |
+
| 在某个子集上还成立吗?(时长、题型、证据位置) | **路线一** | 同上 |
|
| 449 |
+
| 失败案例长什么样? | **路线一** | 同上 |
|
| 450 |
+
| 上界是多少?还有多少提升空间? | **路线一** | 同上 |
|
| 451 |
+
| refinement 真的改了 cue 吗?覆盖率真的涨了吗? | **路线一** | 同上 |
|
| 452 |
+
| 换一个我们没试过的超参会怎样? | **路线二** | GPU + 视频 + 推理 VLM |
|
| 453 |
+
| 换一个新 reader 会怎样? | **路线二的简化版**(见 C3) | GPU 或 API,不用重新选帧 |
|
| 454 |
+
| 在一个新基准上跑一下 | **路线二完整版** | 全套 |
|
| 455 |
+
|
| 456 |
+
## C2. 路线一:纯分析,不需要 GPU
|
| 457 |
+
|
| 458 |
+
**10 分钟就能开始,一台笔记本足够。**
|
| 459 |
+
|
| 460 |
+
### C2.1 环境
|
| 461 |
+
|
| 462 |
+
```bash
|
| 463 |
+
python -m pip install pandas numpy scipy statsmodels matplotlib
|
| 464 |
+
```
|
| 465 |
+
|
| 466 |
+
56 个分析脚本里有 51 个只依赖 pandas/numpy/scipy,可以直接跑。
|
| 467 |
+
|
| 468 |
+
### C2.2 材料在哪
|
| 469 |
+
|
| 470 |
+
```
|
| 471 |
+
cuekfs_paper/02_rebuttal/
|
| 472 |
+
├── README.md ← 「审稿人问什么 → 查哪个文件」对照表,先读它
|
| 473 |
+
├── per_question_eval/
|
| 474 |
+
│ ├── RUNS_INDEX.md ← 244 个实验的准确率总览,人读
|
| 475 |
+
│ ├── runs_index.csv ← 同上,机器读
|
| 476 |
+
│ └── runs/<run名>/eval_summary.<reader>.json ← 445 份逐题记录
|
| 477 |
+
├── derived_tables/ ← 已算好的分析表
|
| 478 |
+
├── stratified_tables/ ← t1–t11 分层分析,每个都有 .md 结论 + _per_query.csv
|
| 479 |
+
├── analysis_caches/ ← 花过钱的 LLM 标注缓存,别浪费
|
| 480 |
+
├── analysis_scripts/ ← 56 个生成上述结果的脚本
|
| 481 |
+
└── qualitative_cases/ ← 175 组案例原图
|
| 482 |
+
```
|
| 483 |
+
|
| 484 |
+
### C2.3 例子:做一个 McNemar 显著性检验
|
| 485 |
+
|
| 486 |
+
```bash
|
| 487 |
+
cd cuekfs_paper/02_rebuttal
|
| 488 |
+
python - <<'EOF'
|
| 489 |
+
import json
|
| 490 |
+
from statsmodels.stats.contingency_tables import mcnemar
|
| 491 |
+
|
| 492 |
+
rows = [json.loads(l) for l in open("derived_tables/videomme_verdicts.jsonl")]
|
| 493 |
+
A, B = "CueKFS|gpt5_5|16", "WFS-SB|gpt5_5|16"
|
| 494 |
+
|
| 495 |
+
# 2x2 列联表:只统计两法结论不同的题
|
| 496 |
+
n01 = sum(1 for r in rows if not r[A] and r[B]) # 只有 B 对
|
| 497 |
+
n10 = sum(1 for r in rows if r[A] and not r[B]) # 只有 A 对
|
| 498 |
+
tbl = [[sum(1 for r in rows if r[A] and r[B]), n10],
|
| 499 |
+
[n01, sum(1 for r in rows if not r[A] and not r[B])]]
|
| 500 |
+
|
| 501 |
+
res = mcnemar(tbl, exact=False, correction=True)
|
| 502 |
+
print(f"n={len(rows)} A独对={n10} B独对={n01}")
|
| 503 |
+
print(f"chi2={res.statistic:.2f} p={res.pvalue:.3e}")
|
| 504 |
+
EOF
|
| 505 |
+
```
|
| 506 |
+
|
| 507 |
+
我在打包前跑过这段,输出是:
|
| 508 |
+
|
| 509 |
+
```
|
| 510 |
+
n=2700 A独对=249 B独对=126
|
| 511 |
+
chi2=39.69 p=2.975e-10
|
| 512 |
+
```
|
| 513 |
+
|
| 514 |
+
也就是说 CueKFS 相对 WFS-SB 在 k=16、gpt-5.5 下的优势是高度显著的:
|
| 515 |
+
249 道题只有 CueKFS 答对,126 道题只有 WFS-SB 答对。
|
| 516 |
+
你在另一台机器上应该得到完全一样的数字,可以拿来验证下载是否完整。
|
| 517 |
+
|
| 518 |
+
`videomme_verdicts.jsonl` 有 2700 行,每行一道题,
|
| 519 |
+
27 个 `方法|reader|预算` 组合的对错各占一个布尔字段
|
| 520 |
+
(三个方法 × 三个 reader × 三个预算)。把 `A`、`B` 换成任意两个组合就能比,
|
| 521 |
+
例如换成 `"CueKFS|internvl3|8"` 和 `"uniform|internvl3|8"`。
|
| 522 |
+
|
| 523 |
+
### C2.4 例子:查任意一个实验的成绩
|
| 524 |
+
|
| 525 |
+
```bash
|
| 526 |
+
cd cuekfs_paper/02_rebuttal/per_question_eval
|
| 527 |
+
python - <<'EOF'
|
| 528 |
+
import csv
|
| 529 |
+
rows = list(csv.DictReader(open("runs_index.csv")))
|
| 530 |
+
for r in rows:
|
| 531 |
+
if r["dataset"] == "videomme" and r["reader"] == "gpt5_5" and "jl_j7" in r["config"]:
|
| 532 |
+
print(f"{r['config']:<32} k={r['budget']:>2} acc={r['accuracy']}")
|
| 533 |
+
EOF
|
| 534 |
+
```
|
| 535 |
+
|
| 536 |
+
### C2.5 例子:做一个新的分层切分
|
| 537 |
+
|
| 538 |
+
比如"只看含隐含信息的题":
|
| 539 |
+
|
| 540 |
+
```bash
|
| 541 |
+
cd cuekfs_paper/02_rebuttal
|
| 542 |
+
python - <<'EOF'
|
| 543 |
+
import json
|
| 544 |
+
# analysis_caches 里存着每道题的 LLM 标注,不用重新调 API
|
| 545 |
+
labels = {}
|
| 546 |
+
for l in open("analysis_caches/implicit_v8_cache.jsonl"):
|
| 547 |
+
d = json.loads(l)
|
| 548 |
+
labels[d.get("qid") or d.get("question_id")] = d
|
| 549 |
+
|
| 550 |
+
verdicts = [json.loads(l) for l in open("derived_tables/videomme_verdicts.jsonl")]
|
| 551 |
+
print("标注覆盖:", sum(1 for v in verdicts if v["question_id"] in labels), "/", len(verdicts))
|
| 552 |
+
print("标注字段:", list(next(iter(labels.values())).keys()))
|
| 553 |
+
EOF
|
| 554 |
+
```
|
| 555 |
+
|
| 556 |
+
先打印字段名,再决定按哪个字段切。
|
| 557 |
+
`analysis_scripts/` 里的 `tag_*.py` 是生成这些缓存的脚本,
|
| 558 |
+
想看某个标签具体怎么定义的就去读对应那个。
|
| 559 |
+
|
| 560 |
+
### C2.6 一个必须知道的限制
|
| 561 |
+
|
| 562 |
+
**只有 VideoMME 的逐题记录是论文里那一版。**
|
| 563 |
+
|
| 564 |
+
`videomme_jl_j7_seconds1p0_siglip0p98_k{8,16,32}` 精确复现论文数字
|
| 565 |
+
(80.70 / 83.33 / 84.18,n=2699),基于它的分析都可靠。
|
| 566 |
+
|
| 567 |
+
但 LongVideoBench 和 MLVU 磁盘上只有 `abl_d2_batchreview_prop`,
|
| 568 |
+
是 j7 超参搜索**之前**的配置,18 个格子全部比论文低 0.3 到 3.5 分。
|
| 569 |
+
论文那两个基准的最终 run 在另一台机器上,没能一起打包。
|
| 570 |
+
另外 `mlvu × gpt5_5 × k16` 那份文件是坏的,只有 2 道题,忽略它。
|
| 571 |
+
|
| 572 |
+
所以:**rebuttal 分析尽量围绕 VideoMME 做**,
|
| 573 |
+
需要动另外两个基准时,先把 j7 的记录从原机器找回来。
|
| 574 |
+
|
| 575 |
+
### C2.7 那 5 个需要额外准备的脚本
|
| 576 |
+
|
| 577 |
+
`analysis_scripts/` 里有 5 个脚本 import 了 `kfs` 包
|
| 578 |
+
(`abl_coverage_change.py`、`abl_coverage_growth.py`、`abl_cue_explore.py`、
|
| 579 |
+
`abl_jaccard_by_action.py`、`build_uncovered_fps.py`)。
|
| 580 |
+
包1里没有这个包,它在包2里、而且已经改名叫 `cuekfs` 了。要跑的话:
|
| 581 |
+
|
| 582 |
+
```bash
|
| 583 |
+
cd cuekfs_paper/02_rebuttal/analysis_scripts
|
| 584 |
+
# 把 kfs. 换成 cuekfs.
|
| 585 |
+
sed -i.bak 's/^from kfs\./from cuekfs./; s/^import kfs$/import cuekfs/' \
|
| 586 |
+
abl_coverage_change.py abl_coverage_growth.py abl_cue_explore.py \
|
| 587 |
+
abl_jaccard_by_action.py build_uncovered_fps.py
|
| 588 |
+
# 让 Python 找得到包2里的 cuekfs
|
| 589 |
+
export PYTHONPATH=/绝对路径/cuekfs_code/repo:$PYTHONPATH
|
| 590 |
+
```
|
| 591 |
+
|
| 592 |
+
这 5 个脚本还需要真实视频和 SigLIP2 权重(它们要重算波形),
|
| 593 |
+
所以实际上属于路线二。其余 51 个不用。
|
| 594 |
+
|
| 595 |
+
---
|
| 596 |
+
|
| 597 |
+
## C3. 路线二:重跑 pipeline
|
| 598 |
+
|
| 599 |
+
只有当你确实要产生**新的选帧结果**时才走这条。
|
| 600 |
+
|
| 601 |
+
### C3.0 先想清楚:也许你只需要换 reader
|
| 602 |
+
|
| 603 |
+
**如果审稿人只是问"换个下游模型还成立吗",你不用重新选帧。**
|
| 604 |
+
包2的 `release_artifacts/selections/` 里存着 122 个实验每道题选了哪些帧
|
| 605 |
+
(只有时间戳,没有像素)。拿这些时间戳去你的新 reader 上解码、推理即可,
|
| 606 |
+
省掉最贵的那一步。
|
| 607 |
+
|
| 608 |
+
```bash
|
| 609 |
+
head -2 cuekfs_code/release_artifacts/selections/videomme_jl_j7_seconds1p0_siglip0p98_k8.jsonl
|
| 610 |
+
```
|
| 611 |
+
|
| 612 |
+
第一行是元信息,之后每行一道题:
|
| 613 |
+
`{"question_id": "001-3", "video": "fFjv93ACGo8", "frames_sec": [46.01, 61.99, ...]}`。
|
| 614 |
+
格式故意做得很简单,你自己写十几行代码就能读。
|
| 615 |
+
|
| 616 |
+
这条路只需要 GPU 跑 reader,不需要推理 VLM、不需要预抽 embedding。
|
| 617 |
+
|
| 618 |
+
### C3.1 硬件与预算
|
| 619 |
+
|
| 620 |
+
| 需要跑什么 | 硬件 | 时间 |
|
| 621 |
+
|---|---|---|
|
| 622 |
+
| 预抽 SigLIP2 embedding | 8 × A100/H100 | VideoMME 15–30 分钟;MLVU 1.5–2 小时;LVB 5–7 小时 |
|
| 623 |
+
| 选帧(VideoMME 全量 2700 题) | 不吃 GPU,瓶颈是推理 VLM 的延迟 | 6–14 小时 |
|
| 624 |
+
| 下游评测 | API reader:不吃 GPU;本地 7–8B reader:4 GPU | 每个预算 1–3 小时 |
|
| 625 |
+
|
| 626 |
+
磁盘:VideoMME 视频约 95 GB,embedding 缓存另需几十 GB。
|
| 627 |
+
|
| 628 |
+
### C3.2 装环境
|
| 629 |
+
|
| 630 |
+
```bash
|
| 631 |
+
cd cuekfs_code/repo
|
| 632 |
+
conda create -n cuekfs python=3.11 -y
|
| 633 |
+
conda activate cuekfs
|
| 634 |
+
|
| 635 |
+
# PyTorch 必须先装,而且要匹配你的 CUDA 版本
|
| 636 |
+
pip install torch --index-url https://download.pytorch.org/whl/cu128
|
| 637 |
+
|
| 638 |
+
pip install -r requirements.txt
|
| 639 |
+
pip install -e .
|
| 640 |
+
```
|
| 641 |
+
|
| 642 |
+
**`requirements.txt` 里没写的三个依赖**(文件末尾有注释说明):
|
| 643 |
+
|
| 644 |
+
1. **PyTorch** —— 上面单独装了
|
| 645 |
+
2. **vLLM 或 SGLang** —— 只有本地起推理 VLM 才需要,要预编译的 flashinfer wheel
|
| 646 |
+
3. **DINOv3** —— 只有跑 embedding backend 消融才需要:
|
| 647 |
+
`pip install git+https://github.com/facebookresearch/dinov3`
|
| 648 |
+
|
| 649 |
+
另外 `torchvision`(InternVL3 reader 要)和 `matplotlib`(分析脚本要)也没声明,
|
| 650 |
+
需要时 `pip install torchvision matplotlib`。
|
| 651 |
+
|
| 652 |
+
完整说明在 `docs/01_installation.md`。
|
| 653 |
+
|
| 654 |
+
### C3.3 下视频
|
| 655 |
+
|
| 656 |
+
```bash
|
| 657 |
+
cat cuekfs_code/repo/data/benchmarks/README.md # 每个基准的下载源
|
| 658 |
+
```
|
| 659 |
+
|
| 660 |
+
题目本身(parquet)已经在包里了,���缺视频:
|
| 661 |
+
|
| 662 |
+
| 基准 | 规模 | 来源 |
|
| 663 |
+
|---|---|---|
|
| 664 |
+
| Video-MME | 2700 题 / 900 视频 / 约 95 GB | HF `lmms-lab/Video-MME` |
|
| 665 |
+
| LongVideoBench | 1337 题(validation split) | HF `longvideobench/LongVideoBench` |
|
| 666 |
+
| MLVU | 2174 题(dev split) | HF `MLVU/MVLU` |
|
| 667 |
+
|
| 668 |
+
split 必须和我们一致:VideoMME test 无字幕、LVB validation、MLVU dev。
|
| 669 |
+
这三个 split 和 WFS-SB 一致,换了就没法比。
|
| 670 |
+
|
| 671 |
+
### C3.4 设环境变量
|
| 672 |
+
|
| 673 |
+
```bash
|
| 674 |
+
export CUEKFS_VLM_BASE_URL=http://localhost:8000/v1 # 推理 VLM 的地址
|
| 675 |
+
export CUEKFS_VLM_API_KEY=... # 需要的话
|
| 676 |
+
export DATA_DIR=/你的路径/videos
|
| 677 |
+
export OUTPUT_DIR=/你的路径/outputs
|
| 678 |
+
export DECORD_EOF_RETRY_MAX=20480 # 不设的话某些视频解码会报错
|
| 679 |
+
|
| 680 |
+
bash scripts/serving/check_env.sh # 自检
|
| 681 |
+
```
|
| 682 |
+
|
| 683 |
+
`CUEKFS_VLM_BASE_URL` 是必需的。原来硬编码的内网地址我已经全部换成了这个环境变量,
|
| 684 |
+
不设就会连到 `http://localhost:8000/v1` 这个默认值。
|
| 685 |
+
|
| 686 |
+
### C3.5 起推理 VLM
|
| 687 |
+
|
| 688 |
+
CueKFS 每道题要调几次推理 VLM。两个选择:
|
| 689 |
+
|
| 690 |
+
```bash
|
| 691 |
+
# A. 本地开源模型(论文的消融用的是 Qwen3.6-27B)
|
| 692 |
+
bash scripts/serving/start_vllm.sh 8000 8 Qwen/Qwen3.6-27B
|
| 693 |
+
export CUEKFS_VLM_BASE_URL=http://localhost:8000/v1
|
| 694 |
+
|
| 695 |
+
# B. 托管 API(论文主结果用的是 gpt-5.5)
|
| 696 |
+
export CUEKFS_VLM_BASE_URL=https://你的端点/v1
|
| 697 |
+
export CUEKFS_VLM_API_KEY=...
|
| 698 |
+
```
|
| 699 |
+
|
| 700 |
+
本地 27B 加载要 5–10 分钟。
|
| 701 |
+
|
| 702 |
+
### C3.6 预抽 SigLIP2 embedding
|
| 703 |
+
|
| 704 |
+
```bash
|
| 705 |
+
bash scripts/01_precompute_embeddings_multigpu.sh \
|
| 706 |
+
$DATA_DIR/videomme/data/ $OUTPUT_DIR/cache 8 configs/main.yaml 8 384 512
|
| 707 |
+
```
|
| 708 |
+
|
| 709 |
+
参数依次是:`<视频目录> <缓存目录> [GPU数] [配置] [batch_size] [max_edge] [decode_chunk_size]`,
|
| 710 |
+
后五个都有默认值(GPU 数默认 8,配置默认 `configs/main.yaml`)。
|
| 711 |
+
产出每个视频一份 `emb___siglip2_global___fps1_0.npy`,
|
| 712 |
+
存的是 1 fps 下每一帧的 SigLIP2 向量。脚本只扫 `*.mp4`。
|
| 713 |
+
|
| 714 |
+
**这一步要在起 VLM 服务之前跑完**(如果共用 GPU),抽 embedding 很吃显存。
|
| 715 |
+
重跑会自动跳过已缓存的视频。
|
| 716 |
+
|
| 717 |
+
跳过这步也能跑,但选帧时会现场编码,慢一个数量级。
|
| 718 |
+
|
| 719 |
+
### C3.7 选帧
|
| 720 |
+
|
| 721 |
+
```bash
|
| 722 |
+
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
|
| 723 |
+
export OMP_NUM_THREADS=4 MKL_NUM_THREADS=4 MALLOC_ARENA_MAX=2
|
| 724 |
+
|
| 725 |
+
python -u scripts/02_select_frames.py \
|
| 726 |
+
--dataset videomme --video_dir $DATA_DIR/videomme/data/ \
|
| 727 |
+
--config configs/main.yaml \
|
| 728 |
+
--pipeline_version v4 \
|
| 729 |
+
--top_k 32,16,8 \
|
| 730 |
+
--max_workers 20
|
| 731 |
+
```
|
| 732 |
+
|
| 733 |
+
**`--pipeline_version v4` 不能省。** 它的默认值是 `legacy`,
|
| 734 |
+
省掉会静默地跑成 v1 老方法,什么都复现不出来。
|
| 735 |
+
|
| 736 |
+
`--top_k 32,16,8` 一次跑三个预算:方法的前两步和预算无关、每题只跑一次,
|
| 737 |
+
所以三个预算几乎不比一个贵。
|
| 738 |
+
|
| 739 |
+
那几个 `OMP_NUM_THREADS` / `MALLOC_ARENA_MAX` 不是装饰。
|
| 740 |
+
不设的话,高 `--max_workers` 下每个 worker 的解码和 embedding 线程会各自铺开,
|
| 741 |
+
内存会涨爆。
|
| 742 |
+
|
| 743 |
+
多机分片:`--num_shards N --shard_id i`,跑完再来一次 `--merge_shards`。
|
| 744 |
+
重跑同一条命令会自动续跑。
|
| 745 |
+
|
| 746 |
+
### C3.8 下游评测
|
| 747 |
+
|
| 748 |
+
```bash
|
| 749 |
+
python -u scripts/03_evaluate_reader.py \
|
| 750 |
+
--dataset videomme --video_dir $DATA_DIR/videomme/data/ \
|
| 751 |
+
--bench_dir $OUTPUT_DIR/benchmark_runs/videomme_main_k32 \
|
| 752 |
+
--eval_model gpt-5.5 --eval_model_family gpt5_5 \
|
| 753 |
+
--max_workers 16 --resume
|
| 754 |
+
```
|
| 755 |
+
|
| 756 |
+
每个预算、每个 reader 各跑一次。**永远带 `--resume`。**
|
| 757 |
+
|
| 758 |
+
**结果以逐题的 `*.eval.json` sidecar 为准,不要信 `eval_summary.*.json`**
|
| 759 |
+
——那个 summary 只统计最近一次调用处理过的题。
|
| 760 |
+
|
| 761 |
+
reader 协议必须和论文一致,否则数字没有可比性:
|
| 762 |
+
Qwen2.5-VL 用 `--video_max_token_num 16384`,InternVL3 用 `--internvl3_max_num 1`。
|
| 763 |
+
|
| 764 |
+
### C3.9 复现 baseline
|
| 765 |
+
|
| 766 |
+
```bash
|
| 767 |
+
python scripts/baselines/wfs_sb_to_results.py # 读 WFS-SB 官方发布的关键帧,忠实转格式
|
| 768 |
+
python scripts/baselines/uniform_to_results.py # 同预算均匀采样
|
| 769 |
+
```
|
| 770 |
+
|
| 771 |
+
完整的复现命令序列在 `docs/04_reproduce_paper.md`。
|
| 772 |
+
|
| 773 |
+
---
|
| 774 |
+
|
| 775 |
+
## C4. 已知的坑
|
| 776 |
+
|
| 777 |
+
按踩到的概率排序:
|
| 778 |
+
|
| 779 |
+
1. **`--pipeline_version` 默认是 `legacy`。** 不显式写 `v4` 就跑成老方法了,而且不报错。
|
| 780 |
+
2. **`cuekfs/pipeline/phase_{a,b,c,d}.py` 不是论文里的 Phase A/B/C/D。**
|
| 781 |
+
那四个文件是被淘汰的 v1 流水线的四个阶段,和论文里的同名概念毫无关系。
|
| 782 |
+
看论文找代码,要去 `cuekfs/pipeline/runner_v4.py` 和 `cuekfs/v4_wave.py`。
|
| 783 |
+
3. **`04_single_sample.py` 不支持 v4。** 它内置的选帧路径早于 CueKFS,
|
| 784 |
+
只认 `legacy|v2|v3`。要单题调试就先用 `02_select_frames.py --sample_index N` 选帧,
|
| 785 |
+
再用 `04_single_sample.py --keyframe_json <产出的json>` 打分。
|
| 786 |
+
4. **`--max_workers > 1` 时结果不是逐位可复现的。** 批处理会打乱请求顺序,
|
| 787 |
+
多卡 embedding 副本也有浮点噪声。要严格复现就 `--max_workers 1` 且
|
| 788 |
+
`siglip2_replica_devices: ""`。方法层面的结论不受影响。
|
| 789 |
+
5. **配置里的 `qwen35_*` 是历史命名**,实际指向你配置的任何模型。
|
| 790 |
+
`configs/main.yaml` 里 `qwen35_model_name: gpt-5.5`。
|
| 791 |
+
6. **sidecar 文件名不能反推 question id。** 写文件时经过了
|
| 792 |
+
`_safe_filename`(非字母数字变 `_`、连续 `_` 折叠、首尾 `_` 去掉),
|
| 793 |
+
LongVideoBench 有 170/1337 个 id 会被改写。
|
| 794 |
+
正确做法是拿 question id 正向套 `_safe_filename` 去找文件,别反解。
|
| 795 |
+
|
| 796 |
+
---
|
| 797 |
+
|
| 798 |
+
# 附:论文主配置速查
|
| 799 |
+
|
| 800 |
+
论文主结果那一版(`configs/main.yaml`,即原来的 `jl_j7_final.yaml`):
|
| 801 |
+
|
| 802 |
+
| 参数 | 值 | 属于哪一步 |
|
| 803 |
+
|---|---|---|
|
| 804 |
+
| `v3_repr_frame_budget` | 48 | 第一步:给推理 VLM 看多少张代表帧 |
|
| 805 |
+
| `v4_review_batch_size` | 20 | 第二步:一批 review 多少个 cue |
|
| 806 |
+
| `v4_percue_frames_cap` | 32 | 第二步:每个 cue 最多留多少证据帧 |
|
| 807 |
+
| `v3_max_loop_rounds` | 5 | 第二步:最多循环几轮 |
|
| 808 |
+
| `disable_sufficiency` | true | 第二步:充分性检查在最终版里是关掉的 |
|
| 809 |
+
| `v4_importance_mode` | similarity | 第三步:重要性排序不走 VLM,用最大帧相似度 |
|
| 810 |
+
| `v4_alloc_mode` | proportional | 第三步:按重要性比例分配预算 |
|
| 811 |
+
| `v4_dedup_tau_siglip` | 0.98 | 第三步:去重的相似度阈值 |
|
| 812 |
+
| `v4_dedup_tau_seconds` | 1.0 | 第三步:去重的时间阈值 |
|
| 813 |
+
| `v4_backfill_mode` | embedding_fps | 第三步:剩余名额用最远点采样补 |
|
| 814 |
+
| `qwen35_model_name` | gpt-5.5 | 推理 VLM |
|
| 815 |
+
| `siglip2_model_name` | `google/siglip2-giant-opt-patch16-384` | 嵌入模型 |
|
| 816 |
+
|
| 817 |
+
推理 VLM 的采样参数:`temperature 0.0`、`seed 42`、`reasoning_effort high`、
|
| 818 |
+
`enable_thinking false`、`image_max_edge 448`。
|
| 819 |
+
|
| 820 |
+
**一个写作时要注意的事实:** VideoMME 那次主结果 run 复用了阶梯上游冻结的 cue,
|
| 821 |
+
只重跑了第三步(J7 调的正好就是第三步的两个去重阈值)。
|
| 822 |
+
cue 文本最初由 gpt-5.5 在 `jl_j1_budget48` 生成,之后沿阶梯往下传,
|
| 823 |
+
目的是让每一级超参的效果不被 cue 生成的随机性污染。
|
| 824 |
+
`configs/main.yaml` 是去掉复用指针的版本,用于在新基准上从头完整跑。
|