Skip to content

[feat] Add fvd implementation#923

Merged
SolitaryThinker merged 18 commits intohao-ai-lab:mainfrom
ketakitank:ketaki-fvd
Dec 12, 2025
Merged

[feat] Add fvd implementation#923
SolitaryThinker merged 18 commits intohao-ai-lab:mainfrom
ketakitank:ketaki-fvd

Conversation

@ketakitank
Copy link
Copy Markdown
Contributor

This PR adds the implementation of FVD benchmark to the repository with support for multiple evaluation protocols and sampling strategies

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @ketakitank, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request delivers a robust and comprehensive implementation of the Fréchet Video Distance (FVD) benchmark, a critical metric for assessing the quality of generated videos. The new FVD module is designed for flexibility and efficiency, offering configurable evaluation protocols, advanced clip sampling strategies, and a memory-efficient streaming pipeline for processing large video datasets. It integrates an I3D feature extractor with caching capabilities and provides both a command-line interface for ease of use and dedicated scripts for validation and demonstration. This addition significantly enhances the repository's capabilities for video generation research and evaluation.

Highlights

  • FVD Benchmark Implementation: Introduces a complete implementation of the Fréchet Video Distance (FVD) benchmark for evaluating video generation models.
  • Configurable Evaluation Protocols: Provides a flexible FVDConfig class with predefined protocols (e.g., fvd2048_16f) and options for custom configurations, ensuring reproducibility and comparability.
  • Advanced Clip Sampling Strategies: Supports diverse clip sampling methods like 'beginning', 'random', 'uniform', 'middle', 'sliding', and 'all', along with frame subsampling (frame_stride).
  • Efficient I3D Feature Extraction: Integrates an I3DFeatureExtractor that handles automatic model download, video preprocessing, and feature extraction, with support for caching to speed up repeated computations.
  • Streaming Video Processing: Implements a memory-efficient streaming approach for loading video clips, making it suitable for large video datasets without excessive RAM usage.
  • Command-Line Interface (CLI): A new cli.py script enables easy FVD computation directly from the command line with various configurable parameters.
  • Validation and Example Scripts: Includes validate_fvd.py for testing the implementation's correctness (identity and real-vs-real tests) and run_fvd.py as an example of FVD usage.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive implementation for the Fréchet Video Distance (FVD) benchmark. The code is well-structured, featuring a command-line interface, modular components for core FVD logic and video processing, and configuration presets for standard evaluation protocols. My review focuses on improving portability by removing hardcoded paths, fixing a bug in one of the FVD protocol configurations, and enhancing code clarity and maintainability. Overall, this is a solid contribution that adds valuable functionality.

Comment thread benchmarks/fvd/fvd.py
Comment thread benchmarks/fvd/validate_fvd.py
Comment thread benchmarks/scripts/run.sh Outdated
Comment thread benchmarks/fvd/cli.py Outdated
Comment thread benchmarks/fvd/fvd.py Outdated
Comment thread benchmarks/fvd/fvd.py Outdated
@SolitaryThinker SolitaryThinker changed the title Add fvd implementation [feat] Add fvd implementation Dec 9, 2025
Comment thread benchmarks/fvd/__init__.py
Comment thread benchmarks/fvd/__init__.py Outdated
Comment thread benchmarks/fvd/i3d_model.py Outdated
Comment thread .gitignore Outdated
Comment thread benchmarks/scripts/run.sh Outdated
@SolitaryThinker SolitaryThinker merged commit 55c2e7c into hao-ai-lab:main Dec 12, 2025
1 check passed
shijiew555 pushed a commit to Gary-ChenJL/FastVideo that referenced this pull request Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants