A high-performance, dual-stream API designed to detect human emotions through Face (Visual) and Voice (Acoustic) analysis in real-time. [cite_start]This system integrates state-of-the-art computer vision with ensemble machine learning to provide calibrated, stable emotion scores.
- Hybrid Detector Chain: Automatically switches between OpenCV/SSD for high-speed video processing and RetinaFace for high-precision static photo analysis.
- Temporal Smoothing: Implements an 8-frame rolling average to eliminate "flickering" in live video streams.
-
Decisive Predictions: Uses Softmax Temperature calibration (
$T=0.8$ ) to provide sharper, more confident results.
- 256-Dim Feature Vector: Extracts comprehensive audio data including MFCCs, Chroma STFT, Mel-spectrogram statistics, and Tonnetz.
- Ensemble Classifier: A robust Voting Classifier combining SVM, Gradient-Boosted Trees, and MLP Neural Networks.
- Noise Robustness: Built-in leading/trailing silence trimming to ensure clean feature extraction.
- [cite_start]Concurrent Ready: Threaded Flask architecture allows face and voice analysis to run simultaneously without blocking.
- [cite_start]Zero Collision: Uses UUID-based temporary file management to handle high-concurrency environments safely.
- [cite_start]Universal Support: CORS-enabled for easy integration with browser-based webcams and microphones.
git clone [https://github.com/yourusername/emotion-recognition-api.git](https://github.com/yourusername/emotion-recognition-api.git)
cd emotion-recognition-api