Modify some incorrect and missing code comments.

This commit is contained in:
JingyuYan
2024-07-06 02:09:09 +08:00
parent 253c82a0a4
commit 31827ec17a
5 changed files with 10 additions and 6 deletions

View File

@@ -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.
<img src="images/banner.jpg" alt="banner" style="zoom:80%;" />
## Change Logs
**`2024-07-05`** Fixed some bugs in the python ctypes interface.

View File

@@ -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);
/**

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

@@ -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)

View File

@@ -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)