Skip to content

Face Detection using OpenCV and Python and Haarcascades provided by OpenCV.

Notifications You must be signed in to change notification settings

arkalsekar/Face-Detection-Haarcascade

Repository files navigation

Face Detection using OpenCV

The code uses Python and OpenCV and OpenCV Frontal Face Haarcascade to detect faces in images as well as live video footage. However, during this era of Advance Deep Learning Age and Robust Model Building, Haarcascade techniques are'nt that efficient but works just fine. All thanks to OpenCV and Adrian from PyImageSearch for this code.

Demo

Installation

Use the package manager pip to install all the requirements.

pip install -r requirements.txt

Usage

The Usage of this code is damn simple.
Firstly, Either Download the Zip and Extract the Code or simply Clone the Repo using.

git clone https://github.com/arkalsekar/Face-Detection-Haarcascade

Once Clone the Repo, head on to the repository.
Here you will find two code files, once is for images and other one is for video stream.

Here is how to run video stream face detection.

python .\video_face_detector.py -c .\face_detector\haarcascade_frontalface_default.xml

Here is how to run image face detection.

python .\haar_face_detector.py -i .\images\image_1.jpg -c .\face_detector\haarcascade_frontalface_default.xml

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Releases

No releases published

Packages

No packages published

Languages