FileAlignments
- class lib.align.objects.FileAlignments(x: int, y: int, w: int, h: int, landmarks_xy: ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy.float32]], mask: dict[str, ~lib.align.objects.MaskAlignmentsFile] = <factory>, identity: dict[str, ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy.float32]]] = <factory>, thumb: ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy.uint8]] | None = None)
Bases:
PNGAlignmentsDataclass that holds the same information as PNGAlignments as well as a thumbnail for a single face
Attributes Summary
96px JPEG thumbnail of the aligned face image stored as a list
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
Attributes Documentation
- Parameters:
x (int)
y (int)
w (int)
h (int)
landmarks_xy (ndarray[tuple[Any, ...], dtype[float32]])
mask (dict[str, MaskAlignmentsFile])
identity (dict[str, ndarray[tuple[Any, ...], dtype[float32]]])
thumb (ndarray[tuple[Any, ...], dtype[uint8]] | None)
- thumb: ndarray[tuple[Any, ...], dtype[uint8]] | None = None
96px JPEG thumbnail of the aligned face image stored as a list
Methods Documentation
- 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
- thumb: ndarray[tuple[Any, ...], dtype[uint8]] | None = None
96px JPEG thumbnail of the aligned face image stored as a list