PyTorch implementation for high-fidelity face swapping
Top 77.3% on sourcepulse
This repository provides an unofficial PyTorch implementation of HifiFace, a high-fidelity face swapping model. It targets researchers and developers interested in advanced face manipulation techniques, offering a 256x256 resolution implementation guided by 3D shape and semantic priors for realistic results.
How It Works
The HifiFace architecture comprises three main components: a 3D shape-aware identity extractor, a semantic facial fusion module, and an encoder-decoder structure. This approach leverages 3D facial priors and semantic information to achieve high-fidelity face swaps, distinguishing it from methods that rely solely on 2D image manipulation.
Quick Start & Requirements
docker build -t hififace:latent .
) and run it (docker run ...
).Deep3DFaceRecon_pytorch
, nvdiffrast
, insightface
), downloading pre-trained models for Deep3DFace and ArcFace, and potentially using face segmentation models from PSFRGAN. CUDA is implicitly required for GPU acceleration.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The implementation uses VGGFace2 for training instead of the Asian-Celeb dataset mentioned in the paper due to accessibility issues. The pre-processing code for face alignment is noted as "to be added."
2 years ago
1 day