Face Detection in Python

In this blog we’ll be focusing on the implementation of Face Detection using Python.

Make sure to install the Python. I’m using Python 3.8.0 to check your current python version run python3 — version in your terminal.

Install OpenCV in python using the command pip3 install opencv-python.

Adding required assets in the project folder.
First add the frontalface xml file. Download the haarcascade_frontalface_default.xml from the Github Repo.
Add a image in the project directory.

I have named the image as sample.jpeg you need to change it accordingly.

Run your program using the Command line python3 main.py or if you using vsCode press F5 to run.

Hurrah! and we are done with the Face Recognition using Python.

Do you know you can press the clap👏 button 50 times? The higher you go, the more it motivates me to write more stuff for you guys!
Hello, I am Agnel Selvan. A noob developer. You can find me on Linkedin or stalk me on GitHub.



I’m an IOS, Flutter Developer and now a Blogger

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store