Loader
- class tools.mask.loader.Loader(location: str, is_faces: bool)
Bases:
objectLoader for reading source data from disk, and yielding the output paired with alignment information
- Parameters:
location (str) – Full path to the source files location
is_faces (bool) –
Trueif the source is a folder of faceswap extracted faces
Attributes Summary
Full file list of source files to be loaded
Trueif the source is a video file otherwiseFalseFull path to the source folder/video file location
The number of faces/frames that have been skipped due to no match in alignments file
Methods Summary
add_alignments(alignments_object)Add the loaded alignments to
_alignmentsfor content matchingload()Load content from source and pair with corresponding alignment data
Attributes Documentation
- file_list
Full file list of source files to be loaded
- is_video
Trueif the source is a video file otherwiseFalse
- location
Full path to the source folder/video file location
- skip_count
The number of faces/frames that have been skipped due to no match in alignments file
Methods Documentation
- add_alignments(alignments_object: Alignments | None) None
Add the loaded alignments to
_alignmentsfor content matching- Parameters:
alignments_object (Alignments | None) – The alignments file object or
Noneif not provided- Return type:
None
- load() Generator[FrameFaces, None, None]
Load content from source and pair with corresponding alignment data
- Yields:
The extract media object for the processed face
- Return type:
Generator[FrameFaces, None, None]
- add_alignments(alignments_object: Alignments | None) None
Add the loaded alignments to
_alignmentsfor content matching- Parameters:
alignments_object (Alignments | None) – The alignments file object or
Noneif not provided- Return type:
None
- property file_list: list[str]
Full file list of source files to be loaded
- property is_video: bool
Trueif the source is a video file otherwiseFalse
- load() Generator[FrameFaces, None, None]
Load content from source and pair with corresponding alignment data
- Yields:
The extract media object for the processed face
- Return type:
Generator[FrameFaces, None, None]
- property location: str
Full path to the source folder/video file location
- property skip_count: int
The number of faces/frames that have been skipped due to no match in alignments file