Member-only story

Building a Generic Face Recognition Application in 2 Minutes

Just 24 Lines of Code and You’re Done!

Lewis Gavin
3 min readOct 30, 2020
Face Recognition (image source)

I’ve recently been on a journey to learn more about Deep Learning. I started off with a Deep Learning course on Udacity. It’s fairly long and does require some mathematical background but it was a good place to start.

However, if you want to start off lighter and simpler and introduce yourself to Deep Learning in a fun way, then this post is for you.

Let’s build an application (in literally 2 minutes) that can recognise faces. Here’s how I approached it using Python and a bunch of easy to use libraries.

1. Install OpenCV

As with most tutorials, a good starting point is to ensure you’ve got your environment set up. Download and install OpenCV for your OS of choice (and of course ensure you have Python installed too).

Now we can go ahead and follow a simple example from the OpenCV website to try and detect faces within your own supplied images.

2. Detecting your own face in an image

Create yourself a fresh directory and within it, place an image of yourself or a celebrity. There can be more than one person in the photo, but for this example, I just used a simple photo…

--

--

Lewis Gavin
Lewis Gavin

Written by Lewis Gavin

Data and Productivity Writer — Data Architect at easyfundraising.org.uk

No responses yet