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 details)
Built Distribution
File details
Details for the file fad_pytorch-0.0.1.tar.gz
.
File metadata
- Download URL: fad_pytorch-0.0.1.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 825617004838360f5e15e7525be3f9050806f053973e0f821061934953000947 |
|
MD5 | 96930a9027034b30c12bac6b901a826e |
|
BLAKE2b-256 | 58084098fd6edb6b34dc290c841f9dbc816ea3590dd45fcd0967c7f29606c748 |
File details
Details for the file fad_pytorch-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: fad_pytorch-0.0.1-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1eccc3f53c8a3c13e0721355b3835f16d47f0388023ca187d3a1d700ea9301b9 |
|
MD5 | 563942ec20c646c7e6fb0dcc4c70c21c |
|
BLAKE2b-256 | 853bebef019236c8c054d8e47d8dc1e79001ad53e85d81ff0dfe882e990c8806 |