Facial Detection in Python with OpenCV
Introduction
Facial detection is a powerful and common use-case of Machine Learning. It can be used to automatize manual tasks such as school attendance and law enforcement. In the other hand, it can be used for biometric authorization.
In this article, we’ll perform facial detection in Python, using OpenCV.
OpenCV
OpenCV is one of the most popular computer vision libraries. It was written in C and C++ and also provides support for Python, besides Java and MATLAB. While it’s not the fastest library out there, it’s easy to work with and provides a high-level interface, allowing developers to write stable code.
Let’s install OpenCV so that we can use it in our Python code:
$ pip install opencv-contrib-python
Alternatively, you can install opencv-python
for just the main modules of OpenCV. The opencv-contrib-python
contains the main modules as well as the contrib modules which provide extended