MCPcopy
hub / github.com/yerfor/GeneFacePlusPlus

github.com/yerfor/GeneFacePlusPlus @main sqlite

repository ↗ · DeepWiki ↗
1,962 symbols 5,582 edges 174 files 405 documented · 21%
README

GeneFace++: Generalized and Stable Real-Time 3D Talking Face Generation

arXiv| GitHub Stars | downloads | visitors

English Readme

这个仓库是GeneFace++的官方PyTorch实现,用于实现高嘴形对齐(lip-sync)、高视频真实度(video reality)、高系统效率(system efficiency)的虚拟人视频合成。您可以访问我们的项目页面以观看Demo视频, 阅读我们的论文以了解技术细节。

<img src="https://github.com/yerfor/GeneFacePlusPlus/raw/main/assets/geneface++.png" width="100%"/>

您可能同样感兴趣

  • 我们发布了Real3D-portrait (ICLR 2024 Spotlight), (https://github.com/yerfor/Real3DPortrait), 一个基于NeRF的单图驱动说话人合成系统, 仅需上传一张照片即可合成真实的说话人视频!

快速上手!

我们在这里提供一个最快体验GeneFace++的流程。

  • 步骤1:根据我们在docs/prepare_env/install_guide.md中的步骤,新建一个名为geneface的Python环境,并下载所需的3DMM文件。

  • 步骤2:下载预处理好的May的数据集 trainval_dataset.npy (Google DriveBaiduYun Disk 提取码: 98n4), 放置在data/binary/videos/May/trainval_dataset.npy路径下。

  • 步骤3:下载预训练好的通用的audio-to-motino模型 audio2motion_vae.zip (Google DriveBaiduYun Disk 提取码: 98n4) 和专用于May的motion-to-video模型 motion2video_nerf.zip (Google DriveBaiduYun Disk 提取码: 98n4), 解压到./checkpoints/目录下。

做完上面的步骤后,您的 checkpointsdata 文件夹的结构应该是这样的:

> checkpoints
    > audio2motion_vae
    > motion2video_nerf
        > may_head
        > may_torso
> data
    > binary
        > videos
            > May
                trainval_dataset.npy
  • 步骤4: 激活geneface的Python环境,然后执行:
export PYTHONPATH=./
python inference/genefacepp_infer.py --a2m_ckpt=checkpoints/audio2motion_vae --head_ckpt= --torso_ckpt=checkpoints/motion2video_nerf/may_torso --drv_aud=data/raw/val_wavs/MacronSpeech.wav --out_name=may_demo.mp4
  • 或者可以使用我们提供的Gradio WebUI:
export PYTHONPATH=./
python inference/app_genefacepp.py --a2m_ckpt=checkpoints/audio2motion_vae --head_ckpt= --torso_ckpt=checkpoints/motion2video_nerf/may_torso
  • 抑或可以使用我们提供的Google Colab,运行其中的所有cell。

在自己的视频上训练GeneFace++

如果您想在您自己的目标人物视频上训练GeneFace++,请遵循 docs/process_datadocs/train_and_infer/中的步骤。

ToDo

  • [x] Release Inference Code of Audio2Motion and Motion2Video.
  • [x] Release Pre-trained weights of Audio2Motion and Motion2Video.
  • [x] Release Training Code of Motino2Video Renderer.
  • [x] Release Gradio Demo.
  • [x] Release Google Colab.
  • [ ] Release Training Code of Audio2Motion and Post-Net.

引用

如果这个仓库对你有帮助,请考虑引用我们的工作:

@article{ye2023geneface,
  title={GeneFace: Generalized and High-Fidelity Audio-Driven 3D Talking Face Synthesis},
  author={Ye, Zhenhui and Jiang, Ziyue and Ren, Yi and Liu, Jinglin and He, Jinzheng and Zhao, Zhou},
  journal={arXiv preprint arXiv:2301.13430},
  year={2023}
}
@article{ye2023geneface++,
  title={GeneFace++: Generalized and Stable Real-Time Audio-Driven 3D Talking Face Generation},
  author={Ye, Zhenhui and He, Jinzheng and Jiang, Ziyue and Huang, Rongjie and Huang, Jiawei and Liu, Jinglin and Ren, Yi and Yin, Xiang and Ma, Zejun and Zhao, Zhou},
  journal={arXiv preprint arXiv:2305.00787},
  year={2023}
}

Core symbols most depended-on inside this repo

view
called by 257
utils/visualization/draw_3d_landmark.py
to
called by 218
data_gen/utils/path_converter.py
append
called by 181
modules/eg3ds/metrics/metric_utils.py
size
called by 160
utils/commons/dataset_utils.py
mean
called by 130
modules/eg3ds/torch_utils/training_stats.py
log
called by 62
modules/commons/improved_diffusion/logger.py
load
called by 44
modules/eg3ds/metrics/metric_utils.py
update
called by 35
utils/commons/meters.py

Shape

Method 1,097
Function 539
Class 322
Route 4

Languages

Python100%

Modules by API surface

modules/audio2motion/transformer_base.py79 symbols
modules/audio2motion/flow_base.py61 symbols
modules/commons/improved_diffusion/logger.py59 symbols
modules/eg3ds/models/networks_stylegan2.py50 symbols
modules/commons/transformer.py47 symbols
modules/commons/loralib/layers.py32 symbols
utils/commons/trainer.py31 symbols
modules/eg3ds/dnnlib/util.py31 symbols
modules/commons/gpt.py31 symbols
tasks/radnerfs/radnerf_sr.py30 symbols
tasks/radnerfs/losses.py30 symbols
utils/commons/dataset_utils.py29 symbols

Dependencies from manifests, versioned

gradio4.16.0 · 1×
httpx0.23.3 · 1×
kornia0.5.0 · 1×
librosa0.9.2 · 1×
numba0.56.4 · 1×
pypinyin0.42.0 · 1×
pyworld0.2.1rc0 · 1×
scipy1.11.1 · 1×

For agents

$ claude mcp add GeneFacePlusPlus \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact