lightweight-expression-detector
Version:
A lightweight hybrid expression detection module using MediaPipe face blendshapes
17 lines (16 loc) • 566 B
TypeScript
export type BlendshapeCategory = {
categoryName: string;
score: number;
};
export type Emotion = string;
export interface EmotionResult {
emotion: Emotion;
labelHints: string[];
}
/**
* Classify emotion from blendshapes and baseline.
* @param blendshapes Category[] from FaceLandmarker
* @param baseline Record of baseline scores
* @param history Array of recent emotion results for smoothing
*/
export declare function classifyBlendshapes(blendshapes: BlendshapeCategory[], baseline: Record<string, number>, history?: string[]): EmotionResult;