DEPARTMENT OF COMPUTER SCIENCE
AND ENGINEERING
Final Year Project Presentation
On
FACE DETECTION AND
RECOGNITION SYSTEM
• Background
• Objective
• Features
• Project Specification
• Theory
• Results and Snapshots
• Evaluation
• Future Works
• Conclusion
• Face detection has been a trending topic of
computer vision for past few years.
• It is being used in cameras that make sure
faces are focused before a picture is taken,
at social media sites where people are
tagged automatically.
• ATMs with facial recognition and detection
software have been introduced.
• Emotion analysis is gaining relevance for
research.
• To study face detection and
recognition techniques.
• To design a system that can
detect and recognize faces in
real time
• Simulate the algorithms and
obtain results using OpenCV
with Python.
A sample figure to illustrate
detected faces in an image
• Can identify multiple faces in a real-time
video recording
• Uses a stored database of faces.
• Returns the confidence of the detected
image. Lower confidence values indicate
accurate results.
• Is robust and not much affected by light.
• Tools and Technology
 Operating System: Windows 7, 32 bit
 Hardware: 4 GB-RAM, Webcam
 Programming Language: Python
 Computer Vision Library: OpenCV
• We used OpenCV-Python to implement the
project.
• OpenCV-Python is a library of Python
bindings designed to solve computer vision
problems.
• OpenCV-Python utilizes Numpy.
 Numpy is a highly optimized library for numerical
operations with MATLAB-style syntax.
 All the OpenCV array structures are converted to
and from Numpy arrays.
• The classifiers used in this project are Haar
Classifier and LBP Classifier.
• What is a classifier?
 A computer program that decides whether an
image is a positive image (face image) or negative
image (non-face image)
• It is trained on hundreds of thousands of
face and non-face images to learn how to
classify a new image correctly.
• OpenCV provides us with these two pre-
trained ready to be used classifiers.
• Face detection algorithms often begin by
searching for human eyes
• Eyes constitute what is known as a valley
region and are one of the easiest features to
detect.
• After eyes, eyebrows, the mouth, nose,
nostrils and the iris are detected.
• Once the algorithm infers that it has
detected a facial region, it can then apply
additional tests to validate whether it has, in
fact, detected a face
• The method used in this project is Haar-Cascades.
• It requires full view frontal upright face, not tilted to
either side.
• It extracts Haar features from each image and finds
whether a face is present or not.
• Some of its features are:
 Robust – very high detection rate (true-positive rate) & very
low false-positive rate always.
 Real time – For practical applications at least 2 frames per
second must be processed.
A couple Haar-like features.
Source: docs.opencv.org
Haar Feature that looks similar to the bridge of the nose is applied onto the face.
Haar Feature that looks similar to the eye region which is darker than the upper
cheeks is applied onto a face. Source: Wikipedia
Haar features used to detect a face
Source: eyalarubas.com
• How is it different from face detection?
 In detection we just need to determine if there is
some face in the image, but in recognition we want to
determine whose face it is.
• The basic concept here is that the face to be
recognized is compared with some training set
of known faces.
• In the training set, we supply the algorithm
faces and tell it to which person they belong.
• When the algorithm is asked to recognize some
unknown face, it uses the training set to make
the recognition.
The method used in this project is Local Binary Patterns
Histogram or LBPH. A LBP proceeds as follows:
Divide the
window into
cells (e.g.
16x16
pixels)
For each
pixel in a
cell,
compare it
with each of
its 8
neighbors
Place a 1
when central
pixel value is
less than its
neighbor,
else 0.
Read row by
row to
obtain a
binary value.
Convert it
into decimal
This process is repeated for every pixel in a window.
Source: superdatascience.com
• Now, each block value is converted to a
histogram. This gives one histogram for
each block in an image:
Finally, to find the image that matches the input
image we just need to compare two histograms
and return the image with the closest histogram.
This is the output of the code which firstly detects faces from a
webcam.
The user enters name of the person and an id.
The training data set consists of
multiple images of the same person.
It is stored at a specific folder.
The recognizer then loads the trainer file and compares the
input image with stored database.
It then returns the name of person detected.
Head tilts hamper the recognizer accuracy.
• Full frontal faces can be detected and
recognized easily.
• The application recognizes persons in real-
time video.
• Accuracy reduces with pose variation,
changes in angles and low resolution.
• The system can be modified to detect and
recognize a broader class of faces.
• Gender classification, happiness index and
emotion analysis may be obtained.
• It can be developed further to identify a
person even in slight disguise (e.g. with
beard, changed hair style etc.)
• The face recognition and detection algorithms
were thoroughly studied taking a number of test
images and varying the conditions and
variables.
• We learnt a lot about the vast collection of
image processing modules in OpenCV.
• We would like to thank our HOD, our guide for
helping us all along the way.
Final year ppt

