Luna Remote SDK API (v.0.15.0)

Download OpenAPI specification:Download

'VisionLabs Luna Remote SDK'

version

get version

get service version

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

Content type
application/json
{
  • "Version": {
    }
}

sdk

sdk resource

Detect faces, human bodies and estimate attributes on input images. Resource estimates only available attributes for corresponding images. For example, if user sends warped face image and wants to calculate a body descriptor, landmarks5 and basic attributes - only basic attributes will be estimated.

Order of input images is corresponding to order elements in output json. If an image is broken resource will returns error for it image, other images will be correct processing.

WARNING: this resource is unstable. A resource API can be changes in any release.

Notes for incoming data:

  • face or body bounding boxes passed with face or body wapred image will be ignored.
query Parameters
image_type
integer
Default: 0
Enum: 0 1 2

Image type of input image. 0 - raw image, 1 - face warped image, 2 - body warped image.

estimate_people_count
integer (int01_def0)
Default: 0
Enum: 0 1

Whether to estimate people count on the image.

People counter licensing feature is required to be enabled to perform estimation.

people_count_coordinates
integer
Default: 1
Enum: 0 1

Whether to return people coordinates with people count estimation.

multiface_policy
integer (multiface_policy)
Default: 1
Enum: 0 1 2

Multiple face detection policy:

  • 0 - do not process images with several detected faces.

    If detect_body is enabled, the system will attempt to detect a human body related to the detected face. If a human body is detected, its detection will be associated with the same event as the face.

    If there is no face detected in the image, no human body detections will be returned. Thus there will be no human body detection returned if detect_face is disabled.

  • 1 - process images with several detected faces and/or human bodies.

    If detect_body is enabled, all the detections of human bodies will be returned. Face detection and human body detection of the same person will be associated with the same event.

    The detections of human bodies are returned even if there were no faces found.

  • 2 - get the best face detection from the image. A single face of the best quality is detected in the image.

    If detect_body is enabled, the system will attempt to detect a human body related to the detected face. If a human body is detected, its detection will be associated with the same event as the face.

    If there is no face detected in the image, no human body detections will be returned. Thus there will be no human body detection returned if detect_face is disabled.

detect_face
integer (detect_face)
Default: 0
Enum: 0 1

Whether to detect faces on the image.

detect_body
integer (detect_body)
Default: 0
Enum: 0 1

Whether to detect human bodies on the image.

estimate_head_pose
integer (estimate_head_pose)
Default: 0
Enum: 0 1

Whether to estimate head pose on the image.

Not supported with warped images (see warped_image or image_type parameter).

estimate_emotions
integer (int01_def0)
Default: 0
Enum: 0 1

Whether to estimate emotions on the image.

estimate_landmarks68
integer (detect_landmarks68)
Default: 0
Enum: 0 1

Whether to detect basic 68-point facial landmarks on the image.

Not supported with warped images (see warped_image or image_type parameter).

estimate_landmarks5
integer (detect_landmarks5)
Default: 0
Enum: 0 1

Whether to detect basic 5-point facial landmarks on the image.

Not supported with warped images (see warped_image or image_type parameter).

estimate_quality
integer (estimate_quality)
Default: 0
Enum: 0 1

Whether to estimate input face image quality.

estimate_gaze
integer (estimate_gaze)
Default: 0
Enum: 0 1

Whether to estimate eye gaze on the image.

Not supported with warped images (see warped_image or image_type parameter).

estimate_eyes_attributes
integer (estimate_eyes_attributes)
Default: 0
Enum: 0 1

Whether to estimate eye attributes on the image.

Not supported with warped images (see warped_image or image_type parameter).

estimate_mouth_attributes
integer (estimate_mouth_attributes)
Default: 0
Enum: 0 1

Whether to estimate mouth attributes on the image.

estimate_mask
integer (estimate_mask)
Default: 0
Enum: 0 1

Whether to estimate mask on the image.

estimate_glasses
integer (estimate_glasses)
Default: 0
Enum: 0 1

Whether to estimate glasses on the image.

estimate_liveness
integer (int01_def0)
Default: 0
Enum: 0 1

Whether to estimate liveness on the image.

Good quality only on webcam or selfie photos: otherwise the result may be incorrect.

Liveness v.2 licensing feature is required to be enabled to perform liveness estimation.

estimate_deepfake
integer (int01_def0)
Default: 0
Enum: 0 1

