import { type Frame, VisionCameraProxy } from 'react-native-vision-camera'; const plugin = VisionCameraProxy.initFrameProcessorPlugin('detectFaces', {}); export type Point = { x: number; y: number }; export interface FaceInterface { leftEyeOpenProbability: number; rollAngle: number; pitchAngle: number; yawAngle: number; rightEyeOpenProbability: number; smilingProbability: number; bounds: { y: number; x: number; height: number; width: number; boundingCenterX: number; boundingCenterY: number; boundingExactCenterX?: number; boundingExactCenterY?: number; }; contours: { FACE: Array; NOSE_BOTTOM: Array; LOWER_LIP_TOP: Array; RIGHT_EYEBROW_BOTTOM: Array; LOWER_LIP_BOTTOM: Array; NOSE_BRIDGE: Array; RIGHT_CHEEK: Array; RIGHT_EYEBROW_TOP: Array; LEFT_EYEBROW_TOP: Array; UPPER_LIP_BOTTOM: Array; LEFT_EYEBROW_BOTTOM: Array; UPPER_LIP_TOP: Array; LEFT_EYE: Array; RIGHT_EYE: Array; LEFT_CHEEK: Array; }; } export function detectFaces(frame: Frame): Array { 'worklet'; if (plugin == null) throw new Error('Failed to load Frame Processor Plugin "detectFaces"!'); return plugin.call(frame) as unknown as Array; }