Skip to main content

Interface: Face

@geenee/bodyprocessors.Face

Face detection

Properties

backproj

Optional backproj: Coord3D[]


mask

Optional mask: BodyMask

Segmentation mask - monochrome image, where every pixel has value from 0 to 1 denoting the probability of it being a foreground pixel. Mask is provided for normalized rect region of the original image, it has a fixed size in pixels and should be scaled to image space.


metric

Optional metric: Coord3D[]

3D metric points - points within 3D space of perspective camera located at the space origin and pointed in the negative direction of the Z-axis. These points can be used to apply texture face mask.


pixel

pixel: Coord3D[]

2D pixel face landmarks - points in the screen coordinate space. X and Y coordinates are normalized screen coordinates (scaled by width and height of the input image), while the Z coordinate is depth within orthographic projection space. These points can be used for 2D face filters or when using orthographic projection.


score

score: number

Reliability score, number between 0 and 1


transform

Optional transform: FacePose

Face pose - transformation matrix (translation+rotation+scale) aligning reference face 3D model with the measured 3D face mesh. Applying this transformation one can align 3D object with the detected face. If the model's initial position is aligned with the reference face, relative transformation will be preserved.