MaskGenerator
- class tools.mask.mask_generate.MaskGenerator(mask_type: str, update_all: bool, input_is_faces: bool, loader: loader.Loader, alignments: align.alignments.Alignments | None, input_location: str, config_file: str | None)
Bases:
objectUses faceswap’s extract pipeline to generate masks and update them into the alignments file and/or extracted face PNG Headers
- Parameters:
mask_type (str) – The mask type to generate
update_all (bool) –
Trueto update all faces,Falseto only update faces missing masksinput_is_faces (bool) –
Trueif the input are faceswap extracted faces otherwiseFalseloader (loader.Loader) – The loader for loading source images/video from disk
config_file (str | None) – Full path to a custom config file to load.
Nonefor default configalignments (align.alignments.Alignments | None)
input_location (str)
Methods Summary
process()Process the output from the extractor pipeline
Methods Documentation
- process() T.Generator[FrameFaces, None, None]
Process the output from the extractor pipeline
- Yields:
The FrameFaces object with updated masks
- Return type:
T.Generator[FrameFaces, None, None]
- process() T.Generator[FrameFaces, None, None]
Process the output from the extractor pipeline
- Yields:
The FrameFaces object with updated masks
- Return type:
T.Generator[FrameFaces, None, None]