This is a HeadSwap project, mainly inspired by HeSer.Pytorch
It includes two stages
- One stage deeply copy from PIRender
- The other stage is from HeSer.Pytorch
Colab notebooks:
the pictures is from 小红书 and baidu
super resolution -> CF-Net
face parsing -> face-parsing.PyTorch
3dmm -> Deep3DFaceRecon_pytorch
- envrionment
follow PIRender and Heser
LVT in this project is follow here - download model
a. follow Deep3DFaceRecon_pytorch(https://github.com/sicxu/Deep3DFaceRecon_pytorch#prepare-prerequisite-models), download BFM files and epoch_20.pth in pretrained_models
b. follow PIRender, put epoch_00190_iteration_000400000_checkpoint.pt to pretrained_models
c.cd process bash download_weight.sh
- run
# set your own image path in inference.py python inference.py
HeSer.Pytorch model and implementation: https://github.com/LeslieZhoa/HeSer.Pytorch Copyright © 2022,LeslieZhoa License https://github.com/LeslieZhoa/HeSer.Pytorch/blob/main/LICENSE
PIRender model and implementation: https://github.com/RenYurui/PIRender Copyright © 2021,RenYurui. License https://github.com/RenYurui/PIRender/blob/main/LICENSE.md
CF-Net model and implementation: https://github.com/ytZhang99/CF-Net Copyright © 2021,ytZhang99.
Deep3DFaceRecon_pytorch model and implementation: https://github.com/sicxu/Deep3DFaceRecon_pytorch Copyright © 2021,sicxu. License https://github.com/sicxu/Deep3DFaceRecon_pytorch/blob/master/LICENSE
arcface pytorch model pytorch model and implementation: https://github.com/ronghuaiyang/arcface-pytorch Copyright © 2018, ronghuaiyang.
LVT model and implementation: https://github.com/LeslieZhoa/LVT Copyright © 2022, LeslieZhoa.
face-parsing model and implementation: https://github.com/zllrunning/face-parsing.PyTorch Copyright © 2019, zllrunning. License https://github.com/zllrunning/face-parsing.PyTorch/blob/master/LICENSE