HUSKYLENS 2 Orientation Detection Function Description
HUSKYLENS 2 offers advanced orientation detection for human faces in 3D space. Learn to select functions, observe effects, and adjust parameters like detection threshold and recognition threshold. The device supports exporting models to other units, ensuring seamless transition and usage. Dive into understanding Euler angles and optimize face recognition tasks for educational projects or innovative applications. This guide is essential for mastering face orientation detection with HUSKYLENS 2.
1.Introduction to Orientation Detection
The Orientation Detection function of HUSKYLENS 2 can detect and estimate the orientation angle of a human face in 3D space.
2.Orientation Detection Description
In this section, we will learn how to use the Orientation Detection function of HUSKYLENS 2 to recognize and learn the orientation of human faces in the frame.
2.1 Select the Orientation Detection Function
Power on HUSKYLENS 2. After it starts successfully, locate and select the "Orientation Detection" function.
2.2 Observe the Orientation Detection Effect
Point the camera of HUSKYLENS 2 at a human face. Observe that a cube frame appears on the screen to mark the face position, with three Euler angle values displayed above: (r:0°, y:31°, p:-6°).
These three values correspond to:
r (Roll): Indicates the left-right tilt angle of the face.When Roll = 0°, the face is upright with no left or right tilt.When Roll > 0°, the face tilts to the left (head tilted left).When Roll < 0°, the face tilts to the right (head tilted right).
y (Yaw): Indicates the left-right rotation angle of the face.When Yaw = 0°, the face is directly facing the camera.When Yaw > 0°, the face rotates to the left (facing the left side of the frame).When Yaw < 0°, the face rotates to the right (facing the right side of the frame).
p (Pitch): Indicates the up-down tilt angle of the face.When Pitch = 0°, the face is looking horizontally forward.When Pitch > 0°, the face is looking upward.When Pitch < 0°, the face is looking downward.
For example, in the image below, r = 0° means the person’s head is upright with no tilt.
y: 31° means the face has rotated approximately 31° to the left, facing toward the left side.
p: -6° means the face is slightly looking downward by about 6°.
2.3 Learn Orientation Detection Results
After pointing the HUSKYLENS 2 camera at a face, press the Button-A in the top-right corner to learn this face orientation. HUSKYLENS 2 will assign a unique ID to each learned face orientation according to the learning sequence, and display the recognition confidence.
3.Orientation Detection Parameter Settings
The factory default settings of HUSKYLENS 2 already meet basic usage requirements. You can manually adjust each parameter for personalized functions.
All parameters below are based on the Orientation Detection function. Therefore, first make sure you have entered the Orientation Detection mode as shown in the figure.
To modify a parameter, you can select it by swiping left or right on the parameter text at the bottom of the screen.
3.1 Forget ID
If you need to forget all previously learned poses:
Step 1: Tap "Forget ID" on the screen.
Step 2: A pop-up will appear saying "Forget all IDs and names", then tap Yes.
At this point, point HUSKYLENS 2 at the face orientations that were learned and then forgotten. If no ID or confidence level appears, this confirms that the data has been successfully forgotten.
3.2 Detection Threshold
Detection Threshold controls the sensitivity of Orientation Detection.
The lower the threshold, the looser the criteria for detecting and judging face orientation in the frame. The higher the threshold, the stricter the criteria.
Setting steps: Tap "Detection Threshold". A parameter slider will appear above it. Slide left to decrease the value, slide right to increase it.
As shown below, if the detection threshold is set too high, the face orientation in the frame cannot be detected.
3.3 Recognition Threshold
Recognition Threshold controls the strictness of recognizing learned face orientations.
The lower the threshold, the looser the criteria for matching the face orientation in the frame to a learned one (easy to misrecognize but hard to miss). The higher the threshold, the stricter the criteria (easy to miss but hard to misrecognize).
Setting steps: Tap "Recognition Threshold". A parameter slider will appear above it. Slide left to decrease the value, slide right to increase it, as shown in the figure.
3.4 NMS Threshold
NMS Threshold is a common parameter in visual recognition, used to filter detection boxes.
In visual recognition tasks, the model often predicts multiple overlapping detection boxes around the same target. Without filtering, one object may be enclosed by multiple overlapping boxes. You can adjust the NMS threshold to remove duplicate overlapping boxes and keep only the optimal one.
In simple terms, the NMS threshold determines how much overlap between two boxes counts as “duplicate”.
For example:
- If the threshold is low (e.g., 0.3): two boxes with slight overlap are considered duplicates, and one will be removed.
- If the threshold is high (e.g., 0.7): two boxes must overlap greatly to be considered duplicates, so more boxes may be kept.
Setting steps: Tap “NMS Threshold”. A parameter slider will appear above it. Slide left to decrease the value, slide right to increase it.
3.5 Set Name
This parameter allows you to assign names to learned poses, supporting both Chinese and English.
Setting steps: Tap "Set Name". Slide the number in the top-left corner up or down to select which ID to name. Use the on-screen keyboard to enter the name, as shown in the left image.
When finished, tap the √ button in the bottom-right corner to save. A green checkmark will appear in the top-right corner to confirm successful saving.
3.6 Show Name
This parameter controls whether the name is displayed when a pose is recognized. It is enabled by default.
Setting steps: Tap "Show Name". When the switch above it is blue (enabled), the name will be shown when a learned face orientation is recognized, as shown in the left image.
Tap the switch to turn it white (disabled); the name will no longer be displayed when a learned face orientation is recognized, as shown in the right image.
3.7 Reset Default
This parameter restores all settings to their default state and forgets learned IDs and names, but does not clear exported models (see below for details on exported models).
Setting steps: Tap Reset Default. When the Restore default configuration pop-up appears, tap Yes.
3.8 Export Model
This parameter allows you to save and export the current parameters, learned IDs, and set names to the local memory of HUSKYLENS 2. It is suitable for scenarios such as migrating parameters to another HUSKYLENS 2. No TF card is required for this operation.
Export steps: Tap "Model Installation". When the "Save configuration to" pop-up (left image) appears, slide the number up or down to select which model slot to save to (up to 5 models can be saved). Then tap the Yes button in the bottom-left corner of the pop-up to save. After confirmation, it will be exported automatically, as shown in the right image.
View Exported Model: After the "Exporting" pop-up disappears, you can view the exported model file on a computer. First, connect HUSKYLENS 2 to a USB port on your computer.
Next, use a computer to access the memory of HUSKYLENS 2 via the path shown in the figure below. You will find two model-related files with the extensions .json and .bin.
The number before the file extension is the model number you selected when saving the configuration. Both files can be copied and pasted to other locations.
3.9 Import Model
This parameter allows you to import the model exported from one HUSKYLENS 2 (referred to as "Husky A") to another HUSKYLENS 2 (referred to as "Husky B").
This enables Husky B to directly use the poses and parameters learned and adjusted by Husky A without re-learning or re-configuring.
Import steps:
Step 1: Connect Husky A to a computer, then copy the exported files to the desktop.
Step 2: Connect Husky B to a computer, then paste the files from the previous step into the specified folder of Husky B, as shown in the figure.
Step 3: First make sure you have entered the Pose Recognition function. Then tap Import Model.
In the "Load configuration" pop-up, slide the number up or down to select which model to load. The number must match the model number you saved earlier.
For example, if the model file you pasted into Husky B is config0.json, select number 0.
Finally, tap Yes to import. Wait until the "Loading" pop-up disappears; the import is then complete.
You can then check whether the parameters and learned poses on Husky B are consistent with those on Husky A.
The left image below shows the recognition status of Husky B before model import, and the right image shows the status after import.
Was this article helpful?