Whether to estimate deepfake feature on the image.

Deepfake licensing feature is required to be enabled to perform deepfake estimation.

estimate_face_descriptor
integer (extract_descriptor)
Default: 0
Enum: 0 1

Whether to estimate face descriptor(s).

estimate_basic_attributes
integer (extract_basic_attributes)
Default: 0
Enum: 0 1

Whether to estimate face basic attributes (gender, age, ethnicity).

estimate_body_descriptor
integer (extract_descriptor)
Default: 0
Enum: 0 1

Whether to estimate human body descriptor(s).

estimate_upper_body
integer (int01_def0)
Default: 0
Enum: 0 1

Whether to estimate human upper body attributes on the image (headwear type, clothing color, sleeve length).

estimate_lower_body
integer (int01_def0)
Default: 0
Enum: 0 1

Whether to estimate human lower body attributes on the image (lower garment type, clothing color, shoes color).

estimate_accessories
integer (int01_def0)
Default: 0
Enum: 0 1

Whether to estimate human body accessories on the image (backpack presence).

estimate_face_occlusion
integer (int01_def0)
Default: 0
Enum: 0 1

Whether to estimate face occlusion on the image.

estimate_body_basic_attributes
integer (int01_def0)
Default: 0
Enum: 0 1

Whether to estimate human body basic attributes on the image (age, gender).

estimate_body_warp
integer (int01_def0)
Default: 0
Enum: 0 1

Whether to estimate human body warp on the image.

estimate_face_warp
integer (int01_def0)
Default: 0
Enum: 0 1

Whether to estimate human face warp on the image.

aggregate_attributes
integer (aggregate_attributes)
Default: 0
Enum: 0 1

Whether to aggregate face descriptor(s).

If true, all extracted attributes will be aggregated and stored as a single attribute. Otherwise, all attributes will be stored for each sample.

pitch_threshold
integer (pitch_threshold) [ 0 .. 180 ]

Maximum deviation pitch angle from 0.

roll_threshold
integer (roll_threshold) [ 0 .. 180 ]

Maximum deviation roll angle from 0.

yaw_threshold
integer (yaw_threshold) [ 0 .. 180 ]

Maximum deviation yaw angle from 0.

score_threshold
number (score_threshold) [ 0 .. 1 ]
Default: 0
Example: score_threshold=0.99

Face descriptor quality score threshold. All the attributes with quality score below the threshold will be ignored (and not stored in the DB). The function will proceed as usual with all the remaining descriptors (if left).

face_occlusion_states
Array of strings (face_occlusion_threshold) non-empty
Items Enum: "face" "forehead" "eye" "nose" "mouth" "lower_face"
Example: face_occlusion_states=face

List of face area which must not be occluded. If any area are occluded on face then face will be filtered. face means that overall_score must be lower than corresponding threshold.

mask_states
Array of integers (mask_states) non-empty
Items Enum: 1 2 3

Filter by mask states.

masks value
missing 1
medical_mask 2
occluded 3
liveness_states
Array of integers (liveness_states) non-empty
Items Enum: 0 1 2 null

Filter by liveness states.

liveness state value
spoof 0
real 1
unknown 2
deepfake_states
Array of integers (deepfake_states) non-empty
Items Enum: 0 1 null

Filter by deepfake states.

liveness state value
fake 0
real 1
use_exif_info
integer
Default: 1
Enum: 0 1
Example: use_exif_info=1

Whether to try to auto orient image based on exif data

