DEV Community

petercour
petercour

Posted on

2 2

Face Detection with Python

face detection

You can detect faces using Python. These faces can be in a still image, video or web cam feed.

All of this can be done with only a few lines of code!

The method used here uses Machine Learning. Machine Learning is a part of Artificial Intelligence, that uses data to make new predictions.

In this case you want to predict if there's a face in the image.

Getting started

You will need Python 3.x and OpenCV 2 installed. You'll also need a cascade file, which OpenCV uses to detect faces.

OpenCV can be installed with the Python package manager:

pip3 install opencv-python

You'll also need the runtime opencv package.

Face detection uses the machine learning approach: given statistical examples, predict if there is a face in the image.

Read more: https://pythonbasics.org/face-detection/

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more