<h1 align='center'>EchoMimic:通过可编辑的关键点条件实现逼真的音频驱动人像动画</h1>
<div align='center'>
<a href='https://github.com/yuange250' target='_blank'>陈志远</a><sup>*</sup> 
<a href='https://github.com/JoeFannie' target='_blank'>曹佳炯</a><sup>*</sup> 
<a href='https://github.com/octavianChen' target='_blank'>陈志全</a><sup></sup> 
<a href='https://github.com/lymhust' target='_blank'>李玉明</a><sup></sup> 
<a href='https://github.com/' target='_blank'>马晨光</a><sup></sup>
</div>
<div align='center'>
*共同第一作者
</div>
<div align='center'>
蚂蚁集团支付宝终端技术部
</div>
<br>
<div align='center'>
<a href='https://badtobest.github.io/echomimic.html'><img src='https://img.shields.io/badge/项目-主页-blue'></a>
<a href='https://huggingface.co/BadToBest/EchoMimic'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20HuggingFace-模型-yellow'></a>
<a href='https://huggingface.co/spaces/BadToBest/EchoMimic'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20HuggingFace-演示-yellow'></a>
<a href='https://www.modelscope.cn/models/BadToBest/EchoMimic'><img src='https://img.shields.io/badge/ModelScope-模型-purple'></a>
<a href='https://www.modelscope.cn/studios/BadToBest/BadToBest'><img src='https://img.shields.io/badge/ModelScope-演示-purple'></a>
<a href='https://arxiv.org/abs/2407.08136'><img src='https://img.shields.io/badge/论文-Arxiv-red'></a>
</div>
📣 📣 更新
- [2024.08.02] 🔥 EchoMimic 现已在 huggingface 上可用,使用 A100 GPU。感谢 ModelScope 的 Wenmeng Zhou。
- [2024.07.25] 🔥🔥🔥 音频驱动的加速模型和管道已发布。推理速度可提高 10 倍(在 V100 GPU 上从 ~7 分钟/240 帧提升到 ~50 秒/240 帧)
- [2024.07.23] 🔥 EchoMimic 的 gradio 演示在 modelscope 上已就绪。
- [2024.07.23] 🔥 EchoMimic 的 gradio 演示在 huggingface 上已就绪。感谢 Sylvain Filoni@fffiloni。
- [2024.07.17] 🔥🔥🔥 音频 + 选定关键点的加速模型和管道已发布。推理速度可提高 10 倍(在 V100 GPU 上从 ~7 分钟/240 帧提升到 ~50 秒/240 帧)
- [2024.07.14] 🔥 ComfyUI 现已可用。感谢 @smthemex 的贡献。
- [2024.07.13] 🔥 感谢 NewGenAI 提供的视频安装教程。
- [2024.07.13] 🔥 我们发布了姿态和音频驱动的代码和模型。
- [2024.07.12] 🔥 WebUI 和 GradioUI 版本已发布。我们感谢 @greengerong @Robin021 和 @O-O1024 的贡献。
- [2024.07.12] 🔥 我们的论文已在 arxiv 上公开。
- [2024.07.09] 🔥 我们发布了音频驱动的代码和模型。
展示
音频驱动(歌唱)
<table class="center">
<tr>
<td width=30% style="border: none">
<video controls loop src="https://github.com/BadToBest/EchoMimic/assets/11451501/d014d921-9f94-4640-97ad-035b00effbfe" muted="false"></video>
</td>
<td width=30% style="border: none">
<video controls loop src="https://github.com/BadToBest/EchoMimic/assets/11451501/877603a5-a4f9-4486-a19f-8888422daf78" muted="false"></video>
</td>
<td width=30% style="border: none">
<video controls loop src="https://github.com/BadToBest/EchoMimic/assets/11451501/e0cb5afb-40a6-4365-84f8-cb2834c4cfe7" muted="false"></video>
</td>
</tr>
</table>
音频驱动(英语)
<table class="center">
<tr>
<td width=30% style="border: none">
<video controls loop src="https://github.com/BadToBest/EchoMimic/assets/11451501/386982cd-3ff8-470d-a6d9-b621e112f8a5" muted="false"></video>
</td>
<td width=30% style="border: none">
<video controls loop src="https://github.com/BadToBest/EchoMimic/assets/11451501/5c60bb91-1776-434e-a720-8857a00b1501" muted="false"></video>
</td>
<td width=30% style="border: none">
<video controls loop src="https://github.com/BadToBest/EchoMimic/assets/11451501/1f15adc5-0f33-4afa-b96a-2011886a4a06" muted="false"></video>
</td>
</tr>
</table>
音频驱动(中文)
<table class="center">
<tr>
<td width=30% style="border: none">
<video controls loop src="https://github.com/BadToBest/EchoMimic/assets/11451501/a8092f9a-a5dc-4cd6-95be-1831afaccf00" muted="false"></video>
</td>
<td width=30% style="border: none">
<video controls loop src="https://github.com/BadToBest/EchoMimic/assets/11451501/c8b5c59f-0483-42ef-b3ee-4cffae6c7a52" muted="false"></video>
</td>
<td width=30% style="border: none">
<video controls loop src="https://github.com/BadToBest/EchoMimic/assets/11451501/532a3e60-2bac-4039-a06c-ff6bf06cb4a4" muted="false"></video>
</td>
</tr>
</table>
关键点驱动
<table class="center">
<tr>
<td width=30% style="border: none">
<video controls loop src="https://github.com/BadToBest/EchoMimic/assets/11451501/1da6c46f-4532-4375-a0dc-0a4d6fd30a39" muted="false"></video>
</td>
<td width=30% style="border: none">
<video controls loop src="https://github.com/BadToBest/EchoMimic/assets/11451501/d4f4d5c1-e228-463a-b383-27fb90ed6172" muted="false"></video>
</td>
<td width=30% style="border: none">
<video controls loop src="https://github.com/BadToBest/EchoMimic/assets/11451501/18bd2c93-319e-4d1c-8255-3f02ba717475" muted="false"></video>
</td>
</tr>
</table>
音频 + 选定关键点驱动
<table class="center">
<tr>
<td width=30% style="border: none">
<video controls loop src="https://github.com/BadToBest/EchoMimic/assets/11451501/4a29d735-ec1b-474d-b843-3ff0bdf85f55" muted="false"></video>
</td>
<td width=30% style="border: none">
<video controls loop src="https://github.com/BadToBest/EchoMimic/assets/11451501/b994c8f5-8dae-4dd8-870f-962b50dc091f" muted="false"></video>
</td>
<td width=30% style="border: none">
<video controls loop src="https://github.com/BadToBest/EchoMimic/assets/11451501/955c1d51-07b2-494d-ab93-895b9c43b896" muted="false"></video>
</td>
</tr>
</table>
(以上部分演示图片来源于图片网站。如有侵权,我们将立即删除并致歉。)
安装
下载代码
git clone https://github.com/BadToBest/EchoMimic
cd EchoMimic
Python 环境设置
- 测试系统环境:Centos 7.2/Ubuntu 22.04,Cuda >= 11.7
- 测试 GPU:A100(80G) / RTX4090D (24G) / V100(16G)
- 测试 Python 版本:3.8 / 3.10 / 3.11
创建 conda 环境(推荐):
conda create -n echomimic python=3.8
conda activate echomimic
使用 pip
安装包
pip install -r requirements.txt
下载 ffmpeg-static
下载 并解压 ffmpeg-static,然后
export FFMPEG_PATH=/path/to/ffmpeg-4.4-amd64-static
下载预训练权重
git lfs install
git clone https://huggingface.co/BadToBest/EchoMimic pretrained_weights
pretrained_weights 的组织结构如下:
./pretrained_weights/
├── denoising_unet.pth
├── reference_unet.pth
├── motion_module.pth
├── face_locator.pth
├── sd-vae-ft-mse
│ └── ...
├── sd-image-variations-diffusers
│ └── ...
└── audio_processor
└── whisper_tiny.pt
其中 denoising_unet.pth / reference_unet.pth / motion_module.pth / face_locator.pth 是 EchoMimic 的主要检查点文件。此仓库中的其他模型也可以从原始仓库下载,感谢他们的出色工作:
音频驱动算法推理
运行Python推理脚本:
python -u infer_audio2vid.py
python -u infer_audio2vid_pose.py
在自定义案例上进行音频驱动算法推理
编辑推理配置文件 ./configs/prompts/animation.yaml,并添加您自己的案例:
test_cases:
"path/to/your/image":
- "path/to/your/audio"
然后运行Python推理脚本:
python -u infer_audio2vid.py
参考图像与驱动视频之间的动作对齐
(首先从huggingface下载带有'_pose.pth'后缀的检查点文件)
在demo_motion_sync.py中编辑driver_video和ref_image为您的路径,然后运行
python -u demo_motion_sync.py
音频和姿势驱动算法推理
编辑 ./configs/prompts/animation_pose.yaml,然后运行
python -u infer_audio2vid_pose.py
姿势驱动算法推理
在infer_audio2vid_pose.py的第135行设置draw_mouse=True。编辑 ./configs/prompts/animation_pose.yaml,然后运行
python -u infer_audio2vid_pose.py
运行Gradio用户界面
感谢@Robin021的贡献:
python -u webgui.py --server_port=3000
发布计划
状态 | 里程碑 | 预计完成时间 |
---|
✅ | 音频驱动算法的推理源代码在GitHub上与大家见面 | 2024年7月9日 |
✅ | 发布在英语和中文普通话上训练的预训练模型 | 2024年7月9日 |
✅ | 姿势驱动算法的推理源代码在GitHub上与大家见面 | 2024年7月13日 |
✅ | 发布具有更好姿势控制的预训练模型 | 2024年7月13日 |
✅ | 发布加速模型 | 2024年7月17日 |
🚀 | 发布具有更好歌唱表现的预训练模型 | 待定 |
🚀 | 大规模和高分辨率的中文对话头像数据集 | 待定 |
致谢
我们要感谢 AnimateDiff、Moore-AnimateAnyone 和 MuseTalk 仓库的贡献者,感谢他们的开放研究和探索。
我们也感谢 V-Express 和 hallo 在基于扩散的对话头像领域所做的出色工作。
如果我们遗漏了任何开源项目或相关文章,我们愿意立即补充对这些特定工作的致谢。
引用
如果您发现我们的工作对您的研究有用,请考虑引用以下论文:
@misc{chen2024echomimic,
title={EchoMimic: Lifelike Audio-Driven Portrait Animations through Editable Landmark Conditioning},
author={Zhiyuan Chen, Jiajiong Cao, Zhiquan Chen, Yuming Li, Chenguang Ma},
year={2024},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
Star 历史
