Project Page | Arxiv | Dataset | Model (Qwen) | Model (Gemma)
Authors: Kanchana Ranasinghe, Honglu Zhou, Dominick Reilly, Le Xue, Shusheng Yang, Juan Carlos Niebles, Silvio Savarese, Ran Xu
uv sync
uv run python -m unittest discover -s tests -vFor model generation and API judging, install the harness dependencies in a CUDA environment:
uv sync --extra harnessThe example configurations use BF16 full-size models and SDPA. Each GPU holds a
complete model replica; multiple GPUs shard videos, not model weights. The recorded
experiments used eight H200 GPUs. Obtain access to the configured Hugging Face models and authenticate with hf auth login
or HF_TOKEN before generation. Model weights are downloaded on first use.
Copy src/metrics.py into another project, or install this repository:
from metrics import score_pauc, score_pauc_f
raw = score_pauc("judged_answers.json", omega=0.5)
result = score_pauc_f("predictions.jsonl", "judged_answers.json", omega=0.5)
print(raw["pauc"], result["pauc_f"])Both functions also accept lists of records. All public summary scores are percentages on a 0–100 scale. To score from the command line:
uv run python src/metrics.py --predictions predictions.jsonl \
--scores judged_answers.json --omega 0.5Predictions use the official JSONL schema:
{"question_id":"video.mp4","model_response_list":[{"time":2.5,"content":"The person opens the door."}]}Judged answers are a JSON list. Each record contains question_id and answer;
each answer contains reply_timespan: [start, end] and judge_scores, mapping
timestamp strings to quality scores 0, 1, or 2. The standalone scorer does not
infer semantic quality from answer text; the evaluation pipeline supplies it.
PAUC averages quality/timing area over gold turns, including its official 25-point
no-reply score. PAUC-F harmonically combines that recall with pooled physical-fire
precision: each turn can credit at most one earliest positive judged fire, and
each physical fire can be credited once. Repeats and out-of-window fires remain
in the denominator. No fires produce PAUC-F zero. Zero-duration windows are
rejected explicitly. The scorer version is pauc-f-v1.
See examples/README.md for more details.
src/metrics.py: standalone PAUC and PAUC-F.src/harness/: streaming protocol, fixed prompt, latest-response memory.src/inference/: Gemma and Qwen model loading and generation.src/evaluation/: shard validation, API judging, and reporting.src/data/: WEB annotation loading and reference frame sampling.configs/: user-editable reproduction settings.examples/: two complete WEB launchers.tests/test_metrics.py: small offline correctness tests.src/train/andsrc/inference/trained/: future release notes.
See contribution guidelines, our Code of Conduct, and AI ethics disclaimer. Report security concerns using SECURITY.md.
The original code in this repository, including the inference harness, evaluation metrics, and benchmarking code, is licensed under the Apache License, Version 2.0. The training pipeline is planned for a future release under the same license.
Third-party dependencies, models, model weights, and datasets remain subject to their respective licenses and terms.
Copyright (c) 2026 Salesforce, Inc.