Import

class tools.mask.mask_import.Import(import_path: str, centering: CenteringType, storage_size: int, input_is_faces: bool, loader: loader.Loader, alignments: align.alignments.Alignments | None, input_location: str, mask_type: str)

Bases: object

Import masks from disk into an Alignments file

Parameters:
  • import_path (str) – The path to the input images

  • centering (CenteringType) – The centering to store the mask at

  • storage_size (int) – The size to store the mask at

  • input_is_faces (bool) – True if the input is aligned faces otherwise False

  • loader (loader.Loader) – The source file loader object

  • alignments (align.alignments.Alignments | None) – The alignments file object for the faces, if provided

  • mask_type (str) – The mask type to update to

  • input_location (str)

Attributes Summary

skip_count

Number of masks that were skipped as they do not exist for given faces

update_count

Number of masks that were skipped as they do not exist for given faces

Methods Summary

import_mask(media)

Import the mask for the given Extract Media object

Attributes Documentation

skip_count

Number of masks that were skipped as they do not exist for given faces

update_count

Number of masks that were skipped as they do not exist for given faces

Methods Documentation

import_mask(media: FrameFaces) None

Import the mask for the given Extract Media object

Parameters:

media (FrameFaces) – The extract media object containing the face(s) to import the mask for

Return type:

None

import_mask(media: FrameFaces) None

Import the mask for the given Extract Media object

Parameters:

media (FrameFaces) – The extract media object containing the face(s) to import the mask for

Return type:

None

property skip_count: int

Number of masks that were skipped as they do not exist for given faces

property update_count: int

Number of masks that were skipped as they do not exist for given faces