Skip to main content

MiRA

MiRA (Music Replication Assessment) tool is a model-independent open evaluation method based on four diverse audio music similarity metrics to assess exact data replication of the training set.

quick start

create and install conda environment

conda create --name mira python=3.10
conda activate mira
python -m pip install --upgrade pip

install mira package

pip install mira-sim

to run KL divergence download PaSST classifier

pip install 'git+https://github.com/kkoutini/passt_hear21@0.0.19'

to run CLAP and DEfNet scores install pythorch...

pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html 

# note that you can also install pytorch by following the official instruction (https://pytorch.org/get-started/locally/)
### for H100 GPU: pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

... and download corresponding models

mkdir misc/ 
wget -O misc/music_audioset_epoch_15_esc_90.14.pt https://huggingface.co/lukewys/laion_clap/resolve/main/music_audioset_epoch_15_esc_90.14.pt?download=true 
wget -O misc/discogs_track_embeddings-effnet-bs64-1.pb https://essentia.upf.edu/models/feature-extractors/discogs-effnet/discogs_track_embeddings-effnet-bs64-1.pb

Attention! MiRA expects to find weights in misc folder in the directory you run mira. Note that if you would like to store the models elsewhere, you MUST change the location directory model_path at files clap.py and defnet.py.

how to use MiRA?

Run an evaluation by calling mira and indicating the directory of the reference folder (reference_foldr), the target folder (target_folder) and name of the evaluation or test (eval_name).

Registering results (log) is active by default. You can deactivate storing the results by setting log to no or you can specify your preferred directory (log_directory). If you do not specify any log folder where results should be stored, MiRA will create a log folder in the current directory automatically.

MiRA will run the evaluation between the samples in the reference and target folder for four music similarity metrics: CLAP score, DEfNet score, Cover Identification (CoverID) and KL divergence. However, you can specify a metric with -m argument.

mira <reference_folder> <target_folder> --eval_name <eval_name> {--log <no/log_directory> -m <clap,defnet,coverid,kld>}

Important! Note that MiRA is prepared to interpret wav files.

Metadata

Release files for mira-sim 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mira-sim 0.1.2
File Size Uploaded Provenance Actions
mira_sim-0.1.2.tar.gz 50.1 kB Without provenance Details for mira_sim-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mira-sim 0.1.2
File Interpreter ABI Platform Actions
mira_sim-0.1.2-py3-none-any.whl Python 3 none any Details for mira_sim-0.1.2-py3-none-any.whl

Total release size: 91.3 kB

Release files / mira_sim-0.1.2.tar.gz

Download URL mira_sim-0.1.2.tar.gz
Size 50.1 kB
Tags Source
SHA-256 checksum
How to use checksums
bd843d4054ccdfa760e375bdcfc8345199e20c2a924d38a25b19baee8aab59e6
BLAKE2b-256 checksum
How to use checksums
0958cc17084524ca75ef6d6d76cbe38e5a58c69147f2b17eb0f16553624eaf86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.14

Release files / mira_sim-0.1.2-py3-none-any.whl

Download URL mira_sim-0.1.2-py3-none-any.whl
Size 41.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
384e1bed8e2508e186e2b2d1363a9158239e256e02e655a59ebe44276be3e341
BLAKE2b-256 checksum
How to use checksums
09acea3205f6272a19f75a6d303c9b385b957826421070396a63179b6f8684b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.14

Security for mira-sim 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page