PNGAlignments
- class lib.align.objects.PNGAlignments(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>)
Bases:
DataclassDictBase Dataclass for storing a single faces’ Alignment Information in Alignments files and 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:
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]]])
- 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
- h: int = <dataclasses._MISSING_TYPE object>
The height of the bounding box
- identity: dict[str, ndarray[tuple[Any, ...], dtype[float32]]] = <dataclasses._MISSING_TYPE object>
The identity vectors stored for the face
- landmarks_xy: ndarray[tuple[Any, ...], dtype[float32]] = <dataclasses._MISSING_TYPE object>
The (x, y) landmark points of the face
- mask: dict[str, MaskAlignmentsFile] = <dataclasses._MISSING_TYPE object>
The masks stored for the face
- w: int = <dataclasses._MISSING_TYPE object>
The width of the bounding box
- x: int = <dataclasses._MISSING_TYPE object>
The left most point of the bounding box
- y: int = <dataclasses._MISSING_TYPE object>
The top most point of the bounding box