fast_bss_eval
Do you have a zillion BSS audio files to process and it is taking days ? Is your simulation never ending ?
Fear no more!
fast_bss_evalis here to help you!
fast_bss_eval is a fast implementation of the bss_eval metrics for the
evaluation of blind source separation. Our implementation of the bss_eval
metrics has the following advantages compared to other existing ones.
- seamlessly works with both numpy arrays and pytorch tensors
- very fast
- can be even faster by using an iterative solver (add
use_cg_iter=10option to the function call) - differentiable via pytorch
- can run on GPU via pytorch
Author
Quick Start
Install
# from pypi
pip install fast-bss-eval
# or from source
git clone https://github.com/fakufaku/fast_bss_eval
cd fast_bss_eval
pip install -e .
Use
Assuming you have multichannel signals for the estmated and reference sources
stored in wav format files names my_estimate_file.wav and
my_reference_file.wav, respectively, you can quickly evaluate the bss_eval
metrics as follows.
from scipy.io import wavfile
import fast_bss_eval
# open the files, we assume the sampling rate is known
# to be the same
fs, ref = wavfile.read("my_reference_file.wav")
_, est = wavfile.read("my_estimate_file.wav")
# compute the metrics
sdr, sir, sar, perm = fast_bss_eval.bss_eval_sources(ref.T, est.T)
Benchmark
This package is significantly faster than other packages that also allow to compute bss_eval metrics such as mir_eval or sigsep/bsseval. We did a benchmark using numpy/torch, single/double precision floating point arithmetic (fp32/fp64), and using either Gaussian elimination or a conjugate gradient descent (solve/CGD10).
Citation
If you use this package in your own research, please cite our paper describing it.
@misc{scheibler_sdr_2021,
title={SDR --- Medium Rare with Fast Computations},
author={Robin Scheibler},
year={2021},
eprint={2110.06440},
archivePrefix={arXiv},
primaryClass={eess.AS}
}
License
2021 (c) Robin Scheibler, LINE Corporation
All of this code is released under MIT License with the exception of fast_bss_eval/torch/hungarian.py which is under 3-clause BSD License.
Metadata
Release files for fast-bss-eval 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fast_bss_eval-0.1.4.tar.gz | 33.7 kB | Without provenance | Details for fast_bss_eval-0.1.4.tar.gz |
Release files / fast_bss_eval-0.1.4.tar.gz
| Download URL | fast_bss_eval-0.1.4.tar.gz |
|---|---|
| Size | 33.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9b1307577f77128dda9efb8310ff4d4ca39afc0fccce0c62640a1e34f9add13
|
|
BLAKE2b-256 checksum How to use checksums |
2cdf9095cedbb89aa308c34b692f65fb9f4405c7fea735feeea8ce3148a66f43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.12
|
Security for fast-bss-eval 0.1.4
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.