PoseEstimate

class lib.align.pose.PoseEstimate(landmarks: ndarray, landmarks_type: LandmarkType)

Bases: object

Estimates pose from a generic 3D head model for the given 2D face landmarks.

Parameters:
  • landmarks (np.ndarray) – The original 68 point landmarks aligned to 0.0 - 1.0 range

  • landmarks_type (LandmarkType) – The type of landmarks that are generating this face

References

Head Pose Estimation using OpenCV and Dlib - https://www.learnopencv.com/tag/solvepnp/ 3D Model points - http://aifi.isr.uc.pt/Downloads/OpenGL/glAnthropometric3DModel.cpp

Attributes Summary

offset

The amount to offset a standard 0.0 - 1.0 Umeyama transformation matrix from the center of the face (between the eyes) or center of the head (middle of skull) rather than the nose area.

pitch

The pitch of the aligned face in Eular angles

roll

The roll of the aligned face in Eular angles

xyz_2d

projected (x, y) coordinates for each x, y, z point at a constant distance from adjusted center of the skull (0.5, 0.5) in the 2D space.

yaw

The yaw of the aligned face in Eular angles

Attributes Documentation

offset

The amount to offset a standard 0.0 - 1.0 Umeyama transformation matrix from the center of the face (between the eyes) or center of the head (middle of skull) rather than the nose area.

pitch

The pitch of the aligned face in Eular angles

roll

The roll of the aligned face in Eular angles

xyz_2d

projected (x, y) coordinates for each x, y, z point at a constant distance from adjusted center of the skull (0.5, 0.5) in the 2D space.

yaw

The yaw of the aligned face in Eular angles

property offset: dict[CenteringType, np.ndarray]

The amount to offset a standard 0.0 - 1.0 Umeyama transformation matrix from the center of the face (between the eyes) or center of the head (middle of skull) rather than the nose area.

property pitch: float

The pitch of the aligned face in Eular angles

property roll: float

The roll of the aligned face in Eular angles

property xyz_2d: ndarray

projected (x, y) coordinates for each x, y, z point at a constant distance from adjusted center of the skull (0.5, 0.5) in the 2D space.

property yaw: float

The yaw of the aligned face in Eular angles