| # Reference Directory |
| git clone https://github.com/PKU-YuanGroup/Helios.git |
| git clone https://github.com/NVlabs/LongLive.git |
| git clone git@github.com:bingreeky/MemGen.git |
|
|
|
|
| 这个目录用于存放项目设计、实现和训练过程中会反复参考的外部资料。 |
| 它不是运行时必须的源码目录,而是研究与开发参考层。 |
|
|
|
|
| ## 目录定位 |
|
|
| `reference/` 主要存放以下几类内容: |
|
|
| - 论文 PDF |
| - 论文配套笔记 |
| - 方案草稿 |
| - 外部开源项目的结构化阅读记录 |
| - 和当前项目直接相关的训练/规划/critic/memory 参考材料 |
|
|
| 它的作用不是“被 import”,而是帮助回答这些问题: |
|
|
| - 当前系统应该如何拆成 `planner / edit / critic / memory` |
| - 哪些训练阶段适合先做监督、后做偏好、再做 RL / GRPO |
| - 哪些工作可以作为 `skill / memory / reflection` 的设计参考 |
| - 在汇报和写文档时,相关设计依据来自哪里 |
|
|
|
|
| ## 当前内容类型 |
|
|
| 目前这个目录下的内容大致包括: |
|
|
| - `SPIRAL- ... .pdf` |
| - 用来参考闭环 `planner -> world model -> critic -> memory` 的训练故事 |
| - `HGM/` |
| - `HyperAgents/` |
| - `MemGen/` |
| - `OpenSpace/` |
| - `ViMax/` |
| - `others/` |
|
|
| 这些子目录一般表示: |
|
|
| - 某篇论文的阅读材料 |
| - 某个参考项目的摘录或整理 |
| - 某类方法的补充资料 |
|
|
|
|
| ## 在当前项目中的具体用途 |
|
|
| ### 1. Planner 设计 |
|
|
| 参考: |
|
|
| - 结构化 planning |
| - style family 选择 |
| - carrier / preserve / rewrite 的拆解方式 |
|
|
| 当前对应代码: |
|
|
| - [src/planner/core/video_planner.py](/home/featurize/low-high-new/src/planner/core/video_planner.py) |
|
|
|
|
| ### 2. Critic 设计 |
|
|
| 参考: |
|
|
| - evaluator 评分维度 |
| - reflection policy |
| - pairwise reward / preference |
| - 闭环修正机制 |
|
|
| 当前对应代码: |
|
|
| - [src/critic/evaluator.py](/home/featurize/low-high-new/src/critic/evaluator.py) |
| - [src/critic/reflector.py](/home/featurize/low-high-new/src/critic/reflector.py) |
|
|
|
|
| ### 3. Memory / Skill 设计 |
|
|
| 参考: |
|
|
| - 显式记忆 |
| - skill 积累 |
| - replay 驱动更新 |
| - 成功/失败经验抽象 |
|
|
| 当前对应代码: |
|
|
| - [src/memory/store.py](/home/featurize/low-high-new/src/memory/store.py) |
| - [src/memory/retriever.py](/home/featurize/low-high-new/src/memory/retriever.py) |
| - [src/memory/evolver.py](/home/featurize/low-high-new/src/memory/evolver.py) |
|
|
|
|
| ### 4. Edit-model 训练设计 |
|
|
| 参考: |
|
|
| - Ditto 风格的 `low/high/prompt` 监督训练 |
| - SPIRAL 风格的闭环优化 |
| - preference / GRPO 的引入时机 |
|
|
| 当前对应代码: |
|
|
| - [scripts/training/edit-model/train.py](/home/featurize/low-high-new/scripts/training/edit-model/train.py) |
|
|
|
|
| ## 为什么这个目录需要在 Git 里可见 |
|
|
| 虽然 `reference/` 里的大部分内容不是运行时必需代码,但它对项目协作很重要: |
|
|
| - 新加入的人可以快速知道设计参考来自哪里 |
| - 写 README、汇报、实验计划时可以快速对齐依据 |
| - 避免“本地有一堆参考资料,但 Git 仓库里完全看不见” |
|
|
| 因此当前仓库采用的策略是: |
|
|
| - `reference/` 目录内容默认不整体纳入版本管理 |
| - 但至少保留这个 `README.md`,说明目录用途和内容范围 |
|
|
|
|
| ## 配置 benchmarks 目录 |
|
|
| `benchmarks/` 里存放评测相关论文、README 摘录、外部 benchmark 代码阅读记录,以及我们整理的落地脚本。它目前通过 Hugging Face dataset repo 保存,不建议把大 PDF、外部代码和缓存文件直接塞进主仓库。 |
|
|
| ### 方式一:随父仓库 submodule 拉取 |
|
|
| 如果你是在完整的 `low-high-new` 仓库里工作,优先用这种方式: |
|
|
| ```bash |
| cd /path/to/low-high-new |
| |
| git pull |
| git submodule update --init --recursive reference |
| ``` |
|
|
| 如果只想强制更新 `reference` 到父仓库记录的版本: |
|
|
| ```bash |
| cd /path/to/low-high-new |
| |
| git submodule sync -- reference |
| git submodule update --init --recursive --force reference |
| ``` |
|
|
| ### 方式二:直接从 Hugging Face 下载 reference |
|
|
| 如果当前机器没有完整初始化 submodule,或者只想恢复 `reference/benchmarks` 内容,可以直接用 HF 下载: |
|
|
| ```bash |
| cd /path/to/low-high-new |
| |
| hf download Ouzhang/low-high-reference \ |
| --repo-type dataset \ |
| --local-dir reference \ |
| --include 'benchmarks/**' \ |
| --exclude '**/.DS_Store' \ |
| --exclude '**/__pycache__/**' |
| ``` |
|
|
| 如果只需要视频编辑评测资料和脚本: |
|
|
| ```bash |
| cd /path/to/low-high-new |
| |
| hf download Ouzhang/low-high-reference \ |
| --repo-type dataset \ |
| --local-dir reference \ |
| --include 'benchmarks/edit/**' \ |
| --exclude '**/.DS_Store' \ |
| --exclude '**/__pycache__/**' |
| ``` |
|
|
| ### 当前 edit benchmark 重点文件 |
|
|
| ```bash |
| reference/benchmarks/edit/评测表格.md |
| reference/benchmarks/edit/traditional_eval_notes.md |
| reference/benchmarks/edit/build_six_method_manifest.py |
| reference/benchmarks/edit/run_traditional_metrics.py |
| ``` |
|
|
| 生成我们当前 6 组 `val20/val100` manifest: |
|
|
| ```bash |
| cd /path/to/low-high-new |
| |
| python3 reference/benchmarks/edit/build_six_method_manifest.py \ |
| --repo-root . \ |
| --output-dir out/edit_model_face_stage1/traditional_eval_manifests |
| ``` |
|
|
| 先跑不需要下载模型的传统指标: |
|
|
| ```bash |
| cd /path/to/low-high-new |
| |
| python3 reference/benchmarks/edit/run_traditional_metrics.py \ |
| --manifest out/edit_model_face_stage1/traditional_eval_manifests/val20.jsonl \ |
| --output out/edit_model_face_stage1/traditional_metrics_val20.jsonl \ |
| --frames-per-video 16 |
| |
| python3 reference/benchmarks/edit/run_traditional_metrics.py \ |
| --manifest out/edit_model_face_stage1/traditional_eval_manifests/val100.jsonl \ |
| --output out/edit_model_face_stage1/traditional_metrics_val100.jsonl \ |
| --frames-per-video 16 |
| ``` |
|
|
| 如果已经下载好 CLIP,可以额外跑 CLIP 文本对齐和跨帧一致性: |
|
|
| ```bash |
| cd /path/to/low-high-new |
| |
| hf download openai/clip-vit-large-patch14 \ |
| --local-dir models/openai_clip-vit-large-patch14 |
| |
| python3 reference/benchmarks/edit/run_traditional_metrics.py \ |
| --manifest out/edit_model_face_stage1/traditional_eval_manifests/val100.jsonl \ |
| --output out/edit_model_face_stage1/traditional_metrics_val100_clip.jsonl \ |
| --frames-per-video 16 \ |
| --clip-model-dir models/openai_clip-vit-large-patch14 \ |
| --device cuda:0 |
| ``` |
|
|
| 注意:`benchmarks/edit/code/` 下如果放了外部 benchmark 原始仓库,通常还需要按各自 README 单独安装依赖;本 README 只负责说明如何恢复资料和运行我们整理的轻量脚本。 |
|
|
|
|
| ## 使用建议 |
|
|
| - 新增参考资料时,优先放进已有子目录或按主题新建子目录 |
| - 如果某份资料对当前实现有直接影响,建议在提交说明或设计文档中顺手写明 |
| - 不建议把过大的无关临时下载内容混进这里 |
|
|
|
|
| ## 总结 |
|
|
| `reference/` 是本项目的“研究参考层”,不是运行时依赖层。 |
| 它的价值在于: |
|
|
| - 对齐设计依据 |
| - 追踪方法来源 |
| - 帮助理解为什么当前系统被设计成现在这样 |
|
|