Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

SYSTEM MANAGEMENT

Group Number: X

GROUP

MEMBERS: -

LCI2020067 Navdeep Khede


LCI2020068 Jalluri Abhinav
LCI2020069 Rohan Chandra
LCS2020067 Kumar Aryan
LCS2020068 Wasnik Khush Vijay
LCS2020069 Suraj Rao
LIT2020067 Shubhankar Nath
LIT2020068 Aman Anand
LIT2020069 Debjyoti Roy

Face Recognition Software


Intro

Face recognition is one of the many wonders that


AI research has brought forward to the world. It is
a subject of curiosity for many techies – who
would like to have a basic understanding of how
things work. Let us take a dip into the subject, to
see how things work.

Agenda
In Face recognition process, it can pick someone's face
out of a crowd, extract the face from the rest of the
scene and compare it to a database of stored images.
Positive identification of individuals is a very basic
societal requirement. In small tribes and villages,
everyone knew and recognized everyone else. You
could easily detect a stranger or identify a potential
breach of security. In today's larger, more complex
society, it isn't that simple.

In fact, as more interactions take place electronically, it


becomes even more important to have an electronic
verification of a person's identity. Until recently,
electronic verification took one of two forms: 1- It was
based on something the person had in their possession,
like a magnetic swipe card or 2- something they knew,
like a password.

The problem is, these forms of electronic identification


aren't very secure, because they can be given away,
taken away, or lost and motivated people have found
ways to forge or circumvent these credentials. So, the
ultimate form of electronic verification of a person's
identity is biometrics; using a physical attribute of the
person to make a positive identification. There are
many robust biometric techniques like fingerprinting
which can be used for human authentication then why
go for face recognition?
In many applications like the surveillance and
monitoring, say, of a public place, the traditional
biometric techniques will fail as for obvious reasons we
cannot ask everyone to come and put his/her thumb on a

slide or something similar. So, we need a system which


is similar to the human eye in some sense to identify a
person. To cater this need and using the observations of
human psychophysics, face recognition as a field
emerged.

Making Software
The system goes through a series of steps to verify the
identity of an individual.

1. Detection: Acquiring an image can be accomplished


by digitally scanning an existing photograph (2D) or by
using a video image to acquire a live picture of a
subject (3D).

2. Alignment: Once it detects a face, the system


determines the head's position, size and pose. As stated
earlier, the subject has the potential to be recognized up
to 90 degrees, while with 2D, the head must be turned
at least 35 degrees toward the camera.

3. Measurement: The system will then measure the


curves of the face on a sub-millimetres (or microwave)
scale and creates a template.

4. Representation: The system will then translate the


template into a unique code. This coding gives each
template a set of numbers to represent the features on a
subject's face.
5. Matching: If the image is 3D and the database
contains 3D images, then matching will take place
without any changes being made to the image. 3D
provides a live, moving variable subject being
compared to a flat, stable image. New technology is
addressing this challenge. When a 3D image is taken,
different points (usually three) are identified. For
example, the outside of the eye, the inside of the eye
and the tip of the nose will be pulled out and measured.
Once those measurements are in place, an algorithm
(step-by-step procedure) will be applied to the image to
convert it to a 2D image. After conversion, the software
will then compare the image with the 2D images in the
database to find a potential match.

6. Recognition or Identification: In verification, an


image is matched to only one image in the database
(1:1). If identification is the goal, then the image is
compared to all images in the database resulting in a
score for each potential match (1: N). In this instance,
the image will be compared to all the individual images
in the database to identify who the subject is.
Preparing a Database

We are going to prepare a database of individuals we


want our system to recognise. We will use all the
images in our images directory for our database of
individuals.

For each image, the image data needs to be converted


into an encoding of 128 float numbers. It can be done
by img_to_encoding function.

This function will take the path of image and transfers it


to face recognition network which returns the output
which happens to be the encoding of the image.

def img_to_encoding ()
{
input facemodel;
float img_data;
input shape (x, y, z);
face_recogmodel(shape);
{
conv shape;
img_data = shape;
}
return img_data;
}

