Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Face Recognition using Python Language
Highest Rated
Rating: 4.7 out of 5(328 ratings)
16,474 students

Face Recognition using Python Language

Simple step by step approach for developing applications for Face Recognition
Last updated 4/2025
English

What you'll learn

  • Python, Artificial Intelligence, Face Recognition, Introduction, Concepts, Algorithms, and Implementation using Python Programming language
  • Simple Python programming concepts and hands on required
  • Python Programming for Face Recognition Application
  • Project work to develop a full Face Recognition- based Employee Attendance System

Course content

11 sections37 lectures6h 3m total length
  • Introduction to Face Recognition16:30

    NOTE: Please download the PDF Document for a better, clear description of the lecture content.

    In this lecture, we introduce Face Recognition as a branch of study in the field of Artificial Intelligence. We begin with a historical perspective. We begin with Face Detection.  Face detection is about observing an image and detecting the human faces in it. A human face has a specific structure with the nose, chin, cheek, forehead, hair, moustache, beard, eyes, eyebrow, eyelashes, mouth, lips, and several other components and features. As we know a human face and its components, we can detect a human face in an image. In a group photo taken at an outdoor with animals, flowers, birds and other objects, we detect all the faces in it. The problem of viewing an image and detecting all human faces in the picture and extracting them in the form of rectangular frames is called face detection.

    Face Recognition is a higher level of intelligent activity than face detection. Face recognition is about reading a human face either directly or in an image and recognize one or more of the following:

    · Identity of the person, who is the person?

    · Age, what is the age of the person? At least approximately.

    · Gender

    · Ethnicity

    · Attractiveness, this is about the symmetricity of various components of the face

    · State of mind, if the person is restless, thoughtful, peaceful

    · Emotions, anger, fear, happy,

    · Trustworthiness

    · Competence

    · Dominance

    · Extraversion, how much the person is an extravert?

    · Mental Health

    Enormous amount of research is happening by leading Artificial Intelligence companies such as Google, Amazon, Facebook, IBM etc. Hundreds and thousands of startup companies in the bay area of US, Continental Europe, Israel, Bangalore and many more places are working on great applications in this area.

    Biometrics

    Right form early days, scientists are trying to uniquely identify human being based on one or more parts of the body and their measurement. Biometrics is the study of body measurements and computation of ratios and other relationships among them. This is used to see if we can uniquely identify people from these measurements. Fingerprints and IRIS have been successfully studied and used for several years in medical research, immigration, travel documentation, criminology, educational certification and many more.

    Medical researchers have been studying how human brain stores faces and recognize them. They have found that the brain does the following cognitive activities:

    · Face Detection

    · Face categorization based on gender, ethnicity, age etc.

    · Face discrimination

    · Faced Individuation

    · Face memory

    · Face naming

    Medical Researchers are working on a few interesting concepts such as Face Diet and Other Race Effect (ORE) areas in Face Recognition. Face recognition capability varies widely among the people. Some people are super recognizers. Even if they meet somebody once, they recognize the face even after a long time. Some people are very poor in face recognition. They require a great deal of training and practice to familiarize a face. There are people who have very high level of inability to recognize faces. This inability is medically diagnosed as Face blindness or Developmental prosopagnosics (DP). In order to improve face recognition capabilities, the researchers propose a few activities.

    Face Diet

    Face Diet is the number of faces we come across every day. People who have rich face diet are found to have a high face recognition capability. People who live meet very few people in a day. So, they have a poor face diets. They have a poor face recognition capability.

    Other Race Effect (ORE)

    We come across people from different ethnicity and race. There are some common face features for every race. When people have no familiarity with a particular race, they find it hard to distinguish faces of that race. All the faces of that race look alike for them. As we become familiar with more and more people of that race, the ability to distinguish increases. This is called Other Race Effect (ORE). when I watch movies from Japan, China or Korea, I have experienced difficulty in recognizing different characters. For me all the characters look alike. This is due to ORE.

    Medical Researchers also work on Nose recognition, Ear Recognition, Mouth Recognition etc. Critical Features of face are studied in detail.

    Face Recognition Approaches

    Broadly there are three sets of scientists working on face recognition and related fields. They are

    1. Medical Scientists – Cognitive strategies

    2. Anthropological Researchers

    3. Artificial Intelligence Researchers using Computer Vision with Deep Learning Convolution Neutral Networks.

    In Medical Research, Scientists work on two broad approaches.

    1. Holistic Face Processing in the brain. In the approach scientist work on how the brain stores and retrieves data.

    2. Recognition of parts such as nose, mouth etc. The work on various shapes of the parts and specialize on recognizing them. For example, in figure __, a few photos are shown. You can observe that the noses have various shapes. In figure ___ different shapes of mouth and lips are shown.

    In Biological Anthropology, researchers study the physical metrics of people from various ethnicity. Craniofacial Anthropometry is the study of head and face measurements. Figure ___ lists all the metrics studied Craniofacial Anthropometry.

    In Artificial Intelligence research the image of the face is represented as a matrix of pixels. By analyzing the image, we try to find the unique set of numbers, called a signature. We use face signature for face recognition. Each image is considered as a matrix of pixels. Each pixel is represented by a set of numbers.

    If the image is BW, the content of a pixel is represented as a number from 0 to 255. Colors are represented by the combination of Red - Green - Blue combination. So, each pixel is represented a tuple (r, g, b) where each entry is a number between 0 and 255.

    NOTE: Please download the PDF Document for a better, clear description of the lecture content.


  • Introduction to Face Signature10:25

    NOTE: Please download the PDF Document for a better, clear description of the lecture content.


    In this video, we explain the concept of Face Signature. The face signature of a face image is created using image recognition methods by extracting the features. Face signature is a 128-size vector.


    Face Signature

    The image of the human face has a standard format, with one nose, two eyes, two ears, a chin, cheek, etc. So, how do we want to distinguish human faces? We must do feature extraction and create a Face signature. In Deep Learning, Convolution Neural Networks are designed and trained using a data set that has thousands of human faces. This CNN outputs the face signature as a vector of dimension 128 or 256. The face signature is a vector of numbers. In order to compare if two faces represent the same person, we compare the two face signatures and check if they are almost the same.

    NOTE: Please download the PDF Document for a better, clear description of the lecture content.


  • Mathematical Techniques and Algorithms for 2D Face Recognition4:24

    NOTE: Please download the PDF Document for a better, clear description of the lecture content.


    Mathematical Techniques for Face Signature

    In this section present a high-level view of various mathematical principles and techniques are used in face recognition research. Though these topics are not in the scope of this course, we present at a high-level for a high level understanding.

    We learn three categories of work on Face recognition.

    1. Global Face approach

    2. Local features approach

    3. Hybrid approach

    Global Face approach

    In global face approach, researchers have worked on linear and non-linear techniques. The following are Linear techniques:

    · Eigen vectors and Eigen Faces

    · Principal Component Analysis (PCA)

    · Independent Component Analysis (ICA)

    · Multidimensional Scaling (MDS)

    · Non-negative Matrix Factorization (NMF)

    · Liner Discriminant Analysis (LDA)

    · Gabor Wavelets

    Researchers have also used the following non-linear techniques for Global Face Recognition approach.

    · Kernel Functions

    · Support Vector Machines (SVM)

    · Nearest Manifold Approach

    Local Feature Approaches

    Local approaches study only same local features of the face such as mouth, eyes etc. Local methods are also called Feature Based Methods. There are two categories of research in this approach.

    1. Interest Point based

    2. Local Appearance based

    In the interest point based approach we first detect the point of interest and then extract features around the point.

    In local-appearance based methods, the face is divided into smaller regions or patches. From each patch, the local features are extracted.

    Hybrid Approaches

    To make the algorithm more efficient people have tried hybrid approaches combining some prominent features of global face and some local ones.

    NOTE: Please download the PDF Document for a better, clear description of the lecture content.


  • Reading Assignment - 3 Hours
  • Introductory Concepts

