deepfakes / faceswap-model

Tweaking the generative model
147 stars 133 forks source link

Exploring new models #1

Open deepfakes opened 6 years ago

deepfakes commented 6 years ago

There are many ways to generate faces, if you find some interesting models, discuss it here

deepfakes commented 6 years ago

Currently looking at:

shaoanlu commented 6 years ago

I've modified the original auto-encoder into a GAN. https://github.com/shaoanlu/faceswap-GAN

btw, I tried random channel_shift on warped images and got worse results (input/output color inconsistency).

deepfakes commented 6 years ago

Wow ! Bravo for tackling that part !

I'm currently on Christmas duties and can't really get into this for now. You can see with @Ganonmaster what to do next. If he is ok with your proposal, we will happily add your contribution to the main repo.

Note that as touching models is a big change, maybe there will be more discussions than usual, but be sure that such contribution is precious and we will take it with the care it deserves

Clorr commented 6 years ago

@Ganonmaster did you see that ? What do you think about it ?

Ganonmaster commented 6 years ago

The results look very promising. Especially the improvement in the eyeball direction is astonishing. I do not have a any experience with GANs myself, so it is difficult for me to comment on an academic level. 😅 Looking through the jupyter notebooks, I think this code can, and should be incorporated. However, because it would result in a non-trivial increase training time, I would opt to do so in a way that does not conflict with the existing model, but still allow the user to test it out should they want to.

Clorr commented 6 years ago

Great then !

I'm thinking about a plugin architecture, already for alignment. It won't be very sophisticated but at least it will enable us to have different behaviors.

shaoanlu commented 6 years ago

There are 2 conceivable problems in my mind about merging the GAN model into the main repo:

  1. Code I wrote in the training part is somehow tensowflow-ish that different from model.fit(...) or model.train_on_batch(...) as usual keras code looks like.
  2. The perceptual loss involves a VGGFace package that requires keras 2.1.1. It may cause compatibility problems, e.g. API changes (It did happen in my environment), as well as GPU memory error during training.

The first one won't take much effort since there are lots of keras GAN examples on github. But the VGGFace one is more convolved. I can't come up with a good solution at the moment. Or perhaps we just put the jupyter notebook into a ./model_zoo or ./examples folder or playground repo where people who got interested will look at, instead of merging my model into the main pipeline.

Anyway, there's no particular hurry, let the bullets fly. 😄 I believe there will soon be more people releasing their models/architectures.

Clorr commented 6 years ago

Someone posted this on Reddit: https://www.reddit.com/r/deepfakes/comments/7n4w9p/comparison_of_loss_functions_model_decoder/

It adds some layer to the model. What's your opinion on this guys?