Update README.md
Browse files
README.md
CHANGED
|
@@ -1,199 +1,159 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
-
#
|
| 7 |
|
| 8 |
-
|
| 9 |
|
|
|
|
| 10 |
|
|
|
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
-
###
|
| 15 |
|
| 16 |
-
|
| 17 |
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 23 |
-
- **Model type:** [More Information Needed]
|
| 24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 25 |
-
- **License:** [More Information Needed]
|
| 26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 27 |
|
| 28 |
-
|
|
|
|
|
|
|
| 29 |
|
| 30 |
-
|
|
|
|
|
|
|
| 31 |
|
| 32 |
-
|
| 33 |
-
- **Paper [optional]:** [More Information Needed]
|
| 34 |
-
- **Demo [optional]:** [More Information Needed]
|
| 35 |
|
| 36 |
-
|
| 37 |
|
| 38 |
-
|
|
|
|
| 39 |
|
| 40 |
-
|
|
|
|
| 41 |
|
| 42 |
-
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
|
|
|
|
|
|
|
| 45 |
|
| 46 |
-
|
| 47 |
|
| 48 |
-
|
| 49 |
|
| 50 |
-
|
| 51 |
|
| 52 |
-
|
| 53 |
|
| 54 |
-
|
| 55 |
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
-
|
| 59 |
|
| 60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
-
|
| 63 |
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
-
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
[More Information Needed]
|
| 120 |
-
|
| 121 |
-
#### Metrics
|
| 122 |
-
|
| 123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 124 |
-
|
| 125 |
-
[More Information Needed]
|
| 126 |
-
|
| 127 |
-
### Results
|
| 128 |
-
|
| 129 |
-
[More Information Needed]
|
| 130 |
-
|
| 131 |
-
#### Summary
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
## Model Examination [optional]
|
| 136 |
-
|
| 137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 138 |
-
|
| 139 |
-
[More Information Needed]
|
| 140 |
-
|
| 141 |
-
## Environmental Impact
|
| 142 |
-
|
| 143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 144 |
-
|
| 145 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 146 |
-
|
| 147 |
-
- **Hardware Type:** [More Information Needed]
|
| 148 |
-
- **Hours used:** [More Information Needed]
|
| 149 |
-
- **Cloud Provider:** [More Information Needed]
|
| 150 |
-
- **Compute Region:** [More Information Needed]
|
| 151 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 152 |
-
|
| 153 |
-
## Technical Specifications [optional]
|
| 154 |
-
|
| 155 |
-
### Model Architecture and Objective
|
| 156 |
-
|
| 157 |
-
[More Information Needed]
|
| 158 |
-
|
| 159 |
-
### Compute Infrastructure
|
| 160 |
-
|
| 161 |
-
[More Information Needed]
|
| 162 |
-
|
| 163 |
-
#### Hardware
|
| 164 |
-
|
| 165 |
-
[More Information Needed]
|
| 166 |
-
|
| 167 |
-
#### Software
|
| 168 |
-
|
| 169 |
-
[More Information Needed]
|
| 170 |
-
|
| 171 |
-
## Citation [optional]
|
| 172 |
-
|
| 173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 174 |
-
|
| 175 |
-
**BibTeX:**
|
| 176 |
-
|
| 177 |
-
[More Information Needed]
|
| 178 |
-
|
| 179 |
-
**APA:**
|
| 180 |
-
|
| 181 |
-
[More Information Needed]
|
| 182 |
-
|
| 183 |
-
## Glossary [optional]
|
| 184 |
-
|
| 185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 186 |
-
|
| 187 |
-
[More Information Needed]
|
| 188 |
-
|
| 189 |
-
## More Information [optional]
|
| 190 |
-
|
| 191 |
-
[More Information Needed]
|
| 192 |
-
|
| 193 |
-
## Model Card Authors [optional]
|
| 194 |
-
|
| 195 |
-
[More Information Needed]
|
| 196 |
-
|
| 197 |
-
## Model Card Contact
|
| 198 |
-
|
| 199 |
-
[More Information Needed]
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- AVSR
|
| 5 |
+
- AVHuBERT
|
| 6 |
+
language:
|
| 7 |
+
- ja
|
| 8 |
+
pipeline_tag: automatic-speech-recognition
|
| 9 |
+
base_model:
|
| 10 |
+
- enactic/japanese-avhubert-base_noise_pt
|
| 11 |
+
metrics:
|
| 12 |
+
- cer
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# AVista Base+ 🐦🔥
|
| 16 |
|
| 17 |
+
This is AVHuBERT (Audio-Visual Hidden Unit BERT) Base model for AVSR (Audio-Visual Speech Recognition) task, derived from [`enactic/japanese-avhubert-base_noise_pt`](https://huggingface.co/enactic/japanese-avhubert-base_noise_pt).
|
| 18 |
|
| 19 |
+
This model is fine-tuned on approximately 1,300h of Japanese audio-visual dataset.
|
| 20 |
|
| 21 |
+
## Usage
|
| 22 |
|
| 23 |
+
Please install dependencies first.
|
| 24 |
+
```bash
|
| 25 |
+
$ pip install git+https://github.com/reazon-research/ReazonSpeech.git#subdirectory=pkg/avsr
|
| 26 |
+
```
|
| 27 |
|
| 28 |
+
### Using `transformers` directly
|
| 29 |
|
| 30 |
+
You can load AVSR models by directly using Hugging Face transformers if you trust our remote code.
|
| 31 |
|
| 32 |
+
```python
|
| 33 |
+
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor
|
| 34 |
|
| 35 |
+
processor = AutoProcessor.from_pretrained("enactic/avista-base-plus", trust_remote_code=True)
|
| 36 |
+
model = AutoModelForSpeechSeq2Seq.from_pretrained("enactic/avista-base-plus", trust_remote_code=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
+
inputs = processor(raw_audio="path/to/audio", raw_video="path/to/video")
|
| 39 |
+
# If mouth extraction is not performed, you can add `extract_mouth=True`
|
| 40 |
+
inputs = processor(raw_audio="path/to/audio", raw_video="path/to/video", extract_mouth=True)
|
| 41 |
|
| 42 |
+
outputs = model.generate(**inputs, num_beams=5, max_new_tokens=256)
|
| 43 |
+
transcription = processor.decode(outputs[0], skip_special_tokens=True)
|
| 44 |
+
```
|
| 45 |
|
| 46 |
+
### Using `reazonspeech.avsr` package
|
|
|
|
|
|
|
| 47 |
|
| 48 |
+
You can also load AVSR models by using reazonspeech.avsr. If you don't want to use remote code for security reasons for example, you can use the following code.
|
| 49 |
|
| 50 |
+
```python
|
| 51 |
+
from reazonspeech.avsr import AVHubertProcessor, AVHubertForConditionalGeneration
|
| 52 |
|
| 53 |
+
processor = AVHubertProcessor.from_pretrained("enactic/avista-base-plus")
|
| 54 |
+
model = AVHubertForConditionalGeneration.from_pretrained("enactic/avista-base-plus")
|
| 55 |
|
| 56 |
+
inputs = processor(raw_audio="path/to/audio", raw_video="path/to/video")
|
| 57 |
+
# If mouth extraction is not performed, you can add `extract_mouth=True`
|
| 58 |
+
inputs = processor(raw_audio="path/to/audio", raw_video="path/to/video", extract_mouth=True)
|
| 59 |
|
| 60 |
+
outputs = model.generate(**inputs, num_beams=5, max_new_tokens=256)
|
| 61 |
+
transcription = processor.decode(outputs[0], skip_special_tokens=True)
|
| 62 |
+
```
|
| 63 |
|
| 64 |
+
## Test Results
|
| 65 |
|
| 66 |
+
We report the Character Error Rate (CER) on an out-of-domain evaluation dataset that was internally collected for AVSR benchmarking.
|
| 67 |
|
| 68 |
+
The following table presents the benchmark results of this model and Japanese ASR models under different noise levels and noise types.
|
| 69 |
|
| 70 |
+
Details of the dataset and the complete benchmark results can be found [here](https://huggingface.co/datasets/enactic/avsr-leaderboard).
|
| 71 |
|
| 72 |
+
**+ ReazonSpeech Speech**
|
| 73 |
|
| 74 |
+
| Model | #Params | N/A | SNR=10 | SNR=5 | SNR=0 | SNR=-5 |
|
| 75 |
+
| :------------------ | ------: | -----: | -----: | -----: | ------: | ------: |
|
| 76 |
+
| AVista Base+ | 156M | 26.88% | 33.24% | 38.13% | 47.64% | 63.60% |
|
| 77 |
+
| reazonspeech k2 | 159M | 7.42% | 9.13% | 19.47% | 71.61% | 104.15% |
|
| 78 |
+
| reazonspeech nemo | 619M | 8.50% | 11.74% | 25.38% | 77.65% | 103.42% |
|
| 79 |
+
| reazonspeech espnet | 118M | 7.44% | 9.20% | 16.58% | 69.34% | 103.22% |
|
| 80 |
+
| whisper large-v3 | 1,550M | 7.75% | 8.70% | 12.81% | 49.34% | 100.53% |
|
| 81 |
+
| whisper medium | 769M | 10.07% | 13.23% | 19.21% | 50.56% | 99.27% |
|
| 82 |
+
| whisper small | 244M | 10.82% | 19.82% | 28.98% | 69.69% | 108.56% |
|
| 83 |
|
| 84 |
+
**+ JSUT Speech**
|
| 85 |
|
| 86 |
+
| Model | #Params | N/A | SNR=10 | SNR=5 | SNR=0 | SNR=-5 |
|
| 87 |
+
| :------------------ | ------: | -----: | -----: | -----: | ------: | ------: |
|
| 88 |
+
| AVista Base+ | 156M | 26.88% | 31.56% | 34.03% | 38.85% | 47.72% |
|
| 89 |
+
| reazonspeech k2 | 159M | 7.42% | 8.49% | 21.94% | 70.81% | 93.04% |
|
| 90 |
+
| reazonspeech nemo | 619M | 8.50% | 10.93% | 29.06% | 83.77% | 98.76% |
|
| 91 |
+
| reazonspeech espnet | 118M | 7.44% | 8.30% | 14.45% | 66.15% | 69.34% |
|
| 92 |
+
| whisper large-v3 | 1,550M | 7.75% | 8.69% | 13.03% | 60.24% | 98.67% |
|
| 93 |
+
| whisper medium | 769M | 10.07% | 12.27% | 18.80% | 58.00% | 97.35% |
|
| 94 |
+
| whisper small | 244M | 10.82% | 19.44% | 26.75% | 71.33% | 101.84% |
|
| 95 |
|
| 96 |
+
**+ Babble**
|
| 97 |
|
| 98 |
+
| Model | #Params | N/A | SNR=10 | SNR=5 | SNR=0 | SNR=-5 |
|
| 99 |
+
| :------------------ | ------: | -----: | -----: | -----: | ------: | ------: |
|
| 100 |
+
| AVista Base+ | 156M | 26.88% | 30.02% | 36.83% | 54.02% | 82.00% |
|
| 101 |
+
| reazonspeech k2 | 159M | 7.42% | 8.24% | 10.17% | 21.65% | 61.57% |
|
| 102 |
+
| reazonspeech nemo | 619M | 8.50% | 10.40% | 14.83% | 31.74% | 77.29% |
|
| 103 |
+
| reazonspeech espnet | 118M | 7.44% | 8.85% | 11.75% | 24.59% | 67.27% |
|
| 104 |
+
| whisper large-v3 | 1,550M | 7.75% | 8.95% | 12.50% | 30.09% | 81.60% |
|
| 105 |
+
| whisper medium | 769M | 10.07% | 12.52% | 18.18% | 42.27% | 95.43% |
|
| 106 |
+
| whisper small | 244M | 10.82% | 19.72% | 28.24% | 56.72% | 109.61% |
|
| 107 |
|
| 108 |
+
**+ Music**
|
| 109 |
|
| 110 |
+
| Model | #Params | N/A | SNR=10 | SNR=5 | SNR=0 | SNR=-5 |
|
| 111 |
+
| :------------------ | ------: | -----: | -----: | -----: | -----: | ------: |
|
| 112 |
+
| AVista Base+ | 156M | 26.88% | 27.91% | 31.29% | 41.01% | 56.38% |
|
| 113 |
+
| reazonspeech k2 | 159M | 7.42% | 7.69% | 8.33% | 9.49% | 16.90% |
|
| 114 |
+
| reazonspeech nemo | 619M | 8.50% | 9.28% | 9.97% | 13.65% | 24.61% |
|
| 115 |
+
| reazonspeech espnet | 118M | 7.44% | 7.86% | 8.57% | 10.41% | 16.62% |
|
| 116 |
+
| whisper large-v3 | 1,550M | 7.75% | 8.16% | 9.01% | 11.23% | 21.26% |
|
| 117 |
+
| whisper medium | 769M | 10.07% | 11.13% | 12.97% | 16.45% | 31.62% |
|
| 118 |
+
| whisper small | 244M | 10.82% | 18.02% | 19.86% | 26.82% | 47.69% |
|
| 119 |
+
|
| 120 |
+
**+ Environmental Noise**
|
| 121 |
+
|
| 122 |
+
| Model | #Params | N/A | SNR=10 | SNR=5 | SNR=0 | SNR=-5 |
|
| 123 |
+
| :------------------ | ------: | -----: | -----: | -----: | -----: | -----: |
|
| 124 |
+
| AVista Base+ | 156M | 26.88% | 28.65% | 30.60% | 35.43% | 44.16% |
|
| 125 |
+
| reazonspeech k2 | 159M | 7.42% | 8.07% | 8.68% | 10.32% | 15.53% |
|
| 126 |
+
| reazonspeech nemo | 619M | 8.50% | 9.31% | 10.16% | 12.71% | 18.32% |
|
| 127 |
+
| reazonspeech espnet | 118M | 7.44% | 8.00% | 8.63% | 10.06% | 14.54% |
|
| 128 |
+
| whisper large-v3 | 1,550M | 7.75% | 8.46% | 9.17% | 11.98% | 19.36% |
|
| 129 |
+
| whisper medium | 769M | 10.07% | 11.77% | 13.06% | 17.04% | 24.83% |
|
| 130 |
+
| whisper small | 244M | 10.82% | 17.62% | 19.84% | 25.55% | 33.77% |
|
| 131 |
+
|
| 132 |
+
## Citation
|
| 133 |
+
|
| 134 |
+
```
|
| 135 |
+
@misc{enactic/avista-base-plus,
|
| 136 |
+
title={avista-base-plus},
|
| 137 |
+
author={Sasaki, Yuta},
|
| 138 |
+
url = {https://huggingface.co/enactic/avista-base-plus},
|
| 139 |
+
year = {2025}
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
@article{shi2022avhubert,
|
| 143 |
+
author = {Bowen Shi and Wei-Ning Hsu and Kushal Lakhotia and Abdelrahman Mohamed},
|
| 144 |
+
title = {Learning Audio-Visual Speech Representation by Masked Multimodal Cluster Prediction},
|
| 145 |
+
journal = {arXiv preprint arXiv:2201.02184}
|
| 146 |
+
year = {2022}
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
@article{shi2022avsr,
|
| 150 |
+
author = {Bowen Shi and Wei-Ning Hsu and Abdelrahman Mohamed},
|
| 151 |
+
title = {Robust Self-Supervised Audio-Visual Speech Recognition},
|
| 152 |
+
journal = {arXiv preprint arXiv:2201.01763}
|
| 153 |
+
year = {2022}
|
| 154 |
+
}
|
| 155 |
+
```
|
| 156 |
+
|
| 157 |
+
## License
|
| 158 |
+
|
| 159 |
+
[Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|