Abstract
To address the issue of facial expression recognition algorithms being susceptible to feature detection errors, this paper proposes a novel algorithm based on a Finite Automata Machine (FAM). The system integrates image preprocessing, Adaboost-based face detection, Active Shape Model (ASM) feature localization, and normalization, culminating in a classification stage driven by FAM. Experimental results demonstrate that this approach achieves high accuracy, stability, and processing speed, offering a robust method for advancing artificial intelligence and human-computer interaction.
Introduction
Facial expression recognition (FER) is a critical component of modern human-computer interaction. However, many existing algorithms suffer from "brittleness." Because they typically rely on static snapshots to detect specific landmarks—such as the corners of the mouth or the arch of an eyebrow—a single-frame error caused by lighting, movement, or sensor noise can lead to an incorrect classification.
This research moves away from static, frame-by-frame classification. Instead of treating each frame as an isolated event, the system models expressions as a sequence of logical state transitions. By asking what the most probable next state is based on the current state and incoming feature changes, the system becomes significantly more resilient to transient detection errors.
Methodology
The proposed pipeline consists of four primary stages:
- Preprocessing and Face Detection: Images undergo grayscale conversion and histogram equalization to standardize contrast. The Adaboost algorithm with Haar features is then employed to locate the face within the frame.
- Feature Localization (ASM): An Active Shape Model (ASM) is used to pinpoint facial landmarks. ASM utilizes a statistical model of facial shapes to iteratively fit a mesh to the subject's face, providing the raw coordinates for expression analysis.
- Normalization: Feature coordinates are normalized to ensure the system is invariant to scale and slight head tilts.
- Finite Automata Machine (FAM) Classification: This is the core innovation. The system treats the recognition process as a state machine where transitions only occur when feature changes exceed a specific threshold (typically ±2 pixels) and follow a predefined logical path.
The Finite Automata Machine (FAM) Approach
The FAM logic acts as a low-pass filter for noise. It incorporates "intermediate states" (such as a partially open mouth) that serve as buffers between a neutral expression and a full emotion. This prevents the system from "jumping" to an extreme emotion due to a momentary glitch in the feature detector.
Experimental Results and Robustness
The system was evaluated across the six basic human emotions. Quantitative analysis revealed high reliability across the board:
- Happiness: 94%
- Surprise, Anger, and Fear: 92%
- Sadness: 90%
A key finding of the study was the system's temporal stability. In a test sequence of 40 frames, the ASM feature detector experienced a failure at the 25th frame, reporting an erroneous mouth width. In a traditional static classifier, this would have triggered a false expression change. However, because the FAM requires a logical sequence of feature changes to transition states, it maintained the correct expression throughout the error.
Conclusion
By combining the localized precision of Active Shape Models with the logical sequence tracking of Finite Automata, this system provides a robust framework for real-time facial expression recognition. While currently focused on the "Big Six" emotions, the architecture's ability to ignore transient detection errors makes it a promising candidate for integration into live robotic systems and empathetic AI interfaces that require high stability in unpredictable real-world environments.
Summary updated