You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/using-with/c-cpp.md
+36-7Lines changed: 36 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
3
3
Whether it is C or C++, we recommend the use of a single CAPI header file + lib, because CAPI long-term maintenance is relatively stable, of course, there are C++ interfaces, specific reference to C++ header files.
4
4
5
+
5
6
## Installation and Setup
6
7
7
8
You can download the precompiled inspireface library from the [release page](https://github.com/HyperInspire/InspireFace/releases), which includes the dynamic library +CAPI header by default. You need to link and include them in your project, using cmake as an example:
@@ -44,6 +45,8 @@ InspireFace's facial analysis algorithms are all concentrated in the session. Yo
44
45
45
46
Since the session contains some cache, **we recommend** using one session within a thread, and **we don't recommend** cross-using internal data from multiple sessions in tracking mode, as this can easily cause confusion. Sessions can be freely created and destroyed anywhere.
Face landmark prediction can be used in any detection mode state, but it should be noted that if the detection mode is in **TRACK** state, you will get smoother facial landmark points. This is because the internal face tracking state landmark optimization filtering has been integrated. We provide two solutions: 5 basic key points and denser key points (more than 100 points).
// Set landmark smoothing ratio (only effective in TRACK mode!)
@@ -252,13 +257,34 @@ if (ret != HSUCCEED) {
252
257
HFReleaseFaceFeature(&feature);
253
258
```
254
259
260
+
### Face Pose Estimation
261
+
262
+
When you create a session with the **HF_ENABLE_FACE_POSE** option enabled, you can obtain face pose Euler angle values from the returned MultipleFaceData during face detection or tracking:
263
+
264
+
- **HFFaceEulerAngle**:
265
+
- **roll**: Head rotation around the Z-axis (tilting left/right)
266
+
- **yaw**: Head rotation around the Y-axis (turning left/right)
267
+
- **pitch**: Head rotation around the X-axis (nodding up/down)
If you want to access facial attribute functions such as Anti-Spoofing, mask detection, quality detection, and facial motion recognition, you need to call the Pipeline interface to execute these functions.
When you configure and execute a Pipeline with the Option containing **HF_ENABLE_LIVENESS**, you can obtain the RGB Anti-Spoofing detection confidence through the following method:
When you configure and execute a Pipeline with the Option containing **HF_ENABLE_MASK_DETECT**, you can obtain the face mask detection confidence through the following method:
@@ -613,6 +638,10 @@ cleanup:
613
638
614
639
We provide a lightweight face embedding vector database (**FeatureHub**) storage solution that includes basic functions such as adding, deleting, modifying, and searching, while supporting both **memory** and **persistent** storage modes.
615
640
641
+
::: tip
642
+
Although we provide a lightweight vector storage and retrieval function, it is not necessary. If it cannot meet your performance requirements, we encourage you to manage the face embeddings yourself.
643
+
:::
644
+
616
645
Before starting FeatureHub, you need to be familiar with the following parameters:
617
646
618
647
-**primaryKeyMode**: Primary key mode, with two modes available. It's recommended to use HF_PK_AUTO_INCREMENT by default
0 commit comments