Saturday 16:15–17:45 in Room 2

Building a live face recognition system in the blink of a very slow eye

Rodrigo Agundez

Audience level:


In this tutorial we will create a face recognition application from scratch, it will provide you hands-on experience on the basics of Face Recognition. We will use the OpenCV library which makes the tutorial accessible to beginners. Together, we'll go from building our face dataset to recognizing faces in a live video. If time permits we will use this face recognition system to classify banking da


Building a live face recognition system in the blink of a very slow eye

In this hands-on tutorial we will build a live face recognition system from scratch with the use of the OpenCV methods. Since face recognition is the main goal of this tutorial we will form teams of 2-3 people and recognize the faces in a live feed. We will make use of the OpenCV computer vision and machine learning library. OpenCV includes a comprehensive set of both classic and state-of-the-art computer vision and machine learning algorithms. These algorithms can be used to:

  • Detect Faces
  • Recognize Faces
  • Identify Objects
  • Classify human actions in videos
  • Track camera movement
  • Track moving objects

  • Extract 3D models of objects
  • Produce 3D point clouds from stereo cameras
  • Stitch images together to produce a high resolution image of an entire scene
  • Find similar images from an image database
  • Remove red eyes from images taken using flash
  • Follow eye movements

OpenCV is a great tool to have in hand when dealing with data problems related to media. In the case you want to create your own tuned algorithm, due to its simplicity it lets you use the majority of your resources on developing the algorithm itself and not on the manipulation of the data, which can be a pain in the … .

OpenCV is not limited to Python but has C++, C, Java and MATLAB interfaces and supports Windows, Linux, Android and Mac OS.


  1. Basics of image and video manipulations
    1. Let’s take a picture
    2. OpenCV and Pyplot formats: GBR vs RGB
    3. Let’s take a video
    4. Write and read picture from file
  2. Detecting faces
    1. Using OpenCV methods to recognize faces in a video
    2. Draw output rectangle to recognize face
    3. Let’s take a video
    4. Extract the face detected
  3. Build our data set
    1. Defining image and video manipulation classes
    2. Normalizing the dataset
    3. Creating the directory skeleton with our data
    4. Take pictures of each person in the team
  4. Train the face recognition algorithm
    1. Brief in-depth description of algorithm
    2. Use dataset to train classification algorithm
  5. Recognize faces in a live video feed
    1. Apply trained model on detected face in live feed
    2. Remarks on other OpenCV face recognition methods
  6. Playing with the OpenCV face recognition algorithm on banking data

Requiered Packages to follow hands-on

  • cv2 (OpenCV)
  • Numpy
  • os
  • matpotlib
  • sys
  • time
  • IPython.display

To get the most of the tutorial is highly recommended to have OpenCV installed since compilation from source is required. See you there!


Become a sponsor.