Skip to main content

Frechet Audio Distance evaluation in PyTorch

Project description

fad_pytorch

Original FAD paper (PDF)

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:

  1. fad_gen.py: produces directories of real & fake audio
  2. fad_embed.py: produces directories of embeddings of real & fake audio
  3. fad_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)

Uploaded Source

Built Distribution

fad_pytorch-0.0.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

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

Hashes for fad_pytorch-0.0.1.tar.gz
Algorithm Hash digest
SHA256 825617004838360f5e15e7525be3f9050806f053973e0f821061934953000947
MD5 96930a9027034b30c12bac6b901a826e
BLAKE2b-256 58084098fd6edb6b34dc290c841f9dbc816ea3590dd45fcd0967c7f29606c748

See more details on using hashes here.

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

Hashes for fad_pytorch-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1eccc3f53c8a3c13e0721355b3835f16d47f0388023ca187d3a1d700ea9301b9
MD5 563942ec20c646c7e6fb0dcc4c70c21c
BLAKE2b-256 853bebef019236c8c054d8e47d8dc1e79001ad53e85d81ff0dfe882e990c8806

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page