Has no effect with tiff images (they're always auto oriented).

Ignored with warped images (see warped_image or image_type parameter).

extract_exif
integer (extract_exif)
Default: 0
Enum: 0 1

Whether to extract EXIF meta information from input JPEG images.

Exact output will vary since there are no mandatory requirements for both authoring software and digital cameras how to write the data.

This function will only parse the tags and output their names and values as they are. Please refer to JEITA CP-3451 EXIF specification for details.

header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/msgpack"

The response content type header.

Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Enum: "application/json" "multipart/form-data" "image/jpeg" "image/png" "image/bmp" "image/x-portable-pixmap" "image/tiff" "image/x-jpeg-base64" "image/x-png-base64" "image/x-bmp-base64" "image/x-tiff-base64" "image/x-portable-pixmap-base64"
Request Body schema:
string <binary>

Responses

Request samples

Content type
No sample

Response samples

Content type
Example
{
  • "images_estimations": [
    ]
}

iso

iso resource

The resource performs a visual examination of frontal type images based on ISO/IEC 19794-5 standard. This means that the images that have passed the validation are standardized and attributes of the person's face meet the established requirements. For more information on the requirements for face attributes in the image, see ISO/IEC 19794-5 Clauses 7-10.

The response contains the result of the check for each estimator. The image check is considered successful if the set of these results complies with the ISO standard.

The order of input images is corresponding to elements order in response. If an image is broken, the resource will return an error for this image and other images will be correctly processed.

Notes for incoming data:

  • face or body bounding boxes passed with face or body wapred image will be ignored.
query Parameters
image_type
integer
Default: 0
Enum: 0 1

Image type of input image. 0 - raw image, 1 - face warped image.

multiface_policy
integer (multiface_policy)
Default: 0
Enum: 0 1 2

Multiple face detection policy:

  • 0 - do not process images with several detected faces.

    If detect_body is enabled, the system will attempt to detect a human body related to the detected face. If a human body is detected, its detection will be associated with the same event as the face.

    If there is no face detected in the image, no human body detections will be returned. Thus there will be no human body detection returned if detect_face is disabled.

  • 1 - process images with several detected faces and/or human bodies.

    If detect_body is enabled, all the detections of human bodies will be returned. Face detection and human body detection of the same person will be associated with the same event.

    The detections of human bodies are returned even if there were no faces found.

  • 2 - get the best face detection from the image. A single face of the best quality is detected in the image.

    If detect_body is enabled, the system will attempt to detect a human body related to the detected face. If a human body is detected, its detection will be associated with the same event as the face.

    If there is no face detected in the image, no human body detections will be returned. Thus there will be no human body detection returned if detect_face is disabled.

extract_exif
integer (extract_exif)
Default: 0
Enum: 0 1

Whether to extract EXIF meta information from input JPEG images.

Exact output will vary since there are no mandatory requirements for both authoring software and digital cameras how to write the data.

This function will only parse the tags and output their names and values as they are. Please refer to JEITA CP-3451 EXIF specification for details.

header Parameters
Accept
string
Default: application/json
Enum: "application/json" "application/msgpack"

The response content type header.

Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Enum: "application/json" "multipart/form-data" "image/jpeg" "image/png" "image/bmp" "image/x-portable-pixmap" "image/tiff" "image/x-jpeg-base64" "image/x-png-base64" "image/x-bmp-base64" "image/x-tiff-base64" "image/x-portable-pixmap-base64"
Request Body schema:
string <binary>

Responses

Request samples

Content type
No sample

Response samples

Content type
{
  • "images": [
    ]
}

estimator

estimator resource

estimator

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Content-Type
string
Value: "application/msgpack"
Request Body schema: application/msgpack
required
object (estimator_parameters)
required
Array of objects (estimator_image)

Responses

Response samples

Content type
application/json
{}

documents

get openapi documentation

Get service OpenApi documentation. If Accept request header is of type application/x-yaml, returns documentation in yaml format or returns html documentation, if Accept-Type is text/html

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Accept
required
string (accept_docs_handler)
Enum: "application/x-yaml" "text/html"

acceptable type of receiving data

Responses

Response samples

Content type
application/json
{}

get development manual

Get sphinx documentation - Development Manual. After the request you will be redirected to the page /docs/dev/index.html

header Parameters
Accept
string
Value: "application/json"

Preferred response content type

Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

Content type
application/json
{}

config

get service configuration

Get service configuration. Passwords and tokens will be hidden in the response.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Accept
string
Enum: "application/json" "text/plain"

acceptable type of receiving data

Responses

Response samples

Content type
{
  • "INFLUX_MONITORING": {
    }
}

plugins

get list of plugins

Get list of service plugins

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

Content type
application/json
{
  • "plugins": [
    ]
}

metrics

get service requests statistics

Get statistics of success and failed requests to the service in prometheus format.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

Content type
text/plain
# HELP request_count_total Counter of requests
# TYPE request_count_total counter
request_count_total{path="GET:/healthcheck",status_code="200"} 1.0

health

get health

get health of service

query Parameters
include_luna_services
integer
Default: 0
Enum: 0 1

Whether to perform healthchecks for dependent luna services.

header Parameters
Luna-Request-Id
string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4...
Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a

external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response.

Responses

Response samples

Content type
application/json
{
  • "execution_time": 0.123
}