NVlabs / FUNIT

Translate images to unseen domains in the test time with few example images.
https://nvlabs.github.io/FUNIT/
Other
1.57k stars 238 forks source link

face swap instead of pet swap #25

Open ak9250 opened 5 years ago

ak9250 commented 5 years ago

https://github.com/shaoanlu/fewshot-face-translation-GAN uses modules from FUNIT and SPADE for face-swapping but the quality of swaps isnt as good as FUNIT, are there particular limits like expressions and rotations?

iperov commented 4 years ago

I just ported funit to pure keras and started training with 2 classes for face swap

iperov commented 4 years ago

python_2019-09-14_13-08-11

ak9250 commented 4 years ago

@iperov cool, is this port public or will it be part of deepfacelab?

iperov commented 4 years ago

part of dfl

eps696 commented 4 years ago

when approx it will appear in your dfl?

iperov commented 4 years ago

@eps696 I dont know , currently testing... Do you want source code for keras ?

eps696 commented 4 years ago

would love to try it [dfl looks a bit overloaded by end-user convenience features, cleaner task-oriented code would b perfect]

mingyuliutw commented 4 years ago

In the last page of the FUNIT arxiv paper (which will be presented in ICCV 2019), we do have the few-shot face translation experiments. We simply use CelebA for the experiments. I expect combining with SPADE and utilizing landmarks should lead to better performance thought.

image

niley1nov commented 4 years ago

@mingyuliutw I am trying to train FUNIT on celebA but I am confused. What are the classes? If I take every person as a different class then there would be too much classes. Or can I take real as 1 and fake as 0, nothing more? Please Guide me.

mingyuliutw commented 4 years ago

Each human identity is a class. CelebA has the person name for each photo. You can divide the training set into different classes using the name.

iperov commented 4 years ago

I trained FUNIT on 256 VGGFace dataset clases for a week.

Currently, it seems that it cannot correctly convert unknown persons.

FUNIT_preview_TEST

iperov commented 4 years ago

@mingyuliutw, are 256 persons with 69k total photos enough for the model?

should I expand to 1024, or 2048 persons ?

iperov commented 4 years ago

@mingyuliutw can you give me advice for network config for 1024 person classes and 200k photos?

iperov commented 4 years ago

@mingyuliutw is it good that one class has 60 photos and other class has 500 photos?

miaoYuanyuan commented 4 years ago

@iperov would you like to share me your keras code? thank you.

iperov commented 4 years ago

https://github.com/iperov/DeepFaceLab/blob/master/nnlib/FUNIT.py

miaoYuanyuan commented 4 years ago

thank you ~~

MengXinChengXuYuan commented 4 years ago

@iperov Hi I'm quite interested how you trained fuint for face swap Note N faces in the trainig data set, you just followed the origin fuint traning set and treat N ids as N classes right?

iperov commented 4 years ago

@MengXinChengXuYuan

for 1024 persons I got unsatisfactory result.

seen faces swap: 377250

unseen faces swaps are unrecognizable: python_2019-11-05_12-41-24

May be if train it on 8000 persons on bigger size funit we will get better result, but I have no time and no hardware for that.

for 2 persons result is much worse than classic deepfake autoencoder. 64905963-b6454980-d6f0-11e9-886d-4cf2e8b5956a 1

Cathy1412 commented 2 months ago

ce possible de donner des caractéristiques de rat à une personne sur une photo