Skip to content

smitngandhi/Face-detection-Using-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Face Detection with OpenCV

A simple real-time face detection script using Python and OpenCV's Haar Cascade Classifier. This project uses your device's webcam to detect and highlight faces in real time.


πŸ“Έ Features

  • Real-time webcam capture
  • Face detection using Haar cascades
  • Draws bounding boxes around detected faces
  • Graceful exit on key press (a)

πŸ› οΈ Requirements

Make sure you have the following installed:

  • Python 3.x
  • OpenCV

Install OpenCV using pip:

pip install opencv-python 

 
face_detection_project/
β”‚
β”œβ”€β”€ haarcascade_frontalface_default.xml   # Pre-trained face detection model
β”œβ”€β”€ face_detect.py                        # Main script
└── README.md

RUN USING BELOW LINE
python face_detect.py

🧠 How It Works
Loads the Haar Cascade face detection model from OpenCV.

Captures video from your webcam.

Converts the video frames to grayscale for processing.

Detects faces and draws rectangles around them.

Waits for you to press "a" to exit.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages