It's an easy-to-use tool for face frontalization. This project was created for lazy people who, like me, had a lot of problems when launching other face frontalization projects.
I recommend to use Anaconda.
To install open Anaconda Prompt, than go to the folder where you saved the lazy-face-frontalization project and paste this:
conda env create -f environment.yml
Download model (link1 or link2) and place it like "C:\Users\<Your_Username>\.insightface\models\inswapper_128\inswapper_128.onnx"
(for Windows) "home/.insightface/models/inswapper_128/inswapper_128.onnx"
(for Linux)
That`s it!!!
Open the environment you just installed. Now you can run the demo.ipynb
if you want to see an example of how it works OR you can place your own face images in input folder and run the frontalization.ipynb
/ frontalization.py
.
After that, the cropped frontalized faces will appear in the output folder.
I lied a bit when I wrote that it was face frontalization. This program just takes the face from the input image and swapp it with the frontalized dummy face. But it doesn't matter because I think the accuracy is pretty good.
- color of the output face depends on the color of the dummy.
- you can change the dummy image in
frontalization.ipynb
/frontalization.py
Developed by Oleksandr Zhuravlov and Vladyslav Prymas