Count the number of Faces from a Image using OpenCV in Python

Mayank Kumar Jul 27, 2023

In the project we have to detect the number of faces in a image. I have used OpenCV framework in Python to complete this project.

In this face detection project i have used OpenCV framework.

Packet Information:

We have to import OpenCV in python and then load the xml file.

Then taking the image path and image it is converted into grayscale for face detection.

After the face detection just print the number of faces.

Around the detected faces i have made a rectangle shape to highlight the faces that are detected.

Where we can use this model :-

One of the major use of this model can be in biometrics as facial recognition.

 

CODE:

Code:

 

OUTPUT:

 

Output

Project Files

Loading...
..
This directory is empty.

Comments (0)

Leave a Comment