Real-Time Emotion Detection: A Comparative Study of traditional ML and advanced DL Models in Streamlit Application for Natural Language Processing
This paper provides a comparative analysis of emotion detection models, categorized into Machine Learning (ML) and Deep Learning (DL) approaches, with a focus on accuracy, loss, and execution time for real-time applications. In the ML category, Naïve Bayes (NB) and Support Vector Machine (SVM) models are evaluated. Naive Bayes achieves 69% accuracy with a loss of 0.93 and processes data in 0.02 seconds. Conversely, SVM, with 87% accuracy, has a much slower processing time of 274.57 seconds. The DL models considered include BERT, DistilBERT, and LSTM. BERT achieves 95% accuracy and a loss of 0.1061, but requires a long processing time of 1507.34 seconds. DistilBERT provides a good balance, achieving 96% accuracy and taking 778.91 seconds. LSTM, while less accurate at 92%, processes data more efficiently at 380.55 seconds. All models are implemented in a real-time emotion recognition system built with Streamlit. The study reveals a trade-off between speed and accuracy, with ML models providing faster predictions at lower accuracy, while DL models such as BERT and DistilBERT provide better accuracy at the expense of computational complexity. The paper discusses these trade-offs in dynamic, real-time environments and suggests optimization strategies, such as model quantization and the use of lightweight transform models, to improve both performance and efficiency.
Authors
- El‐Bay Bourennane (ORCID: https://orcid.org/0000-0002-4809-3002)
- Kamel Messaoudi (ORCID: https://orcid.org/0000-0002-0985-9095)
- Rania Boukhenoun (ORCID: https://orcid.org/0009-0004-7112-6126)
Institutions
- Mohamed-Cherif Messaadia University (DZ)
- ImViA - Imagerie et Vision Artificielle (FR)
Publication Details
- Published
- 2025-04-23
- DOI
- https://doi.org/10.1109/pais66004.2025.11126507
- Primary Topic
- Sentiment Analysis and Opinion Mining
- Type
- article
- Field-Weighted Citation Impact
- 0.00