ironlam / face-detection

Playground for a face detection script using Haar cascade classifier.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Face Detection with OpenCV in Python

This script uses OpenCV to detect human faces in an image and draw rectangle around them. The properties of the rectangle are displayed above the rectangle.

Requirements

  • Python 3.x
  • OpenCV

Usage

  1. Clone the repository:

git clone https://github.com/ironlam/face-detection.git

  1. Move to the directory:

cd face-detection

  1. Install the required packages:

pip install -r requirements.txt

  1. Run the script:

python main.py

  1. The output image will be displayed showing the rectangles around the faces.

Note

Make sure that the haarcascade_frontalface_default.xml file is in the same directory as the script. The file can be downloaded from the OpenCV repository.

About

Playground for a face detection script using Haar cascade classifier.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%