---
title: CameraBench
description: "CMU 镜头运动评测：二分类、VQA、检索与描述。WorldFoundry 聚合官方分数，不编造榜单。"
---

CameraBench（卡内基梅隆）问的是视频模型会不会**理解镜头运动**——推、摇、移以及一套与摄影师共同设计、再经专家标注的分类法。四个指标族：

- **二分类** — `camera_motion_average_precision` 与 `camera_motion_roc_auc`。
- **VQA** — 关于镜头的是 / 否与问题准确率。
- **检索** — 按文本、图像与组检索匹配的运动。
- **描述** — caption 质量。GPT 评判为可选（`OPENAI_API_KEY`，`--no-gpt` 关闭）。

`camerabench_average` 是可用官方指标族的均值。在 WorldFoundry 里，同一套标签也可给镜头控制生成当种子；那是下游用法，不是隐藏榜单。

论文：[CameraBench](https://arxiv.org/abs/2504.15376)。项目：[linzhiqiu.github.io/papers/camerabench](https://linzhiqiu.github.io/papers/camerabench/)。代码：[sy77777en/CameraBench](https://github.com/sy77777en/CameraBench)，打分栈 [linzhiqiu/t2v_metrics](https://github.com/linzhiqiu/t2v_metrics)。数据：[`syCen/CameraBench`](https://huggingface.co/datasets/syCen/CameraBench)（CC-BY-4.0）。

WorldFoundry **聚合已准备的 `score_dir` 文件**或导入官方 JSON。VLM / SfM 打分仍在上游。共享几何栈：`camera_geometry_stack`（VGGT、MoGe、UniDepth、RAFT）。

<BenchmarkPageSections id="camerabench" locale="zh" />

## 如何运行

导入官方 JSON（严格覆盖）：

```bash
WORLDFOUNDRY_CAMERABENCH_STRICT=1 worldfoundry-eval zoo benchmark-run \
  --benchmark-id camerabench \
  --mode official-validation \
  --official-results-path <official_results.json> \
  --benchmark-data-root <camerabench_data_root> \
  --output-dir tmp/camerabench/official-validation \
  --json
```

聚合已准备的分数目录：

```bash
WORLDFOUNDRY_CAMERABENCH_STRICT=1 worldfoundry-eval zoo benchmark-run \
  --benchmark-id camerabench \
  --mode official-validation \
  --score-dir <score_dir> \
  --benchmark-data-root <camerabench_data_root> \
  --output-dir tmp/camerabench/score-dir \
  --json
```

```bash
hf download syCen/CameraBench --repo-type dataset \
  --local-dir cache/worldfoundry/data/hfd_datasets/syCen/CameraBench
```

`--task` 可限制到一个指标族。环境变量：`WORLDFOUNDRY_CAMERABENCH_DATA_ROOT`、`WORLDFOUNDRY_CAMERABENCH_RESULTS_PATH`、`WORLDFOUNDRY_CAMERABENCH_SCORE_DIR`。

仓内指针：`worldfoundry/data/benchmarks/tasks/external/camerabench.yaml`。

产物包括 `scorecard.json`（主键 `camerabench_average`）、存在时的 `camera_predictions.jsonl`、以及 `raw_metric_table.jsonl`。

## 官方两阶段协议

CameraBench 把**方法相关打分**和**方法无关指标**拆开。WorldFoundry 是第二阶段：聚合已准备的 `score_dir` 或导入官方 JSON。第一阶段（Qwen-2.5-VL、MegaSAM 或自研方法）仍在上游。只替换第一阶段，下面的 JSON 合同保持不变。

官方脚本用的视频来自 [`syCen/Videos4CameraBnech`](https://huggingface.co/datasets/syCen/Videos4CameraBnech)（上游拼写如此）。典型数据根：

```text
<data_root>/
  binary_classification/
  vqa_and_retrieval/          # 每个 skill 一个目录
  caption_data.json
  videos/                     # 可选的本地视频副本
```

第一阶段模型拉权重时可能需要 `HF_TOKEN`。

### 二分类

划分：

- 平移：`Move_Up`、`Move_Down`、`Move_In`、`Move_Out`、`Move_Left`、`Move_Right`
- 旋转：`Pan_Left`、`Pan_Right`、`Roll_Clockwise`、`Roll_Counterclockwise`、`Tilt_Down`、`Tilt_Up`
- 变焦：`Zoom_In`、`Zoom_Out`
- 静止：`Static`

自动发现 `vqa_scores_*.json`（自定义方法也可用 `classification_scores_*.json`）。记录格式：

```json
{
  "metadata": {
    "method_type": "Your_Method_Name",
    "model_name": "your_model_name",
    "checkpoint": "optional_checkpoint_path",
    "split_name": "Move_Down",
    "generation_timestamp": "2025-01-XX"
  },
  "scores": [
    {
      "sample_id": "0",
      "video_path": "path/to/video.mp4",
      "question": "Is the camera moving downward?",
      "ground_truth_label": "yes",
      "method": "your_method_identifier",
      "score": 0.85,
      "error": null
    }
  ]
}
```

### VQA 与检索

技能：`complex_description`、`confusable_motion`、`has_motion`、`motion_and_steadiness`、`motion_direction`、`motion_speed`、`only_motion`、`scene_dynamics`、`tracking_shot`。

自动发现 `vqa_retrieval_scores_*.json`。官方评测可 `--mode vqa`、`--mode retrieval` 或两者。记录格式：

```json
{
  "metadata": {
    "method_type": "Your_Method_Name",
    "model_name": "your_model_name",
    "skill_name": "confusable_motion",
    "task_name": "backward_camera_only_vs_backward_ground_only",
    "split_name": "confusable_motion"
  },
  "scores": [
    {
      "sample_id": "0",
      "pos_video": "path/to/positive_video.mp4",
      "neg_video": "path/to/negative_video.mp4",
      "pos_question": "Is the camera moving backward?",
      "neg_question": "Is the ground moving backward?",
      "method": "your_method_identifier",
      "yes_scores": {
        "pos_text_pos_image": 0.85,
        "pos_text_neg_image": 0.23,
        "neg_text_pos_image": 0.31,
        "neg_text_neg_image": 0.78
      },
      "no_scores": {
        "pos_text_pos_image": 0.15,
        "pos_text_neg_image": 0.77,
        "neg_text_pos_image": 0.69,
        "neg_text_neg_image": 0.22
      },
      "error": null
    }
  ]
}
```

### 描述

自动发现 `caption_results_*.json`。GPT-4o 评判需要 `OPENAI_API_KEY`；WorldFoundry `--no-gpt` 可跳过。记录格式：

```json
{
  "metadata": {
    "method_type": "Your_Method_Name",
    "model_name": "your_model_name"
  },
  "captions": [
    {
      "sample_id": "0",
      "video_path": "path/to/video.mp4",
      "question": "Describe the camera motion in this video.",
      "reference_answer": "The camera pans left while moving forward",
      "method": "your_method_identifier",
      "generated_caption": "The camera is panning to the left and moving forward smoothly",
      "error": null
    }
  ]
}
```

第一阶段失败应捕获并写成 `error` 字符串。样本计数（总数 / 成功 / 失败）由文件推导，不要手写。唯一 id 由 `model_name`、`checkpoint`、`split_name` 生成。

[← 返回 Benchmark Hub](/zh/docs/evaluation/benchmark-hub)
