This project utilizes a YOLOv8 model for real-time object detection and a TensorFlow-based emotion model for emotion recognition. The system captures video from a webcam, detects objects, specifically faces, and predicts emotions for the detected faces.
- Real-time object detection using YOLOv8 model.
- Emotion detection from faces using a TensorFlow-based emotion model.
- Annotates video frames with detected objects and emotions.
- Python 3.x
- OpenCV
- TensorFlow
- Ultralyitcs (for YOLOv8)
-
Clone the repository:
git clone https://github.com/your-repo/emotion-object-detection.git cd emotion-object-detection -
Create a virtual environment and activate it:
python -m venv env source env/bin/activate # On Windows use `env\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Download the YOLO model:
ultralytics download yolov8n.pt
-
Run the script:
python main.py
-
The webcam feed with object and emotion detection will be displayed in real-time.
-
Press 'q' to exit the application.
- YOLOv8: For object detection.
- TensorFlow: For emotion detection using a simple CNN model.
Contributions are welcome! Feel free to fork this repository and submit pull requests.
This project is licensed under the MIT License. See the LICENSE file for details.