AlignmentsEntry

class lib.align.objects.AlignmentsEntry(faces: list[~lib.align.objects.FileAlignments] = <factory>, video_meta: dict[~typing.Literal['pts_time', 'keyframe'], int] = <factory>)

Bases: DataclassDict

Holds the alignments entry for a single frame in the Alignments data dictionary

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:
  • faces (list[FileAlignments])

  • video_meta (dict[Literal['pts_time', 'keyframe'], 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

faces: list[FileAlignments] = <dataclasses._MISSING_TYPE object>

The detected faces in a frame

video_meta: dict[Literal['pts_time', 'keyframe'], int] = <dataclasses._MISSING_TYPE object>

The keyframe to pts timestamp mapping for video data