Skip to main content

AI-powered emotion analyzer that detects faces in photos and generates corresponding music

Project description

Face Mood Analyzer

A stable, production-ready AI application that analyzes emotions in photos and generates corresponding musical journeys. Built with well-tested, stable versions of industry-standard libraries.

Features

  • Advanced face detection and recognition using RetinaFace
  • Emotion analysis across multiple photos (7 basic emotions)
  • Face quality assessment and filtering
  • Emotion-based music generation
  • Interactive web interface
  • Video generation with emotional music
  • Support for multiple input photos
  • Real-time processing and analysis

Technical Stack

  • TensorFlow 2.12.0
  • PyTorch 2.0.1
  • OpenCV 4.8.0
  • DeepFace 0.0.75
  • Flask 2.3.3

Setup

  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Place your photos in the uploads directory

  2. Run the application:

python app.py

Project Structure

  • app.py: Main Flask application and web interface
  • emotion_analyzer.py: Face detection and emotion analysis module
  • music_generator.py: Music generation based on emotional patterns
  • static/: Web assets (CSS, JavaScript, images)
  • templates/: HTML templates for the web interface
  • uploads/: Directory for input photos
  • output/: Directory for generated content

Usage

  1. Place your photos in the uploads directory
  2. Run the application
  3. Access the web interface at http://localhost:5000
  4. Upload reference photos of the person to track
  5. Upload photos to analyze
  6. The system will process your photos and generate a musical journey

Requirements

  • Python 3.8+
  • CUDA-capable GPU (recommended for faster processing)
  • Modern web browser
  • 4GB+ RAM
  • 10GB+ disk space

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built with Flask
  • Uses deep learning for emotion detection
  • Music generation powered by machine learning algorithms

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

face_mood_analyzer-1.0.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

face_mood_analyzer-1.0.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file face_mood_analyzer-1.0.2.tar.gz.

File metadata

  • Download URL: face_mood_analyzer-1.0.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for face_mood_analyzer-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b844d2ac6b47e247373bfc0ff0deb4d8338aad885c5fe604ee2ec296eb7d327e
MD5 3d64cdec798f7ce50c087762d08bab5e
BLAKE2b-256 38916f7ad9a348981b04cc3c848349ab7a7b7e5efb5673bfa753aa1e23f4ddc1

See more details on using hashes here.

File details

Details for the file face_mood_analyzer-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for face_mood_analyzer-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7ed343d5297cbcc5372c6a9710203f8a8f334ed0680d484fc6d1d86a1446424c
MD5 c29876afbddc2ae072756cc4708ab632
BLAKE2b-256 b890acba7c56b59e7f7061f84ffeff791432633c12813426b3ce37a767ae26ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page