A powerful cross-platform emotion detection library
Project description
Krezy - Cross-Platform Emotion Detection
A powerful and easy-to-use emotion detection library for Python that works seamlessly across web, mobile, and desktop applications.
✨ Features
-
🎯 Real-time Emotion Detection
- Analyzes emotions from live video feeds
- Supports webcam input
- Fast and efficient processing
-
🔍 Multiple Detection Backends
- OpenCV (default, fastest)
- RetinaFace (most accurate)
- MTCNN
- SSD
-
📊 Rich Emotion Analysis
- 7 basic emotions: Happy, Sad, Angry, Fear, Surprise, Disgust, Neutral
- Percentage scores for each emotion
- Dominant emotion detection
- Timestamp tracking
-
🌐 Cross-Platform Support
- Web applications (Flask)
- Mobile apps (Kivy)
- Desktop software (CustomTkinter)
- Platform-specific optimizations
🚀 Installation
Install the package based on your needs:
# Core package (emotion detection only)
pip install krezy
# For web applications
pip install krezy[web]
# For mobile applications
pip install krezy[mobile]
# For desktop applications
pip install krezy[desktop]
# For all platforms
pip install krezy[all]
Note: Do NOT use pip install krezy_web - that's not the correct package name. The correct format is krezy[web].
📖 Quick Start
Basic Emotion Detection
from krezy import EmotionDetector
# Initialize detector
detector = EmotionDetector()
# Analyze an image
result = detector.detect_emotions('path/to/image.jpg')
print(result['emotions']) # Shows emotion percentages
print(result['dominant_emotion']) # Shows strongest emotion
Web Application
from krezy.web import create_app
# Create a Flask web app with emotion detection
app = create_app()
app.run(debug=True)
# Your emotion detection is now available at:
# - http://localhost:5000/ (web interface)
# - http://localhost:5000/analyze (API endpoint)
Mobile Application
from krezy.mobile import create_app
# Create a Kivy mobile app with emotion detection
app = create_app()
app.run()
Desktop Application
from krezy.desktop import create_app
# Create a modern desktop app with emotion detection
app = create_app()
app.run()
🎮 Advanced Usage
Custom Backend Selection
from krezy import EmotionDetector
# Use RetinaFace for better accuracy
detector = EmotionDetector(detector_backend='retinaface')
# Use MTCNN for balanced performance
detector = EmotionDetector(detector_backend='mtcnn')
Real-time Video Analysis
from krezy import EmotionDetector
detector = EmotionDetector()
# Start webcam analysis with visualization
detector.start_video_stream(camera_id=0, display_output=True)
📋 Requirements
- Python 3.7+
- OpenCV
- DeepFace
- Platform-specific requirements are handled automatically during installation
🔧 Troubleshooting
Common issues and solutions:
-
No face detected
- Ensure good lighting conditions
- Check if face is clearly visible
- Try different detector backend
-
Performance issues
- Use 'opencv' backend for speed
- Reduce video resolution
- Check system resources
-
Installation errors
- Ensure Python 3.7+ is installed
- Update pip:
python -m pip install --upgrade pip - Install platform-specific dependencies first
🤝 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.
🆘 Support
Need help? Try these resources:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file krezy-1.0.0.tar.gz.
File metadata
- Download URL: krezy-1.0.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a56e8f0b290279f9edb2b627574ef69fa5da9af71ccbc67cf2a58075ac863c0b
|
|
| MD5 |
e8e7c39473166e82f17f467be8c53e9a
|
|
| BLAKE2b-256 |
1f72b9a82bfcb8b0df6a540c04ffcf58044181eeeaf1c68d387f587c9f9868b4
|
File details
Details for the file krezy-1.0.0-py3-none-any.whl.
File metadata
- Download URL: krezy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49727b246d0f59c24a15fe8ef877ca852ebf81742f64e60e4aabd79e0ea2420c
|
|
| MD5 |
2d899c72faadbf556f65df58b9b0387d
|
|
| BLAKE2b-256 |
9e0e797836aacd5ca129510f3f3d5154b73d8531b034a30ead445e3dedb98a4e
|