Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Main Features in Readme File #13

Merged
merged 3 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ This project combines elements of computer vision and deep learning with web int
- [Demo Video](https://www.youtube.com/watch?v=Qj5yUBjSr7I)

### Main Features
**1. Real-time Facial Detection and Emotion Recognition:**
- Uses OpenCV to capture live video feed from the user's webcam.
- Employs a pre-trained deep learning model (fer2013_mini_XCEPTION.102-0.66.hdf5) to accurately identify facial expressions.
- Recognizes a range of emotions, including happiness, sadness, anger, and neutrality.

**2. Emotion-Based YouTube Search and Recommendation:**
- Utilizes the webbrowser module to automatically open relevant search results in the user's default browser.
- Leverages the requests library to interact with YouTube's API for a more efficient search process.
- Constructs a YouTube search query based on the detected emotion

**3. Intuitive User Interface:**
- Provides a simple and user-friendly interface to interact with the application.
- Displays the detected emotion in real-time.
- Presents a clear visual representation of the search results.

### Customization & Additional Considerations

Expand Down
3 changes: 2 additions & 1 deletion code/main_face.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def play_first_song(final_emotion):
match = re.search(r'/watch\?v=([^\"]+)', html_content)
if match:
video_id = match.group(1)
video_url = f"https://www.youtube.com/watch?v={video_id}"
#video_url = f"https://www.youtube.com/watch?v={video_id}"
video_url = f"https://www.youtube.com/watch?v={video_id.encode('utf-8').decode('unicode_escape')}"
webbrowser.open(video_url)

# Load the pre-trained facial expression recognition model
Expand Down