yubo0306 commited on
Commit
f19898e
·
verified ·
1 Parent(s): 82df2c3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +128 -166
README.md CHANGED
@@ -1,199 +1,161 @@
1
  ---
2
  library_name: transformers
3
- tags: []
 
 
 
 
 
 
 
 
 
 
4
  ---
5
 
6
- # Model Card for Model ID
7
 
8
- <!-- Provide a quick summary of what the model is/does. -->
9
 
 
10
 
 
11
 
12
- ## Model Details
 
 
 
13
 
14
- ### Model Description
15
 
16
- <!-- Provide a longer summary of what this model is. -->
17
 
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
 
19
 
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
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
- ### Model Sources [optional]
 
 
29
 
30
- <!-- Provide the basic links for the model. -->
 
 
31
 
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
 
36
- ## Uses
37
 
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
 
39
 
40
- ### Direct Use
 
41
 
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
 
 
43
 
44
- [More Information Needed]
 
 
45
 
46
- ### Downstream Use [optional]
47
 
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
 
50
- [More Information Needed]
51
 
52
- ### Out-of-Scope Use
53
 
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
 
56
- [More Information Needed]
 
 
 
 
 
 
 
 
57
 
58
- ## Bias, Risks, and Limitations
59
 
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
 
 
 
 
 
 
 
 
61
 
62
- [More Information Needed]
63
 
64
- ### Recommendations
 
 
 
 
 
 
 
 
65
 
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
 
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
 
 
 
 
 
 
 
 
69
 
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
-
76
- ## Training Details
77
-
78
- ### Training Data
79
-
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
-
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
-
103
- ## Evaluation
104
-
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
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
+ license: apache-2.0
14
  ---
15
 
16
+ # AVista Base+ v2 🐦‍🔥
17
 
18
+ 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).
19
 
