Frechet Video Motion Distance
Project description
FVMD
Fréchet video motion distance(FVMD) is a metric to evaluate the motion consistency of video generation.
🔨 Installation
Install with pip
pip install fvmd
🚀 Usage
Video Data Preparation
The input video sets can be either in .npz or .npy file formats with the shape [clips, frames, height, width, channel], or a folder with the following structure:
Folder/
|-- Clip1/
| |-- Frame1.png/jpg
| |-- Frame2.png/jpg
| |-- ...
|
|-- Clip2/
| |-- Frame1.png/jpg
| |-- Frame2.png/jpg
| |-- ...
|
|-- ...
Evaluate FVMD
To evaluate the FVMD between two video sets, you can run our script:
python -m fvmd --log_dir <log_directory> <path/to/gen_dataset> <path/to/gt_dataset>
You can alose use our FVMD in your Python code:
from fvmd import fvmd
fvmd_value = fvmd(log_dir=<log_directory>,
gen_path=<path/to/gen_dataset>,
gt_path=<path/to/gt_dataset>
)
Evaluate FVMD step by step
You can also run only some intermediate steps of FVMD.
Video Key Point Tracking
from fvmd import keypoint_tracking
velocity_gen, velocity_gt, acceleration_gen, acceleration_gt = keypoint_tracking(log_dir=<log_directory>,
gen_path=<path/to/gen_dataset>,
gt_path=<path/to/gt_dataset>
)
Extract motion feature from velocity/acceleration fields
from fvmd import calc_hist
motion_feature = calc_hist(vectors=<velocity_gen/velocity_gt/acceleration_gen/acceleration_gt>)
Compute FVMD from velocity/acceleration fields
from fvmd import calculate_fvmd_given_paths
results = calculate_fvmd_given_paths(gen_path=<directory/of/gen_velocity/acceleration_cache>,
gt_path=<directory/of/gt_velocity/acceleration_cache>
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fvmd-0.0.1.tar.gz.
File metadata
- Download URL: fvmd-0.0.1.tar.gz
- Upload date:
- Size: 39.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a721d83b16bb9bc220e96860acd2e66ea93414d1a12edc44c3e0c1821dce53c
|
|
| MD5 |
4d6e01138fd0ff60077661147fd5c478
|
|
| BLAKE2b-256 |
7afb7fdfbd3c2665e907195cdbfbfdd3977431707fa535f760cc2580fcf8b1f1
|
File details
Details for the file fvmd-0.0.1-py3-none-any.whl.
File metadata
- Download URL: fvmd-0.0.1-py3-none-any.whl
- Upload date:
- Size: 41.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84729069631cc33413adab21600612fc044ed4d8e5e029a0beb4cd575e0a634c
|
|
| MD5 |
354d7ba2b144c61bbea18f253f38541a
|
|
| BLAKE2b-256 |
112f7a8bb2716ac2680cb93493d18917372e09f5bdb8120a076d73517403f895
|