Bringing You The Future Of Design and Technology

FACIAL RECOGNITION

With this tutorial we will explore the basics of machine learning by creating our own facial recognition program using approximately 22 lines of Python code. For this tutorial you will need a working webcam, a Python IDE and OpenCV installed.

Categories

Art and Web Design

Latest Articles

Facial Recognition Using Python and OpenCV

In this tutorial we will explore basic machine learning concepts by developing a simple facial recognition program in under 22 lines of code, using a webcam, Python 2.7, and the open source library OpenCV v2.

In a future tutorial we will build our own cascades in OpenCV and teach it how to recognize other objects such as cars, bananas and toys. The task of recognizing individual faces is surprisingly difficult, but is possible using machine learning algorithms as described here.

Components and Software

For this tutorial you will need a working webcam, OpenCV and a Python editor.

OpenCV, short for Open Source Computer Vision Library, can be found here. OpenCV is released under a BSD license and is free for both academic and commercial use. It has C++, C, Python, Java and MATLAB interfaces and supports Windows, Linux, Mac OS, iOS and Android systems. OpenCV was designed for computational efficiency and with a strong focus on real-time applications.

I use the PyCharm IDE by JetBrains for this project. PyCharm provides smart code completion, code inspections, on-the-fly error highlighting and quick-fixes, along with automated code refactorings and rich navigation capabilities.