MAD
Implementation for MAUVE Audio Divergence (MAD) as described in Aligning Text-to-Music Evaluation with Human Preferences. Sound examples for the meta-evaluation data can be found on our demo page. The MusicPrefs dataset is available on Huggingface.
Installation
Install using pip:
pip install mad_metric
Or, install from source:
git clone https://github.com/i-need-sleep/mad.git
cd mad
pip install -e .
Usage
Programmic usage:
from mad_metric import compute_mad
score = compute_mad(
eval_dir='DIR_OF_AUDIO_FILES_TO_BE_EVALUATED',
ref_dir='DIR_OF_REFERENCE_AUDIO_FILES',
[optional arguments...]
)
Command line usage:
mad_metric [-h] [--eval_dir EVAL_DIR] [--ref_dir REF_DIR] [--eval_embs_dir EVAL_EMBS_DIR] [--ref_embs_dir REF_EMBS_DIR] [--log_csv LOG_CSV] [--batch_size BATCH_SIZE] [--model_name MODEL_NAME] [--layer LAYER]
[--aggregation AGGREGATION]
eval_dir: The directory of audio files to be evaluated.eval_embs_dir: If botheval_dirandeval_embs_dirare specified, the computed embeddings of the files will be stored undereval_embs_dir. If onlyeval_embs_diris provided, the MAUVE score will be computed directly using the provided embeddings. At least one ofeval_dirandeval_embs_dirmust be provided.ref_dir: Similar toeval_dir. We use FMA-Pop in our experiments.ref_embs_dir: Similar toeval_embs_dir.log_csv: The path to the csv file logging the MAD scores.batch_size: The batch size used when computing embeddings.model_name,layer,aggregation: Specifies which embeddings are used to compute the divergence. Defaults to the best setup with MERT according to our synthetic meta-evaluation with FMA-Pop as the reference set.
Metadata
Release files for mad-metric 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mad_metric-0.0.6.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mad_metric-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.9 kB
Release files / mad_metric-0.0.6.tar.gz
| Download URL | mad_metric-0.0.6.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a473103abb6b9f2013339ae0d4525463ba76804575bdd3eefb503b4d4d3d6a0d
|
|
BLAKE2b-256 checksum How to use checksums |
338fa4bc265bdf47c7bdfa5cdab6705c2ed07237092a4613e8603f204f61e736
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.6
|
Release files / mad_metric-0.0.6-py3-none-any.whl
| Download URL | mad_metric-0.0.6-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
125987fc445fea63b32eecf30d7ba9246d34ef8c819fc5d6c91310d23565329e
|
|
BLAKE2b-256 checksum How to use checksums |
fc34a0305ee6cc18c52e984f27814954b9bcacf56f156e1a2587f61a57f20fa7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.6
|