Skip to content

chenliqiang1106/xuniren

 
 

Repository files navigation

虚拟人说话头生成(NeRF虚拟人实时驱动)--尽情打造自己的call annie吧

xuniren windows安装教程:一步步教学在 Windows 下面安装 pytorch3d 来部署 xuniren 这个项目 - 坤坤 - 博客园 (cnblogs.com)

模型训练教程:(278条消息) xuniren(Fay数字人开源社区项目)NeRF模型训练教程_郭泽斌之心的博客-CSDN博客

Get Started

Installation

Tested on Ubuntu 22.04, Pytorch 1.12 and CUDA 11.6,or Pytorch 1.12 and CUDA 11.3

git clone https://github.com/waityousea/xuniren.git
cd xuniren

Install dependency

# for ubuntu, portaudio is needed for pyaudio to work.
sudo apt install portaudio19-dev

pip install -r requirements.txt
or
## environment.yml中的pytorch使用的1.12和cuda 11.3
conda env create -f environment.yml 
## install pytorch3d
#ubuntu/mac
pip install "git+https://github.com/facebookresearch/pytorch3d.git"

windows安装pytorch3d

  • gcc & g++ ≥ 4.9

在windows中,需要安装gcc编译器,可以根据需求自行安装,例如采用MinGW

以下安装步骤来自于pytorch3d官方, 可以根据需求进行选择。

conda create -n pytorch3d python=3.9
conda activate pytorch3d
conda install pytorch=1.13.0 torchvision pytorch-cuda=11.6 -c pytorch -c nvidia
conda install -c fvcore -c iopath -c conda-forge fvcore iopath

对于 CUB 构建时间依赖项,仅当您的 CUDA 早于 11.7 时才需要,如果您使用的是 conda,则可以继续

conda install -c bottler nvidiacub
# Demos and examples
conda install jupyter
pip install scikit-image matplotlib imageio plotly opencv-python

# Tests/Linting
pip install black usort flake8 flake8-bugbear flake8-comprehensions

任何必要的补丁后,你可以去“x64 Native Tools Command Prompt for VS 2019”编译安装

git clone https://github.com/facebookresearch/pytorch3d.git
cd pytorch3d
python setup.py install

Build extension

By default, we use load to build the extension at runtime. However, this may be inconvenient sometimes. Therefore, we also provide the setup.py to build each extension:

# install all extension modules
# notice: 该模块必须安装。
# 在windows下,建议采用vs2019的x64 Native Tools Command Prompt for VS 2019命令窗口安装
bash scripts/install_ext.sh(建议复制出来单独安装)

start(独立运行)

环境配置完成后,启动虚拟人生成器:

python app.py

start(对接fay,在ubuntu 20.04及windows10下完成测试)

环境配置完成后,启动fay对接脚本(无须启动app.py)

python fay_connect.py

扫码支助开源开发工作,凭支付单号入qq交流群

接口的输入与输出信息 Websoket.md

虚拟人生成的核心文件

## 注意,核心文件需要单独训练
.
├── data
│   ├── kf.json			
│   ├── pretrained
│   └── └── ngp_kg.pth

Inference Speed

在台式机RTX A4000或笔记本RTX 3080ti的显卡(显存16G)上进行视频推理时,1s可以推理35~43帧,假如1s视频25帧,则1s可推理约1.5s视频。

Acknowledgement

  • The data pre-processing part is adapted from AD-NeRF.
  • The NeRF framework is based on torch-ngp.
  • The algorithm core come from RAD-NeRF.
  • Usage example Fay.

学术交流可发邮件到邮箱:[email protected]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 91.2%
  • Python 6.0%
  • Cuda 2.6%
  • Other 0.2%