17#define SFE_FACE_LANDMARK_COUNT 23
88 float *out_mask_confidence);
104#define SFE_FACE_TEMPLATE_SIZE 522
139 float *out_matching_score);
146 float *out_face_template_quality);
190 float matching_score_threshold,
192 size_t *in_out_candidates_count,
size_t thread_count);
213 SFEEntity *entities_gallery,
size_t gallery_size,
214 float matching_score_threshold,
216 size_t *in_out_candidates_count,
217 size_t thread_count);
363 size_t min_face_size,
size_t max_face_size,
392 float face_size_extension,
float max_face_size,
std::optional< std::string > solver
File containing API of sfe_core library as part of SFE Toolkit.
void * SFESolver
Solver provides an abstract interface over inference models and engines.
void * SFEError
Error type used to hold optional error message.
SFEError sfeFaceTemplateIdentify(SFEFaceTemplate *probe_face_template, SFEFaceTemplate *templates_gallery, size_t gallery_size, float matching_score_threshold, SFETemplateIdentificationCandidate *out_candidates, size_t *in_out_candidates_count, size_t thread_count)
Get an ordered array of SFETemplateIdentificationCandidate from tested template best matches of probe...
SFEError sfeFaceArea(SFEImageView image, SFEFaceLandmarks face_landmarks[SFE_FACE_LANDMARK_COUNT], SFEFaceArea *out_area)
Get face area.
SFEError sfeFaceSize(SFEImageView image, SFEFaceLandmarks face_landmarks[SFE_FACE_LANDMARK_COUNT], float *face_size)
Get the face size in pixels from the face landmarks and the source image. Face size is defined as a m...
SFEError sfeFaceDetectInputSize(SFEImageView image, SFEFaceDetectionAccuracyType detection_mode, size_t min_face_size, size_t max_face_size, SFEDetectionInputSize *out_input_size)
Calculation of recommended input image width and height according to desired minimal and maximal size...
SFEError sfeFaceMaskConfidence(const SFEFaceLandmarks face_landmarks[SFE_FACE_LANDMARK_COUNT], float *out_mask_confidence)
Get confidence from given landmarks if the face is wearing a face mask.
SFEFaceDetectionAccuracyType
Supported 2 detection accuracy types.
@ SFE_FACE_DETECT_ACCURACY_TYPE_ACCURATE
@ SFE_FACE_DETECT_ACCURACY_TYPE_BALANCED
SFEError sfeFaceTemplateMatch(SFEFaceTemplate *template1, SFEFaceTemplate *template2, float *out_matching_score)
Match two face templates.
SFEError sfeFaceDemographicAttributes(SFESolver solver, SFEImageView image, SFEFaceLandmarks face_landmarks[SFE_FACE_LANDMARK_COUNT], SFEFaceDemographicAttributes *out_demographic_attributes)
Estimate demographic attributes (age, gender) from a face image.
SFEError sfeFaceTemplateQuality(SFEFaceTemplate *face_template, float *out_face_template_quality)
Get template quality.
#define SFE_FACE_LANDMARK_COUNT
SFEError sfeFaceLandmarks(SFESolver solver, SFEImageView image, const SFEDetection *detection, SFEFaceLandmarks out_face_landmarks[SFE_FACE_LANDMARK_COUNT])
Detect 23 landmarks of the face detected in the area of source image marked with detection.
SFEError sfeFaceLivenessPassive(SFESolver solver, SFEImageView image, SFEFaceLandmarks face_landmarks[SFE_FACE_LANDMARK_COUNT], SFEFaceLiveness *out_liveness)
Passive liveness score calculation.
SFEError sfeFaceHeadPose(SFEImageView image, SFEFaceLandmarks face_landmarks[SFE_FACE_LANDMARK_COUNT], SFEFaceHeadPose *out_head_pose)
Calculate angle rotations of head towards camera reference frame from given landmarks.
SFEError sfeFaceCrop(SFEImageView image, SFEFaceLandmarks face_landmarks[SFE_FACE_LANDMARK_COUNT], float face_size_extension, float max_face_size, SFEFaceCrop *out_crop)
Crop the face according the given landmarks, the face size extension and the maximal face size....
SFEError sfeFaceTemplateExport(const SFEFaceTemplate *face_template, uint8_t *bytes, size_t *size)
Export face template to bytes that can be shared between Innovatrics components.
#define SFE_FACE_TEMPLATE_SIZE
SFEError sfeFaceTemplateImport(const uint8_t *bytes, size_t size, SFEFaceTemplate *out_face_template)
Import face template from bytes; format is auto-detected (iface-template protobuf or raw ICF 522-byte...
SFEError sfeFaceEntityIdentify(SFEFaceTemplate *probe_face_template, SFEFaceTemplate *templates_gallery, SFEEntity *entities_gallery, size_t gallery_size, float matching_score_threshold, SFEEntityIdentificationCandidate *out_candidates, size_t *in_out_candidates_count, size_t thread_count)
Get an ordered array of SFEEntityIdentificationCandidate from tested template best matches of probe t...
SFEError sfeFaceTemplateExtract(SFESolver solver, SFEImageView image, const SFEDetection *detection, const SFEFaceLandmarks face_landmarks[SFE_FACE_LANDMARK_COUNT], SFEFaceTemplate *out_face_template)
Extract template from source image and given face landmarks.
SFEFaceLandmarkType
Face landmark types.
@ SFE_FACE_LANDMARK_TYPE_NOSE_TIP
@ SFE_FACE_LANDMARK_TYPE_LEFT_EDGE
@ SFE_FACE_LANDMARK_TYPE_MOUTH_UPPER_EDGE
@ SFE_FACE_LANDMARK_TYPE_NOSE_RIGHT_BOTTOM
@ SFE_FACE_LANDMARK_TYPE_RIGHT_EYEBROW_INNER_END
@ SFE_FACE_LANDMARK_TYPE_MOUTH_LOWER_EDGE
@ SFE_FACE_LANDMARK_TYPE_RIGHT_EYE_CENTER
@ SFE_FACE_LANDMARK_TYPE_LEFT_EYE_OUTER_CORNER
@ SFE_FACE_LANDMARK_TYPE_NOSE_LEFT_BOTTOM
@ SFE_FACE_LANDMARK_TYPE_MOUTH_RIGHT_CORNER
@ SFE_FACE_LANDMARK_TYPE_LEFT_EYE_CENTER
@ SFE_FACE_LANDMARK_TYPE_NOSE_BOTTOM
@ SFE_FACE_LANDMARK_TYPE_LEFT_EYEBROW_OUTER_END
@ SFE_FACE_LANDMARK_TYPE_MOUTH_LEFT_CORNER
@ SFE_FACE_LANDMARK_TYPE_CHIN_TIP
@ SFE_FACE_LANDMARK_TYPE_LEFT_EYEBROW_INNER_END
@ SFE_FACE_LANDMARK_TYPE_RIGHT_EYEBROW_OUTER_END
@ SFE_FACE_LANDMARK_TYPE_LEFT_EYE_INNER_CORNER
@ SFE_FACE_LANDMARK_TYPE_RIGHT_EDGE
@ SFE_FACE_LANDMARK_TYPE_MOUTH_CENTER
@ SFE_FACE_LANDMARK_TYPE_RIGHT_EYE_OUTER_CORNER
@ SFE_FACE_LANDMARK_TYPE_RIGHT_EYE_INNER_CORNER
@ SFE_FACE_LANDMARK_TYPE_NOSE_ROOT
SFEError sfeFaceQualityAttributes(SFEImageView image, SFEFaceLandmarks face_landmarks[SFE_FACE_LANDMARK_COUNT], SFEFaceQualityAttributes *out_quality_attributes)
Calculate face image quality attributes from given source image and landmarks data.
SFEError sfeFaceTemplateVersion(SFEFaceTemplate *face_template, SFEFaceTemplateVersion *out_face_template_version)
Get face template version.
Core detection - tagged union containing all detection types.
Entity type, used to group templates for entity identification. This type is compatible with uuid_v4 ...
Candidate for identification by entity.
float area_in_image
size of face area intersected with the whole image and relative to the whole image; value in range <0...
float area
size of face area relative to the whole image; value in range <0,1>
float size
absolute face size
SFEBoundingBox crop_box
Bounding box of cropped face including the crop extension.
SFEImage crop_image
Image of face cropped according the crop_box.
float face_size_extension
Defines the size of the crop as an extension of the detection bounding box.
Demographic attributes of the detected face.
float gender
Normalized gender score in range [-1, 1]. Values near -1 indicate male, values near 1 indicate female...
float age
Estimated age in years.
Face head pose struct containing angle rotations of head.
float yaw
Face attribute representing angle rotation of head towards camera reference frame around Y-axis as pe...
float pitch
Face attribute representing angle rotation of head towards camera reference frame around X-axis as pe...
float roll
Face attribute representing angle rotation of head towards camera reference frame around Z-axis as pe...
float y
Y coordinate of the landmark relative to source image - range <0,1>
SFEFaceLandmarkType landmark_type
Type of the landmark detected on the face.
float x
X coordinate of the landmark relative to source image - range <0,1>
float confidence
Confidence of the landmark detected on the face - range <0,1>
float score
Normalized passive liveness score - range <0,1>
Face quality attributes struct.
float unique_intensity_levels
Normalized face attribute for evaluating whether an area of face has appropriate number of unique int...
float sharpness
Normalized face attribute for evaluating whether an area of face image is not blurred....
float brightness
Normalized face attribute for evaluating whether an area of face is correctly exposed....
float contrast
Normalized face attribute for evaluating whether an area of face is contrast enough....
uint8_t data[SFE_FACE_TEMPLATE_SIZE]
Face template version struct.
uint8_t version_major
major template version
uint8_t version_minor
minor template version
Raw owned raster image representation, HWC|BGR order.
Candidate for identification by template.