Result Objects

This section covers how to use the result objects from the operations.

Face Validation Result

This section covers how to use the Face Validation Result Object.

  class cryptonets_python_sdk.helper.result_objects.faceValidationResult.FaceValidationResult(error=-1, message='')
  • Name
    error
    Type
    int
    Description

    Returns the status of the operation

  • Name
    face_objects
    Type
    List[FaceObjectResult]
    Description

    Returns the list of Face Objects

  • Name
    message
    Type
    str
    Description

    Returns the message of the operation

Face Object Object

This section covers how to use the Face Object Result Object.

  class cryptonets_python_sdk.helper.result_objects.faceObjectResult.FaceObjectResult(return_code=-100, message='', age=None, top_left_coordinate=None, bottom_right_coordinate=None)
  • Name
    age
    Type
    float
    Description

    Returns the predicted age of the image Age value might be in the float format as it is returned from DNN model

  • Name
    bounding_box
    Type
    BoundingBox
    Description

    Returns the bounding box for the images found


    BoundingBox

    • Name
      top_left_coordinate
      Type
      Point
      Description
    • Name
      bottom_right_coordinate
      Type
      Point
      Description
  • Name
    message
    Type
    str
    Description

    Returns the message of the operation

  • Name
    return_code
    Type
    int
    Description

    Returns the return code for the image

Return Codes for is valid and Error Messages

Return Code Return Message / Error Description
-100 Invalid Image
-6 Antispoofing detection was not performed and was skipped.
-5 A grayscale image has been detected, which may indicate a spoof attempt
-5 A grayscale image has been detected, which may indicate a spoof attempt
-4 Invalid face detected, unable to apply antispoofing procedures.
-3 Face too close to the edge; please center your face in the image.
-2 Mobile phone detected in the vicinity, which may indicate a spoof attempt.
-1 No Face
0 Valid Biometric
1 Face is an image of an image (spoof). Please only provide live facial image(s). (Under implementation)
2 Face is an image of a video (spoof). Please only provide live facial image(s). (Under implementation)
3 Face in image is too close to the camera. Please move away from the camera.
4 Face in image is too far away.
5 Face in image is too far to the right.
6 Face in image is too far to the left.
7 Face in image is too high.
8 Face in image is too low.
9 Face in image is too blurry.
10 Please remove eyeglasses during registration.
11 Please remove face mask during registration.
12 Head in image turned too far towards the left. Please face the camera.
13 Head in image turned too far towards the right. Please face the camera.
14 Head in image turned too far up. Please face the camera.
15 Head in image turned too far down. Please face the camera.
16 Exposure too dark. Low Light Condition
17 Exposure too bright. Bright Light Condition
18 Face detection Confidence low. Adjust spatial resolution
19 Invalid face background. Too noisy to capture face
20 Eye blink detected.
21 Mouth open detected.

Utils

This section covers how to use the util classes

BoundingBox

  class cryptonets_python_sdk.helper.utils.BoundingBox(top_left_coordinate=None, bottom_right_coordinate=None)
  • Name
    bottom_right_coordinate
    Type
    Point
    Description

    Returns the bottom right coordinate


    BoundingBox

    • Name
      x
      Type
      float
      Description
    • Name
      y
      Type
      float
      Description
  • Name
    top_left_coordinate
    Type
    Point
    Description

    Returns the bounding box for the images found


    BoundingBox

    • Name
      x
      Type
      float
      Description
    • Name
      y
      Type
      float
      Description

Point

  • Name
    x
    Type
    float
    Description
  • Name
    y
    Type
    float
    Description

Face Compare Result