20
+ This model is fine-tuned on approximately 1,300h of Japanese audio-visual dataset combined with 35,000h of Japanese audio-only dataset, [ReazonSpeech](https://huggingface.co/datasets/reazon-research/reazonspeech).
21
 
22
+ ## Usage
23
 
24
+ Please install dependencies first.
25
+ ```bash
26
+ $ pip install git+https://github.com/reazon-research/ReazonSpeech.git#subdirectory=pkg/avsr
27
+ ```
28
 
29
+ ### Using `transformers` directly
30
 
31
+ You can load AVSR models by directly using Hugging Face transformers if you trust our remote code.
32
 
33
+ ```python
34
+ from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor
35
 
36
+ processor = AutoProcessor.from_pretrained("enactic/avista-base-plus-v2", trust_remote_code=True)
37
+ model = AutoModelForSpeechSeq2Seq.from_pretrained("enactic/avista-base-plus-v2", trust_remote_code=True)
 
 
 
 
 
38
 
39
+ inputs = processor(raw_audio="path/to/audio", raw_video="path/to/video")
40
+ # If mouth extraction is not performed, you can add `extract_mouth=True`
41
+ inputs = processor(raw_audio="path/to/audio", raw_video="path/to/video", extract_mouth=True)
42
 
43
+ outputs = model.generate(**inputs, num_beams=5, max_new_tokens=256)
44
+ transcription = processor.decode(outputs[0], skip_special_tokens=True)
45
+ ```
46
 
47
+ ### Using `reazonspeech.avsr` package
 
 
48
 
49
+ 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.
50
 
51
+ ```python
52
+ from reazonspeech.avsr import AVHubertProcessor, AVHubertForConditionalGeneration
53
 
54
+ processor = AVHubertProcessor.from_pretrained("enactic/avista-base-plus-v2")
55
+ model = AVHubertForConditionalGeneration.from_pretrained("enactic/avista-base-plus-v2")
56
 
57
+ inputs = processor(raw_audio="path/to/audio", raw_video="path/to/video")
58
+ # If mouth extraction is not performed, you can add `extract_mouth=True`
59
+ inputs = processor(raw_audio="path/to/audio", raw_video="path/to/video", extract_mouth=True)
60
 
61
+ outputs = model.generate(**inputs, num_beams=5, max_new_tokens=256)
62
+ transcription = processor.decode(outputs[0], skip_special_tokens=True)
63
+ ```
64
 
65
+ ## Test Results
66
 
67
+ We report the Character Error Rate (CER) on an out-of-domain evaluation dataset that was internally collected for AVSR benchmarking.
68
 
69
+ The following table presents the benchmark results of this model and Japanese ASR models under different noise levels and noise types.
70
 
71
+ Details of the dataset and the complete benchmark results can be found [here](https://huggingface.co/datasets/enactic/avsr-leaderboard).
72
 
73
+ **+ ReazonSpeech Speech**
74
 
75
+ | Model | #Params | N/A | SNR=10 | SNR=5 | SNR=0 | SNR=-5 |
76
+ | :------------------ | ------: | -----: | -----: | -----: | ------: | ------: |
77
+ | AVista Base+ v2 | 156M | 10.77% | 15.73% | 23.08% | 62.02% | 98.19% |
78
+ | reazonspeech k2 | 159M | 7.42% | 9.13% | 19.47% | 71.61% | 104.15% |
79
+ | reazonspeech nemo | 619M | 8.50% | 11.74% | 25.38% | 77.65% | 103.42% |
80
+ | reazonspeech espnet | 118M | 7.44% | 9.20% | 16.58% | 69.34% | 103.22% |
81
+ | whisper large-v3 | 1,550M | 7.75% | 8.70% | 12.81% | 49.34% | 100.53% |
82
+ | whisper medium | 769M | 10.07% | 13.23% | 19.21% | 50.56% | 99.27% |
83
+ | whisper small | 244M | 10.82% | 19.82% | 28.98% | 69.69% | 108.56% |
84
 
85
+ **+ JSUT Speech**
86
 
87
+ | Model | #Params | N/A | SNR=10 | SNR=5 | SNR=0 | SNR=-5 |
88
+ | :------------------ | ------: | -----: | -----: | -----: | ------: | ------: |
89
+ | AVista Base+ v2 | 156M | 10.77% | 14.49% | 21.41% | 57.51% | 91.28% |
90
+ | reazonspeech k2 | 159M | 7.42% | 8.49% | 21.94% | 70.81% | 93.04% |
91
+ | reazonspeech nemo | 619M | 8.50% | 10.93% | 29.06% | 83.77% | 98.76% |
92
+ | reazonspeech espnet | 118M | 7.44% | 8.30% | 14.45% | 66.15% | 69.34% |
93
+ | whisper large-v3 | 1,550M | 7.75% | 8.69% | 13.03% | 60.24% | 98.67% |
94
+ | whisper medium | 769M | 10.07% | 12.27% | 18.80% | 58.00% | 97.35% |
95
+ | whisper small | 244M | 10.82% | 19.44% | 26.75% | 71.33% | 101.84% |
96
 
97
+ **+ Babble**
98
 
99
+ | Model | #Params | N/A | SNR=10 | SNR=5 | SNR=0 | SNR=-5 |
100
+ | :------------------ | ------: | -----: | -----: | -----: | ------: | ------: |
101
+ | AVista Base+ v2 | 156M | 10.77% | 13.86% | 20.38% | 43.51% | 85.12% |
102
+ | reazonspeech k2 | 159M | 7.42% | 8.24% | 10.17% | 21.65% | 61.57% |
103
+ | reazonspeech nemo | 619M | 8.50% | 10.40% | 14.83% | 31.74% | 77.29% |
104
+ | reazonspeech espnet | 118M | 7.44% | 8.85% | 11.75% | 24.59% | 67.27% |
105
+ | whisper large-v3 | 1,550M | 7.75% | 8.95% | 12.50% | 30.09% | 81.60% |
106
+ | whisper medium | 769M | 10.07% | 12.52% | 18.18% | 42.27% | 95.43% |
107
+ | whisper small | 244M | 10.82% | 19.72% | 28.24% | 56.72% | 109.61% |
108
 
109
+ **+ Music**
110
 
111
+ | Model | #Params | N/A | SNR=10 | SNR=5 | SNR=0 | SNR=-5 |
112
+ | :------------------ | ------: | -----: | -----: | -----: | -----: | ------: |
113
+ | AVista Base+ v2 | 156M | 10.77% | 12.51% | 14.81% | 21.85% | 40.73% |
114
+ | reazonspeech k2 | 159M | 7.42% | 7.69% | 8.33% | 9.49% | 16.90% |
115
+ | reazonspeech nemo | 619M | 8.50% | 9.28% | 9.97% | 13.65% | 24.61% |
116
+ | reazonspeech espnet | 118M | 7.44% | 7.86% | 8.57% | 10.41% | 16.62% |
117
+ | whisper large-v3 | 1,550M | 7.75% | 8.16% | 9.01% | 11.23% | 21.26% |
118
+ | whisper medium | 769M | 10.07% | 11.13% | 12.97% | 16.45% | 31.62% |
119
+ | whisper small | 244M | 10.82% | 18.02% | 19.86% | 26.82% | 47.69% |
120
 
121
+ **+ Environmental Noise**
122
+
123
+ | Model | #Params | N/A | SNR=10 | SNR=5 | SNR=0 | SNR=-5 |
124
+ | :------------------ | ------: | -----: | -----: | -----: | -----: | -----: |
125
+ | AVista Base+ v2 | 156M | 10.77% | 12.70% | 14.99% | 21.10% | 31.99% |
126
+ | reazonspeech k2 | 159M | 7.42% | 8.07% | 8.68% | 10.32% | 15.53% |
127
+ | reazonspeech nemo | 619M | 8.50% | 9.31% | 10.16% | 12.71% | 18.32% |
128
+ | reazonspeech espnet | 118M | 7.44% | 8.00% | 8.63% | 10.06% | 14.54% |
129
+ | whisper large-v3 | 1,550M | 7.75% | 8.46% | 9.17% | 11.98% | 19.36% |
130
+ | whisper medium | 769M | 10.07% | 11.77% | 13.06% | 17.04% | 24.83% |
131
+ | whisper small | 244M | 10.82% | 17.62% | 19.84% | 25.55% | 33.77% |
132
+
133
+
134
+ ## Citation
135
+
136
+ ```
137
+ @misc{enactic/avista-base-plus-v2,
138
+ title={avista-base-plus-v2},
139
+ author={Sasaki, Yuta},
140
+ url = {https://huggingface.co/enactic/avista-base-plus-v2},
141
+ year = {2025}
142
+ }
143
+
144
+ @article{shi2022avhubert,
145
+ author = {Bowen Shi and Wei-Ning Hsu and Kushal Lakhotia and Abdelrahman Mohamed},
146
+ title = {Learning Audio-Visual Speech Representation by Masked Multimodal Cluster Prediction},
147
+ journal = {arXiv preprint arXiv:2201.02184}
148
+ year = {2022}
149
+ }
150
+
151
+ @article{shi2022avsr,
152
+ author = {Bowen Shi and Wei-Ning Hsu and Abdelrahman Mohamed},
153
+ title = {Robust Self-Supervised Audio-Visual Speech Recognition},
154
+ journal = {arXiv preprint arXiv:2201.01763}
155
+ year = {2022}
156
+ }
157
+ ```
158
+
159
+ ## License
160
+
161
+ [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/)