ποΈ Object, Eye & Emotion (Smile) Detection using YOLO and OpenCV
This project uses YOLO (You Only Look Once) and OpenCV to perform real-time object detection, eye tracking, and emotion/smile detection through a webcam or video input.
It demonstrates how modern deep learning models can be combined with traditional computer vision techniques to analyze faces and emotions effectively.
π§ Project Overview
π§ββοΈ Object Detection β Detects multiple classes such as people, cars, and objects using YOLO.
ποΈ Eye Detection β Uses Haar cascades or deep learning for accurate eye localization.
π Emotion / Smile Detection β Detects facial expressions and identifies smiles.
π· Real-Time Processing β Works with live webcam feed or pre-recorded videos.
πΌοΈ Example Outputs πΉ Object Detection
πΉ Eye Detection
πΉ Emotion / Smile Detection

π§° Tech Stack Component Technology Language Python 3.x Frameworks OpenCV, NumPy Model YOLOv8 / YOLOv5 Pre-trained Models Haar Cascades / CNN for Smile & Eye Detection Visualization Matplotlib / OpenCV βοΈ Installation & Setup 1οΈβ£ Clone the Repository git clone https://github.com/risingstar185/yolo_haarcascade.git
3οΈβ£ Install Dependencies pip install -r requirements.txt
4οΈβ£ Download YOLO Weights
Download YOLO pre-trained weights from:
YOLOv8 Official
or use older YOLOv3 weights:
wget https://pjreddie.com/media/files/yolov3.weights
Place them in the project directory (weights/ folder).
πΉ For Eye & Smile Detection python face_eye_smile_detection.py
πΉ For Emotion Detection (Optional CNN Model) python emotion_detection.py
π§ͺ Sample Results Detection Type Example Output Object β Person, Car, Laptop Eye ποΈ Both eyes detected Smile π Smile recognized π‘ Future Improvements
π Add voice feedback for detection results.
π Integrate with a dashboard (Flask/Streamlit).
π§ββοΈ Add full facial emotion recognition (7+ categories).
βοΈ Deploy as a web app using FastAPI or Streamlit Cloud.
π License
This project is licensed under the MIT License β you are free to use, modify, and distribute it with attribution.
π Author
Your Name :Ayush Patel