How many iterations

Training your model
Forum rules
Read the FAQs and search the forum before posting a new topic.

Please mark any answers that fixed your problems so others can find the solutions.
Post Reply
User avatar
abigflea
Posts: 129
Joined: Sat Feb 22, 2020 10:59 pm
Answers: 1
Has thanked: 11 times
Been thanked: 32 times

How many iterations

Post 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
:o I dunno what I'm doing :shock:
RTX 2070 x2 : GTX 1070 x2 : Ghetto 1060

User avatar
ericpan0513
Posts: 23
Joined: Wed Jul 22, 2020 3:34 am
Has thanked: 6 times

Re: How many iterations

Post 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..?

User avatar
abigflea
Posts: 129
Joined: Sat Feb 22, 2020 10:59 pm
Answers: 1
Has thanked: 11 times
Been thanked: 32 times

Re: How many iterations

Post 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.
:o I dunno what I'm doing :shock:
RTX 2070 x2 : GTX 1070 x2 : Ghetto 1060

User avatar
ericpan0513
Posts: 23
Joined: Wed Jul 22, 2020 3:34 am
Has thanked: 6 times

Re: How many iterations

Post 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?

User avatar
abigflea
Posts: 129
Joined: Sat Feb 22, 2020 10:59 pm
Answers: 1
Has thanked: 11 times
Been thanked: 32 times

Re: How many iterations

Post 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
:o I dunno what I'm doing :shock:
RTX 2070 x2 : GTX 1070 x2 : Ghetto 1060

Post Reply