Introduction: Face Detector

Hi,

This is an easy tutorial that will help you make a project to detect faces using Python programming.

For this project I am using a laptop.

Any doubts, you can ask me in the comment box.

Happy programming!

Step 1: Setup

We need to download Python form this website: https://www.python.org/

Note: While you are installing Python please tick pip.

Now you need to install OpenCV and NumPy.

To install them you should open Command prompt (you can type 'command prompt' or simply 'cmd' in Windows search). After you open Command Prompt you need to type the command ' pip install opencv-python ' to install OpenCV and after you install it you should type the command ' pip install numpy ' to install NumPy.

Step 2: The Program and Haarcascade

Create a folder where we will keep the face detection python file and the haarcascade for the frontal face.

After downloading them open the python code and run the code by pressing the ' F5 ' key on your keyboard.

If you want to come out of the ' img ' window or stop it you can press the ' Esc ' key on your keyboard.

Note: Download both the files ' Face_detection ' and the' haarcascade_frontalface_default.xml ' that are given below and place them in the folder you created.


Note: This detection is not so accurate! And I know it's always showing the word faces even if there is only one face. If you want to understand the code thoroughly you can watch and follow on YouTube.

Happy Programming! :) :D

Ruthwik from AIR Creatives

---------------------------------------------------THANK YOU--------------------------------------------------------