videograin-eval
VideoGrain: Modulating Space-Time Attention for Multi-grained Video Editing — Xiangpeng Yang et al. (arXiv:2502.17258, 2025)
What this evaluates
Evaluates a video editing model's ability to perform multi-grained edits (class, instance, and part levels) on video-text pairs. It measures semantic alignment, temporal consistency, and pixel-level fidelity of the generated edits.
Datasets
- VideoGrain Evaluation Set — total 76; splits: test (76)
Metrics
CLIP-T (primary) — range: [0, 100]
- Average cosine similarity between the input text prompt and all video frames.
CLIP-F — range: [0, 100]
- Average cosine similarity between consecutive video frames.
Warp-Err — range: [0, 100]
- Pixel-level difference computed by warping edited frames using optical flow from the source video (extracted via RAFT-Large).
Q-edit — range: [0, 100]
- Ratio of CLIP-T to Warp-Err, used as a comprehensive measure of editing quality.
Input / output format
Input: Source video frames, editing text prompt, and spatial region/mask information for target edits.
Output: Edited video frames matching the source duration and resolution.
Scoring recipe
def compute_metrics(frames, prompt, source_frames):
clip_t = mean(cosine_similarity(prompt, frame) for frame in frames)
clip_f = mean(cosine_similarity(frames[i], frames[i+1]) for i in range(len(frames)-1))
flow = raft_large(source_frames)
warped = warp(frames, flow)
warp_err = mean_pixel_diff(frames, warped)
q_edit = clip_t / warp_err
return clip_t, clip_f, warp_err, q_edit
Common pitfalls
- All automatic metrics are scaled by 100 in the paper, which may cause confusion if readers expect standard [0,1] ranges.
- Warp-Err relies on RAFT-Large optical flow; errors in flow estimation for fast motion or occlusions can artificially inflate the error score.
- Q-edit is a ratio metric; division by a near-zero Warp-Err can produce outlier values, though the paper scales results for clarity.
Evidence (verbatim from paper)
Four automatic metrics are employed for evaluation: CLIP-T, CLIP-F, Warp-Err, and Q-edit, following (Wu et al., [2022]; Cong et al., [2023]). All metrics are scaled by 100 for clarity. CLIP-T calculates the average cosine similarity between the input prompt and all video frames, while CLIP-F measures the average cosine similarity between consecutive frames. Additionally, Warp-Err captures pixel-level differences by warping the edited video frames according to the optical flow of the source video, extracted using RAFT-Large (Teed & Deng, [2020]). To provide a more comprehensive measure of video editing quality, we follow (Cong et al., [2023]) and use Q-edit, defined as CLIP-T/Warp-Err.
Citation
@misc{yang2025videograin,
title={VideoGrain: Modulating Space-Time Attention for Multi-grained Video Editing},
author={Xiangpeng Yang et al.},
year={2025},
note={arXiv:2502.17258}
}
1---2name: videograin-eval3description: Evaluates a video editing model's ability to perform multi-grained edits (class, instance, and part levels) on video-text pairs. It measures semantic alignment, temporal consistency, and pixel-level fidelity of the generated edits. Use when the user wants to benchmark on VideoGrain Evaluation Set, or asks about evaluating this task. Reports CLIP-T.4---56# videograin-eval78> VideoGrain: Modulating Space-Time Attention for Multi-grained Video Editing — Xiangpeng Yang et al. (arXiv:2502.17258, 2025)910## What this evaluates1112Evaluates a video editing model's ability to perform multi-grained edits (class, instance, and part levels) on video-text pairs. It measures semantic alignment, temporal consistency, and pixel-level fidelity of the generated edits.1314## Datasets1516- **VideoGrain Evaluation Set** — total 76; splits: test (76)1718## Metrics1920- `CLIP-T` **(primary)** — range: [0, 100]21 - Average cosine similarity between the input text prompt and all video frames.22- `CLIP-F` — range: [0, 100]23 - Average cosine similarity between consecutive video frames.24- `Warp-Err` — range: [0, 100]25 - Pixel-level difference computed by warping edited frames using optical flow from the source video (extracted via RAFT-Large).26- `Q-edit` — range: [0, 100]27 - Ratio of CLIP-T to Warp-Err, used as a comprehensive measure of editing quality.2829## Input / output format3031**Input**: Source video frames, editing text prompt, and spatial region/mask information for target edits.3233**Output**: Edited video frames matching the source duration and resolution.3435## Scoring recipe3637```python38def compute_metrics(frames, prompt, source_frames):39 clip_t = mean(cosine_similarity(prompt, frame) for frame in frames)40 clip_f = mean(cosine_similarity(frames[i], frames[i+1]) for i in range(len(frames)-1))41 flow = raft_large(source_frames)42 warped = warp(frames, flow)43 warp_err = mean_pixel_diff(frames, warped)44 q_edit = clip_t / warp_err45 return clip_t, clip_f, warp_err, q_edit46```4748## Common pitfalls4950- All automatic metrics are scaled by 100 in the paper, which may cause confusion if readers expect standard [0,1] ranges.51- Warp-Err relies on RAFT-Large optical flow; errors in flow estimation for fast motion or occlusions can artificially inflate the error score.52- Q-edit is a ratio metric; division by a near-zero Warp-Err can produce outlier values, though the paper scales results for clarity.5354## Evidence (verbatim from paper)5556> Four automatic metrics are employed for evaluation: CLIP-T, CLIP-F, Warp-Err, and Q-edit, following *(Wu et al., [2022]; Cong et al., [2023])*. All metrics are scaled by 100 for clarity. CLIP-T calculates the average cosine similarity between the input prompt and all video frames, while CLIP-F measures the average cosine similarity between consecutive frames. Additionally, Warp-Err captures pixel-level differences by warping the edited video frames according to the optical flow of the source video, extracted using RAFT-Large *(Teed \& Deng, [2020])*. To provide a more comprehensive measure of video editing quality, we follow *(Cong et al., [2023])* and use Q-edit, defined as CLIP-T/Warp-Err.5758## Citation5960```bibtex61@misc{yang2025videograin,62 title={VideoGrain: Modulating Space-Time Attention for Multi-grained Video Editing},63 author={Xiangpeng Yang et al.},64 year={2025},65 note={arXiv:2502.17258}66}67```6869- arXiv: 2502.17258