← 开源
facebookresearch

av_hubert

A self-supervised learning framework for audio-visual speech

Model DevelopmentDomain-specific trainingPython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
996
Star
166
Fork
+0
本周
2
贡献者
创建于 2021-12-23 · 更新于 2026-10-03 · 今日第 12161 名
主要开发者
bw-shichevalierNoir

facebookresearch/av_hubert 排名第 12,161,有 996 个星标。

同类别比较

facebookresearch/av_hubert 排名第 12,161,此处有 8 个同类条目;PAIR-code/saliency 排名第 12,159。

同类别比较
名称排名指标
kuangliu/pytorch-retinanet12,155
语言:
Python
星标数:
997
分叉数:
246
简介:
RetinaNet in PyTorch
merantix/picasso12,156
语言:
Python
星标数:
997
分叉数:
120
简介:
:art: A CNN visualizer
yuchenlin/LLM-Blender12,158
语言:
Python
星标数:
997
分叉数:
91
简介:
[ACL2023] We introduce LLM-Blender, an innovative ensembling framework to attain consistently superior performance by leveraging the diverse strengths of multiple open-source LLMs. LLM-Blender cut the weaknesses through ranking and integrate the strengths through fusing generation to enhance the capability of LLMs.
PAIR-code/saliency12,159
语言:
Jupyter Notebook
星标数:
996
分叉数:
191
简介:
Framework-agnostic implementation for state-of-the-art saliency methods (XRAI, BlurIG, SmoothGrad, and more).
Unity-Technologies/com.unity.perception12,167
语言:
C#
星标数:
995
分叉数:
187
简介:
Perception toolkit for sim2real training and validation in Unity
rmunro/pytorch_active_learning12,171
语言:
Python
星标数:
995
分叉数:
182
简介:
PyTorch Library for Active Learning to accompany Human-in-the-Loop Machine Learning book
molecularsets/moses12,180
语言:
Python
星标数:
993
分叉数:
282
简介:
Molecular Sets (MOSES): A Benchmarking Platform for Molecular Generation Models
mxgmn/TextureSynthesis12,186
语言:
C#
星标数:
992
分叉数:
55
简介:
Texture synthesis from examples
关键参数与规格
关键参数与规格
参数值
语言Python
类别Model Development
子类别Domain-specific training
关键词Speech-to-text
星标数996
分叉数166
贡献者2
创建日期2021-12-23
更新日期2026-10-03
1 天星标数0
7 天星标数0
排名12,161
上次排名12,090
排名变化-71
7 天星标排名13,297
上次 7 天星标排名13,307
7 天星标排名变化10
总星标排名11,184
上次总星标排名11,161
总星标排名变化-23
国家USA
README 摘录

AV-HuBERT (Audio-Visual Hidden Unit BERT) Learning Audio-Visual Speech Representation by Masked Multimodal Cluster Prediction Robust Self-Supervised Audio-Visual Speech Recognition Introduction AV-HuBERT is a self-supervised representation learning framework for audio-visual speech. It achieves state-of-the-art results in lip reading, ASR and audio-visual speech recognition on the LRS3 audio-visual speech benchmark. If you find AV-HuBERT useful in your research, please use the following BibTeX entry for citation. License AV

-HuBERT LICENSE AGREEMENT This License Agreement (as may be amended in accordance with this License Agreement, “License”), between you (“Licensee” or “you”) and Meta Platforms, Inc. (“Meta” or “we”) applies to your use of any computer program, algorithm, source code, object code, or software that is made available by Meta under this License (“Software”) and any specifications, manuals, documentation, and other written information provided by Meta related to the Software (“Documentation”). By using the Software, you agree to the terms

of this License. If you do not agree to this License, then you do not have any rights to use the Software or Documentation (collectively, the “Software Products”), and you must immediately cease using the Software Products. Pre-trained and fine-tuned models Please find the checkpoints here Demo Installation First, create a conda virtual environment and activate it: Then, clone this directory: Lastly, install Fairseq and the other packages: Load a pretrained model Train a new model Data preparation