Final year ppt

  • 1.
    DEPARTMENT OF COMPUTERSCIENCE AND ENGINEERING Final Year Project Presentation On FACE DETECTION AND RECOGNITION SYSTEM
  • 2.
    • Background • Objective •Features • Project Specification • Theory • Results and Snapshots • Evaluation • Future Works • Conclusion
  • 3.
    • Face detectionhas been a trending topic of computer vision for past few years. • It is being used in cameras that make sure faces are focused before a picture is taken, at social media sites where people are tagged automatically. • ATMs with facial recognition and detection software have been introduced. • Emotion analysis is gaining relevance for research.
  • 4.
    • To studyface detection and recognition techniques. • To design a system that can detect and recognize faces in real time • Simulate the algorithms and obtain results using OpenCV with Python. A sample figure to illustrate detected faces in an image
  • 5.
    • Can identifymultiple faces in a real-time video recording • Uses a stored database of faces. • Returns the confidence of the detected image. Lower confidence values indicate accurate results. • Is robust and not much affected by light.
  • 6.
    • Tools andTechnology  Operating System: Windows 7, 32 bit  Hardware: 4 GB-RAM, Webcam  Programming Language: Python  Computer Vision Library: OpenCV
  • 7.
    • We usedOpenCV-Python to implement the project. • OpenCV-Python is a library of Python bindings designed to solve computer vision problems. • OpenCV-Python utilizes Numpy.  Numpy is a highly optimized library for numerical operations with MATLAB-style syntax.  All the OpenCV array structures are converted to and from Numpy arrays.
  • 8.
    • The classifiersused in this project are Haar Classifier and LBP Classifier. • What is a classifier?  A computer program that decides whether an image is a positive image (face image) or negative image (non-face image) • It is trained on hundreds of thousands of face and non-face images to learn how to classify a new image correctly. • OpenCV provides us with these two pre- trained ready to be used classifiers.
  • 9.
    • Face detectionalgorithms often begin by searching for human eyes • Eyes constitute what is known as a valley region and are one of the easiest features to detect. • After eyes, eyebrows, the mouth, nose, nostrils and the iris are detected. • Once the algorithm infers that it has detected a facial region, it can then apply additional tests to validate whether it has, in fact, detected a face
  • 10.
    • The methodused in this project is Haar-Cascades. • It requires full view frontal upright face, not tilted to either side. • It extracts Haar features from each image and finds whether a face is present or not. • Some of its features are:  Robust – very high detection rate (true-positive rate) & very low false-positive rate always.  Real time – For practical applications at least 2 frames per second must be processed.
  • 11.
    A couple Haar-likefeatures. Source: docs.opencv.org
  • 12.
    Haar Feature thatlooks similar to the bridge of the nose is applied onto the face. Haar Feature that looks similar to the eye region which is darker than the upper cheeks is applied onto a face. Source: Wikipedia Haar features used to detect a face Source: eyalarubas.com
  • 13.
    • How isit different from face detection?  In detection we just need to determine if there is some face in the image, but in recognition we want to determine whose face it is. • The basic concept here is that the face to be recognized is compared with some training set of known faces. • In the training set, we supply the algorithm faces and tell it to which person they belong. • When the algorithm is asked to recognize some unknown face, it uses the training set to make the recognition.
  • 14.
    The method usedin this project is Local Binary Patterns Histogram or LBPH. A LBP proceeds as follows: Divide the window into cells (e.g. 16x16 pixels) For each pixel in a cell, compare it with each of its 8 neighbors Place a 1 when central pixel value is less than its neighbor, else 0. Read row by row to obtain a binary value. Convert it into decimal This process is repeated for every pixel in a window. Source: superdatascience.com
  • 15.
    • Now, eachblock value is converted to a histogram. This gives one histogram for each block in an image: Finally, to find the image that matches the input image we just need to compare two histograms and return the image with the closest histogram.
  • 16.
    This is theoutput of the code which firstly detects faces from a webcam. The user enters name of the person and an id.
  • 17.
    The training dataset consists of multiple images of the same person. It is stored at a specific folder.
  • 18.
    The recognizer thenloads the trainer file and compares the input image with stored database. It then returns the name of person detected.
  • 19.
    Head tilts hamperthe recognizer accuracy.
  • 20.
    • Full frontalfaces can be detected and recognized easily. • The application recognizes persons in real- time video. • Accuracy reduces with pose variation, changes in angles and low resolution.
  • 21.
    • The systemcan be modified to detect and recognize a broader class of faces. • Gender classification, happiness index and emotion analysis may be obtained. • It can be developed further to identify a person even in slight disguise (e.g. with beard, changed hair style etc.)
  • 22.
    • The facerecognition and detection algorithms were thoroughly studied taking a number of test images and varying the conditions and variables. • We learnt a lot about the vast collection of image processing modules in OpenCV. • We would like to thank our HOD, our guide for helping us all along the way.