Downloads · 30 days
0
GuijiAI/ReHiFace-S
ReHiFace-S is a machine learning model from GuijiAI. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
ReHiFace-S, short for “Real Time High-Fidelity Faceswap”, is a real-time high-fidelity faceswap algorithm created by Silicon-based Intelligence. By open-sourcing the capabilities of digital human generation, developer…
Downloads · 30 days
0
Access
Public
Updated Aug 20, 2024
Repo size
17.4 MB
Likes
52
Public
Click a slice to open those files.
.gif11 MB · 61%
From the Hugging Face model README
ReHiFace-S, short for “Real Time High-Fidelity Faceswap”, is a real-time high-fidelity faceswap algorithm created by Silicon-based Intelligence. By open-sourcing the capabilities of digital human generation, developers can easily generate large-scale digital humans who they want, enabling real-time faceswap capability.
We show some faceswap examples. </br>
<p align="center"> <img src="./assets/demo20.gif" alt="showcase"> <br> </p> <p align="center"> <img src="./assets/demo10.gif" alt="showcase"> <br> </p>conda create --name faceswap python=3.9
conda activate faceswap
pip install -r requirements.txt
Download all pretrained weights from Google Drive or Baidu Yun. We have packed all weights in one directory 😊. Download and place them in ./pretrain_models folder ensuring the directory structure is as follows:</br>
pretrain_models
├── 9O_865k.onnx
├── CurricularFace.tjm
├── gfpganv14_fp32_bs1_scale.onnx
├── pfpld_robust_sim_bs1_8003.onnx
├── scrfd_500m_bnkps_shape640x640.onnx
├── xseg_230611_16_17.onnx
CUDA_VISIBLE_DEICES='0' python inference.py
Or, you can change the input by specifying the --src_img_path and --video_path arguments:
CUDA_VISIBLE_DEICES='0' python inference.py --src_img_path --video_path
You should at least run by NVIDIA GTX 1080Ti. </br>
Notice: The time taken to render to a video and warm up the models are not included. </br>
Not support Super Resolution.
CUDA_VISIBLE_DEICES='0' python inference_cam.py
Notice: Support change source face during live with 'data/image_feature_dict.pkl' !
<p align="center"> <img src="./assets/cam_demo1.gif" alt="showcase"> <br> </p> <p align="center"> <img src="./assets/cam_demo2.gif" alt="showcase"> <br> </p>We also provide a Gradio interface for a better experience, just run by:
python app.py
If you find ReHiFace-S useful for your research, welcome to 🌟 this repo.