Follow the steps in to pre-process: LRS3 and VoxCeleb2 datasets Follow the steps in (pre-train only) to create: frame-aligned pseudo label files. The is the same as the feature frame rate used for clustering, which is 100Hz for MFCC features and 25Hz for AV-HuBERT features by default. Pre-train an AV-HuBERT model Suppose are saved at , are saved at , the configuration file is saved at , and the label rate is 100Hz. To train a model

, run: Finetune an AV-HuBERT model with Seq2Seq Suppose are saved at , are saved at , the configuration file is saved at . To fine-tune a pre-trained HuBERT model at , run: Decode an AV-HuBERT model Suppose the and are the video list and transcripts of the split to be decoded, saved at , and the fine-tuned model is saved at . Seq2Seq decoding needs to be consistent with the value used during fine-tuning. The command above uses the default

decoding hyperparameter, which can be found in . can be set to (for lip reading), or (for ASR) or (for audio-visual speech recognition). These parameters can be configured from the command line. For example, to search with a beam size of 20, we can append the command above with . Important parameters include: generation. lenpen Different test set If your test data are stored in a different directory with the training data, append the following to the above command. This is

useful when you want to test with the fine-tuned checkpoints we provide. Test under noisy environment If you want

常见问题

记录了多少星标和分叉?

facebookresearch/av_hubert 有 996 个星标和 166 个分叉。

仓库排名是多少?

facebookresearch/av_hubert 排名第 12,161。

记录的语言和类别是什么?

facebookresearch/av_hubert 有 996 个星标,语言为 Python,类别为 Model Development。

哪个仓库排名最接近?

facebookresearch/av_hubert 与 PAIR-code/saliency 比较,后者排名第 12,159,有 996 个星标。

README

AV-HuBERT (Audio-Visual Hidden Unit BERT)

Learning Audio-Visual Speech Representation by Masked Multimodal Cluster Prediction

Robust Self-Supervised Audio-Visual Speech Recognition

Introduction

AV-HuBERT is a self-supervised representation learning framework for audio-visual speech. It achieves state-of-the-art results in lip reading, ASR and audio-visual speech recognition on the LRS3 audio-visual speech benchmark.

If you find AV-HuBERT useful in your research, please use the following BibTeX entry for citation.

@article{shi2022avhubert,
    author  = {Bowen Shi and Wei-Ning Hsu and Kushal Lakhotia and Abdelrahman Mohamed},
    title = {Learning Audio-Visual Speech Representation by Masked Multimodal Cluster Prediction},
    journal = {arXiv preprint arXiv:2201.02184}
    year = {2022}
}

@article{shi2022avsr,
    author  = {Bowen Shi and Wei-Ning Hsu and Abdelrahman Mohamed},
    title = {Robust Self-Supervised Audio-Visual Speech Recognition},
    journal = {arXiv preprint arXiv:2201.01763}
    year = {2022}
}

License

AV-HuBERT LICENSE AGREEMENT

This License Agreement (as may be amended in accordance with this License Agreement, “License”), between you (“Licensee” or “you”) and Meta Platforms, Inc. (“Meta” or “we”) applies to your use of any computer program, algorithm, source code, object code, or software that is made available by Meta under this License (“Software”) and any specifications, manuals, documentation, and other written information provided by Meta related to the Software (“Documentation”).

By using the Software, you agree to the terms of this License. If you do not agree to this License, then you do not have any rights to use the Software or Documentation (collectively, the “Software Products”), and you must immediately cease using the Software Products.

Pre-trained and fine-tuned models

Please find the checkpoints here

Demo

Run our lip-reading demo using Colab:

Installation

First, create a conda virtual environment and activate it:

conda create -n avhubert python=3.8 -y
conda activate avhubert

Then, clone this directory:

