The last couple of days I've been playing with Faceswap and created a couple of demo videos in which I swap the face of Jeff Bezos with that of Elon Musk. You can see the result here: https://streamable.com/7w1g6.
The videos I used to train the model are:
I extracted frames in which only the face of the subject occurs and randomly selected about 8000 frames from the video. Then I extracted the faces using:
Code: Select all
python faceswap.py extract -i <input> -o <output> -D s3fd -A fan -nm hist
The model used for training is the Villain model:
Code: Select all
python faceswap.py train -A <A> -ala <A fsa> -B <B> -alb <B fsa> -m <model> -t villain -bs 32 -nl -g 4
I changed the following parameters in train.ini
Code: Select all
coverage = 70.0
loss_function = ssim
reflect_padding = True
Training was done on an AWS p3.8xlarge instance containing 4 Tesla V100 GPU's for 10,175 iterations. The lowest average loss dropped to 0.01620 for A and 0.01586 for B.
To me the result still looks more blurry than I expected. Do you feel the same? Can this be caused by the resolution of the faces that are swapped? In the demo video they are around 275x275 pixels while the output of the network is 128x128. Is it possible to train the Villain network with a larger in- and output size? Or do you have any other suggestions to make the result less blurry?
Much appreciated!