Feeding images to a DeepFake model

Want to understand the training process better? Got tips for which model to use and when? This is the place for you


Forum rules

Read the FAQs and search the forum before posting a new topic.

This forum is for discussing tips and understanding the process involved with Training a Faceswap model.

If you have found a bug are having issues with the Training process not working, then you should post in the Training Support forum.

Please mark any answers that fixed your problems so others can find the solutions.

Locked
User avatar
RD23
Posts: 1
Joined: Mon Apr 24, 2023 9:58 am

Feeding images to a DeepFake model

Post by RD23 »

Hello everyone,
Firstly thanks to everyone and especially to the developper of Phaze-A for the amazing work done here, I've just started becoming interested in deepfakes and this forum has been an awesome ressource.

Since I like coding, I tried to implement a very simple architecture (1 encoder - 2 split FCL - 1 shared encoder) similar to what can be done in DFLab for instance.
I'm wondering how the batches of data are fed to the network, is it by simply iterating over the source images and then "reseeing" randomly chosen batches of the destination for instance (since I have more source images than destination images) ? As the Phaze-A guide mentions it, the term "epoch" doesn't make sense here :cry:
For now I have very good reconstructed images during training, but the swap is very blurry and not satisfying at all. I was thinking this could be the issue.
Many thanks if someone can help me, and have a good day :)

Last edited by RD23 on Mon Apr 24, 2023 12:18 pm, edited 1 time in total.
User avatar
torzdf
Posts: 2649
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 128 times
Been thanked: 623 times

Re: Feeding images to a DeepFake model

Post by torzdf »

Thank you for your kind words, I'm glad you are getting some enjoyment out of it.

For each side, the list of image files are shuffled (randomized) and then iterated through, batch by batch, until the last image is reached. The file list is then shuffled again and the process continues.

There are many reasons why the output may be blurry. See here for some pointers: app.php/faqpage#f4r1
(it won't jump to the right place as it is near the bottom of the page. You are looking for:
I've trained the model for ages, the previews look good, so why is the swapped face blurry?

Last edited by torzdf on Thu Apr 27, 2023 12:44 pm, edited 1 time in total.

My word is final

Locked