This is a HeadSwap project, mainly inspired by HeSer.Pytorch
It includes two stages
Fix enviroment bug!!!
Colab notebooks:
the pictures is from 小红书 and baidu
super resolution -> CF-Net
face parsing -> face-parsing.PyTorch
3dmm -> Deep3DFaceRecon_pytorch
conda create -n headswap python==3.10.12
conda activate headswap
pip install -r requirements.txt
LVT in this project is follow here
cd process
bash download_weight.sh
files like this:
pretrained_models/
├── BFM
│ ├── 01_MorphableModel.mat
│ └── similarity_Lm3D_all.mat
├── Blender-401-00012900.pth
├── epoch_00190_iteration_000400000_checkpoint.pt
├── epoch_20.pth
├── parsing.pth
└── sr_cf.onnx
# 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