Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
justin200914 committed May 19, 2023
1 parent ce1fa71 commit 93270dd
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
pitchThreshold = 10
rollThreshold = 10
occlusionThreshold = 0.9
eyeClosureThreshold = 0.7
eyeClosureThreshold = 0.8
mouthOpeningThreshold = 0.5
borderRate = 0.05
smallFaceThreshold = 100
Expand Down
51 changes: 51 additions & 0 deletions header/facesdk.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#pragma once

#ifdef __cplusplus
extern "C" {
#endif

enum SDK_ERROR
{
SDK_SUCCESS = 0,
SDK_LICENSE_KEY_ERROR = -1,
SDK_LICENSE_APPID_ERROR = -2,
SDK_LICENSE_EXPIRED = -3,
SDK_NO_ACTIVATED = -4,
SDK_INIT_ERROR = -5,
};

typedef struct _tagFaceBox
{
int x1, y1, x2, y2;
float liveness;
float yaw, roll, pitch;
float face_quality, face_luminance, eye_dist;
float left_eye_closed, right_eye_closed, face_occlusion, mouth_opened;
float landmark_68[68 * 2];
} FaceBox;

/*
* Get the machine code for SDK activation
*/
const char* getMachineCode();

/*
* Activate the SDK using the provided license
*/

int setActivation(char* license);

/*
* Initialize the SDK with the specified model path
*/
int initSDK(char* modelPath);

/*
* Detect faces, perform liveness detection, determine face orientation (yaw, roll, pitch),
* assess face quality, detect facial occlusion, eye closure, mouth opening, and identify facial landmarks.
*/
int faceDetection(unsigned char* rgbData, int width, int height, FaceBox* faceBoxes, int faceBoxCount);

#ifdef __cplusplus
}
#endif

0 comments on commit 93270dd

Please sign in to comment.