Appearance
Face Orientation
⚠️ Warning
This node is exclusive to the Forxai Mirror project and requires a specific installation for use.
Overview
The Face Orientation node determines head alignment angles from facial landmarks. It evaluates horizontal, vertical, and oblique positions against user-defined thresholds.
Use Face Orientation when:
- Verifying that a person is looking directly at a camera or sensor.
- Filtering out faces that are turned too far away, tilted, or looking too far up/down.
💡 Tip
This node requires at least 5 facial landmarks to perform calculations. Ensure your preceding detection model provides sufficient keypoint detail.
Inputs
| Name | Type | Description |
|---|---|---|
| face_points | list[point] | Keypoints extracted from a detected face (minimum 5 required) |
| face_polygons | list[polygon] | Bounding boxes for the detected faces being evaluated. |
Outputs
| Name | Type | Description |
|---|---|---|
| result | bool | The overall evaluation status (true if all enabled checks pass). |
| horizontal_value | number | The calculated horizontal angle of the head. |
| vertical_value | number | The calculated vertical angle of the head. |
| oblique_value | number | The calculated oblique tilt angle of the head. |
| horizontal_ok | bool | true if the horizontal angle is within the threshold. |
| vertical_ok | bool | true if the vertical angle is within the threshold. |
| oblique_ok | bool | true if the oblique angle is within the threshold. |
Parameters
| Parameter | Default | Type | Description | Tunable |
|---|---|---|---|---|
| Face Horizontal Enabled | true | bool | Enable/disable horizontal alignment check. | ✅ |
| Face Vertical Enabled | false | bool | Enable/disable vertical alignment check. | ✅ |
| Face Oblique Enabled | true | bool | Enable/disable oblique (tilt) alignment check. | ✅ |
| Face Horizontal Threshold | 0.45 | float | Minimum coefficient for a "centered" horizontal view. | ✅ |
| Face Vertical Threshold Min | 0.55 | float | Minimum coefficient for a "centered" horizontal view. | ✅ |
| Face Vertical Threshold Max | 1.50 | float | Maximum coefficient for vertical alignment. | ✅ |
| Face Oblique Threshold | 20 | int | Maximum allowed tilt deviation. | ✅ |
Logic Details
The node uses specific coefficient comparisons rather than simple degree angles for horizontal and vertical checks:
- Horizontal Check: Passes if the value is greater than or equal to the threshold (default 0.45).
- Vertical Check: Passes if the value falls between the Min (0.55) and Max (1.50) thresholds.
- Oblique Check: It passes if this corrected value is less than or equal to the threshold (default 20).
Example
Front-facing check
A security kiosk requires users to look directly at the camera. The Face Orientation node is set with a strict threshold for horizontal and vertical angles.
Configuration:
- Face Horizontal Threshold:
0.50 - Face Vertical Threshold:
1.50 - Face Horizontal Enabled:
true - Face Vertical Enabled:
true
Result: If a user tilts their head or looks slightly to the side, the result output will switch to false, which can be used to pause a process or trigger a notification.
Related links
Reference:
- Face Mask Evaluation — checking for proper mask wearing
- AI Model — basic model inference for detections