Skip to content

Commit 93270dd

Browse files
committed
Update
1 parent ce1fa71 commit 93270dd

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
pitchThreshold = 10
2020
rollThreshold = 10
2121
occlusionThreshold = 0.9
22-
eyeClosureThreshold = 0.7
22+
eyeClosureThreshold = 0.8
2323
mouthOpeningThreshold = 0.5
2424
borderRate = 0.05
2525
smallFaceThreshold = 100

header/facesdk.h

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#pragma once
2+
3+
#ifdef __cplusplus
4+
extern "C" {
5+
#endif
6+
7+
enum SDK_ERROR
8+
{
9+
SDK_SUCCESS = 0,
10+
SDK_LICENSE_KEY_ERROR = -1,
11+
SDK_LICENSE_APPID_ERROR = -2,
12+
SDK_LICENSE_EXPIRED = -3,
13+
SDK_NO_ACTIVATED = -4,
14+
SDK_INIT_ERROR = -5,
15+
};
16+
17+
typedef struct _tagFaceBox
18+
{
19+
int x1, y1, x2, y2;
20+
float liveness;
21+
float yaw, roll, pitch;
22+
float face_quality, face_luminance, eye_dist;
23+
float left_eye_closed, right_eye_closed, face_occlusion, mouth_opened;
24+
float landmark_68[68 * 2];
25+
} FaceBox;
26+
27+
/*
28+
* Get the machine code for SDK activation
29+
*/
30+
const char* getMachineCode();
31+
32+
/*
33+
* Activate the SDK using the provided license
34+
*/
35+
36+
int setActivation(char* license);
37+
38+
/*
39+
* Initialize the SDK with the specified model path
40+
*/
41+
int initSDK(char* modelPath);
42+
43+
/*
44+
* Detect faces, perform liveness detection, determine face orientation (yaw, roll, pitch),
45+
* assess face quality, detect facial occlusion, eye closure, mouth opening, and identify facial landmarks.
46+
*/
47+
int faceDetection(unsigned char* rgbData, int width, int height, FaceBox* faceBoxes, int faceBoxCount);
48+
49+
#ifdef __cplusplus
50+
}
51+
#endif

0 commit comments

Comments
 (0)