mirror of
https://github.com/deepinsight/insightface.git
synced 2026-03-13 04:50:17 +00:00
Added the system resource management and monitoring functions
This commit is contained in:
@@ -50,6 +50,8 @@ draw = image.copy()
|
||||
for idx, face in enumerate(faces):
|
||||
print(f"{'==' * 20}")
|
||||
print(f"idx: {idx}")
|
||||
# Print detection confidence.
|
||||
print(f"detection confidence: {face.detection_confidence}")
|
||||
# Print Euler angles of the face.
|
||||
print(f"roll: {face.roll}, yaw: {face.yaw}, pitch: {face.pitch}")
|
||||
# Draw bounding box around the detected face.
|
||||
|
||||
@@ -3,5 +3,4 @@ from .inspire_face import ImageStream, FaceExtended, FaceInformation, SessionCus
|
||||
FaceIdentity, feature_hub_set_search_threshold, feature_hub_face_insert, SearchResult, \
|
||||
feature_hub_face_search, feature_hub_face_search_top_k, feature_hub_face_update, feature_hub_face_remove, \
|
||||
feature_hub_get_face_identity, feature_hub_get_face_count, view_table_in_terminal, version, \
|
||||
set_logging_level, disable_logging
|
||||
|
||||
set_logging_level, disable_logging, show_system_resource_statistics
|
||||
@@ -875,6 +875,8 @@ _libs[_LIBRARY_FILENAME] = load_library(_LIBRARY_FILENAME)
|
||||
|
||||
# No modules
|
||||
|
||||
uint8_t = c_ubyte# /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_types/_uint8_t.h: 31
|
||||
|
||||
HPVoid = POINTER(None)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/intypedef.h: 8
|
||||
|
||||
HFImageStream = POINTER(None)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/intypedef.h: 9
|
||||
@@ -933,35 +935,35 @@ struct_HPoint2f._fields_ = [
|
||||
|
||||
HPoint2f = struct_HPoint2f# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/intypedef.h: 37
|
||||
|
||||
enum_HFImageFormat = c_int# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 49
|
||||
enum_HFImageFormat = c_int# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 47
|
||||
|
||||
HF_STREAM_RGB = 0# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 49
|
||||
HF_STREAM_RGB = 0# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 47
|
||||
|
||||
HF_STREAM_BGR = 1# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 49
|
||||
HF_STREAM_BGR = 1# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 47
|
||||
|
||||
HF_STREAM_RGBA = 2# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 49
|
||||
HF_STREAM_RGBA = 2# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 47
|
||||
|
||||
HF_STREAM_BGRA = 3# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 49
|
||||
HF_STREAM_BGRA = 3# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 47
|
||||
|
||||
HF_STREAM_YUV_NV12 = 4# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 49
|
||||
HF_STREAM_YUV_NV12 = 4# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 47
|
||||
|
||||
HF_STREAM_YUV_NV21 = 5# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 49
|
||||
HF_STREAM_YUV_NV21 = 5# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 47
|
||||
|
||||
HFImageFormat = enum_HFImageFormat# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 49
|
||||
HFImageFormat = enum_HFImageFormat# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 47
|
||||
|
||||
enum_HFRotation = c_int# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 61
|
||||
enum_HFRotation = c_int# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 58
|
||||
|
||||
HF_CAMERA_ROTATION_0 = 0# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 61
|
||||
HF_CAMERA_ROTATION_0 = 0# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 58
|
||||
|
||||
HF_CAMERA_ROTATION_90 = 1# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 61
|
||||
HF_CAMERA_ROTATION_90 = 1# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 58
|
||||
|
||||
HF_CAMERA_ROTATION_180 = 2# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 61
|
||||
HF_CAMERA_ROTATION_180 = 2# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 58
|
||||
|
||||
HF_CAMERA_ROTATION_270 = 3# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 61
|
||||
HF_CAMERA_ROTATION_270 = 3# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 58
|
||||
|
||||
HFRotation = enum_HFRotation# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 61
|
||||
HFRotation = enum_HFRotation# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 58
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 74
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 70
|
||||
class struct_HFImageData(Structure):
|
||||
pass
|
||||
|
||||
@@ -973,36 +975,42 @@ struct_HFImageData.__slots__ = [
|
||||
'rotation',
|
||||
]
|
||||
struct_HFImageData._fields_ = [
|
||||
('data', POINTER(c_uint8)),
|
||||
('data', POINTER(uint8_t)),
|
||||
('width', HInt32),
|
||||
('height', HInt32),
|
||||
('format', HFImageFormat),
|
||||
('rotation', HFRotation),
|
||||
]
|
||||
|
||||
HFImageData = struct_HFImageData# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 74
|
||||
HFImageData = struct_HFImageData# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 70
|
||||
|
||||
PHFImageData = POINTER(struct_HFImageData)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 74
|
||||
PHFImageData = POINTER(struct_HFImageData)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 70
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 86
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 81
|
||||
if _libs[_LIBRARY_FILENAME].has("HFCreateImageStream", "cdecl"):
|
||||
HFCreateImageStream = _libs[_LIBRARY_FILENAME].get("HFCreateImageStream", "cdecl")
|
||||
HFCreateImageStream.argtypes = [PHFImageData, POINTER(HFImageStream)]
|
||||
HFCreateImageStream.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 97
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 91
|
||||
if _libs[_LIBRARY_FILENAME].has("HFReleaseImageStream", "cdecl"):
|
||||
HFReleaseImageStream = _libs[_LIBRARY_FILENAME].get("HFReleaseImageStream", "cdecl")
|
||||
HFReleaseImageStream.argtypes = [HFImageStream]
|
||||
HFReleaseImageStream.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 110
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 105
|
||||
if _libs[_LIBRARY_FILENAME].has("HFLaunchInspireFace", "cdecl"):
|
||||
HFLaunchInspireFace = _libs[_LIBRARY_FILENAME].get("HFLaunchInspireFace", "cdecl")
|
||||
HFLaunchInspireFace.argtypes = [HPath]
|
||||
HFLaunchInspireFace.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 131
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 113
|
||||
if _libs[_LIBRARY_FILENAME].has("HFTerminateInspireFace", "cdecl"):
|
||||
HFTerminateInspireFace = _libs[_LIBRARY_FILENAME].get("HFTerminateInspireFace", "cdecl")
|
||||
HFTerminateInspireFace.argtypes = []
|
||||
HFTerminateInspireFace.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 134
|
||||
class struct_HFSessionCustomParameter(Structure):
|
||||
pass
|
||||
|
||||
@@ -1025,39 +1033,39 @@ struct_HFSessionCustomParameter._fields_ = [
|
||||
('enable_interaction_liveness', HInt32),
|
||||
]
|
||||
|
||||
HFSessionCustomParameter = struct_HFSessionCustomParameter# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 131
|
||||
HFSessionCustomParameter = struct_HFSessionCustomParameter# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 134
|
||||
|
||||
PHFSessionCustomParameter = POINTER(struct_HFSessionCustomParameter)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 131
|
||||
PHFSessionCustomParameter = POINTER(struct_HFSessionCustomParameter)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 134
|
||||
|
||||
enum_HFDetectMode = c_int# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 142
|
||||
enum_HFDetectMode = c_int# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 147
|
||||
|
||||
HF_DETECT_MODE_ALWAYS_DETECT = 0# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 142
|
||||
HF_DETECT_MODE_ALWAYS_DETECT = 0# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 147
|
||||
|
||||
HF_DETECT_MODE_LIGHT_TRACK = (HF_DETECT_MODE_ALWAYS_DETECT + 1)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 142
|
||||
HF_DETECT_MODE_LIGHT_TRACK = (HF_DETECT_MODE_ALWAYS_DETECT + 1)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 147
|
||||
|
||||
HF_DETECT_MODE_TRACK_BY_DETECTION = (HF_DETECT_MODE_LIGHT_TRACK + 1)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 142
|
||||
HF_DETECT_MODE_TRACK_BY_DETECTION = (HF_DETECT_MODE_LIGHT_TRACK + 1)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 147
|
||||
|
||||
HFDetectMode = enum_HFDetectMode# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 142
|
||||
HFDetectMode = enum_HFDetectMode# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 147
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 157
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 163
|
||||
if _libs[_LIBRARY_FILENAME].has("HFCreateInspireFaceSession", "cdecl"):
|
||||
HFCreateInspireFaceSession = _libs[_LIBRARY_FILENAME].get("HFCreateInspireFaceSession", "cdecl")
|
||||
HFCreateInspireFaceSession.argtypes = [HFSessionCustomParameter, HFDetectMode, HInt32, HInt32, HInt32, POINTER(HFSession)]
|
||||
HFCreateInspireFaceSession.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 179
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 180
|
||||
if _libs[_LIBRARY_FILENAME].has("HFCreateInspireFaceSessionOptional", "cdecl"):
|
||||
HFCreateInspireFaceSessionOptional = _libs[_LIBRARY_FILENAME].get("HFCreateInspireFaceSessionOptional", "cdecl")
|
||||
HFCreateInspireFaceSessionOptional.argtypes = [HOption, HFDetectMode, HInt32, HInt32, HInt32, POINTER(HFSession)]
|
||||
HFCreateInspireFaceSessionOptional.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 194
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 189
|
||||
if _libs[_LIBRARY_FILENAME].has("HFReleaseInspireFaceSession", "cdecl"):
|
||||
HFReleaseInspireFaceSession = _libs[_LIBRARY_FILENAME].get("HFReleaseInspireFaceSession", "cdecl")
|
||||
HFReleaseInspireFaceSession.argtypes = [HFSession]
|
||||
HFReleaseInspireFaceSession.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 204
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 199
|
||||
class struct_HFFaceBasicToken(Structure):
|
||||
pass
|
||||
|
||||
@@ -1070,11 +1078,11 @@ struct_HFFaceBasicToken._fields_ = [
|
||||
('data', HPVoid),
|
||||
]
|
||||
|
||||
HFFaceBasicToken = struct_HFFaceBasicToken# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 204
|
||||
HFFaceBasicToken = struct_HFFaceBasicToken# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 199
|
||||
|
||||
PHFFaceBasicToken = POINTER(struct_HFFaceBasicToken)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 204
|
||||
PHFFaceBasicToken = POINTER(struct_HFFaceBasicToken)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 199
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 215
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 210
|
||||
class struct_HFFaceEulerAngle(Structure):
|
||||
pass
|
||||
|
||||
@@ -1089,9 +1097,9 @@ struct_HFFaceEulerAngle._fields_ = [
|
||||
('pitch', POINTER(HFloat)),
|
||||
]
|
||||
|
||||
HFFaceEulerAngle = struct_HFFaceEulerAngle# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 215
|
||||
HFFaceEulerAngle = struct_HFFaceEulerAngle# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 210
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 229
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 225
|
||||
class struct_HFMultipleFaceData(Structure):
|
||||
pass
|
||||
|
||||
@@ -1099,6 +1107,7 @@ struct_HFMultipleFaceData.__slots__ = [
|
||||
'detectedNum',
|
||||
'rects',
|
||||
'trackIds',
|
||||
'detConfidence',
|
||||
'angles',
|
||||
'tokens',
|
||||
]
|
||||
@@ -1106,63 +1115,64 @@ struct_HFMultipleFaceData._fields_ = [
|
||||
('detectedNum', HInt32),
|
||||
('rects', POINTER(HFaceRect)),
|
||||
('trackIds', POINTER(HInt32)),
|
||||
('detConfidence', POINTER(HFloat)),
|
||||
('angles', HFFaceEulerAngle),
|
||||
('tokens', PHFFaceBasicToken),
|
||||
]
|
||||
|
||||
HFMultipleFaceData = struct_HFMultipleFaceData# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 229
|
||||
HFMultipleFaceData = struct_HFMultipleFaceData# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 225
|
||||
|
||||
PHFMultipleFaceData = POINTER(struct_HFMultipleFaceData)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 229
|
||||
PHFMultipleFaceData = POINTER(struct_HFMultipleFaceData)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 225
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 239
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 235
|
||||
if _libs[_LIBRARY_FILENAME].has("HFSessionSetTrackPreviewSize", "cdecl"):
|
||||
HFSessionSetTrackPreviewSize = _libs[_LIBRARY_FILENAME].get("HFSessionSetTrackPreviewSize", "cdecl")
|
||||
HFSessionSetTrackPreviewSize.argtypes = [HFSession, HInt32]
|
||||
HFSessionSetTrackPreviewSize.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 248
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 245
|
||||
if _libs[_LIBRARY_FILENAME].has("HFSessionSetFilterMinimumFacePixelSize", "cdecl"):
|
||||
HFSessionSetFilterMinimumFacePixelSize = _libs[_LIBRARY_FILENAME].get("HFSessionSetFilterMinimumFacePixelSize", "cdecl")
|
||||
HFSessionSetFilterMinimumFacePixelSize.argtypes = [HFSession, HInt32]
|
||||
HFSessionSetFilterMinimumFacePixelSize.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 257
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 254
|
||||
if _libs[_LIBRARY_FILENAME].has("HFSessionSetFaceDetectThreshold", "cdecl"):
|
||||
HFSessionSetFaceDetectThreshold = _libs[_LIBRARY_FILENAME].get("HFSessionSetFaceDetectThreshold", "cdecl")
|
||||
HFSessionSetFaceDetectThreshold.argtypes = [HFSession, HFloat]
|
||||
HFSessionSetFaceDetectThreshold.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 267
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 264
|
||||
if _libs[_LIBRARY_FILENAME].has("HFExecuteFaceTrack", "cdecl"):
|
||||
HFExecuteFaceTrack = _libs[_LIBRARY_FILENAME].get("HFExecuteFaceTrack", "cdecl")
|
||||
HFExecuteFaceTrack.argtypes = [HFSession, HFImageStream, PHFMultipleFaceData]
|
||||
HFExecuteFaceTrack.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 284
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 281
|
||||
if _libs[_LIBRARY_FILENAME].has("HFCopyFaceBasicToken", "cdecl"):
|
||||
HFCopyFaceBasicToken = _libs[_LIBRARY_FILENAME].get("HFCopyFaceBasicToken", "cdecl")
|
||||
HFCopyFaceBasicToken.argtypes = [HFFaceBasicToken, HPBuffer, HInt32]
|
||||
HFCopyFaceBasicToken.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 298
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 295
|
||||
if _libs[_LIBRARY_FILENAME].has("HFGetFaceBasicTokenSize", "cdecl"):
|
||||
HFGetFaceBasicTokenSize = _libs[_LIBRARY_FILENAME].get("HFGetFaceBasicTokenSize", "cdecl")
|
||||
HFGetFaceBasicTokenSize.argtypes = [HPInt32]
|
||||
HFGetFaceBasicTokenSize.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 305
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 302
|
||||
if _libs[_LIBRARY_FILENAME].has("HFGetNumOfFaceDenseLandmark", "cdecl"):
|
||||
HFGetNumOfFaceDenseLandmark = _libs[_LIBRARY_FILENAME].get("HFGetNumOfFaceDenseLandmark", "cdecl")
|
||||
HFGetNumOfFaceDenseLandmark.argtypes = [HPInt32]
|
||||
HFGetNumOfFaceDenseLandmark.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 315
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 312
|
||||
if _libs[_LIBRARY_FILENAME].has("HFGetFaceDenseLandmarkFromFaceToken", "cdecl"):
|
||||
HFGetFaceDenseLandmarkFromFaceToken = _libs[_LIBRARY_FILENAME].get("HFGetFaceDenseLandmarkFromFaceToken", "cdecl")
|
||||
HFGetFaceDenseLandmarkFromFaceToken.argtypes = [HFFaceBasicToken, POINTER(HPoint2f), HInt32]
|
||||
HFGetFaceDenseLandmarkFromFaceToken.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 329
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 326
|
||||
class struct_HFFaceFeature(Structure):
|
||||
pass
|
||||
|
||||
@@ -1175,31 +1185,31 @@ struct_HFFaceFeature._fields_ = [
|
||||
('data', HPFloat),
|
||||
]
|
||||
|
||||
HFFaceFeature = struct_HFFaceFeature# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 329
|
||||
HFFaceFeature = struct_HFFaceFeature# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 326
|
||||
|
||||
PHFFaceFeature = POINTER(struct_HFFaceFeature)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 329
|
||||
PHFFaceFeature = POINTER(struct_HFFaceFeature)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 326
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 341
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 337
|
||||
if _libs[_LIBRARY_FILENAME].has("HFFaceFeatureExtract", "cdecl"):
|
||||
HFFaceFeatureExtract = _libs[_LIBRARY_FILENAME].get("HFFaceFeatureExtract", "cdecl")
|
||||
HFFaceFeatureExtract.argtypes = [HFSession, HFImageStream, HFFaceBasicToken, PHFFaceFeature]
|
||||
HFFaceFeatureExtract.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 353
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 349
|
||||
if _libs[_LIBRARY_FILENAME].has("HFFaceFeatureExtractCpy", "cdecl"):
|
||||
HFFaceFeatureExtractCpy = _libs[_LIBRARY_FILENAME].get("HFFaceFeatureExtractCpy", "cdecl")
|
||||
HFFaceFeatureExtractCpy.argtypes = [HFSession, HFImageStream, HFFaceBasicToken, HPFloat]
|
||||
HFFaceFeatureExtractCpy.restype = HResult
|
||||
|
||||
enum_HFSearchMode = c_int# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 366
|
||||
enum_HFSearchMode = c_int# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 362
|
||||
|
||||
HF_SEARCH_MODE_EAGER = 0# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 366
|
||||
HF_SEARCH_MODE_EAGER = 0# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 362
|
||||
|
||||
HF_SEARCH_MODE_EXHAUSTIVE = (HF_SEARCH_MODE_EAGER + 1)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 366
|
||||
HF_SEARCH_MODE_EXHAUSTIVE = (HF_SEARCH_MODE_EAGER + 1)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 362
|
||||
|
||||
HFSearchMode = enum_HFSearchMode# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 366
|
||||
HFSearchMode = enum_HFSearchMode# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 362
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 379
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 377
|
||||
class struct_HFFeatureHubConfiguration(Structure):
|
||||
pass
|
||||
|
||||
@@ -1218,21 +1228,21 @@ struct_HFFeatureHubConfiguration._fields_ = [
|
||||
('searchMode', HFSearchMode),
|
||||
]
|
||||
|
||||
HFFeatureHubConfiguration = struct_HFFeatureHubConfiguration# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 379
|
||||
HFFeatureHubConfiguration = struct_HFFeatureHubConfiguration# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 377
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 391
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 389
|
||||
if _libs[_LIBRARY_FILENAME].has("HFFeatureHubDataEnable", "cdecl"):
|
||||
HFFeatureHubDataEnable = _libs[_LIBRARY_FILENAME].get("HFFeatureHubDataEnable", "cdecl")
|
||||
HFFeatureHubDataEnable.argtypes = [HFFeatureHubConfiguration]
|
||||
HFFeatureHubDataEnable.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 397
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 395
|
||||
if _libs[_LIBRARY_FILENAME].has("HFFeatureHubDataDisable", "cdecl"):
|
||||
HFFeatureHubDataDisable = _libs[_LIBRARY_FILENAME].get("HFFeatureHubDataDisable", "cdecl")
|
||||
HFFeatureHubDataDisable.argtypes = []
|
||||
HFFeatureHubDataDisable.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 409
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 406
|
||||
class struct_HFFaceFeatureIdentity(Structure):
|
||||
pass
|
||||
|
||||
@@ -1247,11 +1257,11 @@ struct_HFFaceFeatureIdentity._fields_ = [
|
||||
('feature', PHFFaceFeature),
|
||||
]
|
||||
|
||||
HFFaceFeatureIdentity = struct_HFFaceFeatureIdentity# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 409
|
||||
HFFaceFeatureIdentity = struct_HFFaceFeatureIdentity# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 406
|
||||
|
||||
PHFFaceFeatureIdentity = POINTER(struct_HFFaceFeatureIdentity)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 409
|
||||
PHFFaceFeatureIdentity = POINTER(struct_HFFaceFeatureIdentity)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 406
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 418
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 415
|
||||
class struct_HFSearchTopKResults(Structure):
|
||||
pass
|
||||
|
||||
@@ -1266,89 +1276,89 @@ struct_HFSearchTopKResults._fields_ = [
|
||||
('customIds', HPInt32),
|
||||
]
|
||||
|
||||
HFSearchTopKResults = struct_HFSearchTopKResults# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 418
|
||||
HFSearchTopKResults = struct_HFSearchTopKResults# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 415
|
||||
|
||||
PHFSearchTopKResults = POINTER(struct_HFSearchTopKResults)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 418
|
||||
PHFSearchTopKResults = POINTER(struct_HFSearchTopKResults)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 415
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 429
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 427
|
||||
if _libs[_LIBRARY_FILENAME].has("HFFeatureHubFaceSearchThresholdSetting", "cdecl"):
|
||||
HFFeatureHubFaceSearchThresholdSetting = _libs[_LIBRARY_FILENAME].get("HFFeatureHubFaceSearchThresholdSetting", "cdecl")
|
||||
HFFeatureHubFaceSearchThresholdSetting.argtypes = [c_float]
|
||||
HFFeatureHubFaceSearchThresholdSetting.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 440
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 438
|
||||
if _libs[_LIBRARY_FILENAME].has("HFFaceComparison", "cdecl"):
|
||||
HFFaceComparison = _libs[_LIBRARY_FILENAME].get("HFFaceComparison", "cdecl")
|
||||
HFFaceComparison.argtypes = [HFFaceFeature, HFFaceFeature, HPFloat]
|
||||
HFFaceComparison.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 448
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 446
|
||||
if _libs[_LIBRARY_FILENAME].has("HFGetFeatureLength", "cdecl"):
|
||||
HFGetFeatureLength = _libs[_LIBRARY_FILENAME].get("HFGetFeatureLength", "cdecl")
|
||||
HFGetFeatureLength.argtypes = [HPInt32]
|
||||
HFGetFeatureLength.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 457
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 454
|
||||
if _libs[_LIBRARY_FILENAME].has("HFFeatureHubInsertFeature", "cdecl"):
|
||||
HFFeatureHubInsertFeature = _libs[_LIBRARY_FILENAME].get("HFFeatureHubInsertFeature", "cdecl")
|
||||
HFFeatureHubInsertFeature.argtypes = [HFFaceFeatureIdentity]
|
||||
HFFeatureHubInsertFeature.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 467
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 465
|
||||
if _libs[_LIBRARY_FILENAME].has("HFFeatureHubFaceSearch", "cdecl"):
|
||||
HFFeatureHubFaceSearch = _libs[_LIBRARY_FILENAME].get("HFFeatureHubFaceSearch", "cdecl")
|
||||
HFFeatureHubFaceSearch.argtypes = [HFFaceFeature, HPFloat, PHFFaceFeatureIdentity]
|
||||
HFFeatureHubFaceSearch.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 477
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 475
|
||||
if _libs[_LIBRARY_FILENAME].has("HFFeatureHubFaceSearchTopK", "cdecl"):
|
||||
HFFeatureHubFaceSearchTopK = _libs[_LIBRARY_FILENAME].get("HFFeatureHubFaceSearchTopK", "cdecl")
|
||||
HFFeatureHubFaceSearchTopK.argtypes = [HFFaceFeature, HInt32, PHFSearchTopKResults]
|
||||
HFFeatureHubFaceSearchTopK.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 485
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 483
|
||||
if _libs[_LIBRARY_FILENAME].has("HFFeatureHubFaceRemove", "cdecl"):
|
||||
HFFeatureHubFaceRemove = _libs[_LIBRARY_FILENAME].get("HFFeatureHubFaceRemove", "cdecl")
|
||||
HFFeatureHubFaceRemove.argtypes = [HInt32]
|
||||
HFFeatureHubFaceRemove.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 493
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 491
|
||||
if _libs[_LIBRARY_FILENAME].has("HFFeatureHubFaceUpdate", "cdecl"):
|
||||
HFFeatureHubFaceUpdate = _libs[_LIBRARY_FILENAME].get("HFFeatureHubFaceUpdate", "cdecl")
|
||||
HFFeatureHubFaceUpdate.argtypes = [HFFaceFeatureIdentity]
|
||||
HFFeatureHubFaceUpdate.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 502
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 500
|
||||
if _libs[_LIBRARY_FILENAME].has("HFFeatureHubGetFaceIdentity", "cdecl"):
|
||||
HFFeatureHubGetFaceIdentity = _libs[_LIBRARY_FILENAME].get("HFFeatureHubGetFaceIdentity", "cdecl")
|
||||
HFFeatureHubGetFaceIdentity.argtypes = [HInt32, PHFFaceFeatureIdentity]
|
||||
HFFeatureHubGetFaceIdentity.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 510
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 508
|
||||
if _libs[_LIBRARY_FILENAME].has("HFFeatureHubGetFaceCount", "cdecl"):
|
||||
HFFeatureHubGetFaceCount = _libs[_LIBRARY_FILENAME].get("HFFeatureHubGetFaceCount", "cdecl")
|
||||
HFFeatureHubGetFaceCount.argtypes = [POINTER(HInt32)]
|
||||
HFFeatureHubGetFaceCount.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 517
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 515
|
||||
if _libs[_LIBRARY_FILENAME].has("HFFeatureHubViewDBTable", "cdecl"):
|
||||
HFFeatureHubViewDBTable = _libs[_LIBRARY_FILENAME].get("HFFeatureHubViewDBTable", "cdecl")
|
||||
HFFeatureHubViewDBTable.argtypes = []
|
||||
HFFeatureHubViewDBTable.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 536
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 533
|
||||
if _libs[_LIBRARY_FILENAME].has("HFMultipleFacePipelineProcess", "cdecl"):
|
||||
HFMultipleFacePipelineProcess = _libs[_LIBRARY_FILENAME].get("HFMultipleFacePipelineProcess", "cdecl")
|
||||
HFMultipleFacePipelineProcess.argtypes = [HFSession, HFImageStream, PHFMultipleFaceData, HFSessionCustomParameter]
|
||||
HFMultipleFacePipelineProcess.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 552
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 548
|
||||
if _libs[_LIBRARY_FILENAME].has("HFMultipleFacePipelineProcessOptional", "cdecl"):
|
||||
HFMultipleFacePipelineProcessOptional = _libs[_LIBRARY_FILENAME].get("HFMultipleFacePipelineProcessOptional", "cdecl")
|
||||
HFMultipleFacePipelineProcessOptional.argtypes = [HFSession, HFImageStream, PHFMultipleFaceData, HInt32]
|
||||
HFMultipleFacePipelineProcessOptional.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 564
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 560
|
||||
class struct_HFRGBLivenessConfidence(Structure):
|
||||
pass
|
||||
|
||||
@@ -1361,17 +1371,17 @@ struct_HFRGBLivenessConfidence._fields_ = [
|
||||
('confidence', HPFloat),
|
||||
]
|
||||
|
||||
HFRGBLivenessConfidence = struct_HFRGBLivenessConfidence# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 564
|
||||
HFRGBLivenessConfidence = struct_HFRGBLivenessConfidence# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 560
|
||||
|
||||
PHFRGBLivenessConfidence = POINTER(struct_HFRGBLivenessConfidence)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 564
|
||||
PHFRGBLivenessConfidence = POINTER(struct_HFRGBLivenessConfidence)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 560
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 577
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 572
|
||||
if _libs[_LIBRARY_FILENAME].has("HFGetRGBLivenessConfidence", "cdecl"):
|
||||
HFGetRGBLivenessConfidence = _libs[_LIBRARY_FILENAME].get("HFGetRGBLivenessConfidence", "cdecl")
|
||||
HFGetRGBLivenessConfidence.argtypes = [HFSession, PHFRGBLivenessConfidence]
|
||||
HFGetRGBLivenessConfidence.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 588
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 583
|
||||
class struct_HFFaceMaskConfidence(Structure):
|
||||
pass
|
||||
|
||||
@@ -1384,17 +1394,17 @@ struct_HFFaceMaskConfidence._fields_ = [
|
||||
('confidence', HPFloat),
|
||||
]
|
||||
|
||||
HFFaceMaskConfidence = struct_HFFaceMaskConfidence# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 588
|
||||
HFFaceMaskConfidence = struct_HFFaceMaskConfidence# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 583
|
||||
|
||||
PHFFaceMaskConfidence = POINTER(struct_HFFaceMaskConfidence)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 588
|
||||
PHFFaceMaskConfidence = POINTER(struct_HFFaceMaskConfidence)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 583
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 600
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 595
|
||||
if _libs[_LIBRARY_FILENAME].has("HFGetFaceMaskConfidence", "cdecl"):
|
||||
HFGetFaceMaskConfidence = _libs[_LIBRARY_FILENAME].get("HFGetFaceMaskConfidence", "cdecl")
|
||||
HFGetFaceMaskConfidence.argtypes = [HFSession, PHFFaceMaskConfidence]
|
||||
HFGetFaceMaskConfidence.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 611
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 606
|
||||
class struct_HFFaceQualityConfidence(Structure):
|
||||
pass
|
||||
|
||||
@@ -1407,23 +1417,23 @@ struct_HFFaceQualityConfidence._fields_ = [
|
||||
('confidence', HPFloat),
|
||||
]
|
||||
|
||||
HFFaceQualityConfidence = struct_HFFaceQualityConfidence# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 611
|
||||
HFFaceQualityConfidence = struct_HFFaceQualityConfidence# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 606
|
||||
|
||||
PHFFaceQualityConfidence = POINTER(struct_HFFaceQualityConfidence)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 611
|
||||
PHFFaceQualityConfidence = POINTER(struct_HFFaceQualityConfidence)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 606
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 623
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 618
|
||||
if _libs[_LIBRARY_FILENAME].has("HFGetFaceQualityConfidence", "cdecl"):
|
||||
HFGetFaceQualityConfidence = _libs[_LIBRARY_FILENAME].get("HFGetFaceQualityConfidence", "cdecl")
|
||||
HFGetFaceQualityConfidence.argtypes = [HFSession, PHFFaceQualityConfidence]
|
||||
HFGetFaceQualityConfidence.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 635
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 630
|
||||
if _libs[_LIBRARY_FILENAME].has("HFFaceQualityDetect", "cdecl"):
|
||||
HFFaceQualityDetect = _libs[_LIBRARY_FILENAME].get("HFFaceQualityDetect", "cdecl")
|
||||
HFFaceQualityDetect.argtypes = [HFSession, HFFaceBasicToken, POINTER(HFloat)]
|
||||
HFFaceQualityDetect.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 645
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 641
|
||||
class struct_HFFaceIntereactionState(Structure):
|
||||
pass
|
||||
|
||||
@@ -1438,17 +1448,17 @@ struct_HFFaceIntereactionState._fields_ = [
|
||||
('rightEyeStatusConfidence', HPFloat),
|
||||
]
|
||||
|
||||
HFFaceIntereactionState = struct_HFFaceIntereactionState# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 645
|
||||
HFFaceIntereactionState = struct_HFFaceIntereactionState# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 641
|
||||
|
||||
PHFFaceIntereactionState = POINTER(struct_HFFaceIntereactionState)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 645
|
||||
PHFFaceIntereactionState = POINTER(struct_HFFaceIntereactionState)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 641
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 652
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 648
|
||||
if _libs[_LIBRARY_FILENAME].has("HFGetFaceIntereactionStateResult", "cdecl"):
|
||||
HFGetFaceIntereactionStateResult = _libs[_LIBRARY_FILENAME].get("HFGetFaceIntereactionStateResult", "cdecl")
|
||||
HFGetFaceIntereactionStateResult.argtypes = [HFSession, PHFFaceIntereactionState]
|
||||
HFGetFaceIntereactionStateResult.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 661
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 660
|
||||
class struct_HFFaceIntereactionsActions(Structure):
|
||||
pass
|
||||
|
||||
@@ -1469,17 +1479,17 @@ struct_HFFaceIntereactionsActions._fields_ = [
|
||||
('blink', HPInt32),
|
||||
]
|
||||
|
||||
HFFaceIntereactionsActions = struct_HFFaceIntereactionsActions# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 661
|
||||
HFFaceIntereactionsActions = struct_HFFaceIntereactionsActions# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 660
|
||||
|
||||
PHFFaceIntereactionsActions = POINTER(struct_HFFaceIntereactionsActions)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 661
|
||||
PHFFaceIntereactionsActions = POINTER(struct_HFFaceIntereactionsActions)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 660
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 663
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 668
|
||||
if _libs[_LIBRARY_FILENAME].has("HFGetFaceIntereactionActionsResult", "cdecl"):
|
||||
HFGetFaceIntereactionActionsResult = _libs[_LIBRARY_FILENAME].get("HFGetFaceIntereactionActionsResult", "cdecl")
|
||||
HFGetFaceIntereactionActionsResult.argtypes = [HFSession, PHFFaceIntereactionsActions]
|
||||
HFGetFaceIntereactionActionsResult.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 691
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 695
|
||||
class struct_HFFaceAttributeResult(Structure):
|
||||
pass
|
||||
|
||||
@@ -1496,17 +1506,17 @@ struct_HFFaceAttributeResult._fields_ = [
|
||||
('ageBracket', HPInt32),
|
||||
]
|
||||
|
||||
HFFaceAttributeResult = struct_HFFaceAttributeResult# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 691
|
||||
HFFaceAttributeResult = struct_HFFaceAttributeResult# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 695
|
||||
|
||||
PHFFaceAttributeResult = POINTER(struct_HFFaceAttributeResult)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 691
|
||||
PHFFaceAttributeResult = POINTER(struct_HFFaceAttributeResult)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 695
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 703
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 707
|
||||
if _libs[_LIBRARY_FILENAME].has("HFGetFaceAttributeResult", "cdecl"):
|
||||
HFGetFaceAttributeResult = _libs[_LIBRARY_FILENAME].get("HFGetFaceAttributeResult", "cdecl")
|
||||
HFGetFaceAttributeResult.argtypes = [HFSession, PHFFaceAttributeResult]
|
||||
HFGetFaceAttributeResult.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 717
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 720
|
||||
class struct_HFInspireFaceVersion(Structure):
|
||||
pass
|
||||
|
||||
@@ -1521,143 +1531,172 @@ struct_HFInspireFaceVersion._fields_ = [
|
||||
('patch', c_int),
|
||||
]
|
||||
|
||||
HFInspireFaceVersion = struct_HFInspireFaceVersion# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 717
|
||||
HFInspireFaceVersion = struct_HFInspireFaceVersion# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 720
|
||||
|
||||
PHFInspireFaceVersion = POINTER(struct_HFInspireFaceVersion)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 717
|
||||
PHFInspireFaceVersion = POINTER(struct_HFInspireFaceVersion)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 720
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 727
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 730
|
||||
if _libs[_LIBRARY_FILENAME].has("HFQueryInspireFaceVersion", "cdecl"):
|
||||
HFQueryInspireFaceVersion = _libs[_LIBRARY_FILENAME].get("HFQueryInspireFaceVersion", "cdecl")
|
||||
HFQueryInspireFaceVersion.argtypes = [PHFInspireFaceVersion]
|
||||
HFQueryInspireFaceVersion.restype = HResult
|
||||
|
||||
enum_HFLogLevel = c_int# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 739
|
||||
enum_HFLogLevel = c_int# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 744
|
||||
|
||||
HF_LOG_NONE = 0# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 739
|
||||
HF_LOG_NONE = 0# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 744
|
||||
|
||||
HF_LOG_DEBUG = (HF_LOG_NONE + 1)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 739
|
||||
HF_LOG_DEBUG = (HF_LOG_NONE + 1)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 744
|
||||
|
||||
HF_LOG_INFO = (HF_LOG_DEBUG + 1)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 739
|
||||
HF_LOG_INFO = (HF_LOG_DEBUG + 1)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 744
|
||||
|
||||
HF_LOG_WARN = (HF_LOG_INFO + 1)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 739
|
||||
HF_LOG_WARN = (HF_LOG_INFO + 1)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 744
|
||||
|
||||
HF_LOG_ERROR = (HF_LOG_WARN + 1)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 739
|
||||
HF_LOG_ERROR = (HF_LOG_WARN + 1)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 744
|
||||
|
||||
HF_LOG_FATAL = (HF_LOG_ERROR + 1)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 739
|
||||
HF_LOG_FATAL = (HF_LOG_ERROR + 1)# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 744
|
||||
|
||||
HFLogLevel = enum_HFLogLevel# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 739
|
||||
HFLogLevel = enum_HFLogLevel# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 744
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 744
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 749
|
||||
if _libs[_LIBRARY_FILENAME].has("HFSetLogLevel", "cdecl"):
|
||||
HFSetLogLevel = _libs[_LIBRARY_FILENAME].get("HFSetLogLevel", "cdecl")
|
||||
HFSetLogLevel.argtypes = [HFLogLevel]
|
||||
HFSetLogLevel.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 749
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 754
|
||||
if _libs[_LIBRARY_FILENAME].has("HFLogDisable", "cdecl"):
|
||||
HFLogDisable = _libs[_LIBRARY_FILENAME].get("HFLogDisable", "cdecl")
|
||||
HFLogDisable.argtypes = []
|
||||
HFLogDisable.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 762
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 767
|
||||
if _libs[_LIBRARY_FILENAME].has("HFDeBugImageStreamImShow", "cdecl"):
|
||||
HFDeBugImageStreamImShow = _libs[_LIBRARY_FILENAME].get("HFDeBugImageStreamImShow", "cdecl")
|
||||
HFDeBugImageStreamImShow.argtypes = [HFImageStream]
|
||||
HFDeBugImageStreamImShow.restype = None
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 773
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 779
|
||||
if _libs[_LIBRARY_FILENAME].has("HFDeBugImageStreamDecodeSave", "cdecl"):
|
||||
HFDeBugImageStreamDecodeSave = _libs[_LIBRARY_FILENAME].get("HFDeBugImageStreamDecodeSave", "cdecl")
|
||||
HFDeBugImageStreamDecodeSave.argtypes = [HFImageStream, HPath]
|
||||
HFDeBugImageStreamDecodeSave.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 794
|
||||
if _libs[_LIBRARY_FILENAME].has("HFDeBugShowResourceStatistics", "cdecl"):
|
||||
HFDeBugShowResourceStatistics = _libs[_LIBRARY_FILENAME].get("HFDeBugShowResourceStatistics", "cdecl")
|
||||
HFDeBugShowResourceStatistics.argtypes = []
|
||||
HFDeBugShowResourceStatistics.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 804
|
||||
if _libs[_LIBRARY_FILENAME].has("HFDeBugGetUnreleasedSessionsCount", "cdecl"):
|
||||
HFDeBugGetUnreleasedSessionsCount = _libs[_LIBRARY_FILENAME].get("HFDeBugGetUnreleasedSessionsCount", "cdecl")
|
||||
HFDeBugGetUnreleasedSessionsCount.argtypes = [POINTER(HInt32)]
|
||||
HFDeBugGetUnreleasedSessionsCount.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 815
|
||||
if _libs[_LIBRARY_FILENAME].has("HFDeBugGetUnreleasedSessions", "cdecl"):
|
||||
HFDeBugGetUnreleasedSessions = _libs[_LIBRARY_FILENAME].get("HFDeBugGetUnreleasedSessions", "cdecl")
|
||||
HFDeBugGetUnreleasedSessions.argtypes = [POINTER(HFSession), HInt32]
|
||||
HFDeBugGetUnreleasedSessions.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 825
|
||||
if _libs[_LIBRARY_FILENAME].has("HFDeBugGetUnreleasedStreamsCount", "cdecl"):
|
||||
HFDeBugGetUnreleasedStreamsCount = _libs[_LIBRARY_FILENAME].get("HFDeBugGetUnreleasedStreamsCount", "cdecl")
|
||||
HFDeBugGetUnreleasedStreamsCount.argtypes = [POINTER(HInt32)]
|
||||
HFDeBugGetUnreleasedStreamsCount.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 836
|
||||
if _libs[_LIBRARY_FILENAME].has("HFDeBugGetUnreleasedStreams", "cdecl"):
|
||||
HFDeBugGetUnreleasedStreams = _libs[_LIBRARY_FILENAME].get("HFDeBugGetUnreleasedStreams", "cdecl")
|
||||
HFDeBugGetUnreleasedStreams.argtypes = [POINTER(HFImageStream), HInt32]
|
||||
HFDeBugGetUnreleasedStreams.restype = HResult
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 26
|
||||
try:
|
||||
HF_ENABLE_NONE = 0x00000000
|
||||
except:
|
||||
pass
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 27
|
||||
try:
|
||||
HF_ENABLE_NONE = 0
|
||||
HF_ENABLE_FACE_RECOGNITION = 0x00000002
|
||||
except:
|
||||
pass
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 28
|
||||
try:
|
||||
HF_ENABLE_FACE_RECOGNITION = 2
|
||||
HF_ENABLE_LIVENESS = 0x00000004
|
||||
except:
|
||||
pass
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 29
|
||||
try:
|
||||
HF_ENABLE_LIVENESS = 4
|
||||
HF_ENABLE_IR_LIVENESS = 0x00000008
|
||||
except:
|
||||
pass
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 30
|
||||
try:
|
||||
HF_ENABLE_IR_LIVENESS = 8
|
||||
HF_ENABLE_MASK_DETECT = 0x00000010
|
||||
except:
|
||||
pass
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 31
|
||||
try:
|
||||
HF_ENABLE_MASK_DETECT = 16
|
||||
HF_ENABLE_FACE_ATTRIBUTE = 0x00000020
|
||||
except:
|
||||
pass
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 32
|
||||
try:
|
||||
HF_ENABLE_FACE_ATTRIBUTE = 32
|
||||
HF_ENABLE_PLACEHOLDER_ = 0x00000040
|
||||
except:
|
||||
pass
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 33
|
||||
try:
|
||||
HF_ENABLE_PLACEHOLDER_ = 64
|
||||
HF_ENABLE_QUALITY = 0x00000080
|
||||
except:
|
||||
pass
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 34
|
||||
try:
|
||||
HF_ENABLE_QUALITY = 128
|
||||
HF_ENABLE_INTERACTION = 0x00000100
|
||||
except:
|
||||
pass
|
||||
|
||||
# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 35
|
||||
try:
|
||||
HF_ENABLE_INTERACTION = 256
|
||||
except:
|
||||
pass
|
||||
HFImageData = struct_HFImageData# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 70
|
||||
|
||||
HFImageData = struct_HFImageData# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 74
|
||||
HFSessionCustomParameter = struct_HFSessionCustomParameter# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 134
|
||||
|
||||
HFSessionCustomParameter = struct_HFSessionCustomParameter# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 131
|
||||
HFFaceBasicToken = struct_HFFaceBasicToken# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 199
|
||||
|
||||
HFFaceBasicToken = struct_HFFaceBasicToken# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 204
|
||||
HFFaceEulerAngle = struct_HFFaceEulerAngle# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 210
|
||||
|
||||
HFFaceEulerAngle = struct_HFFaceEulerAngle# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 215
|
||||
HFMultipleFaceData = struct_HFMultipleFaceData# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 225
|
||||
|
||||
HFMultipleFaceData = struct_HFMultipleFaceData# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 229
|
||||
HFFaceFeature = struct_HFFaceFeature# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 326
|
||||
|
||||
HFFaceFeature = struct_HFFaceFeature# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 329
|
||||
HFFeatureHubConfiguration = struct_HFFeatureHubConfiguration# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 377
|
||||
|
||||
HFFeatureHubConfiguration = struct_HFFeatureHubConfiguration# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 379
|
||||
HFFaceFeatureIdentity = struct_HFFaceFeatureIdentity# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 406
|
||||
|
||||
HFFaceFeatureIdentity = struct_HFFaceFeatureIdentity# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 409
|
||||
HFSearchTopKResults = struct_HFSearchTopKResults# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 415
|
||||
|
||||
HFSearchTopKResults = struct_HFSearchTopKResults# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 418
|
||||
HFRGBLivenessConfidence = struct_HFRGBLivenessConfidence# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 560
|
||||
|
||||
HFRGBLivenessConfidence = struct_HFRGBLivenessConfidence# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 564
|
||||
HFFaceMaskConfidence = struct_HFFaceMaskConfidence# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 583
|
||||
|
||||
HFFaceMaskConfidence = struct_HFFaceMaskConfidence# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 588
|
||||
HFFaceQualityConfidence = struct_HFFaceQualityConfidence# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 606
|
||||
|
||||
HFFaceQualityConfidence = struct_HFFaceQualityConfidence# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 611
|
||||
HFFaceIntereactionState = struct_HFFaceIntereactionState# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 641
|
||||
|
||||
HFFaceIntereactionState = struct_HFFaceIntereactionState# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 645
|
||||
HFFaceIntereactionsActions = struct_HFFaceIntereactionsActions# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 660
|
||||
|
||||
HFFaceIntereactionsActions = struct_HFFaceIntereactionsActions# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 661
|
||||
HFFaceAttributeResult = struct_HFFaceAttributeResult# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 695
|
||||
|
||||
HFFaceAttributeResult = struct_HFFaceAttributeResult# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 691
|
||||
|
||||
HFInspireFaceVersion = struct_HFInspireFaceVersion# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 717
|
||||
HFInspireFaceVersion = struct_HFInspireFaceVersion# /Users/tunm/work/InspireFace/cpp/inspireface/c_api/inspireface.h: 720
|
||||
|
||||
# No inserted files
|
||||
|
||||
# No prefix-stripping
|
||||
|
||||
|
||||
@@ -179,6 +179,7 @@ class FaceInformation:
|
||||
|
||||
def __init__(self,
|
||||
track_id: int,
|
||||
detection_confidence: float,
|
||||
location: Tuple,
|
||||
roll: float,
|
||||
yaw: float,
|
||||
@@ -186,6 +187,7 @@ class FaceInformation:
|
||||
_token: HFFaceBasicToken,
|
||||
_feature: np.array = None):
|
||||
self.track_id = track_id
|
||||
self.detection_confidence = detection_confidence
|
||||
self.location = location
|
||||
self.roll = roll
|
||||
self.yaw = yaw
|
||||
@@ -312,6 +314,7 @@ class InspireFaceSession(object):
|
||||
pitch = euler_angle[idx][2]
|
||||
track_id = track_ids[idx]
|
||||
_token = tokens[idx]
|
||||
detection_confidence = self.multiple_faces.detConfidence[idx]
|
||||
|
||||
info = FaceInformation(
|
||||
location=(top_left[0], top_left[1], bottom_right[0], bottom_right[1]),
|
||||
@@ -320,6 +323,7 @@ class InspireFaceSession(object):
|
||||
pitch=pitch,
|
||||
track_id=track_id,
|
||||
_token=_token,
|
||||
detection_confidence=detection_confidence,
|
||||
)
|
||||
infos.append(info)
|
||||
|
||||
@@ -341,6 +345,20 @@ class InspireFaceSession(object):
|
||||
landmark.append(point.y)
|
||||
|
||||
return np.asarray(landmark).reshape(-1, 2)
|
||||
|
||||
def set_detection_confidence_threshold(self, threshold: float):
|
||||
"""
|
||||
Sets the detection confidence threshold for the face detection session.
|
||||
|
||||
Args:
|
||||
threshold (float): The confidence threshold for face detection.
|
||||
|
||||
Notes:
|
||||
If setting the detection confidence threshold fails, an error is logged with the returned status code.
|
||||
"""
|
||||
ret = HFSessionSetFaceDetectThreshold(self._sess, threshold)
|
||||
if ret != 0:
|
||||
logger.error(f"Set detection confidence threshold error: {ret}")
|
||||
|
||||
def set_track_preview_size(self, size=192):
|
||||
"""
|
||||
@@ -962,3 +980,9 @@ def disable_logging() -> None:
|
||||
Disables all logging from the InspireFace library.
|
||||
"""
|
||||
HFLogDisable()
|
||||
|
||||
def show_system_resource_statistics():
|
||||
"""
|
||||
Displays the system resource information.
|
||||
"""
|
||||
HFDeBugShowResourceStatistics()
|
||||
|
||||
@@ -26,6 +26,9 @@ def case_face_detection_image(resource_path, image_path):
|
||||
opt = HF_ENABLE_FACE_RECOGNITION | HF_ENABLE_QUALITY | HF_ENABLE_MASK_DETECT | HF_ENABLE_LIVENESS | HF_ENABLE_INTERACTION | HF_ENABLE_FACE_ATTRIBUTE
|
||||
session = ifac.InspireFaceSession(opt, HF_DETECT_MODE_ALWAYS_DETECT)
|
||||
|
||||
# Set detection confidence threshold
|
||||
session.set_detection_confidence_threshold(0.5)
|
||||
|
||||
# Load the image using OpenCV.
|
||||
image = cv2.imread(image_path)
|
||||
assert image is not None, "Please check that the image path is correct."
|
||||
@@ -33,12 +36,13 @@ def case_face_detection_image(resource_path, image_path):
|
||||
# Perform face detection on the image.
|
||||
faces = session.face_detection(image)
|
||||
print(f"face detection: {len(faces)} found")
|
||||
|
||||
|
||||
# Copy the image for drawing the bounding boxes.
|
||||
draw = image.copy()
|
||||
for idx, face in enumerate(faces):
|
||||
print(f"{'==' * 20}")
|
||||
print(f"idx: {idx}")
|
||||
print(f"detection confidence: {face.detection_confidence}")
|
||||
# Print Euler angles of the face.
|
||||
print(f"roll: {face.roll}, yaw: {face.yaw}, pitch: {face.pitch}")
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
|
||||
import inspireface as ifac
|
||||
from inspireface.param import *
|
||||
import click
|
||||
|
||||
@click.command()
|
||||
@click.argument("resource_path")
|
||||
def case_show_system_resource_statistics(resource_path):
|
||||
"""
|
||||
This case is used to test the system resource statistics.
|
||||
"""
|
||||
ret = ifac.launch(resource_path)
|
||||
assert ret, "Launch failure. Please ensure the resource path is correct."
|
||||
print("-" * 100)
|
||||
print("Initialization state")
|
||||
print("-" * 100)
|
||||
ifac.show_system_resource_statistics()
|
||||
print("-" * 100)
|
||||
print("Create 10 sessions")
|
||||
print("-" * 100)
|
||||
print("")
|
||||
num_created_sessions = 10
|
||||
sessions = []
|
||||
for i in range(num_created_sessions):
|
||||
session = ifac.InspireFaceSession(HF_ENABLE_FACE_RECOGNITION, HF_DETECT_MODE_ALWAYS_DETECT)
|
||||
sessions.append(session)
|
||||
ifac.show_system_resource_statistics()
|
||||
print("-" * 100)
|
||||
print("Release 10 sessions")
|
||||
print("-" * 100)
|
||||
print()
|
||||
for session in sessions:
|
||||
session.release()
|
||||
ifac.show_system_resource_statistics()
|
||||
|
||||
if __name__ == "__main__":
|
||||
case_show_system_resource_statistics()
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 242 KiB |
Reference in New Issue
Block a user