Skip to content

[Benchmark] Add QVHighlights moment retrieval and highlight detection - #1770

Open
aliasgerovs wants to merge 1 commit into
open-compass:mainfrom
aliasgerovs:qvhighlights
Open

aliasgerovs wants to merge 1 commit into
open-compass:mainfrom
aliasgerovs:qvhighlights

Conversation

@aliasgerovs

Copy link
Copy Markdown
Contributor

What this adds

This PR adds QVHighlights (Lei et al., NeurIPS 2021), the standard benchmark for moment retrieval and highlight detection. Each query comes with every matching moment in a 150-second YouTube clip, and three annotators scored each 2-second clip of those moments from 0 (very bad) to 4 (very good). The PR uses the official validation split (1,550 queries over 1,519 videos; the test labels are not public) with both of its tasks:

Dataset Task Scores
QVHighlights-MR moment retrieval: list all matching moments mAP over IoU 0.5:0.05:0.95, mAP@0.5, mAP@0.75, R1@0.5, R1@0.7
QVHighlights-HD highlight detection: which clips matter most for the query mAP and HIT@1 for clips rated "Very Good" (also "Good" and "Fair")

Highlight detection is a different kind of task from the grounding benchmarks already in VLMEvalKit: the model scores parts of the video instead of returning a time span. TimeLens-Bench (#1715) uses a re-annotated QVHighlights test split for single-moment grounding, so the two do not overlap.

Data: annotations from https://github.com/jayleicn/moment_detr (CC BY-NC-SA 4.0); videos from the official archive linked there.

How it works

  • The annotations are downloaded the first time. The official video archive has all splits (about 144 GB), so it is streamed and only the 1,519 validation clips are kept, in LMUData/QVHighlights/videos. If you already have the clips, put them there and nothing is downloaded.
  • Moment retrieval prompt: the model is asked to list every matching span in seconds, most relevant first, as [[start, end], ...]. Up to 10 spans are read, in order; the order is the ranking used for mAP.
  • Highlight detection prompt: the zero-shot QVHighlights prompt of TimeChat (also used by later video LLM papers). It asks for highlight timestamps with saliency scores; each timestamp is mapped to its 2-second clip, and clips that are not mentioned get 0.
  • The metrics are re-implemented from the official evaluation script (standalone_eval/eval.py). On the sample predictions that ship with it (standalone_eval/sample_val_preds.jsonl), all 26 numbers are identical to the official script: mAP, mAP@0.5, mAP@0.75, R1@0.5 and R1@0.7 for all, short, middle and long moments, plus highlight mAP and HIT@1 at the three thresholds. One deliberate difference: an answer without a readable span counts as 0. The official script was written for models that always output windows, so it would leave such queries out of the mAP.
  • Dataset names: QVHighlights-MR_2fps, QVHighlights-MR_1fps, QVHighlights-HD_2fps, QVHighlights-HD_1fps.

Reference results

Qwen3-VL-8B-Instruct with the same model settings as #1715 (2 fps, 64 to 14,336 visual tokens, greedy):

Dataset mAP mAP@0.5 mAP@0.75 R1@0.5 R1@0.7
QVHighlights-MR_2fps 26.4 38.6 26.7 36.8 27.8
Dataset mAP (Very Good) HIT@1 (Very Good)
QVHighlights-HD_2fps 26.1 46.7

All 1,550 answers could be read for both tasks. Short moments are the hard part of moment retrieval: the mAP is 6.1 for moments of up to 10 seconds, 25.3 for 10 to 30 seconds and 32.5 for longer ones. For highlight detection with the looser thresholds, mAP / HIT@1 is 46.0 / 60.4 (Good) and 56.2 / 64.2 (Fair). For context, the TimeChat paper reports 14.5 mAP / 23.9 HIT@1 for TimeChat-7B with the same zero-shot prompt.

Checks

  • The repo pre-commit hooks (flake8, isort, yapf and the others) pass on the changed files.
  • pytest tests/test_qvhighlights_metrics.py: 8 passed (parsing, AP, both metric sets, end-to-end scoring).
  • pytest tests/test_dataset_alias.py: 29 passed (the new datasets are in the shortcut manifest).

Adds the official QVHighlights validation split (1,550 queries) with both of its tasks: moment
retrieval (mAP over IoU 0.5:0.05:0.95, R1@0.5 / 0.7) and highlight detection (mAP and HIT@1 over
2-second clip saliency scores), scored as in the official evaluation script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant