PNGSource
- class lib.align.objects.PNGSource(alignments_version: float, original_filename: str, face_index: int, source_filename: str, source_is_video: bool, source_frame_dims: tuple[int, int])
Bases:
DataclassDictDataclass for storing additional meta information in PNG headers.
Methods Summary
from_dict(data_dict)Load the contents from a serialized python dict into this dataclass
to_dict()Obtain the contents of the dataclass object as a python dictionary
Methods Documentation
- Parameters:
alignments_version (float)
original_filename (str)
face_index (int)
source_filename (str)
source_is_video (bool)
source_frame_dims (tuple[int, int])
- classmethod from_dict(data_dict: dict[str, Any]) Self
Load the contents from a serialized python dict into this dataclass
- Parameters:
data_dict (dict[str, Any]) – The data to load into the dataclass
- Return type:
Self
- to_dict() dict[str, Any]
Obtain the contents of the dataclass object as a python dictionary
- Return type:
The dataclass object as a python dictionary, with numpy arrays converted to lists
- alignments_version: float = <dataclasses._MISSING_TYPE object>
The alignments file version that created the alignments data
- face_index: int = <dataclasses._MISSING_TYPE object>
The index of this face within the frame
- original_filename: str = <dataclasses._MISSING_TYPE object>
The original filename that this face was saved with
- source_filename: str = <dataclasses._MISSING_TYPE object>
The filename of the original frame the face was extracted from
- source_frame_dims: tuple[int, int] = <dataclasses._MISSING_TYPE object>
The (Height, Width) dimensions of the original frame the face was extracted from
- source_is_video: bool = <dataclasses._MISSING_TYPE object>
Trueif the face was extracted from a video.Falseif from an image