diff --git a/.gitattributes b/.gitattributes index bed0738c7eeb449bca98b5d2f33c89a1ee56349a..1954c7d17cd7f44beee6ecc68974ad96239a77a4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -58,3 +58,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text # Video files - compressed *.mp4 filter=lfs diff=lfs merge=lfs -text *.webm filter=lfs diff=lfs merge=lfs -text +VideoX-Fun/VBench/VBench-2.0/vbench2/third_party/ViTDetector/data/lvis/annotations/lvis_v1_minival_inserted_image_name.json filter=lfs diff=lfs merge=lfs -text +VideoX-Fun/VBench/VBench-2.0/vbench2/third_party/ViTDetector/lvis/lvis_v1_minival_inserted_image_name.json filter=lfs diff=lfs merge=lfs -text +VideoX-Fun/VBench/VBench-2.0/vbench2/third_party/ViTDetector/third_party/YOLO-World/data/coco/lvis/lvis_v1_minival_inserted_image_name.json filter=lfs diff=lfs merge=lfs -text +VideoX-Fun/VBench/VBench-2.0/vbench2/third_party/YOLO-World/data/coco/lvis/lvis_v1_minival_inserted_image_name.json filter=lfs diff=lfs merge=lfs -text diff --git a/VideoX-Fun/VBench/.gitignore b/VideoX-Fun/VBench/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..c23e9fb8ebc4d0788d0aadbd108ff4f4df674f1b --- /dev/null +++ b/VideoX-Fun/VBench/.gitignore @@ -0,0 +1,199 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class +*.DS_Store + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# pytorch checkpoints +*.pt +*.pth +*.ckpt +*.pkl + +# sampled videos +*.mp4 +*.avi +*.gif + +# development logs +private_dev/* +evaluation_results/*.json +vbench/third_party/ViCLIP/bpe_simple_vocab_16e6.txt.gz +trash* +prepublish-ci/* + +# image suite +vbench2_beta_i2v/data +VBench-2.0/src +VBench-2.0/evaluation_results +VBench-2.0/evaluation_results_ToMoviee +VBench-2.0/evaluation_results_Veo3 +VBench-2.0/evaluate_multi_temp.sh +VBench-2.0/evaluate_multi_model.sh +VBench-2.0/evaluate_v.sh +VBench-2.0/evaluate_cus.sh +VBench-2.0/evaluate_multi.sh +VBench-2.0/result_all.py +VBench-2.0/log_rank0.txt +VBench-2.0/model_clip +VBench-2.0/prompts/prompt_ch_revise +VBench-2.0/vbench2/third_party/ViTDetector/outputs +VBench-2.0/vbench2/third_party/ViTDetector/VBench-2.0_human_anomaly +VBench-2.0/vbench2/third_party/ViTDetector/checkpoint +VBench-2.0/vbench2/third_party/ViTDetector/train.sh +VBench-2.0/vbench2/third_party/ViTDetector/test_results.json +VBench-2.0/vbench2/third_party/ViTDetector/log_rank0.txt +VBench-2.0/scripts/temp.py + + +# documentations +README-pypi.md \ No newline at end of file diff --git a/VideoX-Fun/VBench/LICENSE b/VideoX-Fun/VBench/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..f49a4e16e68b128803cc2dcea614603632b04eac --- /dev/null +++ b/VideoX-Fun/VBench/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/VideoX-Fun/VBench/MANIFEST.in b/VideoX-Fun/VBench/MANIFEST.in new file mode 100644 index 0000000000000000000000000000000000000000..86940ec2b3b77e9eeaf6f1e2d2d7110efcf450cf --- /dev/null +++ b/VideoX-Fun/VBench/MANIFEST.in @@ -0,0 +1,5 @@ +include version.txt +include requirements.txt +recursive-include vbench/third_party *.yaml +recursive-include vbench *.json +recursive-include vbench *.txt diff --git a/VideoX-Fun/VBench/README-FAQ.md b/VideoX-Fun/VBench/README-FAQ.md new file mode 100644 index 0000000000000000000000000000000000000000..2661433e2a06c307d2f8eb2f28cb146d7384054f --- /dev/null +++ b/VideoX-Fun/VBench/README-FAQ.md @@ -0,0 +1,35 @@ +# FAQ + +**Q: How can I join VBench Leaderboard?**
+A: There are 3 options to join the leaderboard:
+Option | Sampling Party | Evaluation Party | Comments | +| :---: | :---: | :---: | :-------------- | +| 1️⃣ | VBench Team | VBench Team | VBench Team handles everything — ideal for both open-source and closed-source models (if API access is provided). We 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. | +| 2️⃣ | Your Team | VBench Team | Submit your video samples via this [Google Form](https://forms.gle/Dy26sRobB6vouQZC7). If you prefer to evaluate on your own, refer to Option 3. | +| 3️⃣ | Your Team | Your Team | Already performed the full VBench evaluation? Submit your `eval_results.zip` files to the [VBench Leaderboard](https://huggingface.co/spaces/Vchitect/VBench_Leaderboard)'s `[T2V]Submit here!` form. The evaluation results will be automatically updated to the leaderboard. Make sure to also fill in model details in the `[T2V]Submit here!` form. Submissions lacking essential information may be removed periodically. | + +🔍 Transparency Note: Each leaderboard entry clearly states who performed the sampling and evaluation. + + + +**Q: For option 2️⃣ and 3️⃣ - What if my model has been updated and now performs better? Can I make a new submission to the VBench Leaderboard?**
+A: Yes, you can submit an updated version of your model. Please clearly specify what changes have been made and how this version differs from your previous submission. Updates will only be evaluated if the modifications are explicitly described. + +**Q: For option 2️⃣ - After sharing a cloud storage link to our sampled videos, how long will it take to receive the evaluation results?**
+A: Once we receive both your cloud storage link and the corresponding model information, evaluation typically takes 1–2 weeks, depending on the current queue. + +**Q: For option 1️⃣ and 2️⃣ - Is the evaluation fully automated?**
+A: Yes. The evaluation strictly follows the open-source procedure available in our official code repository. It is fully reproducible, with no manual intervention or subjective judgment involved. + +**Q: For option 2️⃣ - If the evaluation results are unsatisfactory, can we resubmit new videos for the same model?**
+A: Evaluation results are final and tied to the specific model version submitted. However, you may submit a newer checkpoint or updated version of the model for a fresh evaluation. In such cases, please include a brief explanation of the updates. Previous results will remain on the leaderboard and will not be removed. + +**Q: For option 2️⃣ - how should I organize the sampled videos for submission?**
+A: You can place all sampled videos in a single folder. The filenames should follow the format shown in [this example list](https://github.com/Vchitect/VBench/blob/master/sampled_videos/sampled_videos.txt). + + +**Q: What’s the difference between VBench and VBench-Long?**
+A: Use [**VBench**](https://github.com/Vchitect/VBench?tab=readme-ov-file#usage) for evaluating videos shorter than 5.0 seconds (< 5.0s). +Use [**VBench-Long**](https://github.com/Vchitect/VBench/tree/master/vbench2_beta_long) for evaluating videos 5.0 seconds or longer (≥ 5.0s). +Each benchmark is optimized for its respective video length to ensure fair and consistent evaluation. + diff --git a/VideoX-Fun/VBench/README-pypi.md b/VideoX-Fun/VBench/README-pypi.md new file mode 100644 index 0000000000000000000000000000000000000000..e306bda5233017e9caf325159759099325fb8198 --- /dev/null +++ b/VideoX-Fun/VBench/README-pypi.md @@ -0,0 +1,115 @@ +![vbench_logo](https://raw.githubusercontent.com/Vchitect/VBench/master/asset/vbench_logo_short.jpg) + +**VBench** is a comprehensive benchmark suite for video generative models. You can use **VBench** to evaluate video generation models from 16 different ability aspects. + +This project is the PyPI implementation of the following research: +> **VBench: Comprehensive Benchmark Suite for Video Generative Models**
+> [Ziqi Huang](https://ziqihuangg.github.io/)∗, [Yinan He](https://github.com/yinanhe)∗, [Jiashuo Yu](https://scholar.google.com/citations?user=iH0Aq0YAAAAJ&hl=zh-CN)∗, [Fan Zhang](https://github.com/zhangfan-p)∗, [Chenyang Si](https://chenyangsi.top/), [Yuming Jiang](https://yumingj.github.io/), [Yuanhan Zhang](https://zhangyuanhan-ai.github.io/), [Tianxing Wu](https://tianxingwu.github.io/), [Qingyang Jin](https://github.com/Vchitect/VBench), [Nattapol Chanpaisit](https://nattapolchan.github.io/me), [Yaohui Wang](https://wyhsirius.github.io/), [Xinyuan Chen](https://scholar.google.com/citations?user=3fWSC8YAAAAJ), [Limin Wang](https://wanglimin.github.io), [Dahua Lin](http://dahua.site/)+, [Yu Qiao](http://mmlab.siat.ac.cn/yuqiao/index.html)+, [Ziwei Liu](https://liuziwei7.github.io/)+
+ +[![Paper](https://img.shields.io/badge/cs.CV-Paper-b31b1b?logo=arxiv&logoColor=red)](https://arxiv.org/abs/2311.17982) +[![Project Page](https://img.shields.io/badge/VBench-Website-green?logo=googlechrome&logoColor=green)](https://vchitect.github.io/VBench-project/) +[![HuggingFace](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Leaderboard-blue)](https://huggingface.co/spaces/Vchitect/VBench_Leaderboard) +[![Video](https://img.shields.io/badge/YouTube-Video-c4302b?logo=youtube&logoColor=red)](https://www.youtube.com/watch?v=7IhCC8Qqn8Y) +[![Visitor](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FVchitect%2FVBench&count_bg=%23FFA500&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=visitors&edge_flat=false)](https://hits.seeyoufarm.com) + +## Installation +``` +pip install vbench +``` + +To evaluate some video generation ability aspects, you need to install [detectron2](https://github.com/facebookresearch/detectron2) via: + ``` + pip install detectron2@git+https://github.com/facebookresearch/detectron2.git + ``` + +If there is an error during [detectron2](https://github.com/facebookresearch/detectron2) installation, see [here](https://detectron2.readthedocs.io/en/latest/tutorials/install.html). + +## Usage + +### 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. +- Note: We support customized videos / prompts for the following dimensions: `'subject_consistency', 'background_consistency', 'motion_smoothness', 'dynamic_degree', 'aesthetic_quality', 'imaging_quality'` + + +To evaluate videos with customed 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 +``` + +### Evaluation on the Standard Prompt Suite of VBench + +##### command line +```bash + vbench evaluate --videos_path $VIDEO_PATH --dimension $DIMENSION +``` +For example: +```bash + vbench evaluate --videos_path "sampled_videos/lavie/human_action" --dimension "human_action" +``` +##### python +```python + from vbench import VBench + my_VBench = VBench(device, , ) + my_VBench.evaluate( + videos_path = , + name = , + dimension_list = [, , ...], + ) +``` +For example: +```python + 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 on a specific category from VBench + +##### command line +```bash +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 +``` + +## Prompt Suite + +We provide prompt lists are at `prompts/`. + +Check out [details of prompt suites](https://github.com/Vchitect/VBench/tree/master/prompts), and instructions for [**how to sample videos for evaluation**](https://github.com/Vchitect/VBench/tree/master/prompts). + +## Citation + + If you find this package useful for your reports or publications, please consider citing the VBench paper: + + ```bibtex + @article{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}, + journal={arXiv preprint arXiv:2311.17982}, + year={2023} + } + ``` diff --git a/VideoX-Fun/VBench/README.md b/VideoX-Fun/VBench/README.md new file mode 100644 index 0000000000000000000000000000000000000000..738f1ff9908b3351ba8aefd2edc3384929b0de8a --- /dev/null +++ b/VideoX-Fun/VBench/README.md @@ -0,0 +1,475 @@ +![vbench_logo](https://raw.githubusercontent.com/Vchitect/VBench/master/asset/vbench_logo_github_20240605.jpg) + + + +[![HuggingFace](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Leaderboard-blue)](https://huggingface.co/spaces/Vchitect/VBench_Leaderboard) +[![VBench Arena (View Generated Videos Here!)](https://img.shields.io/badge/%F0%9F%A4%97%20VBench%20Arena-blue)](https://huggingface.co/spaces/Vchitect/VBench_Video_Arena) +[![VBench-2.0 Arena (View Generated Videos Here!)](https://img.shields.io/badge/%F0%9F%A4%97%20VBench2.0%20Arena-blue)](https://huggingface.co/spaces/Vchitect/VBench2.0_Video_Arena) +[![Project Page](https://img.shields.io/badge/VBench-Website-green?logo=googlechrome&logoColor=green)](https://vchitect.github.io/VBench-project/) +[![Project Page](https://img.shields.io/badge/VBench%202.0-Website-green?logo=googlechrome&logoColor=green)](https://vchitect.github.io/VBench-2.0-project/) +[![Dataset Download](https://img.shields.io/badge/Dataset-Download-red?logo=googlechrome&logoColor=red)](https://drive.google.com/drive/folders/1on66fnZ8atRoLDimcAXMxSwRxqN8_0yS?usp=sharing) +[![PyPI](https://img.shields.io/pypi/v/vbench)](https://pypi.org/project/vbench/) +[![Video](https://img.shields.io/badge/VBench-Video-c4302b?logo=youtube&logoColor=red)](https://www.youtube.com/watch?v=7IhCC8Qqn8Y) +[![Video](https://img.shields.io/badge/VBench%202.0-Video-c4302b?logo=youtube&logoColor=red)](https://www.youtube.com/watch?v=kJrzKy9tgAc) +![Visitors](https://hitscounter.dev/api/hit?url=https%3A%2F%2Fgithub.com%2FVchitect%2FVBench&label=Visitors&icon=people&color=%23FFA500) + + +This repository provides unified implementations for the **VBench series** of works, supporting comprehensive evaluation of video generative models across a wide spectrum of capabilities and settings. + +If your questions are not addressed in this README, please contact Ziqi Huang at ZIQI002 [at] e [dot] ntu [dot] edu [dot] sg. + +## Table of Contents +- [Overview](#overview) - *See this section for component locations and the differences between VBench, VBench++, and VBench-2.0.* +- [Updates](#updates) +- [Evaluation Results](#evaluation_results) +- [Video Generation Models Info](https://github.com/Vchitect/VBench/tree/master/sampled_videos#what-are-the-details-of-the-video-generation-models) +- [Installation](#installation) +- [Usage](#usage) +- [Prompt Suite](#prompt_suite) +- [Sampled Videos](#sampled_videos) +- [Evaluation Method Suite](#evaluation_method_suite) +- [Citation and Acknowledgement](#citation_and_acknowledgement) + + + +## :mega: Overview + +This repository provides unified implementations for the **VBench series** of works, supporting comprehensive evaluation of video generative models across a wide spectrum of capabilities and settings. + +### (1) VBench + +***TL;DR: Evaluating Video Generation — Benchmark • Evaluation Dimensions • Evaluation Methods • Human Alignment • Insights*** + +> [![VBench Paper (CVPR 2024)](https://img.shields.io/badge/VBench-CVPR%202024-b31b1b?logo=arxiv&logoColor=red)](https://arxiv.org/abs/2311.17982) **VBench: Comprehensive Benchmark Suite for Video Generative Models**
+> [Ziqi Huang](https://ziqihuangg.github.io/)∗, [Yinan He](https://github.com/yinanhe)∗, [Jiashuo Yu](https://scholar.google.com/citations?user=iH0Aq0YAAAAJ&hl=zh-CN)∗, [Fan Zhang](https://github.com/zhangfan-p)∗, [Chenyang Si](https://chenyangsi.top/), [Yuming Jiang](https://yumingj.github.io/), [Yuanhan Zhang](https://zhangyuanhan-ai.github.io/), [Tianxing Wu](https://tianxingwu.github.io/), [Qingyang Jin](https://github.com/Vchitect/VBench), [Nattapol Chanpaisit](https://nattapolchan.github.io/me), [Yaohui Wang](https://wyhsirius.github.io/), [Xinyuan Chen](https://scholar.google.com/citations?user=3fWSC8YAAAAJ), [Limin Wang](https://wanglimin.github.io), [Dahua Lin](http://dahua.site/)+, [Yu Qiao](http://mmlab.siat.ac.cn/yuqiao/index.html)+, [Ziwei Liu](https://liuziwei7.github.io/)+
+> IEEE/CVF Conference on Computer Vision and Pattern Recognition (**CVPR**), 2024 + +![overall_structure](./asset/fig_paper_teaser_vbench.jpg) + + +We propose **VBench**, a comprehensive benchmark suite for video generative models. We design a comprehensive and hierarchical Evaluation Dimension Suite 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 Prompt Suite as test cases, and sample Generated Videos from a set of video generation models. For each evaluation dimension, we specifically design an Evaluation Method Suite, which uses carefully crafted method or designated pipeline for automatic objective evaluation. We also conduct Human Preference Annotation for the generated videos for each dimension, and show that VBench evaluation results are well aligned with human perceptions. VBench can provide valuable insights from multiple perspectives. + + +**Note**: The code and README for the VBench components are located [here](https://github.com/Vchitect/VBench/tree/master), relative path: `.`. + +```bibtex +@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} +} +``` + +### (2) VBench++ + +***TL;DR: Extends VBench with (1) VBench-I2V for image-to-video, (2) VBench-Long for long videos, and (3) VBench-Trustworthiness covering fairness, bias, and safety.*** + +> [![VBench++ (TPAMI 2025)](https://img.shields.io/badge/VBench++-TPAMI%202025-b31b1b?logo=arxiv&logoColor=red)](https://arxiv.org/abs/2411.13503) **VBench++: Comprehensive and Versatile Benchmark Suite for Video Generative Models**
+> [Ziqi Huang](https://ziqihuangg.github.io/)∗, [Fan Zhang](https://github.com/zhangfan-p)∗, [Xiaojie Xu](https://github.com/xjxu21), [Yinan He](https://github.com/yinanhe), [Jiashuo Yu](https://scholar.google.com/citations?user=iH0Aq0YAAAAJ&hl=zh-CN), [Ziyue Dong](https://github.com/DZY-irene), [Qianli Ma](https://github.com/MqLeet), [Nattapol Chanpaisit](https://nattapolchan.github.io/me), [Chenyang Si](https://chenyangsi.top/), [Yuming Jiang](https://yumingj.github.io/), [Yaohui Wang](https://wyhsirius.github.io/), [Xinyuan Chen](https://scholar.google.com/citations?user=3fWSC8YAAAAJ), [Ying-Cong Chen](https://www.yingcong.me/), [Limin Wang](https://wanglimin.github.io), [Dahua Lin](http://dahua.site/)+, [Yu Qiao](http://mmlab.siat.ac.cn/yuqiao/index.html)+, [Ziwei Liu](https://liuziwei7.github.io/)+
+> IEEE Transactions on Pattern Analysis and Machine Intelligence (**TPAMI**), 2025 + +![overall_structure](./asset/fig_extention_teaser.jpg) + + +VBench++ supports a wide range of video generation tasks, including text-to-video and image-to-video, with an adaptive Image Suite for fair evaluation across different settings. It evaluates not only technical quality but also the trustworthiness of generative models, offering a comprehensive view of model performance. We continually incorporate more video generative models into VBench to inform the community about the evolving landscape of video generation. + + +**Note**: The code and README for the VBench++ components are located at: +- (1) VBench-I2V (image-to-video): [link](https://github.com/Vchitect/VBench/tree/master/vbench2_beta_i2v), relative path: `vbench2_beta_i2v` +- (2) VBench-Long (long video evaluation): [link](https://github.com/Vchitect/VBench/tree/master/vbench2_beta_long), relative path: `vbench2_beta_long` +- (3) VBench-Trustworthiness (fairness, bias, and safety): [link](https://github.com/Vchitect/VBench/tree/master/vbench2_beta_trustworthiness), relative path: `vbench2_beta_trustworthiness` + +*These modules belong to VBench++, not VBench, or VBench-2.0. However, to maintain backward compatibility for users who have already installed the repository, we preserve the original relative path names and provide this clarification here. +* + +```bibtex +@article{huang2025vbench++, + title={{VBench++}: Comprehensive and Versatile Benchmark Suite for Video Generative Models}, + author={Huang, Ziqi and Zhang, Fan and Xu, Xiaojie and He, Yinan and Yu, Jiashuo and Dong, Ziyue and Ma, Qianli and Chanpaisit, Nattapol and Si, Chenyang and Jiang, Yuming and Wang, Yaohui and Chen, Xinyuan and Chen, Ying-Cong and Wang, Limin and Lin, Dahua and Qiao, Yu and Liu, Ziwei}, + journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, + year={2025}, + doi={10.1109/TPAMI.2025.3633890} +} +``` + +### (3) VBench-2.0 + +***TL;DR: Extends VBench to evaluate intrinsic faithfulness — a key challenge for next-generation video generation models.*** + +> [![VBench-2.0 Report (arXiv)](https://img.shields.io/badge/VBench-2.0%20Report-b31b1b?logo=arxiv&logoColor=red)](https://arxiv.org/abs/2503.21755) **VBench-2.0: Advancing Video Generation Benchmark Suite for Intrinsic Faithfulness**
+> [Dian Zheng](https://zhengdian1.github.io/)∗, [Ziqi Huang](https://ziqihuangg.github.io/)∗, [Hongbo Liu](https://github.com/Alexios-hub), [Kai Zou](https://github.com/Jacky-hate), [Yinan He](https://github.com/yinanhe), [Fan Zhang](https://github.com/zhangfan-p), [Yuanhan Zhang](https://zhangyuanhan-ai.github.io/), [Jingwen He](https://scholar.google.com/citations?user=GUxrycUAAAAJ&hl=zh-CN), [Wei-Shi Zheng](https://www.isee-ai.cn/~zhwshi/)+, [Yu Qiao](http://mmlab.siat.ac.cn/yuqiao/index.html)+, [Ziwei Liu](https://liuziwei7.github.io/)+
+ +![overall_structure](./VBench-2.0/asset/fig_paper_teaser.jpg) +Overview of VBench-2.0. (a) Scope of VBench-2.0. Video generative models have progressed from achieving superficial faithfulness in fundamental technical aspects such as pixel fidelity and basic prompt adherence, to addressing more complex challenges associated with intrinsic faithfulness, including commonsense reasoning, physics-based realism, human motion, and creative composition. While VBench primarily assessed early-stage technical quality, VBench-2.0 expands the benchmarking framework to evaluate these advanced capabilities, ensuring a more comprehensive assessment of next-generation models. (b) Evaluation Dimension of VBench-2.0. VBench-2.0 introduces a structured evaluation suite comprising five broad categories and 18 fine-grained capability dimensions. + +**Note**: The code and README for the VBench-2.0 components are located at [link](https://github.com/Vchitect/VBench/tree/master/VBench-2.0), relative path: `VBench-2.0`. + +```bibtex +@article{zheng2025vbench2, + title={{VBench-2.0}: Advancing Video Generation Benchmark Suite for Intrinsic Faithfulness}, + author={Zheng, Dian and Huang, Ziqi and Liu, Hongbo and Zou, Kai and He, Yinan and Zhang, Fan and Zhang, Yuanhan and He, Jingwen and Zheng, Wei-Shi and Qiao, Yu and Liu, Ziwei}, + journal={arXiv preprint arXiv:2503.21755}, + year={2025} +} +``` + + + + +## :fire: Updates +- [03/2026] **VBench-I2V Arena** released: [![VBench-I2V Arena (View Generated Videos Here!)](https://img.shields.io/badge/%F0%9F%A4%97%20VBench--I2V%20Arena-blue)](https://huggingface.co/spaces/Vchitect/VBenchI2V_Video_Arena) View the generated videos here, and vote for your preferred video. You can explore videos generated by your chosen models following your chosen text prompts. +- [11/2025] **VBench++** accepted to TPAMI: [![VBench++ (TPAMI 2025)](https://img.shields.io/badge/VBench++-TPAMI%202025-b31b1b?logo=arxiv&logoColor=red)](https://arxiv.org/abs/2411.13503) +- [05/2025] We support **evaluating customized videos** for VBench-2.0! See [here](https://github.com/Vchitect/VBench/tree/master/VBench-2.0#new-evaluating-single-dimension-of-your-own-videos) for instructions. +- [04/2025] **[Human Anomaly Detection for AIGC Videos](https://github.com/Vchitect/VBench/tree/master/VBench-2.0/vbench2/third_party/ViTDetector):** We release the pipeline for evaluating human anatomical quality in AIGC videos, including a manually human anomaly dataset on real and AIGC videos, and the training pipeline for anomaly detection. +- [03/2025] :fire: **Major Update! We released [VBench-2.0](https://github.com/Vchitect/VBench/tree/master/VBench-2.0)!** :fire: Video generative models have progressed from achieving *superficial faithfulness* in fundamental technical aspects such as pixel fidelity and basic prompt adherence, to addressing more complex challenges associated with *intrinsic faithfulness*, including commonsense reasoning, physics-based realism, human motion, and creative composition. While VBench primarily assessed early-stage technical quality, VBench-2.0 expands the benchmarking framework to evaluate these advanced capabilities, ensuring a more comprehensive assessment of next-generation models. +- [01/2025] **PyPI Updates: v0.1.5** preprocessing bug fixes, torch>=2.0 support. +- [01/2025] **VBench Arena** released: [![Arena (View Generated Videos Here!)](https://img.shields.io/badge/%F0%9F%A4%97%20VBench%20Arena-blue)](https://huggingface.co/spaces/Vchitect/VBench_Video_Arena) View the generated videos here, and vote for your preferred video. This demo features over 180,000 generated videos, and you can explore videos generated by your chosen models (we already support 40 models) following your chosen text prompts. + +- [09/2024] **VBench-Long Leaderboard** available: Our VBench-Long leaderboard now has 10 long video generation models. VBench leaderboard now has 40 text-to-video (both long and short) models. All video generative models are encouraged to participate! [![HuggingFace](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Leaderboard-blue)](https://huggingface.co/spaces/Vchitect/VBench_Leaderboard) + +- [09/2024] **PyPI Updates: PyPI package is updated to version [0.1.4](https://github.com/Vchitect/VBench/releases/tag/v0.1.4):** bug fixes and multi-gpu inference. +- [08/2024] **Longer and More Descriptive Prompts**: [Available Here](https://github.com/Vchitect/VBench/tree/master/prompts/gpt_enhanced_prompts)! We follow [CogVideoX](https://github.com/THUDM/CogVideo?tab=readme-ov-file#prompt-optimization)'s prompt optimization technique to enhance VBench prompts using GPT-4o, making them longer and more descriptive without altering their original meaning. +- [08/2024] **VBench Leaderboard** update: Our leaderboard has 28 *T2V models*, 12 *I2V models* so far. All video generative models are encouraged to participate! [![HuggingFace](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Leaderboard-blue)](https://huggingface.co/spaces/Vchitect/VBench_Leaderboard) +- [06/2024] :fire: **[VBench-Long](https://github.com/Vchitect/VBench/tree/master/vbench2_beta_long)** :fire: is ready to use for evaluating longer Sora-like videos! +- [06/2024] **Model Info Documentation**: Information on video generative models in our [VBench Leaderboard](https://huggingface.co/spaces/Vchitect/VBench_Leaderboard) + is documented [HERE](https://github.com/Vchitect/VBench/tree/master/sampled_videos#what-are-the-details-of-the-video-generation-models). +- [05/2024] **PyPI Update**: PyPI package `vbench` is updated to version 0.1.2. This includes changes in the preprocessing for high-resolution images/videos for `imaging_quality`, support for evaluating customized videos, and minor bug fixes. +- [04/2024] We release all the videos we sampled and used for VBench evaluation. [![Dataset Download](https://img.shields.io/badge/Dataset-Download-red?logo=googlechrome&logoColor=red)](https://drive.google.com/drive/folders/13pH95aUN-hVgybUZJBx1e_08R6xhZs5X) See details [here](https://github.com/Vchitect/VBench/tree/master/sampled_videos). +- [03/2024] :fire: **[VBench-Trustworthiness](https://github.com/Vchitect/VBench/tree/master/vbench2_beta_trustworthiness)** :fire: We now support evaluating the **trustworthiness** (*e.g.*, culture, fairness, bias, safety) of video generative models. +- [03/2024] :fire: **[VBench-I2V](https://github.com/Vchitect/VBench/tree/master/vbench2_beta_i2v)** :fire: We now support evaluating **Image-to-Video (I2V)** models. We also provide [Image Suite](https://drive.google.com/drive/folders/1fdOZKQ7HWZtgutCKKA7CMzOhMFUGv4Zx?usp=sharing). +- [03/2024] We support **evaluating customized videos**! See [here](https://github.com/Vchitect/VBench/?tab=readme-ov-file#new-evaluate-your-own-videos) for instructions. +- [02/2024] **VBench** accepted to CVPR 2024 as Highlight: [![VBench Paper (CVPR 2024)](https://img.shields.io/badge/VBench-CVPR%202024-b31b1b?logo=arxiv&logoColor=red)](https://arxiv.org/abs/2311.17982) +- [01/2024] PyPI package is released! [![PyPI](https://img.shields.io/pypi/v/vbench)](https://pypi.org/project/vbench/). Simply `pip install vbench`. +- [12/2023] :fire: **[VBench](https://github.com/Vchitect/VBench?tab=readme-ov-file#usage)** :fire: Evaluation code released for 16 **Text-to-Video (T2V) evaluation** dimensions. + - `['subject_consistency', 'background_consistency', 'temporal_flickering', 'motion_smoothness', 'dynamic_degree', 'aesthetic_quality', 'imaging_quality', 'object_class', 'multiple_objects', 'human_action', 'color', 'spatial_relationship', 'scene', 'temporal_style', 'appearance_style', 'overall_consistency']` +- [11/2023] Prompt Suites released. (See prompt lists [here](https://github.com/Vchitect/VBench/tree/master/prompts)) + + + +## :mortar_board: Evaluation Results + +***See our leaderboard for the most updated ranking and numerical results (with models like Gen-3, Kling, Pika)***. [![HuggingFace](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Leaderboard-blue)](https://huggingface.co/spaces/Vchitect/VBench_Leaderboard) + +

+ +

+We visualize the evaluation results of the 12 most recent top-performing long video generation models across 16 VBench dimensions. + +

+ + +

+ +Additionally, we present radar charts separately for the evaluation results of open-source and closed-source models. The results are normalized per dimension for clearer comparisons. + +#### :trophy: Leaderboard + +See numeric values at our [Leaderboard](https://huggingface.co/spaces/Vchitect/VBench_Leaderboard) :1st_place_medal::2nd_place_medal::3rd_place_medal: + + + +#### :film_projector: Model Info +See [model info](https://github.com/Vchitect/VBench/tree/master/sampled_videos#what-are-the-details-of-the-video-generation-models) for video generation models we used for evaluation. + + + + +## :hammer: Installation +### Install with pip +``` +pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118 # or any other PyTorch version with CUDA<=12.1 +pip install vbench +``` + +To evaluate some video generation ability aspects, you need to install [detectron2](https://github.com/facebookresearch/detectron2) via: + ``` + pip install detectron2@git+https://github.com/facebookresearch/detectron2.git + ``` + +If there is an error during [detectron2](https://github.com/facebookresearch/detectron2) installation, see [here](https://detectron2.readthedocs.io/en/latest/tutorials/install.html). Detectron2 is working only with CUDA 12.1 or 11.X. + +Download [VBench_full_info.json](https://github.com/Vchitect/VBench/blob/master/vbench/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 torch torchvision --index-url https://download.pytorch.org/whl/cu118 # or other version with CUDA<=12.1 + pip install VBench + +If there is an error during [detectron2](https://github.com/facebookresearch/detectron2) installation, see [here](https://detectron2.readthedocs.io/en/latest/tutorials/install.html). + + +## Usage +Use VBench to evaluate videos, and video generative models. +- A Side Note: VBench is designed for evaluating different models on a standard benchmark. Therefore, by default, we enforce evaluation on the **standard VBench prompt lists** to ensure **fair comparisons** among different video generation models. That's also why we give warnings when a required video is not found. This is done via defining the set of prompts in [VBench_full_info.json](https://github.com/Vchitect/VBench/blob/master/vbench/VBench_full_info.json). However, we understand that many users would like to use VBench to evaluate their own videos, or videos generated from prompts that does not belong to the VBench Prompt Suite, so we also added the function of **Evaluating Your Own Videos**. Simply set `mode=custom_input`, and you can evaluate your own videos. + + +### **[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. +- Note: We support customized videos / prompts for the following dimensions: `'subject_consistency', 'background_consistency', 'motion_smoothness', 'dynamic_degree', 'aesthetic_quality', 'imaging_quality'` + + +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 +```bash +vbench evaluate --videos_path $VIDEO_PATH --dimension $DIMENSION +``` +For example: +```bash +vbench evaluate --videos_path "sampled_videos/lavie/human_action" --dimension "human_action" +``` +##### Python +```python +from vbench import VBench +my_VBench = VBench(device, , ) +my_VBench.evaluate( + videos_path = , + name = , + dimension_list = [, , ...], +) +``` +For example: +```python +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 +```bash +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 +``` +### Submit to Leaderboard +We have provided scripts for calculating the `Total Score`, `Quality Score`, and `Semantic Score` in the Leaderboard. You can run them locally to obtain the aggregate scores or as a final check before submitting to the Leaderboard. + +```bash +# Pack the evaluation results into a zip file. +cd evaluation_results +zip -r ../evaluation_results.zip . + +# [Optional] get the total 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](https://huggingface.co/spaces/Vchitect/VBench_Leaderboard) + +### How to Calculate Total Score + +To calculate the **Total Score**, we follow these steps: + +1. **Normalization**: + Each dimension's results are normalized using the following formula: + + ```bash + Normalized Score = (dim_score - min_val) / (max_val - min_val) + ``` + +2. **Quality Score**: + The `Quality Score` is a weighted average of the following dimensions: + **subject consistency**, **background consistency**, **temporal flickering**, **motion smoothness**, **aesthetic quality**, **imaging quality**, and **dynamic degree**. + +3. **Semantic Score**: + The `Semantic Score` is a weighted average of the following dimensions: + **object class**, **multiple objects**, **human action**, **color**, **spatial relationship**, **scene**, **appearance style**, **temporal style**, and **overall consistency**. + + +4. **Weighted Average Calculation**: + The **Total Score** is a weighted average of the `Quality Score` and `Semantic Score`: + ```bash + Total Score = w1 * Quality Score + w2 * Semantic Score + ``` + + +The minimum and maximum values used for normalization in each dimension, as well as the weighting coefficients for the average calculation, can be found in the `scripts/constant.py` file. + +### Total Score for VBench-I2V +For Total Score Calculation for VBench-I2V, you can refer to [link](https://github.com/Vchitect/VBench/tree/master/vbench2_beta_i2v#submit-to-leaderboard). + + +## :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`. + + +## :bookmark_tabs: Prompt Suite + +We provide prompt lists are at `prompts/`. + +Check out [details of prompt suites](https://github.com/Vchitect/VBench/tree/master/prompts), and instructions for [**how to sample videos for evaluation**](https://github.com/Vchitect/VBench/tree/master/prompts). + + +## :bookmark_tabs: Sampled Videos + +[![Dataset Download](https://img.shields.io/badge/Dataset-Download-red?logo=googlechrome&logoColor=red)](https://drive.google.com/drive/folders/13pH95aUN-hVgybUZJBx1e_08R6xhZs5X) + +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](https://drive.google.com/drive/folders/13pH95aUN-hVgybUZJBx1e_08R6xhZs5X). + +See detailed explanations of the sampled videos [here](https://github.com/Vchitect/VBench/tree/master/sampled_videos). + +We also provide detailed setting for the models under evaluation [here](https://github.com/Vchitect/VBench/tree/master/sampled_videos#what-are-the-details-of-the-video-generation-models). + + +## :surfer: Evaluation Method Suite + +To perform evaluation on one dimension, run this: +``` +python evaluate.py --videos_path $VIDEOS_PATH --dimension $DIMENSION +``` +- The complete list of dimensions: + ``` + ['subject_consistency', 'background_consistency', 'temporal_flickering', 'motion_smoothness', 'dynamic_degree', 'aesthetic_quality', 'imaging_quality', 'object_class', 'multiple_objects', 'human_action', 'color', 'spatial_relationship', 'scene', 'temporal_style', 'appearance_style', 'overall_consistency'] + ``` + +Alternatively, you can evaluate multiple models and multiple dimensions using this script: +``` +bash evaluate.sh +``` +- The default sampled video paths: + ``` + vbench_videos/{model}/{dimension}/{prompt}-{index}.mp4/gif + ``` + + + +#### 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 +``` + +## :hearts: Acknowledgement + +#### :muscle: VBench Contributors +Order is based on the time joining the project: +> [Ziqi Huang](https://ziqihuangg.github.io/), [Yinan He](https://github.com/yinanhe), [Jiashuo Yu](https://scholar.google.com/citations?user=iH0Aq0YAAAAJ&hl=zh-CN), [Fan Zhang](https://github.com/zhangfan-p), [Nattapol Chanpaisit](https://nattapolchan.github.io/me), [Xiaojie Xu](https://github.com/xjxu21), [Qianli Ma](https://github.com/MqLeet), [Ziyue Dong](https://github.com/DZY-irene), [Dian Zheng](https://zhengdian1.github.io/), [Hongbo Liu](https://github.com/Alexios-hub), [Kai Zou](https://github.com/Jacky-hate) + +#### :hugs: Open-Sourced Repositories +This project wouldn't be possible without the following open-sourced repositories: +[AMT](https://github.com/MCG-NKU/AMT/), [UMT](https://github.com/OpenGVLab/unmasked_teacher), [RAM](https://github.com/xinyu1205/recognize-anything), [CLIP](https://github.com/openai/CLIP), [RAFT](https://github.com/princeton-vl/RAFT), [GRiT](https://github.com/JialianW/GRiT), [IQA-PyTorch](https://github.com/chaofengc/IQA-PyTorch/), [ViCLIP](https://github.com/OpenGVLab/InternVideo/tree/main/Data/InternVid), and [LAION Aesthetic Predictor](https://github.com/LAION-AI/aesthetic-predictor). + +### Related Links + +We are putting together [Awesome-Evaluation-of-Visual-Generation](https://github.com/ziqihuangg/Awesome-Evaluation-of-Visual-Generation), which collects works for evaluating visual generation. + +Our related projects: [Evaluation Agent](https://vchitect.github.io/Evaluation-Agent-project/), [Uni-MMMU](https://vchitect.github.io/Uni-MMMU-Project/), and [WorldLens](https://worldbench.github.io/worldlens). + +```bibtex +@InProceedings{zhang2024evaluationagent, + title = {Evaluation Agent: Efficient and Promptable Evaluation Framework for Visual Generative Models}, + author = {Zhang, Fan and Tian, Shulin and Huang, Ziqi and Qiao, Yu and Liu, Ziwei}, + booktitle={Annual Meeting of the Association for Computational Linguistics (ACL), 2025}, + year = {2025} +} + +@article{zou2025unimmmumassivemultidisciplinemultimodal, + title={{Uni-MMMU}: A Massive Multi-discipline Multimodal Unified Benchmark}, + author = {Kai Zou and Ziqi Huang and Yuhao Dong and Shulin Tian and Dian Zheng and Hongbo Liu and Jingwen He and Bin Liu and Yu Qiao and Ziwei Liu}, + journal={arXiv preprint arXiv:2510.13759}, + year = {2025} +} + +@article{worldlens, + title = {{WorldLens}: Full-Spectrum Evaluations of Driving World Models in Real World}, + author = {Ao Liang and Lingdong Kong and Tianyi Yan and Hongsi Liu and Wesley Yang and Ziqi Huang and Wei Yin and Jialong Zuo and Yixuan Hu and Dekai Zhu and Dongyue Lu and Youquan Liu and Guangfeng Jiang and Linfeng Li and Xiangtai Li and Long Zhuo and Lai Xing Ng and Benoit R. Cottereau and Changxin Gao and Liang Pan and Wei Tsang Ooi and Ziwei Liu}, + journal = {arXiv preprint arXiv:2512.xxxxx} + year = {2025} +} +``` + +### Contact Details + +**How to Reach Us:** +- Code Issues: Please open an [issue](https://github.com/Vchitect/VBench/issues) in our GitHub repository for any problems or bugs. +- Evaluation Requests: To submit your sampled videos for evaluation, please complete this [Google Form](https://forms.gle/wHk1xe7ecvVNj7yAA). +- General Inquiries: **Check our [FAQ](https://github.com/Vchitect/VBench/blob/master/README-FAQ.md)** for common questions. For other questions, contact Ziqi Huang at ZIQI002 [at] e [dot] ntu [dot] edu [dot] sg. + + + + +## :black_nib: Citation + + If you find our repo useful for your research, please consider citing our paper: + + ```bibtex + @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} + } + + @article{huang2025vbench++, + title={{VBench++}: Comprehensive and Versatile Benchmark Suite for Video Generative Models}, + author={Huang, Ziqi and Zhang, Fan and Xu, Xiaojie and He, Yinan and Yu, Jiashuo and Dong, Ziyue and Ma, Qianli and Chanpaisit, Nattapol and Si, Chenyang and Jiang, Yuming and Wang, Yaohui and Chen, Xinyuan and Chen, Ying-Cong and Wang, Limin and Lin, Dahua and Qiao, Yu and Liu, Ziwei}, + journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, + year={2025}, + doi={10.1109/TPAMI.2025.3633890} + } + + @article{zheng2025vbench2, + title={{VBench-2.0}: Advancing Video Generation Benchmark Suite for Intrinsic Faithfulness}, + author={Zheng, Dian and Huang, Ziqi and Liu, Hongbo and Zou, Kai and He, Yinan and Zhang, Fan and Zhang, Yuanhan and He, Jingwen and Zheng, Wei-Shi and Qiao, Yu and Liu, Ziwei}, + journal={arXiv preprint arXiv:2503.21755}, + year={2025} + } + ``` diff --git a/VideoX-Fun/VBench/VBench-2.0/MANIFEST.in b/VideoX-Fun/VBench/VBench-2.0/MANIFEST.in new file mode 100644 index 0000000000000000000000000000000000000000..7fabc6e6fdb32e0234bf0baa5078e8b5e68adb49 --- /dev/null +++ b/VideoX-Fun/VBench/VBench-2.0/MANIFEST.in @@ -0,0 +1,5 @@ +include version.txt +include requirement.txt +recursive-include vbench2/third_party *.yaml +recursive-include vbench2 *.json +recursive-include vbench2 *.txt diff --git a/VideoX-Fun/VBench/VBench-2.0/README-FAQ.md b/VideoX-Fun/VBench/VBench-2.0/README-FAQ.md new file mode 100644 index 0000000000000000000000000000000000000000..27366f0d7d08e41bf206f60ae8d86f44b58f9782 --- /dev/null +++ b/VideoX-Fun/VBench/VBench-2.0/README-FAQ.md @@ -0,0 +1,42 @@ +# FAQ + +**Q: How should I sample the videos using VBench-2.0 prompt suite?**
+A: We offer two ways: sampling based on per-dimension prompt or directly sampling by the full text list. The detailed instruction in [How to sample](https://github.com/Vchitect/VBench/tree/master/VBench-2.0/prompts#evaluate-all-dimensions) + +**Q: If the name of the prompt exceeds the saving limit, what should I do?**
+A: In VBench-2.0, some prompt will exceed the saving limit, we will save the first 180 characters. The detailed instruction in [How to sample](https://github.com/Vchitect/VBench/tree/master/VBench-2.0/prompts#evaluate-all-dimensions) + +**Q: How to name the videos if using augmented prompts or chinese prompts (whatever by myself or VBench-2.0)?**
+A: Note that the naming must follow the instruction of [How to sample](https://github.com/Vchitect/VBench/tree/master/VBench-2.0/prompts#evaluate-all-dimensions). We also provide our video name list and you can check the correctness [sample_videos.txt](https://github.com/Vchitect/VBench/tree/master/VBench-2.0/sampled_videos/sampled_videos.txt) + +**Q: How can I join VBench-2.0 Leaderboard?**
+A: There are 3 options to join the leaderboard:
+Option | Sampling Party | Evaluation Party | Comments | +| :---: | :---: | :---: | :-------------- | +| 1️⃣ | VBench Team | VBench Team | VBench Team handles everything — ideal for both open-source and closed-source models (if API access is provided). We 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. | +| 2️⃣ | Your Team | VBench Team | Submit your video samples via this [Google Form](https://forms.gle/rjH6hmAHpZhRGdkv5). If you prefer to evaluate on your own, refer to Option 3. | +| 3️⃣ | Your Team | Your Team | Already performed the full VBench-2.0 evaluation? Submit your `eval_results.zip` files to the [VBench Leaderboard](https://huggingface.co/spaces/Vchitect/VBench_Leaderboard)'s `VBench-2.0 Submit here!` form. The evaluation results will be automatically updated to the leaderboard. Make sure to also fill in model details in the `VBench-2.0 Submit here!` form. Submissions lacking essential information may be removed periodically. | + +🔍 Transparency Note: Each leaderboard entry clearly states who performed the sampling and evaluation. + + + +**Q: For option 2️⃣ and 3️⃣ - What if my model has been updated and now performs better? Can I make a new submission to the VBench-2.0 Leaderboard?**
+A: Yes, you can submit an updated version of your model. Please clearly specify what changes have been made and how this version differs from your previous submission. Updates will only be evaluated if the modifications are explicitly described. + +**Q: For option 2️⃣ - After sharing a cloud storage link to our sampled videos, how long will it take to receive the evaluation results?**
+A: Once we receive both your cloud storage link and the corresponding model information, evaluation typically takes 1–2 weeks, depending on the current queue. + +**Q: For option 1️⃣ and 2️⃣ - Is the evaluation fully automated?**
+A: Yes. The evaluation strictly follows the open-source procedure available in our official code repository. It is fully reproducible, with no manual intervention or subjective judgment involved. + +**Q: For option 2️⃣ - If the evaluation results are unsatisfactory, can we resubmit new videos for the same model?**
+A: Evaluation results are final and tied to the specific model version submitted. However, you may submit a newer checkpoint or updated version of the model for a fresh evaluation. In such cases, please include a brief explanation of the updates. Previous results will remain on the leaderboard and will not be removed. + +**Q: For option 2️⃣ - how should I organize the sampled videos for submission?**
+A: You can place all sampled videos in a single folder. The filenames should follow the format shown in [this example list](https://github.com/Vchitect/VBench/blob/master/VBench-2.0/sampled_videos/sampled_videos.txt). + +**Q: There seem to be some unreasonable parts in the prompt?**
+A1: `A person is doing xxx, suddenly they start to do xxx.` The `they` here is a singular, gender-neutral pronoun, which aims to avoid specifying the gender. + +A2: `Aerial view, aerial view. Aerial view, aerial view. One blue balls and one red balls are on the wooden table and collide horizontally, bird's-eye view.` in `Instance Preservation`. The repetition of `aerial view` here is intentional to ensure that some models can successfully generate a top-down perspective. \ No newline at end of file diff --git a/VideoX-Fun/VBench/VBench-2.0/README-pypi.md b/VideoX-Fun/VBench/VBench-2.0/README-pypi.md new file mode 100644 index 0000000000000000000000000000000000000000..c27a23300dd36c082d1cae796b0dc078f1b6b581 --- /dev/null +++ b/VideoX-Fun/VBench/VBench-2.0/README-pypi.md @@ -0,0 +1,101 @@ +![vbench_logo](https://raw.githubusercontent.com/Vchitect/VBench/master/asset/vbench_logo_short.jpg) + +**VBench-2.0** is a comprehensive benchmark suite for video generative models. You can use **VBench-2.0** to evaluate video generation models from 18 different ability aspects. + +This project is the PyPI implementation of the following research: +> **VBench-2.0: Advancing Video Generation Benchmark Suite for Intrinsic Faithfulness**
+> [Dian Zheng](https://zhengdian1.github.io/)∗, [Ziqi Huang](https://ziqihuangg.github.io/)∗, [Hongbo Liu](https://github.com/Alexios-hub), [Kai Zou](https://github.com/Jacky-hate), [Yinan He](https://github.com/yinanhe), [Fan Zhang](https://github.com/zhangfan-p), [Yuanhan Zhang](https://zhangyuanhan-ai.github.io/), [Jingwen He](https://scholar.google.com/citations?user=GUxrycUAAAAJ&hl=zh-CN), [Wei-Shi Zheng](https://www.isee-ai.cn/~zhwshi/)+, [Yu Qiao](http://mmlab.siat.ac.cn/yuqiao/index.html)+, [Ziwei Liu](https://liuziwei7.github.io/)+
+ + + +[![Paper](https://img.shields.io/badge/VBench-2.0%20Report-b31b1b?logo=arxiv&logoColor=red)](https://arxiv.org/abs/2503.21755) +[![Project Page](https://img.shields.io/badge/Project-Page-green?logo=googlechrome&logoColor=green)](https://vchitect.github.io/VBench-2.0-project/) +[![Video](https://img.shields.io/badge/YouTube-Video-c4302b?logo=youtube&logoColor=red)](https://www.youtube.com/watch?v=kJrzKy9tgAc) +[![HuggingFace](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Leaderboard-blue)](https://huggingface.co/spaces/Vchitect/VBench_Leaderboard) +[![Visitor](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FVchitect%2FVBench&count_bg=%23FFA500&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=visitors&edge_flat=false)](https://hits.seeyoufarm.com) + +## Installation +``` +conda install psutil +pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu118 +python -m pip install ninja +python -m pip install git+https://github.com/Dao-AILab/flash-attention.git@v2.7.2.post1 +pip install vbench2 +pip install -e git+https://github.com/openai/CLIP.git@dcba3cb2e2827b402d2701e7e1c7d9fed8a20ef1#egg=clip +pip install -e git+https://github.com/LLaVA-VL/LLaVA-NeXT@79ef45a6d8b89b92d7a8525f077c3a3a9894a87d#egg=llava +pip install -e git+https://github.com/AILab-CVC/YOLO-World.git@4826695a84ce370dad7fe4cb555a6c7162f3751d#egg=yolo_world +pip install mmcv==2.2.0 -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.4/index.html --no-cache-dir +pip install retinaface_pytorch==0.0.8 --no-deps +``` + +## Usage + + + + + + + +### Evaluation on the Standard Prompt Suite of VBench-2.0 + +##### command line +```bash + vbench2 evaluate --videos_path $VIDEO_PATH --dimension $DIMENSION +``` +For example: +```bash + vbench2 evaluate --videos_path "sampled_videos/HunyuanVideo/Human_Interaction" --dimension "Human_Interaction" +``` +##### python +```python + from vbench2 import VBench2 + my_VBench = VBench2(device, , ) + my_VBench.evaluate( + videos_path = , + name = , + dimension_list = [, , ...], + ) +``` +For example: +```python + from vbench2 import VBench2 + my_VBench = VBench2(device, "vbench2/VBench2_full_info.json", "evaluation_results") + my_VBench.evaluate( + videos_path = "sampled_videos/HunyuanVideo/Human_Interaction", + name = "HunyuanVideo_Human_Interaction", + dimension_list = ["Human_Interaction"], + ) +``` + +## Prompt Suite + +We provide prompt lists are at `prompts/`. + +Check out [details of prompt suites](https://github.com/Vchitect/VBench/tree/master/VBench-2.0/prompts), and instructions for [**how to sample videos for evaluation**](https://github.com/Vchitect/VBench/tree/master/VBench-2.0/prompts). + +## Citation + + If you find this package useful for your reports or publications, please consider citing the VBench-2.0 paper: + + ```bibtex + @article{zheng2025vbench2, + title={{VBench-2.0}: Advancing Video Generation Benchmark Suite for Intrinsic Faithfulness}, + author={Zheng, Dian and Huang, Ziqi and Liu, Hongbo and Zou, Kai and He, Yinan and Zhang, Fan and Zhang, Yuanhan and He, Jingwen and Zheng, Wei-Shi and Qiao, Yu and Liu, Ziwei}, + journal={arXiv preprint arXiv:2503.21755}, + year={2025} + } + ``` diff --git a/VideoX-Fun/VBench/VBench-2.0/README.md b/VideoX-Fun/VBench/VBench-2.0/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4507aa6def2f2bcf620308972191c4aa13a1a4d8 --- /dev/null +++ b/VideoX-Fun/VBench/VBench-2.0/README.md @@ -0,0 +1,259 @@ +![vbench_logo](https://raw.githubusercontent.com/Vchitect/VBench/master/asset/vbench_logo_github_20240605.jpg) + +**How to Reach Us:** +- Code Issues: Please open an [issue](https://github.com/Vchitect/VBench/issues) in our GitHub repository for any problems or bugs. +- Evaluation Requests: To submit your sampled videos for evaluation, please complete this [Google Form](https://forms.gle/rjH6hmAHpZhRGdkv5). +- General Inquiries: **Check our [FAQ](https://github.com/Vchitect/VBench/blob/master/VBench-2.0/README-FAQ.md)** for common questions. For other questions, contact Dian Zheng at zhengd35 [at] mail2 [at] sysu [at] edu [at] cn or Ziqi Huang at ZIQI002 [at] e [dot] ntu [dot] edu [dot] sg. + +[![VBench-2.0 Report (arXiv)](https://img.shields.io/badge/VBench-2.0%20Report-b31b1b?logo=arxiv&logoColor=red)](https://arxiv.org/abs/2503.21755) +[![HuggingFace](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Leaderboard-blue)](https://huggingface.co/spaces/Vchitect/VBench_Leaderboard) +[![Project Page](https://img.shields.io/badge/Project-Page-green?logo=googlechrome&logoColor=green)](https://vchitect.github.io/VBench-2.0-project/) +[![Video](https://img.shields.io/badge/YouTube-Video-c4302b?logo=youtube&logoColor=red)](https://www.youtube.com/watch?v=kJrzKy9tgAc) +[![VBench-2.0 Arena (View Generated Videos Here!)](https://img.shields.io/badge/%F0%9F%A4%97%20VBench2.0%20Arena-blue)](https://huggingface.co/spaces/Vchitect/VBench2.0_Video_Arena) +[![Dataset Download](https://img.shields.io/badge/Dataset-Download-red?logo=googlechrome&logoColor=red)](https://drive.google.com/drive/folders/1on66fnZ8atRoLDimcAXMxSwRxqN8_0yS?usp=sharing) + +This repository contains the implementation of the following paper. + +> **VBench-2.0: Advancing Video Generation Benchmark Suite for Intrinsic Faithfulness**
+> [Dian Zheng](https://zhengdian1.github.io/)∗, [Ziqi Huang](https://ziqihuangg.github.io/)∗, [Hongbo Liu](https://github.com/Alexios-hub), [Kai Zou](https://github.com/Jacky-hate), [Yinan He](https://github.com/yinanhe), [Fan Zhang](https://github.com/zhangfan-p), [Yuanhan Zhang](https://zhangyuanhan-ai.github.io/), [Jingwen He](https://scholar.google.com/citations?user=GUxrycUAAAAJ&hl=zh-CN), [Wei-Shi Zheng](https://www.isee-ai.cn/~zhwshi/)+, [Yu Qiao](http://mmlab.siat.ac.cn/yuqiao/index.html)+, [Ziwei Liu](https://liuziwei7.github.io/)+
+ + +### Table of Contents +- [Updates](#updates) +- [Overview](#overview) +- [Evaluation Results](#evaluation_results) +- [Video Generation Models Info](https://github.com/Vchitect/VBench/tree/master/VBench-2.0/sampled_videos#what-are-the-details-of-the-video-generation-models) +- [Installation](#installation) +- [Pretrained Models](#pretrained_models) +- [Usage](#usage) +- [Prompt Suite](#prompt_suite) +- [Sampled Videos](#sampled_videos) +- [Citation and Acknowledgement](#citation_and_acknowledgement) + + +## :fire: Updates +- [05/2025] We support **evaluating customized videos**! See [here](https://github.com/Vchitect/VBench/tree/master/VBench-2.0#new-evaluating-single-dimension-of-your-own-videos) for instructions. +- [04/2025] **[Human Anomaly Detection for AIGC Videos](https://github.com/Vchitect/VBench/tree/master/VBench-2.0/vbench2/third_party/ViTDetector):** We release the pipeline for evaluating human anatomical quality in AIGC videos, including a manually human anomaly dataset on real and AIGC videos, and the training pipeline for anomaly detection. +- [03/2025] :fire: **Major Update! We released [VBench-2.0](https://github.com/Vchitect/VBench/tree/master/VBench-2.0)!** :fire: Video generative models have progressed from achieving *superficial faithfulness* in fundamental technical aspects such as pixel fidelity and basic prompt adherence, to addressing more complex challenges associated with *intrinsic faithfulness*, including commonsense reasoning, physics-based realism, human motion, and creative composition. While VBench primarily assessed early-stage technical quality, VBench-2.0 expands the benchmarking framework to evaluate these advanced capabilities, ensuring a more comprehensive assessment of next-generation models. + + +## :mega: Overview +![overall_structure](./asset/fig_paper_teaser.jpg) +Overview of VBench-2.0. (a) Scope of VBench-2.0. Video generative models have progressed from achieving superficial faithfulness in fundamental technical aspects such as pixel fidelity and basic prompt adherence, to addressing more complex challenges associated with intrinsic faithfulness, including commonsense reasoning, physics-based realism, human motion, and creative composition. While VBench primarily assessed early-stage technical quality, VBench-2.0 expands the benchmarking framework to evaluate these advanced capabilities, ensuring a more comprehensive assessment of next-generation models. (b) Evaluation Dimension of VBench-2.0. VBench-2.0 introduces a structured evaluation suite comprising five broad categories and 18 fine-grained capability dimensions. + + +## :mortar_board: Evaluation Results + +

+ +

+We visualize the evaluation results of the 6 recent top-performing video generative models across 18 VBench-2.0 dimensions. + + +## :hammer: Installation +### Install with pip +``` +conda create -n vbench2 python=3.10 -y +conda activate vbench2 +conda install psutil +pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu118 +#ensure your cuda version is 11.8, and ensure the gcc in a high version (we use 11.2) +python -m pip install ninja +python -m pip install git+https://github.com/Dao-AILab/flash-attention.git@v2.7.2.post1 +pip install -r requirement.txt +pip install retinaface_pytorch==0.0.8 --no-deps +#ensure you have set up the ffmpeg with the version 4.x +cd vbench2/third_party/Instance_detector +pip install -e . +cd ../../.. +pip install mmcv==2.2.0 -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.4/index.html --no-cache-dir +``` +There will be an error about the mmcv version exceeds 2.1.0, users could directly change the `mmcv_maximum_version` to `2.3.0` in `Your_PATH_to_Anaconda/env/vbench2/lib/python3.10/site-packages/mmdet/__init__.py` and `Your_PATH_to_Anaconda/env/vbench2/lib/python3.10/site-packages/mmyolo/__init__.py` + + +## Pretrained Models +[Optional] Please download the pre-trained weights according to the guidance in the `download.sh` file for each model in the `pretrained` folder to `~/.cache/vbench2`. +*Note that for `LLaVA-Video-7B-Qwen2` and `Qwen2.5-7B-Instruct`, we highly recommend the users to download the model before evaluation based on the `download.sh` in `pretrained`* + + + +## Usage +Use VBench-2.0 to evaluate videos, and video generative models. +- A Side Note: VBench-2.0 is designed for evaluating different models on a standard benchmark. Therefore, by default, we enforce evaluation on the **standard VBench-2.0 prompt lists** to ensure **fair comparisons** among different video generation models. That's also why we give warnings when a required video is not found. This is done via defining the set of prompts in [VBench2_full_info.json](https://github.com/Vchitect/VBench/blob/master/VBench-2.0/vbench2/VBench2_full_info.json). + +### Evaluating All of the Dimensions on the Standard Prompt Suite of VBench-2.0 + +Evaluate 18 dimensions sequentially on a single GPU (not recommended): +```bash +bash evaluate.sh --max_parallel_tasks 1 +``` +Evaluate 18 dimensions on different GPUs, one dimension per GPU. You can set the total number of GPUs available for evaluation (do not exceed 8): +```bash +bash evaluate.sh --max_parallel_tasks 8 +``` + +### **[New]** Evaluating Single Dimension of Your Own Videos +We support evaluating any video. Simply provide the path to the video file. There is no requirement on the videos' names except `Diversity` dimension. +- Note: We support customized videos / prompts for the following dimensions: `'Human_Anatomy', 'Human_Identity', 'Human_Clothes', 'Diversity', 'Multi-View_Consistency'` +- Note: `Diversity` requires at least 20 videos for one prompt to robustly test the diversity of your model and the naming format should be `prompt-index.mp4` where index ranges from 0 to 19 +- Note: `Diversity` and `Multi-View_Consistency` should be placed in separate folders while `'Human_Anatomy', 'Human_Identity', 'Human_Clothes'` can share a folder (save your time). + +To evaluate videos with customized input prompt, run our script with `--mode=custom_input`: +```bash +python evaluate.py \ + --dimension $DIMENSION \ + --videos_path /path/to/folder_or_video/ \ + --output_path "evaluation_results/$DIMENSION" \ + --mode=custom_input +``` +For example: +```bash +python evaluate.py \ + --dimension "Human_Anatomy" \ + --videos_path "YOUR_VIDEO_PATH" \ + --output_path "evaluation_results/Human_Anatomy" \ + --mode=custom_input +``` + +### Evaluating Single Dimension on the Standard Prompt Suite of VBench-2.0 + + +##### python +```python + from vbench2 import VBench2 + my_VBench = VBench2(device, , ) + my_VBench.evaluate( + videos_path = , + name = , + dimension_list = [, , ...], + ) +``` +For example: +```python + from vbench2 import VBench2 + my_VBench = VBench2(device, "vbench2/VBench2_full_info.json", "evaluation_results") + my_VBench.evaluate( + videos_path = "sampled_videos/HunyuanVideo/Human_Interaction", + name = "HunyuanVideo_Human_Interaction", + dimension_list = ["Human_Interaction"], + ) +``` + +### Use Human Anomaly Detector of VBench-2.0 + +Detecting human anomalies is crucial for video generation, as it can be used for evaluation or as feedback for fine-tuning. We fully release the training data (including unlabeled raw videos and labeled images), along with the training and inference code of it. See [Human_Anomaly](https://github.com/Vchitect/VBench/blob/master/VBench-2.0/vbench2/third_party/ViTDetector) for details. + +### Submit to Leaderboard +We have provided scripts for calculating the `Total Score`, `Creativity Score`, `Commonsense Score`, `Controllability Score`, `Human Fidelity Score` and `Physics Score` in the Leaderboard. You can run them locally to obtain the aggregate scores or as a final check before submitting to the Leaderboard. + +```bash +# Pack the evaluation results into a zip file. +cd evaluation_results +zip -r ../evaluation_results.zip . + +# [Optional] get the total 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](https://huggingface.co/spaces/Vchitect/VBench_Leaderboard) + +### How to Calculate Total Score + +To calculate the **Total Score**, we follow these steps: + +1. **Creativity Score**: + The `Creativity Score` is the average of the following dimensions: + **Diversity**, and **Composition**. + +2. **Commonsense Score**: + The `Commonsense Score` is the average of the following dimensions: + **Motion Rationality**, and **Instance Preservation**. + +3. **Controllability Score**: + The `Controllability Score` is the average of the following dimensions: + **Dynamic Spatial Relationship**, **Dynamic Attribute**, **Motion Order Understanding**, **Human Interaction**, **Complex Landscape**, **Complex Plot**, and **Camera Motion**. + +4. **Human Fidelity Score**: + The `Human Fidelity Score` is the average of the following dimensions: + **Human Anatomy**, **Human Identity**, and **Human Clothes**. + +5. **Physics Score**: + The `Physics Score` is the average of the following dimensions: + **Mechanics**, **Thermotics**, **Material**, and **Multi-View Consistency**. + +6. **Average Calculation**: + The **Total Score** is the average of the `Creativity Score`, `Commonsense Score`, `Controllability Score`, `Human Fidelity Score` and `Physics Score`: + ```bash + Total Score = 0.2 * (Creativity Score + Commonsense Score + Controllability Score + Human Fidelity Score + Physics Score) + ``` + + +## :bookmark_tabs: Prompt Suite + +We provide prompt lists are at `prompts/`. + +Check out [details of prompt suites](https://github.com/Vchitect/VBench/tree/master/VBench-2.0/prompts), and instructions for [**how to sample videos for evaluation**](https://github.com/Vchitect/VBench/tree/master/VBench-2.0/prompts#how-to-sample-videos-for-evaluation). + + + +## :bookmark_tabs: Sampled Videos + +[![Dataset Download](https://img.shields.io/badge/Dataset-Download-red?logo=googlechrome&logoColor=red)](https://drive.google.com/drive/folders/19nXdrNFw-PxxYJcd9HyWmbLVe5Agmlc2) + +To facilitate future research and to ensure full transparency, we release all the videos we sampled and used for VBench-2.0 evaluation. You can download them on [Google Drive](https://drive.google.com/drive/folders/19nXdrNFw-PxxYJcd9HyWmbLVe5Agmlc2). + +See detailed explanations of the sampled videos [here](https://github.com/Vchitect/VBench/tree/master/VBench-2.0/sampled_videos). + +We also provide detailed setting for the models under evaluation [here](https://github.com/Vchitect/VBench/tree/master/VBench-2.0/sampled_videos#what-are-the-details-of-the-video-generation-models). + + + +## :black_nib: Citation + + If you find our repo useful for your research, please consider citing our paper: + + ```bibtex + @article{zheng2025vbench2, + title={{VBench-2.0}: Advancing Video Generation Benchmark Suite for Intrinsic Faithfulness}, + author={Zheng, Dian and Huang, Ziqi and Liu, Hongbo and Zou, Kai and He, Yinan and Zhang, Fan and Zhang, Yuanhan and He, Jingwen and Zheng, Wei-Shi and Qiao, Yu and Liu, Ziwei}, + journal={arXiv preprint arXiv:2503.21755}, + year={2025} + } + + @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} + } + + @article{huang2025vbench++, + title={{VBench++}: Comprehensive and Versatile Benchmark Suite for Video Generative Models}, + author={Huang, Ziqi and Zhang, Fan and Xu, Xiaojie and He, Yinan and Yu, Jiashuo and Dong, Ziyue and Ma, Qianli and Chanpaisit, Nattapol and Si, Chenyang and Jiang, Yuming and Wang, Yaohui and Chen, Xinyuan and Chen, Ying-Cong and Wang, Limin and Lin, Dahua and Qiao, Yu and Liu, Ziwei}, + journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, + year={2025}, + doi={10.1109/TPAMI.2025.3633890} + } + + ``` + + +## :hearts: Acknowledgement + +**VBench-2.0** is currently maintained by [Dian Zheng](https://zhengdian1.github.io/) and [Ziqi Huang](https://ziqihuangg.github.io/). + + +#### :hugs: Open-Sourced Repositories +This project wouldn't be possible without the following open-sourced repositories: +[LLaVA-Video](https://github.com/LLaVA-VL/LLaVA-NeXT), [Qwen2.5](https://github.com/QwenLM/Qwen2.5), [CoTracker](https://github.com/facebookresearch/co-tracker), [Insightface](https://github.com/deepinsight/insightface), [CLIP](https://github.com/openai/CLIP), [RAFT](https://github.com/princeton-vl/RAFT), [YOLO_World](https://github.com/AILab-CVC/YOLO-World). + +## Related Links + +We are putting together [Awesome-Evaluation-of-Visual-Generation](https://github.com/ziqihuangg/Awesome-Evaluation-of-Visual-Generation), which collects works for evaluating visual generation. diff --git a/VideoX-Fun/VBench/VBench-2.0/asset/all_dimension.jpg b/VideoX-Fun/VBench/VBench-2.0/asset/all_dimension.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9b97954dc4b9885d1eace3940ae46b6834ae8516 --- /dev/null +++ b/VideoX-Fun/VBench/VBench-2.0/asset/all_dimension.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fcb561d2d4203ec683e0c6732261d0df80c6d6905802af83118b95d9b6c0657 +size 377691 diff --git a/VideoX-Fun/VBench/VBench-2.0/asset/fig_paper_teaser.jpg b/VideoX-Fun/VBench/VBench-2.0/asset/fig_paper_teaser.jpg new file mode 100644 index 0000000000000000000000000000000000000000..53b943f9ea9e0b91c11151e7a0250303b8f6b53e --- /dev/null +++ b/VideoX-Fun/VBench/VBench-2.0/asset/fig_paper_teaser.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed0e1982ec320073f2574a82ee959ef9f1c7e9fc6cd1c197118a04180f4ef2d8 +size 257483 diff --git a/VideoX-Fun/VBench/VBench-2.0/divide_video.py b/VideoX-Fun/VBench/VBench-2.0/divide_video.py new file mode 100644 index 0000000000000000000000000000000000000000..8a351b9c8543249f5d8b84d7410cdbcc2d604e3d --- /dev/null +++ b/VideoX-Fun/VBench/VBench-2.0/divide_video.py @@ -0,0 +1,36 @@ +import os +import json +import re +import shutil + +json_path = 'prompts/VBench2_full_text_info.json' +source_video_file = '/mnt/petrelfs/zhengdian/zhengdian/VBench2.0/sample_video/vbench2_videos' # CHANGE +target_video_file = '/mnt/petrelfs/zhengdian/zhengdian/VBench2.0/sample_video/Vidu_Q1' # DEFAULT +with open(json_path, 'r', encoding='utf-8') as f: + data = json.load(f) + +for video in os.listdir(source_video_file): + source_path = os.path.join(source_video_file, video) + video_suffix = re.split(r'-\d+\.mp4', video)[0] + info = data[video_suffix[:180]] + if 'Diversity' in info['dimension'] and len(info['dimension'])==1: + target_path = os.path.join(target_video_file, 'Diversity', video) + os.makedirs(os.path.dirname(target_path), exist_ok=True) + shutil.copy(source_path, target_path) + elif 'Diversity' in info['dimension'] and len(info['dimension'])!=1: + caption = info['caption'][:180] + for dimension in info['dimension']: + if video in [f"{caption}-0.mp4", f"{caption}-1.mp4", f"{caption}-2.mp4"]: + target_path = os.path.join(target_video_file, dimension, video) + os.makedirs(os.path.dirname(target_path), exist_ok=True) + shutil.copy(source_path, target_path) + else: + if dimension == 'Diversity': + target_path = os.path.join(target_video_file, dimension, video) + os.makedirs(os.path.dirname(target_path), exist_ok=True) + shutil.copy(source_path, target_path) + else: + for dimension in info['dimension']: + target_path = os.path.join(target_video_file, dimension, video) + os.makedirs(os.path.dirname(target_path), exist_ok=True) + shutil.copy(source_path, target_path) \ No newline at end of file diff --git a/VideoX-Fun/VBench/VBench-2.0/environment.yml b/VideoX-Fun/VBench/VBench-2.0/environment.yml new file mode 100644 index 0000000000000000000000000000000000000000..9fc23181ad5587c732ed55efb4d6c856bb8e7280 --- /dev/null +++ b/VideoX-Fun/VBench/VBench-2.0/environment.yml @@ -0,0 +1,382 @@ +name: vbench2 +channels: + - defaults + - https://repo.anaconda.com/pkgs/main + - https://repo.anaconda.com/pkgs/r +dependencies: + - _libgcc_mutex=0.1=main + - _openmp_mutex=5.1=1_gnu + - bzip2=1.0.8=h5eee18b_6 + - ca-certificates=2025.2.25=h06a4308_0 + - expat=2.7.1=h6a678d5_0 + - ld_impl_linux-64=2.40=h12ee557_0 + - libffi=3.4.4=h6a678d5_1 + - libgcc-ng=11.2.0=h1234567_1 + - libgomp=11.2.0=h1234567_1 + - libstdcxx-ng=11.2.0=h1234567_1 + - libuuid=1.41.5=h5eee18b_0 + - libxcb=1.17.0=h9b100fa_0 + - ncurses=6.4=h6a678d5_0 + - openssl=3.0.16=h5eee18b_0 + - pip=25.1=pyhc872135_2 + - psutil=5.9.0=py310h5eee18b_1 + - pthread-stubs=0.3=h0ce48e5_1 + - python=3.10.18=h1a3bd86_0 + - readline=8.2=h5eee18b_0 + - setuptools=78.1.1=py310h06a4308_0 + - sqlite=3.50.2=hb25bd0a_1 + - tk=8.6.14=h993c535_1 + - wheel=0.45.1=py310h06a4308_0 + - xorg-libx11=1.8.12=h9b100fa_1 + - xorg-libxau=1.0.12=h9b100fa_0 + - xorg-libxdmcp=1.1.5=h9b100fa_0 + - xorg-xorgproto=2024.1=h5eee18b_1 + - xz=5.6.4=h5eee18b_1 + - zlib=1.2.13=h5eee18b_1 + - pip: + - absl-py==2.3.1 + - accelerate==1.9.0 + - addict==2.4.0 + - aiofiles==24.1.0 + - aiohappyeyeballs==2.4.4 + - aiohttp==3.11.11 + - aiosignal==1.3.2 + - albucore==0.0.19 + - albumentations==1.4.19 + - aliyun-python-sdk-core==2.16.0 + - aliyun-python-sdk-kms==2.16.5 + - altair==5.5.0 + - annotated-types==0.7.0 + - antlr4-python3-runtime==4.9.3 + - anyio==4.8.0 + - args==0.1.0 + - asttokens==3.0.0 + - astunparse==1.6.3 + - async-timeout==5.0.1 + - attrdict==2.0.1 + - attrs==24.3.0 + - av==14.0.1 + - bcrypt==4.3.0 + - beautifulsoup4==4.12.3 + - binpacking==1.5.2 + - bitsandbytes==0.42.0 + - blinker==1.9.0 + - blis==1.2.0 + - boto3==1.26.90 + - botocore==1.29.165 + - braceexpand==0.1.7 + - brotli==1.1.0 + - cachetools==6.1.0 + - catalogue==2.0.10 + - certifi==2024.12.14 + - cffi==1.17.1 + - charset-normalizer==3.4.1 + - click==8.1.8 + - clint==0.5.1 + - cloudpathlib==0.21.1 + - cloudpickle==3.1.1 + - colorama==0.4.6 + - coloredlogs==15.0.1 + - confection==0.1.5 + - configobj==5.0.9 + - contourpy==1.3.1 + - cpm-kernels==1.0.11 + - crcmod==1.7 + - cryptography==45.0.5 + - cycler==0.12.1 + - cymem==2.0.11 + - cython==3.1.2 + - dacite==1.9.2 + - datasets==3.2.0 + - decorator==5.1.1 + - decord==0.6.0 + - deep-sort-realtime==1.3.2 + - deepspeed==0.14.4 + - defusedxml==0.7.1 + - deprecated==1.2.18 + - diffusers==0.32.1 + - dill==0.3.8 + - distro==1.9.0 + - docker-pycreds==0.4.0 + - docopt==0.6.2 + - easydict==1.13 + - einops==0.8.0 + - einops-exts==0.0.4 + - eval-type-backport==0.2.2 + - exceptiongroup==1.2.2 + - executing==2.2.0 + - fabric==3.2.2 + - fairscale==0.4.13 + - fastapi==0.115.6 + - ffmpy==0.6.0 + - filelock==3.13.1 + - filterpy==1.4.5 + - fire==0.4.0 + - flash-attn==2.7.2.post1 + - flatbuffers==25.2.10 + - flowlib==0.6.6.8 + - fonttools==4.55.3 + - frozenlist==1.5.0 + - fsspec==2024.2.0 + - ftfy==6.3.1 + - future==1.0.0 + - fvcore==0.1.5.post20221221 + - gast==0.6.0 + - gdown==5.2.0 + - gevent==25.5.1 + - gitdb==4.0.12 + - gitpython==3.1.44 + - google-pasta==0.2.0 + - gradio==5.38.0 + - gradio-client==1.11.0 + - greenlet==3.2.3 + - groovy==0.1.2 + - grpcio==1.73.1 + - h11==0.14.0 + - h5py==3.12.1 + - hjson==3.1.0 + - hpsv2==1.2.0 + - httpcore==1.0.7 + - httpx==0.28.1 + - huggingface-hub==0.30.0 + - humanfriendly==10.0 + - idna==3.10 + - iglovikov-helper-functions==0.0.53 + - imagecorruptions==1.1.2 + - imageio==2.37.0 + - imageio-ffmpeg==0.6.0 + - importlib-metadata==8.5.0 + - iniconfig==2.0.0 + - invoke==2.2.0 + - iopath==0.1.10 + - ipdb==0.13.13 + - ipython==8.32.0 + - jax==0.6.2 + - jaxlib==0.6.2 + - jedi==0.19.2 + - jieba==0.42.1 + - jinja2==3.1.3 + - jiter==0.8.2 + - jmespath==0.10.0 + - joblib==1.4.2 + - jpeg4py==0.1.4 + - jsonschema==4.25.0 + - jsonschema-specifications==2025.4.1 + - keras==3.10.0 + - kiwisolver==1.4.8 + - kornia==0.5.6 + - kornia-rs==0.1.8 + - langcodes==3.5.0 + - language-data==1.3.0 + - lazy-loader==0.4 + - libclang==18.1.1 + - llava==1.7.0.dev0 + - logger==1.4 + - lvis==0.5.3 + - marisa-trie==1.2.1 + - markdown==3.8.2 + - markdown-it-py==3.0.0 + - markupsafe==2.1.5 + - matplotlib==3.10.0 + - matplotlib-inline==0.1.7 + - mdurl==0.1.2 + - mediapipe==0.10.11 + - ml-dtypes==0.5.1 + - mmcv==2.2.0 + - mmcv-lite==2.2.0 + - mmdet==3.0.0 + - mmengine==0.10.5 + - mmyolo==0.6.0 + - model-index==0.1.11 + - modelscope==1.28.0 + - mpmath==1.3.0 + - msgpack==1.1.0 + - multidict==6.1.0 + - multiprocess==0.70.16 + - murmurhash==1.0.12 + - namex==0.1.0 + - narwhals==1.48.0 + - networkx==3.2.1 + - ninja==1.11.1.4 + - nltk==3.9.1 + - numpy==1.26.3 + - nvidia-cublas-cu11==11.11.3.6 + - nvidia-cuda-cupti-cu11==11.8.87 + - nvidia-cuda-nvrtc-cu11==11.8.89 + - nvidia-cuda-runtime-cu11==11.8.89 + - nvidia-cudnn-cu11==9.1.0.70 + - nvidia-cufft-cu11==10.9.0.58 + - nvidia-curand-cu11==10.3.0.86 + - nvidia-cusolver-cu11==11.4.1.48 + - nvidia-cusparse-cu11==11.7.5.86 + - nvidia-ml-py==12.575.51 + - nvidia-nccl-cu11==2.21.5 + - nvidia-nvtx-cu11==11.8.86 + - omegaconf==2.3.0 + - onnx==1.17.0 + - onnxruntime==1.16.3 + - open-clip-torch==2.30.0 + - openai==1.59.5 + - opencv-contrib-python==4.11.0.86 + - opencv-python==4.10.0.84 + - opencv-python-headless==4.10.0.84 + - opendatalab==0.0.10 + - openmim==0.3.9 + - openxlab==0.0.11 + - opt-einsum==3.4.0 + - optree==0.16.0 + - ordered-set==4.1.0 + - orjson==3.11.0 + - oss2==2.19.1 + - outcome==1.3.0.post0 + - packaging==24.2 + - pandas==2.2.3 + - paramiko==3.5.1 + - parso==0.8.4 + - peft==0.15.2 + - pexpect==4.9.0 + - pillow==10.2.0 + - platformdirs==4.3.6 + - pluggy==1.5.0 + - portalocker==3.1.1 + - preshed==3.0.9 + - prettytable==3.14.0 + - prompt-toolkit==3.0.51 + - propcache==0.2.1 + - protobuf==3.20.3 + - ptyprocess==0.7.0 + - pure-eval==0.2.3 + - py-cpuinfo==9.0.0 + - pyarrow==18.1.0 + - pybboxes==0.1.6 + - pycocoevalcap==1.2 + - pycocotools==2.0.8 + - pycparser==2.22 + - pycryptodome==3.23.0 + - pydantic==2.10.4 + - pydantic-core==2.27.2 + - pydeck==0.9.1 + - pydub==0.25.1 + - pyecharts==2.0.8 + - pygments==2.19.2 + - pynacl==1.5.0 + - pynvml==12.0.0 + - pyparsing==3.2.1 + - pysocks==1.7.1 + - pytest==7.2.0 + - pytest-split==0.8.0 + - python-dateutil==2.9.0.post0 + - python-multipart==0.0.20 + - pytz==2024.2 + - pyyaml==6.0.2 + - qudida==0.0.4 + - qwen-vl-utils==0.0.11 + - referencing==0.36.2 + - regex==2024.11.6 + - requests==2.32.3 + - retina-face==0.0.17 + - retinaface-pytorch==0.0.8 + - rich==13.9.4 + - rouge==1.0.1 + - rpds-py==0.26.0 + - ruff==0.12.4 + - s3transfer==0.6.2 + - safehttpx==0.1.6 + - safetensors==0.5.2 + - sahi==0.11.31 + - scenedetect==0.6.5.2 + - scikit-image==0.25.0 + - scikit-learn==1.6.0 + - scipy==1.15.0 + - seaborn==0.13.2 + - selenium==4.29.0 + - semantic-version==2.10.0 + - sentencepiece==0.2.0 + - sentry-sdk==2.19.2 + - setproctitle==1.3.4 + - sh==2.2.2 + - shapely==2.0.7 + - shellingham==1.5.4 + - simplejson==3.20.1 + - six==1.17.0 + - smart-open==7.3.0.post1 + - smmap==5.0.2 + - snapshot-selenium==0.0.2 + - sniffio==1.3.1 + - sortedcontainers==2.4.0 + - sounddevice==0.5.2 + - soupsieve==2.6 + - spacy==3.8.4 + - spacy-legacy==3.0.12 + - spacy-loggers==1.0.5 + - srsly==2.5.1 + - stack-data==0.6.3 + - starlette==0.41.3 + - streamlit==1.47.0 + - stringzilla==3.12.5 + - supervision==0.19.0 + - sympy==1.13.1 + - tabulate==0.9.0 + - tenacity==9.1.2 + - tensorboard==2.19.0 + - tensorboard-data-server==0.7.2 + - tensorflow==2.19.0 + - tensorflow-io-gcs-filesystem==0.37.1 + - termcolor==2.5.0 + - terminaltables==3.1.10 + - tf-keras==2.19.0 + - thinc==8.3.4 + - thop==0.1.1-2209072238 + - threadpoolctl==3.5.0 + - tifffile==2025.1.10 + - tiktoken==0.8.0 + - timesformer-pytorch==0.4.1 + - timm==0.4.12 + - tokenizers==0.21.1 + - toml==0.10.2 + - tomli==2.2.1 + - tomlkit==0.13.3 + - torch==2.5.1+cu118 + - torchaudio==2.5.1+cu118 + - torchvision==0.20.1+cu118 + - tornado==6.5.1 + - tqdm==4.67.1 + - traitlets==5.14.3 + - transformers==4.51.0 + - transformers-stream-generator==0.0.5 + - trio==0.30.0 + - trio-websocket==0.12.2 + - triton==3.1.0 + - trl==0.19.1 + - typer==0.16.0 + - typing-extensions==4.12.2 + - tzdata==2024.2 + - ultralytics==8.3.68 + - ultralytics-thop==2.0.14 + - unicorn==2.1.1 + - urllib3==1.26.15 + - uvicorn==0.35.0 + - wandb==0.19.2 + - wasabi==1.1.3 + - watchdog==6.0.0 + - wcwidth==0.2.13 + - weasel==0.4.1 + - webdataset==0.2.100 + - websocket==0.2.1 + - websocket-client==1.8.0 + - websockets==15.0.1 + - werkzeug==3.1.3 + - wordcloud==1.9.4 + - wrapt==1.17.2 + - wsproto==1.2.0 + - xxhash==3.5.0 + - yacs==0.1.8 + - yapf==0.43.0 + - yarl==1.18.3 + - yolo-world==0.1.0 + - yolov5==7.0.10 + - zipp==3.21.0 + - zope-event==5.1 + - zope-interface==7.2 + - zstandard==0.23.0 +prefix: ./anaconda3/envs/vbench2 diff --git a/VideoX-Fun/VBench/VBench-2.0/evaluate.py b/VideoX-Fun/VBench/VBench-2.0/evaluate.py new file mode 100644 index 0000000000000000000000000000000000000000..a2127494032d1bf7435f469156de13f218a35fc2 --- /dev/null +++ b/VideoX-Fun/VBench/VBench-2.0/evaluate.py @@ -0,0 +1,153 @@ +import torch +import os +from vbench2 import VBench2 +from vbench2.distributed import dist_init, print0 +from datetime import datetime +import argparse +import json + +def parse_args(): + + CUR_DIR = os.path.dirname(os.path.abspath(__file__)) + parser = argparse.ArgumentParser(description='VBench2', formatter_class=argparse.RawTextHelpFormatter) + parser.add_argument( + "--output_path", + type=str, + default='./evaluation_results/', + help="output path to save the evaluation results", + ) + parser.add_argument( + "--full_json_dir", + type=str, + default=f'{CUR_DIR}/vbench2/VBench2_full_info.json', + help="path to save the json file that contains the prompt and dimension information", + ) + parser.add_argument( + "--videos_path", + type=str, + required=True, + help="folder that contains the sampled videos", + ) + parser.add_argument( + "--dimension", + nargs='+', + required=True, + help="list of evaluation dimensions, usage: --dimension ", + ) + parser.add_argument( + "--load_ckpt_from_local", + type=bool, + required=False, + help="whether load checkpoints from local default paths (assuming you have downloaded the checkpoints locally", + ) + parser.add_argument( + "--read_frame", + type=bool, + required=False, + help="whether directly read frames, or directly read videos", + ) + parser.add_argument( + "--mode", + choices=['custom_input', 'vbench_standard', 'vbench_category'], + default='vbench_standard', + help="""This flags determine the mode of evaluations, choose one of the following: + 1. "custom_input": receive input prompt from either --prompt/--prompt_file flags or the filename + 2. "vbench_standard": evaluate on standard prompt suite of VBench + 3. "vbench_category": evaluate on specific category + """, + ) + parser.add_argument( + "--prompt", + type=str, + default="None", + help="""Specify the input prompt + If not specified, filenames will be used as input prompts + * Mutually exclusive to --prompt_file. + ** This option must be used with --mode=custom_input flag + """ + ) + parser.add_argument( + "--prompt_file", + type=str, + required=False, + help="""Specify the path of the file that contains prompt lists + If not specified, filenames will be used as input prompts + * Mutually exclusive to --prompt. + ** This option must be used with --mode=custom_input flag + """ + ) + parser.add_argument( + "--category", + type=str, + required=False, + help="""This is for mode=='vbench_category' + The category to evaluate on, usage: --category=animal. + """, + ) + + ## for dimension specific params ### + parser.add_argument( + "--imaging_quality_preprocessing_mode", + type=str, + required=False, + default='longer', + help="""This is for setting preprocessing in imaging_quality + 1. 'shorter': if the shorter side is more than 512, the image is resized so that the shorter side is 512. + 2. 'longer': if the longer side is more than 512, the image is resized so that the longer side is 512. + 3. 'shorter_centercrop': if the shorter side is more than 512, the image is resized so that the shorter side is 512. + Then the center 512 x 512 after resized is used for evaluation. + 4. 'None': no preprocessing + """, + ) + args = parser.parse_args() + return args + + +def main(): + args = parse_args() + + # dist_init() + print(f'args: {args}') + device = torch.device("cuda") + my_VBench = VBench2(device, args.full_json_dir, args.output_path) + + print(f'start evaluation') + + current_time = datetime.now().strftime('%Y-%m-%d-%H:%M:%S') + + kwargs = {} + + prompt = [] + + if (args.prompt_file is not None) and (args.prompt != "None"): + raise Exception("--prompt_file and --prompt cannot be used together") + if (args.prompt_file is not None or args.prompt != "None") and (args.mode!='custom_input'): + raise Exception("must set the --mode=custom_input for using external prompt") + + if args.prompt_file: + with open(args.prompt_file, 'r') as f: + prompt = json.load(f) + assert type(prompt) == dict, "Invalid prompt file format. The correct format is {\"video_path\": prompt, ... }" + elif args.prompt != "None": + prompt = [args.prompt] + + if args.category != "": + kwargs['category'] = args.category + + kwargs['imaging_quality_preprocessing_mode'] = args.imaging_quality_preprocessing_mode + + my_VBench.evaluate( + videos_path = args.videos_path, + name = f'results_{current_time}', + prompt_list=prompt, # pass in [] to read prompt from filename + dimension_list = args.dimension, + local=args.load_ckpt_from_local, + read_frame=args.read_frame, + mode=args.mode, + **kwargs + ) + print('done') + + +if __name__ == "__main__": + main() diff --git a/VideoX-Fun/VBench/VBench-2.0/evaluate.sh b/VideoX-Fun/VBench/VBench-2.0/evaluate.sh new file mode 100644 index 0000000000000000000000000000000000000000..721790b82df9684cf1af8bb422e0c079a301cdf1 --- /dev/null +++ b/VideoX-Fun/VBench/VBench-2.0/evaluate.sh @@ -0,0 +1,48 @@ +# Define the dimension list +dimensions=("Human_Anatomy" "Human_Identity" "Human_Clothes" "Diversity" "Composition" "Dynamic_Spatial_Relationship" "Dynamic_Attribute" "Motion_Order_Understanding" "Human_Interaction" "Complex_Landscape" "Complex_Plot" "Camera_Motion" "Motion_Rationality" "Mechanics" "Thermotics" "Material" "Multi-View_Consistency" "Instance_Preservation") + +# Corresponding folder names +folders=("Human_Anatomy" "Human_Identity" "Human_Clothes" "Diversity" "Composition" "Dynamic_Spatial_Relationship" "Dynamic_Attribute" "Motion_Order_Understanding" "Human_Interaction" "Complex_Landscape" "Complex_Plot" "Camera_Motion" "Motion_Rationality" "Mechanics" "Thermotics" "Material" "Multi-View_Consistency" "Instance_Preservation") + +# Number of tasks to run in parallel +max_parallel_tasks=8 +model="vbench2_videos" + +# Split dimensions into batches of size `max_parallel_tasks` +total_dimensions=${#dimensions[@]} +for ((start=0; start