Requirements

  • Knowledge of Computer Science
  • Simple programming fundamentals

Description

Face Recognition is one of the popular domains in Artificial Intelligence having applications in Employee attendance management, Student attendance management, Immigration, Travel Documentation, Surveillance of campuses, and many more. In this course, we teach an ordinary beginner to develop Python applications for very useful AI applications using Face Recognition. This course begins with a historical perspective of Face recognition and its importance in the AI-enabled world. We also give the algorithms used in research for some high-level understanding. We first write a Python program to read an image and identify all faces in the image. We explain the concept of face signature. The next chapter is about developing a program to compute the face signature. We then write Python programs to read faces and compare the signatures and recognize resemblances. We explain the process to create a face recognition application using the data. We write the complete program to recognize the faces of all known people. We also write a program to recognize faces from the CCTV footage. We coach the reader to understand the applications of face recognition and motivate them towards developing new applications. The tests are given at the end of each section help to summarize the understanding to build further in the right understanding.

Learning Objectives

  1. Understand the field of face recognition as a branch of biometrics and algorithms and approaches.

  2. Install Python Face Recognition and PIL (Python Image Library) with all required libraries.

  3. Develop Python programs to locate human faces in a picture and make them in the image.

  4. Develop Python programs to compare faces and recognize resemblance between faces and Identify a person when they appear in front of a camera.

  5. Conduct project work to develop a full-face recognition-based employee attendance system.

Syllabus

Unit – I Introduction to Face Recognition

Introduction to Python Face Recognition Library –Installation of the library - Introduction to Face Recognition Concepts and Face Signature – Mathematical Techniques and algorithms for Face Recognition.

Unit – 2 Python Image Library

Representation of Images in Python – Python Image Library(PIL) – Loading a picture and identification of faces – Functions and methods of Python Image Library – Displaying Faces using Python methods

Unit – 3 Face Detections and Face Locations

Python methods for detecting faces in a group photo – counting the number of faces in a picture – Identifying all faces in a group photo and marking them as rectangular frames – Writing labels on marked faces

Unit – 4 Face Encodings and Resemblance detection

Face Encodings – Distance Function and finding the resemblance – Resemblance Detection – Resemblance examples for mothers and daughters – Compare faces and detecting the name from data files – Face Recognition – methods and examples

Unit – 5 Face Recognition based Attendance management system

Capture the face of a person using the laptop camera – Attendance Recording based on Face Recognition - Announcing the name – Writing the name and display in display – Create sample database – Implement a live system

Who this course is for:

  • All the Graduates working in the Software Industry
  • Application Developers for Face Recogniion and Artificial Intelligence applications