Basic Face Detection using Cascades

This repository contains a Python script for detecting faces in images and video streams using cascades. The script uses the Haar cascades provided by OpenCV to detect faces.

Table of Contents

Installation

Clone the repository to your local machine using the following command:

git clone https://github.com/Kesavan-Raman/Basic-Face-Detection-using-Cascades.git ```

This implementation of face detection requires Python 3.x and the following libraries:

-OpenCV
-numpy
-imutils (optional, for resizing video frames)

These libraries can be installed using the following command:

```bash pip install opencv-python numpy imutils

##Here's an updated README.md file for the GitHub repository you provided:

bash Copy code

Basic Face Detection using Cascades

This repository contains a Python script for detecting faces in images and video streams using cascades. The script uses the Haar cascades provided by OpenCV to detect faces.

Table of Contents

Installation

Clone the repository to your local machine using the following command:

git clone https://github.com/Kesavan-Raman/Basic-Face-Detection-using-Cascades.git
This implementation of face detection requires Python 3.x and the following libraries:

OpenCV
numpy
imutils (optional, for resizing video frames)
These libraries can be installed using the following command:


##Usage
To detect faces in an image, run the detect_faces_image.py script and pass in the path to the image:

```bash
python detect_faces_image.py --image path/to/image.jpg

##Implementation Details The face detection algorithm used in this repository is based on the Viola-Jones object detection framework, which uses Haar cascades to detect objects in an image. The algorithm works by scanning the image with a sliding window and applying a classifier to each window to determine if it contains a face. The classifier is trained on positive and negative examples of faces and non-faces using machine learning techniques.

The Haar cascades provided by OpenCV contain pre-trained classifiers that can detect faces, eyes, and other objects. The classifiers are trained on thousands of positive and negative images to achieve high accuracy.

##Demo The demo.ipynb Jupyter notebook in this repository provides an example of how to use the face detection script. The notebook loads an image and applies the face detection algorithm to the image.

##References This implementation of face detection using cascades was based on the following resources:

Viola, Paul, and Michael Jones. "Robust real-time face detection." International journal of computer vision 57.2 (2004): 137-154. OpenCV documentation: https://docs.opencv.org/master/d7/d8b/tutorial_py_face_detection.html