VisibleObjects

class tools.manual.face_viewer.viewport.VisibleObjects(viewport: Viewport)

Bases: object

Holds the objects from the Grid that appear in the viewable area of the Viewport.

Parameters:

viewport (Viewport) – The viewport object for the FacesViewer canvas

Attributes Summary

images

The viewport's tkinter canvas image objects.

meshes

The viewport's tkinter canvas mesh annotation objects.

visible_faces

The currently visible DetectedFace objects.

visible_grid

The currently visible section of the Grid

Methods Summary

update()

Load and unload thumbnails in the visible area of the faces viewer.

Attributes Documentation

images

The viewport’s tkinter canvas image objects.

A numpy array of shape (rows, columns) corresponding to the viewable area of the display grid and containing the tkinter canvas image object for the face at the corresponding location.

Type:

numpy.ndarray

meshes

The viewport’s tkinter canvas mesh annotation objects.

A numpy array of shape (rows, columns) corresponding to the viewable area of the display grid and containing a dictionary of the corresponding tkinter polygon and line objects required to build a face’s mesh annotation for the face at the corresponding location.

Type:

numpy.ndarray

visible_faces

The currently visible DetectedFace objects.

A numpy array of shape (rows, columns) corresponding to the viewable area of the display grid and containing the detected faces at their currently viewable position.

Any locations that are not populated by a face will have None in it’s place.

Type:

numpy.ndarray

visible_grid

The currently visible section of the Grid

A numpy array of shape (4, rows, columns) corresponding to the viewable area of the display grid. 1st dimension contains frame indices, 2nd dimension face indices. The 3rd and 4th dimension contain the x and y position of the top left corner of the face respectively.

Any locations that are not populated by a face will have a frame and face index of -1.

Type:

numpy.ndarray

Methods Documentation

update() None

Load and unload thumbnails in the visible area of the faces viewer.

Return type:

None

property images: ndarray

The viewport’s tkinter canvas image objects.

A numpy array of shape (rows, columns) corresponding to the viewable area of the display grid and containing the tkinter canvas image object for the face at the corresponding location.

Type:

numpy.ndarray

property meshes: ndarray

The viewport’s tkinter canvas mesh annotation objects.

A numpy array of shape (rows, columns) corresponding to the viewable area of the display grid and containing a dictionary of the corresponding tkinter polygon and line objects required to build a face’s mesh annotation for the face at the corresponding location.

Type:

numpy.ndarray

update() None

Load and unload thumbnails in the visible area of the faces viewer.

Return type:

None

property visible_faces: ndarray

The currently visible DetectedFace objects.

A numpy array of shape (rows, columns) corresponding to the viewable area of the display grid and containing the detected faces at their currently viewable position.

Any locations that are not populated by a face will have None in it’s place.

Type:

numpy.ndarray

property visible_grid: ndarray

The currently visible section of the Grid

A numpy array of shape (4, rows, columns) corresponding to the viewable area of the display grid. 1st dimension contains frame indices, 2nd dimension face indices. The 3rd and 4th dimension contain the x and y position of the top left corner of the face respectively.

Any locations that are not populated by a face will have a frame and face index of -1.

Type:

numpy.ndarray