This project demonstrates how classical Haar Cascade classifiers in OpenCV can be used to detect faces, eyes, and smiles in both static images and real-time webcam feeds.
This project includes two Python scripts:
Static Image Detection
Detects faces, eyes, and smiles from a given image.
Webcam Real-Time Detection
Continuously detects facial features from a live webcam feed using OpenCV.
GitHub Repository:
https://github.com/TaufiaHussain/Face-webcam-Detection
git clone https://github.com/TaufiaHussain/Face-webcam-Detection
cd Face-webcam-Detection
pip install opencv-python
Static Image:
python "face eye smile detection.py"
Webcam Detection:
python "webcam detection.py"
Note: Press q to stop the webcam.
Haar Cascades are classical machine learning models trained on positive/negative samples for object detection.
No deep learning models were used — just efficient, lightweight, and fast OpenCV-based cascades.
face_eye_smile_detected.jpg is automatically saved when using the static image script.
Webcam detection displays bounding boxes in real-time with the OpenCV GUI.
-Educational demos for beginners in computer vision
-Real-time smile detection
-Face tracking for UI interactions
This project is licensed under the MIT License. See the repository for full details.
Taufia Hussain
Scientific researcher | Co-Founder@DataLens.Tools
https://github.com/TaufiaHussain | https://www.linkedin.com/in/taufia-hussain-52300015/