diff --git a/cpp-package/inspireface/README.md b/cpp-package/inspireface/README.md index 4f28713..972a10c 100644 --- a/cpp-package/inspireface/README.md +++ b/cpp-package/inspireface/README.md @@ -9,6 +9,8 @@ If you require further information on tracking development branches, CI/CD proce Please contact [contact@insightface.ai](mailto:contact@insightface.ai?subject=InspireFace) for commercial support, including obtaining and integrating higher accuracy models, as well as custom development. +banner + ## Change Logs **`2024-07-05`** Fixed some bugs in the python ctypes interface. diff --git a/cpp-package/inspireface/cpp/inspireface/c_api/inspireface.h b/cpp-package/inspireface/cpp/inspireface/c_api/inspireface.h index fb32ebd..6316e67 100644 --- a/cpp-package/inspireface/cpp/inspireface/c_api/inspireface.h +++ b/cpp-package/inspireface/cpp/inspireface/c_api/inspireface.h @@ -636,7 +636,7 @@ HYPER_CAPI_EXPORT extern HResult HFFaceQualityDetect(HFSession session, HFFaceBa /** - * @brief Some facial states in the face interaction module. + * @brief Facial states in the face interaction module. */ typedef struct HFFaceIntereactionResult { HInt32 num; ///< Number of faces detected. @@ -644,6 +644,11 @@ typedef struct HFFaceIntereactionResult { HPFloat rightEyeStatusConfidence; ///< Right eye state: confidence close to 1 means open, close to 0 means closed. } HFFaceIntereactionResult, *PHFFaceIntereactionResult; +/** + * @brief Get the prediction results of face interaction. + * @param session Handle to the session. + * @param result Facial state prediction results in the face interaction module. + */ HYPER_CAPI_EXPORT extern HResult HFGetFaceIntereactionResult(HFSession session, PHFFaceIntereactionResult result); /** diff --git a/cpp-package/inspireface/images/banner.jpg b/cpp-package/inspireface/images/banner.jpg new file mode 100644 index 0000000..b7ea664 Binary files /dev/null and b/cpp-package/inspireface/images/banner.jpg differ diff --git a/cpp-package/inspireface/python/sample_face_detection.py b/cpp-package/inspireface/python/sample_face_detection.py index bee9595..f706337 100644 --- a/cpp-package/inspireface/python/sample_face_detection.py +++ b/cpp-package/inspireface/python/sample_face_detection.py @@ -48,10 +48,7 @@ def case_face_detection_image(resource_path, image_path): # Calculate center, size, and angle center = ((x1 + x2) / 2, (y1 + y2) / 2) size = (x2 - x1, y2 - y1) - angle = face.roll # 这里使用 roll 角度 - - # Get rotation matrix - rotation_matrix = cv2.getRotationMatrix2D(center, angle, 1.0) + angle = face.roll # Apply rotation to the bounding box corners rect = ((center[0], center[1]), (size[0], size[1]), angle) diff --git a/cpp-package/inspireface/python/sample_face_track_from_video.py b/cpp-package/inspireface/python/sample_face_track_from_video.py index c36d473..e73ed8b 100644 --- a/cpp-package/inspireface/python/sample_face_track_from_video.py +++ b/cpp-package/inspireface/python/sample_face_track_from_video.py @@ -62,7 +62,7 @@ def case_face_tracker_from_video(resource_path, source, show): # Calculate center, size, and angle center = ((x1 + x2) / 2, (y1 + y2) / 2) size = (x2 - x1, y2 - y1) - angle = face.roll # 这里使用 roll 角度 + angle = face.roll # Get rotation matrix rotation_matrix = cv2.getRotationMatrix2D(center, angle, 1.0)