deepfakes / faceswap-model

Tweaking the generative model
147 stars 133 forks source link

How do I reuse models in other faceswaps? #28

Open Tvde1 opened 5 years ago

Tvde1 commented 5 years ago

Let's say I have a well trained faceswap with Person A -> Person B
And now I want another faceswap with Person C -> Person A.

Can I reuse, say, encoder_A.h of model 1 and paste that as encoder_B.h in model 2?

RemsX commented 5 years ago

yeah you can. I'm not sure if this is recommended, but I've experimented with swapping A and B a couple of times. This seems to have helped in cases where there are very few images. My theory was that some facial expressions don't exist in the source images of "B" lets say, by switching them I seem to have given it a full range of expression for the desired video, although, of course the expressions came from the original "A" video, which means the face may not look quite as authentic as it should, but it's often better than whatever it would have otherwise guessed. I have a handful of models folders so that I can re-use similar looking ones if needed, that is generally quicker, although some say have trained a model to recognize any face might be good for optimization if you want to be quick and don't need to train model B and you have a pretrained encoder for A which is trained using many different faces. This is all just conjecture, but yeah, it's experimental and open source so.. good luck.

mike3454 commented 5 years ago

@RemsX cool. Is there a publicly accessible link to download the pre trained models

DylanMaeng commented 5 years ago

@Tvde1 Cool!Is this method feasible? I want to replace A or B ‘s face with the face of untrained C? I have tried to replace C ‘s face with A or B' face. The result is not bad.

jiangbo2015 commented 5 years ago

The result looks good