Downloads · 30 days
0
flateon/FVD-I3D-torchscript
FVD-I3D-torchscript is a machine learning model from flateon. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This repository contains a TorchScript version of the I3D (Inflated 3D ConvNet) model, specifically for calculating Frechet Video Distance (FVD). FVD is a metric used to evaluate the quality of generated videos by com…
Downloads · 30 days
0
Access
Public
Updated Apr 7, 2025
Repo size
51.2 MB
Likes
1
Public
Click a slice to open those files.
.pt51.2 MB · 100%
From the Hugging Face model README
This repository contains a TorchScript version of the I3D (Inflated 3D ConvNet) model, specifically for calculating Frechet Video Distance (FVD). FVD is a metric used to evaluate the quality of generated videos by comparing the statistics of generated videos with real videos.
The I3D model is a deep neural network architecture designed for video recognition. In the context of FVD calculation, we use the I3D model to extract meaningful features from videos, which are then used to compute the distance between the feature distributions of real and generated videos.
pip install huggingface_hub
import torch
from huggingface_hub import hf_hub_download
# Download the model from Hugging Face Hub
model_path = hf_hub_download(
repo_id="flateon/FVD-I3D-torchscript",
filename="i3d_torchscript.pt"
)
# Load the model
i3d_model = torch.jit.load(model_path)
# Example with a random video tensor
# Format: [batch_size, channels, frames, height, width]
video_tensor = torch.randn(2, 3, 16, 224, 224)
# Extract features
features = i3d_model(video_tensor, rescale=True, resize=True, return_features=True)
print(features.shape) # torch.Size([2, 400])