I want to use a few videos and a folder of photos as my "source" face. How do I combine all that for trainin/conversion?

Want to know about the Faceswap's Face Extraction process? Got tips, ideas or just want to learn about how it all works? Then 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 for Extracting and preparing face sets for training a model in Faceswap.

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

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

Locked
User avatar
unkempt
Posts: 81
Joined: Wed Dec 28, 2022 2:09 pm
Has thanked: 1 time
Been thanked: 9 times

I want to use a few videos and a folder of photos as my "source" face. How do I combine all that for trainin/conversion?

Post by unkempt »

Let's say I have 5 or so videos but they're short so not a lot of frame or face position variety. I also have maybe 50 photos. I can do extraction on a folder of photos, and each of the videos, but I end up with several alignment files which does me no good when it's time to train or convert. I want to use ALL of the information in the various sources because it's the same face. To be clear, this is the face I want to replace ON to other videos.

Is there a way to create a folder of faces and matching alignments file to train on any number of videos going foward? I want to make a clean and permanent set of face extractions so I can train over and over without having to mess with the originals again.

User avatar
torzdf
Posts: 2649
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 128 times
Been thanked: 622 times

Re: I want to use a few videos and a folder of photos as my "source" face. How do I combine all that for trainin/convers

Post by torzdf »

I think you are misunderstanding the purpose(s) of the alignments file.

It serves as:

  1. convert - The document which tells the convert process where faces exist in the source for swapping
  2. general - Holds information about all the faces it has found within a particular source

In regards to training, the alignments file is not used (directly) at all. The information that is held in the PNG header of each training image is the same as the information that is held in the alignments file.

So why keep the alignments file for training? You don't have to. You can delete it. However it is the master document that contains information about the faces within a particular source. By keeping this alignments file, you can quickly and easily re-extract the faceset from the source file by just keeping the source and the corresponding alignments file. There is no need to keep facesets around, which take more space on the disk, and also the information in the PNG header may go out of date as the process moves on.

However, there is nothing stopping you deleting the original source + alignments file and just keeping the facesets. However, without the alignments file + source you would be unable to perform any edits on these faces going forward (technically, you can re-generate alignments files from a folder of faces, but that's out of scope here).

Ultimately, it's a workflow thing. For me, personally, having 10 source videos for an individual + 10 cleaned, fixed and corresponding alignments file means that I can quickly regenerate face sets for this individual..

My word is final

User avatar
unkempt
Posts: 81
Joined: Wed Dec 28, 2022 2:09 pm
Has thanked: 1 time
Been thanked: 9 times

Re: I want to use a few videos and a folder of photos as my "source" face. How do I combine all that for trainin/convers

Post by unkempt »

Ok, so if I wanted to train on a combined set of faces, all I really need to do is make sure that I properly extract, fix alignments, fix masks, make sure the updates are extracted to the pngs in a folder for each source and then I can literally copy the PNG files all into one folder for training and use that in perpetuity. That helps a LOT, thank you!

Locked