Home

Awesome

vbench_logo

<!-- [![arXiv](https://img.shields.io/badge/arXiv-2311.99999-b31b1b.svg)](https://arxiv.org/abs/2311.99999) -->

Paper Project Page Dataset Download PyPI HuggingFace Video Visitor

This repository contains the implementation of the following paper and its related serial works in progress. We evaluate video generative models!

VBench: Comprehensive Benchmark Suite for Video Generative Models<br> Ziqi Huang<sup></sup>, Yinan He<sup></sup>, Jiashuo Yu<sup></sup>, Fan Zhang<sup></sup>, Chenyang Si, Yuming Jiang, Yuanhan Zhang, Tianxing Wu, Qingyang Jin, Nattapol Chanpaisit, Yaohui Wang, Xinyuan Chen, Limin Wang, Dahua Lin<sup>+</sup>, Yu Qiao<sup>+</sup>, Ziwei Liu<sup>+</sup><br> IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2024

Table of Contents

<a name="updates"></a>

:fire: Updates

<a name="overview"></a>

:mega: Overview

overall_structure We propose VBench, a comprehensive benchmark suite for video generative models. We design a comprehensive and hierarchical <b>Evaluation Dimension Suite</b> to decompose "video generation quality" into multiple well-defined dimensions to facilitate fine-grained and objective evaluation. For each dimension and each content category, we carefully design a <b>Prompt Suite</b> as test cases, and sample <b>Generated Videos</b> from a set of video generation models. For each evaluation dimension, we specifically design an <b>Evaluation Method Suite</b>, which uses carefully crafted method or designated pipeline for automatic objective evaluation. We also conduct <b>Human Preference Annotation</b> for the generated videos for each dimension, and show that VBench evaluation results are <b>well aligned with human perceptions</b>. VBench can provide valuable insights from multiple perspectives.

<a name="evaluation_results"></a>

:mortar_board: Evaluation Results

See our leaderboard for the most updated ranking and numerical results (with models like Gen-3, Kling, Pika). HuggingFace

<p align="center"> <img src="./asset/radar-open.jpg" width="48%" style="margin-right: 4%;" /> <img src="./asset/radar-close.jpg" width="48%" /> </p>

We visualize VBench evaluation results of various publicly available video generation models, as well as Gen-2 and Pika, across 16 VBench dimensions. We normalize the results per dimension for clearer comparisons.

:trophy: Leaderboard

See numeric values at our Leaderboard :1st_place_medal::2nd_place_medal::3rd_place_medal:

How to join VBench Leaderboard? See the 3 options below:

Sampling PartyEvaluation PartyComments
VBench TeamVBench TeamWe periodically allocate resources to sample newly released models and perform evaluations. You can request us to perform sampling and evaluation, but the progress depends on our available resources.
Your TeamVBench TeamFor non-open-source models interested in joining our leaderboard, submit your video samples to us for evaluation. If you prefer to provide the evaluation results directly, see the row below.
Your TeamYour TeamIf you have already used VBench for full evaluation in your report/paper, submit your eval_results.zip files to the VBench Leaderboard using the Submit here! form. The evaluation results will be automatically updated to the leaderboard. Also, share your model information for our records for any columns here.

:film_projector: Model Info

See model info for video generation models we used for evaluation.

<!-- The values have been normalized for better readability of the chart. The normalization process involves scaling each set of performance values to a common scale between 0.3 and 0.8. The formula used for normalization is: (value - min value) / (max value - min value). -->

<a name="installation"></a>

:hammer: Installation

Install with pip

pip install vbench

To evaluate some video generation ability aspects, you need to install detectron2 via:

pip install detectron2@git+https://github.com/facebookresearch/detectron2.git

If there is an error during detectron2 installation, see here.

Download VBench_full_info.json to your running directory to read the benchmark prompt suites.

Install with git clone

git clone https://github.com/Vchitect/VBench.git
pip install -r VBench/requirements.txt
pip install VBench

If there is an error during detectron2 installation, see here.

<a name="usage"></a>

Usage

Use VBench to evaluate videos, and video generative models.

[New] Evaluate Your Own Videos

We support evaluating any video. Simply provide the path to the video file, or the path to the folder that contains your videos. There is no requirement on the videos' names.

To evaluate videos with customized input prompt, run our script with --mode=custom_input:

python evaluate.py \
    --dimension $DIMENSION \
    --videos_path /path/to/folder_or_video/ \
    --mode=custom_input

alternatively you can use our command:

vbench evaluate \
    --dimension $DIMENSION \
    --videos_path /path/to/folder_or_video/ \
    --mode=custom_input

To evaluate using multiple gpus, we can use the following commands:

torchrun --nproc_per_node=${GPUS} --standalone evaluate.py ...args...

or

vbench evaluate --ngpus=${GPUS} ...args...

Evaluation on the Standard Prompt Suite of VBench

Command Line
vbench evaluate --videos_path $VIDEO_PATH --dimension $DIMENSION

For example:

vbench evaluate --videos_path "sampled_videos/lavie/human_action" --dimension "human_action"
Python
from vbench import VBench
my_VBench = VBench(device, <path/to/VBench_full_info.json>, <path/to/save/dir>)
my_VBench.evaluate(
    videos_path = <video_path>,
    name = <name>,
    dimension_list = [<dimension>, <dimension>, ...],
)

For example:

from vbench import VBench
my_VBench = VBench(device, "vbench/VBench_full_info.json", "evaluation_results")
my_VBench.evaluate(
    videos_path = "sampled_videos/lavie/human_action",
    name = "lavie_human_action",
    dimension_list = ["human_action"],
)

Evaluation of Different Content Categories

command line
vbench evaluate \
    --videos_path $VIDEO_PATH \
    --dimension $DIMENSION \
    --mode=vbench_category \
    --category=$CATEGORY

or

python evaluate.py \
    --dimension $DIMENSION \
    --videos_path /path/to/folder_or_video/ \
    --mode=vbench_category

Example of Evaluating VideoCrafter-1.0

We have provided scripts to download VideoCrafter-1.0 samples, and the corresponding evaluation scripts.

# download sampled videos
sh scripts/download_videocrafter1.sh

# evaluate VideoCrafter-1.0
sh scripts/evaluate_videocrafter1.sh

Get Final Score and Submit to Leaderboard

We have provided scripts for calculating the Final Score, Quality Score, and Semantic Score in the Leaderboard. You can run them locally to obtain the final scores or as a final check before submitting to the Leaderboard.

command line
# Pack the evaluation results into a zip file.
cd evaluation_results
zip -r ../evaluation_results.zip .

# [Optional] get the final score of your submission file.
python scripts/cal_final_score.py --zip_file {path_to_evaluation_results.zip} --model_name {your_model_name}

You can submit the json file to HuggingFace

<a name="pretrained_models"></a>

:gem: Pre-Trained Models

[Optional] Please download the pre-trained weights according to the guidance in the model_path.txt file for each model in the pretrained folder to ~/.cache/vbench.

<a name="prompt_suite"></a>

:bookmark_tabs: Prompt Suite

We provide prompt lists are at prompts/.

Check out details of prompt suites, and instructions for how to sample videos for evaluation.

<a name="sampled_videos"></a>

:bookmark_tabs: Sampled Videos

Dataset Download

To facilitate future research and to ensure full transparency, we release all the videos we sampled and used for VBench evaluation. You can download them on Google Drive.

See detailed explanations of the sampled videos here.

We also provide detailed setting for the models under evaluation here.

<a name="evaluation_method_suite"></a>

:surfer: Evaluation Method Suite

To perform evaluation on one dimension, run this:

python evaluate.py --videos_path $VIDEOS_PATH --dimension $DIMENSION

Alternatively, you can evaluate multiple models and multiple dimensions using this script:

bash evaluate.sh

Before evaluating the temporal flickering dimension, it is necessary to filter out the static videos first.

To filter static videos in the temporal flickering dimension, run this:

# This only filter out static videos whose prompt matches the prompt in the temporal_flickering.
python static_filter.py --videos_path $VIDEOS_PATH

You can adjust the filtering scope by:

# 1. Change the filtering scope to consider all files inside videos_path for filtering.
python static_filter.py --videos_path $VIDEOS_PATH --filter_scope all

# 2. Specify the path to a JSON file ($filename) to consider only videos whose prompts match those listed in $filename.
python static_filter.py --videos_path $VIDEOS_PATH --filter_scope $filename

<a name="citation_and_acknowledgement"></a>

:black_nib: Citation

If you find our repo useful for your research, please consider citing our paper:

 @InProceedings{huang2023vbench,
     title={{VBench}: Comprehensive Benchmark Suite for Video Generative Models},
     author={Huang, Ziqi and He, Yinan and Yu, Jiashuo and Zhang, Fan and Si, Chenyang and Jiang, Yuming and Zhang, Yuanhan and Wu, Tianxing and Jin, Qingyang and Chanpaisit, Nattapol and Wang, Yaohui and Chen, Xinyuan and Wang, Limin and Lin, Dahua and Qiao, Yu and Liu, Ziwei},
     booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
     year={2024}
 }

:hearts: Acknowledgement

:muscle: VBench Contributors

Order is based on the time joining the project:

Ziqi Huang, Yinan He, Jiashuo Yu, Fan Zhang, Nattapol Chanpaisit, Xiaojie Xu, Qianli Ma, Ziyue Dong.

:hugs: Open-Sourced Repositories

This project wouldn't be possible without the following open-sourced repositories: AMT, UMT, RAM, CLIP, RAFT, GRiT, IQA-PyTorch, ViCLIP, and LAION Aesthetic Predictor.

Related Links

We are putting together Awesome-Evaluation-of-Visual-Generation, which collects works for evaluating visual generation.