Introduction | Preparation | Inference | Citation | Contact
Lei Yang, Yi He, Fei Wu, Shilin Wang
This is the official inference implementation of Cascade-Free Mandarin Visual Speech Recognition via Semantic-Guided Cross-Representation Alignment.
-
Clone the repository.
git clone https://github.com/YangLeiSX/MandOb.git cd MandOb/app -
Setup the environment.
# Install uv if not already installed curl -LsSf https://astral.sh/uv/install.sh | sh # Create virtual environment with Python 3.10 uv venv .venv --python 3.10 # Activate virtual environment source .venv/bin/activate # Install dependencies uv pip install -r requirements.txt
-
Download the pre-trained model weights:
File Link Description CMLR-CER-0.1980.ckptDownload Model trained on CMLR dataset lrw_visual.pthDownload LRW visual frontend pretrained weights mkdir -p checkpoints pretrained # Place downloaded weights in corresponding directories # 百度网盘提取码: nau9
python main.py /path/to/video.npz [options]| Argument | Default | Description |
|---|---|---|
--device |
cpu |
Inference device (cpu or cuda) |
--decode_mode |
greedy |
Decoding mode (greedy or beam) |
--beam_size |
12 |
Beam search width |
--ckpt |
checkpoints/CMLR-CER-0.1980.ckpt |
Model checkpoint path |
# Greedy decoding (CPU)
python main.py sample.npz
# Beam search (GPU)
python main.py sample.npz --device cuda --decode_mode beam --beam_size 12python evaluate.py| Argument | Default | Description |
|---|---|---|
--test_csv |
(see below) | Path to test sample list CSV |
--npz_dir |
/path/to/CMLR/mouth_96 |
Directory containing npz files |
--text_dir |
/path/to/CMLRdataset/text |
Directory containing ground truth text files |
--device |
cpu |
Inference device |
--decode_mode |
greedy |
Decoding mode |
--output |
eval_results.csv |
Output CSV file for results |
| Checkpoint | Beam Size | CER |
|---|---|---|
| CMLR-CER-0.1980.ckpt | 12 (temp=0.8) | 0.1980 |
If you use this code, please consider citing:
@misc{yang2026cascadefreemandarinvisualspeech,
title={Cascade-Free Mandarin Visual Speech Recognition via Semantic-Guided Cross-Representation Alignment},
author={Lei Yang and Yi He and Fei Wu and Shilin Wang},
year={2026},
eprint={2603.21808},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2603.21808},
}