This section covers how to use the Compare Result Object.

  class cryptonets_python_sdk.helper.result_objects.compareResult.FaceCompareResult(result=None, distance_min=None, distance_mean=None, distance_max=None, second_validation_result=None, first_validation_result=None, status=-1, distance=None, message='')
  • Name
    distance_max
    Type
    float
    Description

    Returns the maximum distance

    Maximum distance refers to the thresholds used for comparing the images

  • Name
    distance_mean
    Type
    float
    Description

    Returns the average distance

    Mean distance refers to the thresholds used for comparing the images

  • Name
    distance_min
    Type
    float
    Description

    Returns the minimum distance

    Minimum distance refers to the thresholds used for comparing the images

  • Name
    first_validation_result
    Type
    int
    Description

    Returns the validation result of first image

  • Name
    message
    Type
    str
    Description

    Returns the message of the operation

  • Name
    result
    Type
    int
    Description

    Returns the result of the operation

  • Name
    second_validation_result
    Type
    int
    Description

    Returns the validation result of second image

  • Name
    status
    Type
    int
    Description

    Returns the status of the operation

    0 - If successfully obtained result from server

    -1 - In case of error

Face Enroll Predict Result

This section covers how to use the Enroll / Predict result object.

  class cryptonets_python_sdk.helper.result_objects.enrollPredictResult.FaceEnrollPredictResult(enroll_level=None, puid=None, guid=None, token=None, code=None, score=None, status=-1, message='', api_message='', api_status=None, enroll_performed=False)
  • Name
    api_message
    Type
    str
    Description

    Returns the message received from the API of the operation

  • Name
    api_status
    Type
    str
    Description

    Returns the status received from the API of the operation 0 - Success else - Failure

  • Name
    enroll_level
    Type
    int
    Description

    Returns the enroll_level of the user 0 - one-factor authentication 1 - two-factor authentication

  • Name
    enroll_performed
    Type
    bool
    Description

    Returns True if enroll was actually performed, False otherwise This property is only relevant for the enroll operation

  • Name
    guid
    Type
    str
    Description

    Returns the GUID of the user Unique ID of length 20

  • Name
    puid
    Type
    str
    Description

    Returns the PUID of the user Unique ID of length 20

  • Name
    message
    Type
    str
    Description

    Returns the message of the operation

  • Name
    status
    Type
    int
    Description

    Returns the status of the operation 0 - If successfully obtained result from server -1 - In case of error

  • Name
    token
    Type
    str
    Description

    Returns the token for verifying the operation Yet to be implemented for configuration

Face Delete Result

This section covers how to use the Delete result Object.

  class cryptonets_python_sdk.helper.result_objects.deleteResult.FaceDeleteResult(status=-1, message='')
  • Name
    message
    Type
    str
    Description

    Returns the message of the operation

  • Name
    status
    Type
    int
    Description

    Returns the status of the operation 0 - If successfully obtained result from server -1 - In case of error

ISO Face Result

This section covers how to use the ISO Face result Object.

  class cryptonets_python_sdk.helper.result_objects.isoFaceResult.ISOFaceResult(iso_image_width=None, iso_image_height=None, iso_image_channels=None, confidence=None, image=None, status=-1, message='')
  • Name
    confidence
    Type
    str
    Description

    Returns the confidence score for the converted ISO image

  • Name
    image
    Type
    str
    Description

    Returns the PIL Image object face ISO Specification converted

  • Name
    iso_image_channels
    Type
    str
    Description

    Returns the number of channels present in the image

  • Name
    iso_image_height
    Type
    int
    Description

    Returns the height of the Image object

  • Name
    iso_image_width
    Type
    int
    Description

    Returns the width of the Image object

  • Name
    message
    Type
    str
    Description

    Returns the message of the operation

  • Name
    status
    Type
    int
    Description

    Returns the status of the operation

Antispoof Check Result

This section covers how to use the AntispoofCheck Result Object.

  class cryptonets_python_sdk.helper.result_objects.antispoofCheckResult.AntispoofCheckResult(status=None, message='', is_antispoof=False)
  • Name
    is_antispoof
    Type
    bool
    Description

    Returns a boolean indicating if the anti-spoofing operation detected spoofing.

  • Name
    message
    Type
    str
    Description

    Returns a descriptive message associated with the anti-spoofing operation result.

  • Name
    status
    Type
    int
    Description

    Returns the status of the anti-spoofing operation.

Was this page helpful?