Page 1 of 1

no change between 30,000 iterations and 54,000

Posted: Sat Aug 15, 2020 4:50 pm
by Ash Johnson

Okay, so let me say this faceswap was probably going to be the first and last one I ever do. I have been training for about 340 hours. I thought that I could end at about 40 - 50 thousand iters, but no. It doesn't look good enough. At first I kept training till 30,000 iterations and then converted it to a video. The lip sync was not bad, but the problem was that it was really blurry. I thought "No problem! I only have 30,000 iterations!". So I trained some more. 40000 iterations - still blurry. In fact, I couldn't even tell they were different. Now I am at 54,000 iteration with not even the slightest improvement. And for that matter, check out this video:

She did 70,000 iterations and got crystal clear results. I only have about 15,000 iterations less then them. But it still look really blurry. And I don't think getting to 70,000 iters will make a big difference looking at the 30,000 video and the 54,000 one. What am I doing wrong?

I don't have the appropriate specs to run faceswap but I managed anyways. Here they are below:

OS: Windows 10 Home 64 Bit Build 2004
Faceswap Mode: CPU
CPU: Intel Core i5 inside 3.20 GHz
RAM: 16 GB
Training Batch Size: 64
Trainer: Original
Conversion Writer: Used Ffmpeg for 30,000 iters, Pillow for 40,000, and OpenCV for 54,000
Conversion Scaling: None
Conversion Mask Type: Extended
Conversion Color Adjustment: Avg-Color for 40,000 iters and 50,000 iters, used Match-Hist for 30,000

Just saying, I am not on a VM.


Re: no change between 30,000 iterations and 54,000

Posted: Sun Aug 16, 2020 8:55 am
by torzdf

Oooof. You're training on CPU? I'm quite impressed you've got this far!

The single most important thing for clear swaps is the quality of data. Unfortunately data selection tends to be a skill that is picked up with time and practice. I tell nearly everyone that their first swap will be terrible.

That said, you can do some tricks to help make the final swap look better, like downscaling your final video to 320p for example.


Re: no change between 30,000 iterations and 54,000

Posted: Sun Aug 16, 2020 2:11 pm
by Ash Johnson

Thanks for the advice. I recorded my face for about ten minutes. I was just swapping it on to my brother as a test run. It did take a lot longer than expected. I recorded my brother's face first so I could see what he did and try to replicate that. His clip was only 17 seconds long. I have been researching on how faceswap and ai works so I can make better ones. Me and my brother look pretty similar so it doesn't have to do much morphing either. We also filmed in the same room and time so we don't have to mess around with color grading stuff. If the problem is that it is my first one then I think the only logical thing to do is quite at maybe 70,000 iters and just call it 350 hours.;) ;)


Re: no change between 30,000 iterations and 54,000

Posted: Mon Aug 17, 2020 12:03 am
by torzdf

If you can (and a GPU is out of reach for you), then I recommend looking into cloud compute for experimentation. You will get results and feedback a LOT quicker than experimenting on CPU.

GCP currently offer some free credit. See here: viewtopic.php?f=4&t=357


Re: no change between 30,000 iterations and 54,000

Posted: Mon Aug 17, 2020 5:22 am
by bryanlyon

Also it's important to note that Faceswap doesn't do any sort of "morphing" and having very similar faces wont actually speed up training. But I can also say that I've often trained models for more than 500k iterations at quite high batch sizes effectively training anywhere from 10-100x as much as your 54k iterations (what Batch Size did you use). GPU is HIGHLY recommended to get anywhere as it's somehwere around that same 10-100x difference as the speed of CPU training.