Once we have added the encoding for each image to our


database, our system can finally start recognising
individuals!

Recognising a Face

For recognising the face this the function


encoding_to_flag processes the image using encoding
of 128 float numbers and returns a flag by which we can
find the individual that the image most likely belongs to.
To find the individual, the difference between the new
image and each individual in the database will be
checked. The individual with the lowest difference to
the new image is then chosen as the most likely
candidate.

Finally, we must determine whether the candidate image


and the new image contain the same person or not.
Since by the end of our loop we have only determined
the most likely individual. This is where the other
function will work so that the software could work at its
highest accuracy.

def encoding_to_flag ()
{
int flag, n;
load database_img;
input facemodel;
input shape (x, y, z);
input img_data;
n=cmp(img_data, database_img);
if (n==0)
flag = 1;
else
flag =0;
return flag;
}

 Ck_retina: This function will check the


measurement of retina and will compare it to the
most likely individual.

 Ck_cheeks: This function will check the


measurement of cheeks and will compare it to the
most likely individual.

 Ck_forehead: This function will check the


measurement of forehead and will compare it to the
most likely individual.

 Ck_eye: This function will check the eye colour


and will compare it to the most likely individual.
Now, these functions will return the accuracy by which
these different are matched to the most likely individual
and if favours the comparison, face recognition will be
completed

User Experience
Let us take an example for better understanding of the
user experience of the face recognition software.

Installing Software
Install the face_recognition module.

Import Modules
Next, we import the required modules.

import PIL.Image
import PIL.ImageDraw
import requests
from io import BytesIO
from IPython.display import
display
import face_recognition
import img_to_encoding
import encoding_to_flag

Load Image
Next, we load a picture.
Identify Faces
Once we have loaded the face, let us have a look at
parts of the face_recognition module.

Output
1 face is found in this photograph. This means, the
algorithm found just one face in the image. Let us have
a look at the image and the face identified.

Now, we get the pixel at which image is located


A face is located at pixel location Top: 68, Left: 117,
Bottom: 291, Right: 340

Face Encodings
It is simply a face for us. But, for our algorithm, it is
array of RGB values of different encodings — that
matches a pattern that the it has learnt from the data
samples we provided to it.

This gives us the long list of the curves for each of the
individual features each having its own encoding.

[{
'chin': [(46, 47), (45, 54), (44, 62), (44, 69), (44, 77),
(46, 84), (49, 91), (54, 95), (61, 97), (68, 97), (76, 95),
(84, 91), (90, 87), (94, 81), (97, 75), (99, 68), (101,
60)],
'left_eyebrow': [(51, 42), (54, 39), (58, 39), (63, 40),
(67, 42)],
'right_eyebrow': [(75, 44), (80, 44), (86, 44), (90, 47),
(93, 51)],
'nose_bridge': [(70, 48), (68, 52), (67, 56), (66, 60)],
'nose_tip': [(60, 64), (62, 65), (65, 67), (68, 66), (71,
66)],
'left_eye': [(55, 47), (57, 45), (61, 46), (63, 48), (60,
48), (57, 48)],
'right_eye': [(77, 51), (80, 50), (84, 51), (86, 54), (83,
54), (79, 53)],
'top_lip': [(54, 75), (58, 72), (61, 72), (64, 73), (66,
73), (70, 75), (73, 80), (71, 79), (66, 75), (63, 75), (61,
74), (56, 75)],
'bottom_lip': [(73, 80), (68, 81), (64, 81), (62, 80),
(60, 80), (57, 78), (54, 75), (56, 75), (60, 77), (63, 78),
(65, 78), (71, 79)]
}]

Conclusion
Face recognition is still a challenging problem in the
field of computer vision. It has received a great deal of
attention over the past years because of its several
applications in various domains. Although there is
strong research effort in this area, face recognition
systems are far from ideal to perform adequately in all
situations form real world. Paper presented a brief
survey of issues methods and applications in area of
face recognition. There is much work to be done in
order to realise methods that reflect how humans
recognise faces and optimally make use of the temporal
evolution of the appearance of the face for recognition.

You might also like