Frechet Audio Distance evaluation in PyTorch
Project description
fad_pytorch
Install
Work in progress. If you’re just finding this repo on GitHub, it may not be ready yet.
pip install fad_pytorch
About
(Intended) Features:
- runs in parallel on multiple GPUs
- favors 48kHz sample rates
- can use CLAP embeddings
- favors ops in PyTorch instead of numpy
- allows dataset access via WebDataset (over s3://)
- operates on CPU, CUDA, or MPS
This is designed to be run as 3 command-line scripts in succession:
fad_gen.py
: produces directories of real & fake audiofad_embed.py
: produces directories of embeddings of real & fake audiofad_score.py
: reads the embeddings & generates FAD score, for real (“$r$”) and fake (“$f$”):
$$ FAD = || \mu_r - \mu_f ||^2 + tr\left(\Sigma_r + \Sigma_f - 2 \sqrt{\Sigma_r \Sigma_f}\right)$$
Related Repos
There are [several] others, but this one is mine. These repos didn’t have all the features I wanted, but I used them for inspiration:
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
fad_pytorch-0.0.1.tar.gz
(12.0 kB
view hashes)
Built Distribution
Close
Hashes for fad_pytorch-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1eccc3f53c8a3c13e0721355b3835f16d47f0388023ca187d3a1d700ea9301b9 |
|
MD5 | 563942ec20c646c7e6fb0dcc4c70c21c |
|
BLAKE2b-256 | 853bebef019236c8c054d8e47d8dc1e79001ad53e85d81ff0dfe882e990c8806 |