The Vibify is an program that uses facial emotion recognition to create a personalized music experience. By detecting the user's emotional state through a camera, the player automatically selects and plays music that matches or enhances the detected mood.
-
Real-Time Emotion Detection:
- Uses a camera to capture and analyze facial expressions to determine the user's current emotion.
- Supports emotions like Happy, Sad, Fearful, Disgusted, Surprised, Angry, and Neutral.
-
Mood-Based Playlist Generation:
- Automatically selects and plays a playlist from a predefined set of mood-based playlists corresponding to the detected emotion.
-
User Interface:
- Simple and intuitive interface to pause/play the current playing song, rendomly choose a song from the same emotion playlist and view the detected emotion.
- Navigate to the desired directory using the shell/command prompt.
- Clone the repository:
git clone https://github.com/MTCodes01/Parasseri-Techies.git
- Navigate to the project directory:
cd Parasseri-Techies - Install the required dependencies:
pip install -r requirements.txt
- Install the pre-trained model Click here
Only Needed if you don't want to train a new model - Install the pre-defined music library Click here
place the folder in the same directory as the main.py
- Ensure you have Python installed on your system. You can download it from python.org.
Run the train script(Ignore if you installed the pre-trained model)python train.py
Run the main script(After either the training/Download of the pre-trained model is done andmodel.weights.h5is in the same directory as themain.py):python main.py
- The camera will start capturing your facial expressions, and the system will detect your emotion.
- Based on the detected emotion, the corresponding song will start playing automatically.
- Use the user interface to pause/play the current playing song, rendomly choose a song from the same emotion playlist and view the detected emotion.
Note
The player selects music based on the following emotions:
- Happy:
- Sad:
- Fearful:
- Disgusted:
- Surprised:
- Angry:
- Neutral:
You can customize the playlists by adding or modifying the songs in the respective folders.
-
Module/__init__.pymusic.py- Handles the music playback and playlist management.UI.py- Manages the user interface, displaying the detected emotion and controls.
-
music/Happy/- Contains songs for the Happy mood.Sad/- Contains songs for the Sad mood.Fearful/- Contains songs for the Fearful mood.Disgusted/- Contains songs for the Disgusted mood.Surprised/- Contains songs for the Surprised mood.Angry/- Contains songs for the Angry mood.Neutral/- Contains songs for the Neutral mood.
-
Concept.md- Detailed description of the project and its concept. -
main.py- The entry point of the application, integrates emotion detection and music playback. -
model.weights.h5- Contains the model weights. -
LICENSE- The license file for the project. -
README.md- The file you're currently reading.