Page 1 of 1

How many iterations

Posted: Tue Sep 01, 2020 6:05 pm
by abigflea

Many newcomers to Faceswap will often ask "how many iterations do I need?".
The short answer is as many as it takes to look good.

Here is a simple example for you to look at and get an idea.
Need to watch it at HD1024 full screen. Stop at frames to see differences.

There are other considerations about batch size (go big) and over-training (have plenty of images), but that's not the point here.
The Model used here is:
DFL-SAE (Df architecture)
Batch 10 @ 128Px
MSE loss function


Re: How many iterations

Posted: Fri Sep 04, 2020 2:19 am
by ericpan0513

I was wondering why I have a Dlight model with 400K iterations, batchsize = 6, Output size=384, but still can't get a fair result.
Have 4000+pictures but was extracted from 1080p/720p youtube videos. Is this the source's problem...? Or it may need more time..?


Re: How many iterations

Posted: Fri Sep 04, 2020 2:34 am
by abigflea

Yea maybe longer.
Nothing wrong with a batch of 6, might just take longer.
In my Training Model examples post I hit 500K+ on some models and they were still getting better.
Others were just great at 100K.
I had a high res DFl-SAE Batch 8 (that's like batch 4 on the current version) for 750K before I said That is enough.

Maybe your input images aren't as good as you think?
What the computer sees and what you do is different.


Re: How many iterations

Posted: Fri Sep 04, 2020 3:55 am
by ericpan0513

Thanks!
BTW I want to ask if it's more important to find good quality videos for face B than face A(if I don't need the model to swap the other way A->B)? Like if I want to put my face on a movie star, than my face(which is B) quality influent more than face A?
Because sometimes when we want to put our own faces on celebrities or whoever, we usually can only ensure the quality of our own faces, so in this situation, is ''face A has a normal quality and face B has a good quality" an OK thing to training?


Re: How many iterations

Posted: Fri Sep 04, 2020 9:47 am
by abigflea

Both really do matter. Even if you are only converting A--> B, the NN still has to learn and its A<-->B
You might slack on the diversity of A and get away with it, do your best.

It would not be great to train for 96 hours and have a less than stellar swap