Clone this repo:
git clone https://github.com/neuralchen/SimHuman.git
cd SimHuman
All dependencies for defining the environment are provided in environment.yml
. We recommend running this repository using Anaconda (you may need to modify environment.yml to install PyTorch that matches your own CUDA version following https://pytorch.org/):
conda env create -f environment.yml
TensorRT download URL: https://developer.nvidia.com/tensorrt-download
CUDA version must match with TensorRT version.
Untar TensorRT installation package:
tar xzvf TensorRT-xxxxxxxxxxxx.tar
Add system environment PATH in /etc/profile
or ~/.bashrc
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:[path to your tensorrt]/lib
Copy files to system lib:
sudo cp -r [your tensorrt dir]/lib/* /usr/lib
sudo cp -r [your tensorrt dir]/include/* /usr/include
Installation of TensorRT, Before installation, please check the python version:
# TensorRT installation
cd [your tensorrt dir]/python
pip install tensorrt-xxxxxxxx-py2.py3-none-any.whl
# UFF installation to support model conversion of tensorflow
cd [your tensorrt dir]/uff
pip install uff-xxxxxxxx-py2.py3-none-any.whl
# graphsurgeon installation, to support self-defined operators and structures
cd [your tensorrt dir]/graphsurgeon
pip install graphsurgeon-xxxxxxxxxx-py2.py3-none-any.whl
To verify installation, please import tensorrt and uff in python env.
Download face detection models from Google Driver.
- glintr100.onnx ---> ./insightface_func/models/ckpt/antelope/
- scrfd_10g_bnkps.onnx ---> ./insightface_func/models/ckpt/antelope/
- det_10g.onnx ---> ./insightface_func/new/
Download TTS models from [Baidu Driver, Password:qgpi
]
- 8000.pth.tar ---> ./TTS/output/ckpt/biaobei/
- generator_universal.pth.tar ---> ./TTS/hifigan/
- best_model.pt ---> ./TTS/transformer/prosody_model/
- GFPGANv1.4.onnx ---> ./restoration/
- wav2lip.pth ---> ./checkpoints/
python gui.py --video ./example.mp4