deepfakes / faceswap-model

Tweaking the generative model
147 stars 133 forks source link

[Paper] Fast Face-swap Using Convolutional Neural Networks #15

Closed Clorr closed 5 years ago

Clorr commented 6 years ago

A paper with another approach at face swapping. I don't know how it compares to ours, especially as it shows only examples of frontal poses. But maybe there is some useful info to pick (loss function maybe ?)

https://arxiv.org/abs/1611.09577

bryanlyon commented 6 years ago

This paper obviously involves a lot of similar techniques to the one used in faceswap. The big difference is that their model is unidirectional and makes assumptions about pose that allow it to run faster. These assumptions would not work in our context since we want a variety of poses (The face pointing different directions in the final video). It's possible that /u/deepfakes actually read this paper in designing his model.

Many of the methods in the paper are in use in the model used in faceswaps. It already treats lighting as a discriminator in the face matching. The loss function is not terribly different from faceswap, though the weights are different, the main features which are calculated are very similar.

I am not certain whether the model in this paper would be faster or better for us, even if we allowed for pose differentiation, the model is unidirectional. The unidirectional nature of the model may allow it to be faster, since only one set of matrix transformations are necessary in training, but may make the model less effective an facial transforms. Changing faceswap to use the model in the paper would require a fair amount of work since the current system assumes bidirectionality.

In the end, this paper seems interesting, but probably not helpful as it's innovations are antithetical to our use cases.

shaoanlu commented 6 years ago

This paper was published before cycleGAN and UNIT. It's sad that even a 1.5-year-old paper seems obsolete (hyperbole here) in deep learning era.

Nevertheless it provides many insights/techniques for face swapping, e.g., pyramidal (multi-scale) architecture, light. loss, showing effectiveness of style transfer approach on human face, and U-NET for post-processing segmentation. I think the segmentation model can be applied to replace the current landmarks convex hull. See how it handles hairs/bangs in Fig. 5. But unfortunately there is not much information about how the segmentation network was trained.

bryanlyon commented 6 years ago

Yeah, I saw that, but it seems that for the final picture they're just cutting the replacement face off RIGHT above the eyes. So the forehead is getting no treatment at all. In fact, they actually mention that their model changes "nose, eyes, eyebrows, lips and facial wrinkles" and you can see how those details are really the only ones changed. I think, in general, faceswap is significantly more advanced and that this paper is less than useful in advancing the models we have.