This project leverages Streamlit to create a user-friendly interface for real-time webcam-based face emotion detection. The application utilizes the Haar Cascade classifier for face detection and a transfer-learned ImageNet model trained on the FER 2013 dataset for facial emotion classification.
-
Streamlit Web Interface: The application provides a seamless and interactive user experience through the Streamlit framework.
-
Face Detection: Haar Cascade classifier is employed to detect faces in real-time from the webcam feed.
-
Emotion Classification: A transfer-learned ImageNet model, trained on the FER 2013 dataset, is used for accurate emotion classification.
-
Real-Time Updates: Emotion predictions are dynamically updated and displayed on the Streamlit app, providing instant feedback on detected facial expressions.
-
Clone the repository:
git clone https://github.com/Aravind-SL/Real_Time_Face_Emotion_Detection.git cd Real_Time_Face_Emotion_Detection```
-
Install dependencies:
pip install -r requirements.txt
-
Run the Streamlit app:
streamlit run app.py
-
Open the Streamlit app in your web browser: Navigate to the provided URL after running the
streamlit run app.py
command. -
Webcam Feed: The webcam feed will be displayed on the Streamlit app, with faces highlighted by the Haar Cascade classifier.
-
Real-Time Emotion Predictions: Emotion predictions will be overlaid on detected faces in real-time.
-
Experiment: Try different facial expressions to observe the real-time emotion classification.
Contributions are encouraged! Feel free to open an issue or submit a pull request for any improvements or additional features.
While the current model for real-time webcam face emotion detection has proven effective for Happy, Sad, Surprised, Angry and Neutral, it does have some limitations that should be acknowledged. Notably, the model struggles to accurately predict fear and disgust emotions.
This project is licensed under the MIT License - see the LICENSE file for details.
The emotion detection model is based on a transfer-learned ImageNet architecture trained on the FER 2013 dataset.