Skip to content

simple face detection algorithm to pull faces from an image and save individually using google colab. tensorflow, dlib, keras, cv2, matplotlib. pil

Notifications You must be signed in to change notification settings

ArupDutta/face_detector_pull_faces_from_image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image_processing_pull_faces_from_images

Brief Summary

Last updated: 03-08-2020 with Dlib

This repository is an extension to my last repository Object Detection-single object. This tutorial explains how to detect and pull a face from an image and save it individually. Google colab online editer is being used for the coding.

Note: This will run in all platform (windows, linux). Make sure to have an google colab account, Its free. Follow Getting Started with Google Colab to getting started with it.

Introduction

Image processing is a method to perform some operations on an image, in order to get an enhanced image or to extract some useful information from it. It is a type of signal processing in which input is an image and output may be image or characteristics/features associated with that image. Nowadays, image processing is among rapidly growing technologies. It forms core research area within engineering and computer science disciplines too.

Image processing basically includes the following three steps:

Importing the image via image acquisition tools; Analysing and manipulating the image; Output in which result can be altered image or report that is based on image analysis.

The sole purpose of this tutorial is to show and explain how easily to create an image processing/face detection algorithm using dlib API, without any complex installation that can easily pull individual faces from an image. At the end the images are saved separately for later review.

Steps

1. Configure Project

Follow Anaconda Installation Video, which shows the process for installing Anaconda. Visit Dlib, PIL Website for personal studies.

Download the face_detector_pull_faces.ipynb file from repository, upload it to your google colab and you are good to go with your Project Configuration.

At this point, here is what object detection folder should look like:

2. Clone Face Detection Repository from GitHub

Once the face detector_pull faces.ipynb file is opened, execute the code block step by step carefully. Clone the full Face detection repository to your current runtime from GitHub.

3. Important Libraries and Functions

a. PIL library to loads image into PIL format

b. Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python

c. OS library allows to loop through each image in the directory

d. numpy to create an array

e. Dlib imports the face detector. The face detector is made using the now classic Histogram of Oriented Gradients (HOG) feature combined with a linear classifier, an image pyramid, and sliding window detection scheme. This type of object detector is fairly general and capable of detecting many types of semi-rigid objects in addition to human faces.

Happy Learning 👍

Connect with me:

ArupDutta | TAU ArupDutta | LinkedIn ArupDutta | Instagram

About

simple face detection algorithm to pull faces from an image and save individually using google colab. tensorflow, dlib, keras, cv2, matplotlib. pil

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published