Page 1 of 1

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?

Posted: Sun Jan 22, 2023 6:29 am
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.


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

Posted: Sun Jan 22, 2023 1:47 pm
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..


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

Posted: Sun Jan 22, 2023 1:50 pm
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!