|
--- |
|
language: "en" |
|
thumbnail: |
|
tags: |
|
- Sound Classification |
|
- Interpretable Sound Classification |
|
- PIQ |
|
- Posthoc Interpretation |
|
- Posthoc Interpretation via Quantization |
|
- CNN14 |
|
license: "apache-2.0" |
|
datasets: |
|
- ESC50 |
|
--- |
|
|
|
<iframe src="https://ghbtns.com/github-btn.html?user=speechbrain&repo=speechbrain&type=star&count=true&size=large&v=2" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe> |
|
<br/><br/> |
|
|
|
# PIQ Posthoc Interpreter trained on ESC50 |
|
|
|
This repository provides all the necessary tools to perform audio posthoc interpretations using the [PIQ](https://arxiv.org/abs/2303.12659) method on a conv-2d classifier. |
|
|
|
| Release | Classification Accuracy Valid | Classification Accuracy Test | |
|
|:-------------:|:--------------:|:--------------:| |
|
| 15-07-23 | 80% | 75% | |
|
|
|
|
|
|
|
## Install SpeechBrain |
|
|
|
First of all, please install SpeechBrain with the following command: |
|
|
|
``` |
|
pip install speechbrain |
|
``` |
|
|
|
Please notice that we encourage you to read our tutorials and learn more about |
|
[SpeechBrain](https://speechbrain.github.io). |
|
|
|
|
|
### Perform Interpretable Classification on your own file |
|
|
|
```python |
|
from speechbrain.pretrained import PIQAudioInterpreter |
|
import torchaudio |
|
|
|
model = PIQAudioInterpreter.from_hparams(source="speechbrain/PIQ-ESC50", savedir='pretrained_models/PIQ-ESC50') |
|
x_int_sound_domain, text_lab, fs_model = model.interpret_file('speechbrain/PIQ-ESC50/mix.wav') |
|
|
|
print('Classification is {}'.format(text_lab)) |
|
torchaudio.save("interpretation.wav", x_int_sound_domain.data.cpu(), fs_model) |
|
``` |
|
|
|
|
|
### Limitations |
|
The SpeechBrain team does not provide any warranty on the performance achieved by this model when used on other datasets. |
|
|
|
#### Referencing SpeechBrain |
|
|
|
```bibtex |
|
@misc{speechbrain, |
|
title={{SpeechBrain}: A General-Purpose Speech Toolkit}, |
|
author={Mirco Ravanelli and Titouan Parcollet and Peter Plantinga and Aku Rouhe and Samuele Cornell and Loren Lugosch and Cem Subakan and Nauman Dawalatabad and Abdelwahab Heba and Jianyuan Zhong and Ju-Chieh Chou and Sung-Lin Yeh and Szu-Wei Fu and Chien-Feng Liao and Elena Rastorgueva and François Grondin and William Aris and Hwidong Na and Yan Gao and Renato De Mori and Yoshua Bengio}, |
|
year={2021}, |
|
eprint={2106.04624}, |
|
archivePrefix={arXiv}, |
|
primaryClass={eess.AS}, |
|
note={arXiv:2106.04624} |
|
} |
|
``` |
|
|
|
|
|
#### Referencing PIQ |
|
If you use this model for your research, please use the following Bibtex to cite it: |
|
```bibtex |
|
@misc{paissan2023posthoc, |
|
title={Posthoc Interpretation via Quantization}, |
|
author={Francesco Paissan and Cem Subakan and Mirco Ravanelli}, |
|
year={2023}, |
|
eprint={2303.12659}, |
|
archivePrefix={arXiv}, |
|
primaryClass={cs.AI} |
|
} |
|
``` |
|
|
|
# **About SpeechBrain** |
|
- Website: https://speechbrain.github.io/ |
|
- Code: https://github.com/speechbrain/speechbrain/ |
|
- HuggingFace: https://huggingface.co/speechbrain/ |