Skip to content

Plumerai Error Codes

This document describes the list of error codes returned by various Plumerai functions.

ErrorCode

class ErrorCode(Enum):
  SUCCESS = 0

  # Should not occur, contact Plumerai if this happens
  INTERNAL_ERROR = -1

  # Returned when a function is not available on the current platform.
  NOT_AVAILABLE = -2

  # The `delta_t` parameter should be >= 0
  INVALID_DELTA_T = -3

  # The `STATE_` error codes are only returned by
  # `VideoIntelligence::store_state` and `VideoIntelligence::restore_state`.
  # See those functions for more details.

  # The state can not be (re)stored while enrolling
  STATE_WHILE_ENROLLING = -4

  # The state could not be restored
  STATE_CORRUPT = -5

  # The state was serialized with a different height/width than the current
  # object, or uses different familiar face identification settings.
  STATE_SETTINGS_MISMATCH = -6

  # This error code is only returned by `MotionDetection::get_grid`.
  # See that function for more details.
  MOTION_GRID_NOT_YET_READY = -7

  # This is returned by `ObjectDetection::box_has_moved`,
  # `ObjectDetection::get_person_box_from_face_box` or
  # `ObjectDetection::get_face_box_from_person_box` if the argument is not a
  # valid box.
  INVALID_BOX = -8

  # Returned by `DetectionZones::add_zone` or `DetectionZones::is_box_in_zone`
  # when the provided zone coordinates or zone ID have an invalid geometry,
  # such as too few or too many points.
  INVALID_ZONE_GEOMETRY = -9

  # Returned by `DetectionZones::is_box_in_zone` if the given zone ID is not a
  # valid zone ID as created by `add_zone`.
  INVALID_ZONE_ID = -10

  # Returned by `DetectionZones::is_box_in_zone` if the given box does not
  # belong to one of the configured classes for the given detection zone, or
  # returned by `DetectionZones::add_zone` if none or invalid classes are
  # specified.
  INVALID_ZONE_CLASS = -11

  # Returned by `DetectionZones::add_zone` if the maximum number of detection
  # zones is reached.
  MAXIMUM_DETECTION_ZONES_REACHED = -12

  # Returned when the neural network shape information is not correct.
  INVALID_NEURAL_NETWORK_PARAMETER = -13

  # This is returned by `FaceIdentification::get_person_box_from_face_box` or
  # `FaceIdentification::get_face_box_from_person_box` if the argument is not a
  # valid box.
  NO_BOX_MATCH = -14

  # This is returned by `MotionDetection::set_grid_size` when the provided
  # grid size is invalid.
  INVALID_GRID_SIZE = -15

  #
  # Starting below are all error codes related to Familiar Face Identification.
  # They have values -1000 and below.
  #

  # Everything OK, enrollment is in progress.
  ENROLLMENT_IN_PROGRESS = -1000

  # Called `FaceEnrollmentManual::start_enrollment` but enrollment is already
  # started.
  ALREADY_ENROLLING = -1002

  # Last frame was ignored because multiple faces were detected within the
  # specified region of interest. Try again with one face visible.
  MULTIPLE_FACES_IN_VIEW = -1003

  # Last frame was ignored because no face was detected, or it was not clearly
  # visible, or the lighting was not good enough for enrollment. Try again with
  # one face clearly visible.
  NO_FACE_IN_VIEW = -1004

  # Last frame was ignored because the face detection was too close to the
  # edge. Too close to the edge means that the border of the face bounding-box
  # is within 2% of the edge of the image. In theory, it is OK if a face is
  # close to edge, however, it can also mean that a face is only partially
  # visible. Thus, this check is added to prevent partial faces from being
  # enrolled.
  FACE_CLOSE_TO_EDGE = -1005

  # Called `FaceEnrollmentManual::finish_enrollment` but enrollment was not
  # started.
  NOT_ENROLLING = -1006

  # This is returned by `FaceEnrollmentManual::finish_enrollment` when the
  # enrollment failed because no faces could be detected in any of the images.
  ENROLLMENT_FAILED = -1007

  # This is returned by `FaceEnrollmentManual::finish_enrollment` when a face
  # embedding is returned but the quality of the enrollment is very low. In
  # this case re-enrolllment is recommended.
  LOW_QUALITY_ENROLLMENT = -1008

  # Returned by `FaceEnrollmentManual::add_embedding` or
  # `FaceEnrollmentManual::remove_embedding` when the provided face ID is
  # invalid.
  INVALID_FACE_ID = -1009

  # Returned by `FaceEnrollmentManual::add_embedding` when the provided face
  # embedding is invalid.
  INVALID_EMBEDDING = -1010

  # Returned by `FaceEnrollmentManual::add_embedding` or
  # `FaceEnrollmentAutomatic::restore_embedding_data` when the face
  # library is full.
  FACE_LIBRARY_FULL = -1011

  #
  # Starting below are all error codes related to Automatic Enrollment.
  # They have values -2000 and below.
  #

  # Returned by `FaceEnrollmentAutomatic::remove_embedding` when the
  # provided face ID is invalid.
  UNKNOWN_FACE_ID = -2001

  # Returned by `FaceEnrollmentAutomatic::get_face_snapshot` when the face
  # snapshots are disabled.
  FACE_SNAPSHOTS_DISABLED = -2002

  # Returned by `FaceEnrollmentAutomatic::configure_face_snapshots` when the
  # provided settings are invalid
  INVALID_ARGUMENT = -2003