tools package
The Tools Package provides various tools for working with Faceswap outside of the core functionality.
Subpackages
mask module
Tool to generate masks and previews of masks for existing alignments file
- class tools.mask.mask.Mask(arguments: Namespace)
Bases:
object
This tool is part of the Faceswap Tools suite and should be called from
python tools.py mask
command.Faceswap Masks tool. Generate masks from existing alignments files, and output masks for preview.
Wrapper for the mask process to run in either batch mode or single use mode
- Parameters:
arguments (
argparse.Namespace
) – Theargparse
arguments as passed in fromtools.py
- process() None
The entry point for triggering the Extraction Process.
Should only be called from
lib.cli.launcher.ScriptExecutor
model module
Tool to restore models from backup
- class tools.model.model.Inference(arguments: argparse.Namespace)
Bases:
object
Save an inference model from a trained Faceswap model.
:param
argparse.Namespace
: The command line arguments calling the model tool- process() None
Run the inference model creation process.
- class tools.model.model.Model(arguments: argparse.Namespace)
Bases:
object
Tool to perform actions on a model file.
:param
argparse.Namespace
: The command line arguments calling the model tool- process() None
Call the selected model job.