Skip to content

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

NameTypeDescription
face_pointslist[point]Keypoints extracted from a detected face (minimum 5 required)
face_polygonslist[polygon]Bounding boxes for the detected faces being evaluated.

Outputs

NameTypeDescription
resultboolThe overall evaluation status (true if all enabled checks pass).
horizontal_valuenumberThe calculated horizontal angle of the head.
vertical_valuenumberThe calculated vertical angle of the head.
oblique_valuenumberThe calculated oblique tilt angle of the head.
horizontal_okbooltrue if the horizontal angle is within the threshold.
vertical_okbooltrue if the vertical angle is within the threshold.
oblique_okbooltrue if the oblique angle is within the threshold.

Parameters

ParameterDefaultTypeDescriptionTunable
Face Horizontal EnabledtrueboolEnable/disable horizontal alignment check.
Face Vertical EnabledfalseboolEnable/disable vertical alignment check.
Face Oblique EnabledtrueboolEnable/disable oblique (tilt) alignment check.
Face Horizontal Threshold0.45floatMinimum coefficient for a "centered" horizontal view.
Face Vertical Threshold Min0.55floatMinimum coefficient for a "centered" horizontal view.
Face Vertical Threshold Max1.50floatMaximum coefficient for vertical alignment.
Face Oblique Threshold20intMaximum 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.

Reference: