This Real-Time Emotion Detection application leverages a deep learning model to identify facial emotions in real-time through webcam feed. Built using OpenCV, Streamlit, and TensorFlow, it provides an interactive experience with:
- Emotion recognition using a custom-trained CNN model.
- User-friendly interface with modern UI design and animations.
- Real-time results for multiple emotions like Happy, Sad, Angry, and more.
To run this project, ensure you have the following installed:
- Python 3.9 or above
- TensorFlow 2.x
- OpenCV
- Streamlit
- Streamlit-WebRTC
Install all dependencies by running:
pip install -r requirements.txt
Follow these steps to set up the project on your local machine:
-
Clone the repository:
git clone https://github.com/TechyCSR/Real-Time-Emotion-Detection cd Real-Time-Emotion-Detection
-
Create a virtual environment (optional):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Download the required model and cascade files:
- Place
emotion_model1.json
andemotion_model1.h5
in the root directory. - Place
haarcascade_frontalface_default.xml
in the root directory.
- Place
To run the application locally, follow these commands:
-
Run the Streamlit app:
streamlit run app.py
-
Access the app in your browser: Open http://localhost:8501 in your web browser.
-
Use the app:
- Navigate to the "Webcam Detection" page.
- Start the webcam and see real-time emotion detection in action!
Have questions or suggestions? Reach out to us:
- Web: TechyCSR Projects
- Email: [email protected]
- X (Twitter): @TechyCSR
- LinkedIn: @TechyCSR
This project is licensed under the MIT License. See the LICENSE file for details.
If you like this project, give it a ⭐ on GitHub! Feel free to contribute or open issues for improvements.