Applying a trained model to perform a swap
Once the model has completed training, it can be used to swap the faces on any video to that contains the individual that is to be swapped out. Three items are required to successfully perform a swap – a video/series of images, a trained model, and an alignments file for the media that is to be converted. The first two items are self-explanatory; the alignments file is the one item we need to create.
The alignments file
The alignments file is a file bespoke to Faceswap, with a .fsa
extension. This file should exist for every media source that is to be converted. It contains information about the location of faces within a video file, the alignment information (how the faces are orientated within each frame), as well as any associated masks for each frame.
Generating an alignments file is fairly trivial. In fact, at least one has been generated already when we built a training set. The process for generating training data and...