Thumbnails
- class lib.align.thumbnails.Thumbnails(alignments: align.alignments.Alignments)
Bases:
objectThumbnail images stored in the alignments file.
The thumbnails are stored as low resolution (64px), low quality JPG in the alignments file and are used for the Manual Alignments tool.
- Parameters:
alignments (align.alignments.Alignments) – The parent alignments class that these thumbs belong to
Attributes Summary
Trueif all faces in the alignments file contain thumbnail images otherwiseFalse.Methods Summary
add_thumbnail(frame, face_index, thumb)Add a thumbnail for the given face index for the given frame.
get_thumbnail_by_index(frame_index, face_index)Obtain a JPG thumbnail from the given frame index for the given face index
Attributes Documentation
- has_thumbnails
Trueif all faces in the alignments file contain thumbnail images otherwiseFalse.
Methods Documentation
- add_thumbnail(frame: str, face_index: int, thumb: ndarray) None
Add a thumbnail for the given face index for the given frame.
- Parameters:
frame (str) – The name of the frame to add the thumbnail for
face_index (int) – The face index within the given frame to add the thumbnail for
thumb (ndarray) – The encoded JPG thumbnail at 64px to add to the alignments file
- Return type:
None
- get_thumbnail_by_index(frame_index: int, face_index: int) ndarray
Obtain a JPG thumbnail from the given frame index for the given face index
- Parameters:
frame_index (int) – The frame index that contains the thumbnail
face_index (int) – The face index within the frame to retrieve the thumbnail for
- Return type:
The encoded JPG thumbnail
- add_thumbnail(frame: str, face_index: int, thumb: ndarray) None
Add a thumbnail for the given face index for the given frame.
- Parameters:
frame (str) – The name of the frame to add the thumbnail for
face_index (int) – The face index within the given frame to add the thumbnail for
thumb (ndarray) – The encoded JPG thumbnail at 64px to add to the alignments file
- Return type:
None
- get_thumbnail_by_index(frame_index: int, face_index: int) ndarray
Obtain a JPG thumbnail from the given frame index for the given face index
- Parameters:
frame_index (int) – The frame index that contains the thumbnail
face_index (int) – The face index within the frame to retrieve the thumbnail for
- Return type:
The encoded JPG thumbnail
- property has_thumbnails: bool
Trueif all faces in the alignments file contain thumbnail images otherwiseFalse.