git clone https://github.com/facebookresearch/av_hubert.git
cd avhubert
git submodule init
git submodule update

Lastly, install Fairseq and the other packages:

pip install -r requirements.txt
cd fairseq
pip install --editable ./

Load a pretrained model

$ cd avhubert
$ python
>>> import fairseq
>>> import hubert_pretraining, hubert
>>> ckpt_path = "/path/to/the/checkpoint.pt"
>>> models, cfg, task = fairseq.checkpoint_utils.load_model_ensemble_and_task([ckpt_path])
>>> model = models[0]

Train a new model

Data preparation

Follow the steps in preparation to pre-process:

  • LRS3 and VoxCeleb2 datasets

Follow the steps in clustering (pre-train only) to create:

  • {train,valid}.km frame-aligned pseudo label files. The label_rate is the same as the feature frame rate used for clustering, which is 100Hz for MFCC features and 25Hz for AV-HuBERT features by default.

Pre-train an AV-HuBERT model

Suppose {train,valid}.tsv are saved at /path/to/data, {train,valid}.km are saved at /path/to/labels, the configuration file is saved at /path/to/conf/conf-name, and the label rate is 100Hz.

To train a model, run:

$ cd avhubert
$ fairseq-hydra-train --config-dir /path/to/conf/ --config-name conf-name \
  task.data=/path/to/data task.label_dir=/path/to/label \
  model.label_rate=100 hydra.run.dir=/path/to/experiment/pretrain/ \
  common.user_dir=`pwd`

Finetune an AV-HuBERT model with Seq2Seq

Suppose {train,valid}.tsv are saved at /path/to/data, {train,valid}.wrd are saved at /path/to/labels, the configuration file is saved at /path/to/conf/conf-name.

To fine-tune a pre-trained HuBERT model at /path/to/checkpoint, run:

$ cd avhubert
$ fairseq-hydra-train --config-dir /path/to/conf/ --config-name conf-name \
  task.data=/path/to/data task.label_dir=/path/to/label \
  task.tokenizer_bpe_model=/path/to/tokenizer model.w2v_path=/path/to/checkpoint \
  hydra.run.dir=/path/to/experiment/finetune/ common.user_dir=`pwd`

Decode an AV-HuBERT model

Suppose the test.tsv and test.wrd are the video list and transcripts of the split to be decoded, saved at /path/to/data, and the fine-tuned model is saved at /path/to/checkpoint.

Seq2Seq decoding

task.normalize needs to be consistent with the value used during fine-tuning. Decoding results will be saved at /path/to/experiment/decode/s2s/test.

$ cd avhubert
$ python -B infer_s2s.py --config-dir ./conf/ --config-name conf-name \
  dataset.gen_subset=test common_eval.path=/path/to/checkpoint \
  common_eval.results_path=/path/to/experiment/decode/s2s/test \
  override.modalities=['video'] common.user_dir=`pwd`

The command above uses the default decoding hyperparameter, which can be found in conf/s2s_decode.yaml. override.modalities can be set to ['video'] (for lip reading), or ['audio'] (for ASR) or ['audio','video'] (for audio-visual speech recognition).These parameters can be configured from the command line. For example, to search with a beam size of 20, we can append the command above with generation.beam=20. Important parameters include:

  • generation.beam
  • generation.lenpen

Different test set

If your test data are stored in a different directory with the training data, append the following to the above command.

+override.data=/path/to/test +override.label_dir=/path/to/test

, where /path/to/test contains test.{tsv,wrd}. This is useful when you want to test with the fine-tuned checkpoints we provide.

Test under noisy environment

If you want to test your model under noisy environment, append the following to the above command.

+override.noise_wav=/path/to/noise override.noise_prob=1 override.noise_snr={snr}

{snr} is the signal-to-noise ratio (SNR) and /path/to/noise is a folder containing noise manifest files (/path/to/noise/{valid,test}.tsv). See preparation for setting up this folder.

排名相邻
同类项目