Face Recognition System Using Neural Network A thesis submitted towards the partial fulfillment of the requirements of the degree of Master of Engineering In Electronic Instrumentation and Control Engineering Submitted By Sourabh Gupta Roll No-80651018 Under the esteemed guidance of Sunil Kumar Singla Sr.Lecturer,EIED DEPARTMENT OF ELECTRICAL AND INSTRUMENTATION ENGINEERING THAPAR UNIVERSITY PATIALA –147004. June - 2008 DEDICATED TO MY PARENTS i CERTIFICATE This is to certify that my work presented in this thesis entitled “Face Recognition System Using Neural Network” submitted in partial fulfillment of the requirement for the award of the degree of Master of Engineering in Electronic Instrumentation and Control Engineering at Thapar University, Patiala, is an original record under supervision and guidance of Mr. Sunil Kumar Singla (Sr. Lecturer). The matter embodied in this report has not been submitted anywhere for the award of any degree. Date: (Sourabh Gupta) Roll No - 80651018 It is certified that the above statement made by the student is correct to the best of our knowledge and belief. ( Sunil Kumar Singla) Sr. Lecturer, EIED (Supervisor) Thapar University, Patiala (Dr. Smarajit Ghosh) Professor & Head, EIED Thapar University, Patiala (Dr. R. K. Sharma) Dean of Academic Affairs Thapar University, Patial ii ACKNOWLEDGEMENT The real spirit of achieving a goal is through the way of excellence and austerous discipline. I would have never succeeded in completing my task without the cooperation, encouragement and help provided to me by various personalities. First of all, I render my gratitude to the ALMIGHTY who bestowed selfconfidence, ability and strength in me to complete this work. Without his grace this would never come to be today’s reality. With deep sense of gratitude I express my sincere thanks to my esteemed and worthy Supervisor Mr. Sunil Kumar Singla (Sr. Lecturer) in the Department of Electrical and Instrumentation Engineering for his valuable guidance in carrying out this work under his effective supervision, encouragement, enlightenment and cooperation. Most of the novel ideas and solutions found in this thesis are the result of our numerous stimulating discussions. His feedback and editorial comments were also invaluable for writing of this thesis. I shall be failing in my duties if I do not express my deep sense of gratitude towards Dr. Smarajit Ghosh, Professor and Head of Electrical and Instrumentation Department who has been a constant source of inspiration for me throughout this work. I am greatful to Dr. R.K. Sharma, Dean of Academic Affair for his constant encouragement that was of great importance in the completion of the thesis. I extend my thanks to Dr. K.K. Raina, Deputy Director, Dr. Abhijit Mukherjee, Director, Thapar University for their valuable support that made me consistent performer. I am also thankful to all the staff members of the Department for their full cooperation and help. My greatest thanks are to all who wished me success especially my parents, my sisters whose support and care makes me stay on earth. Place: TU, Patiala Date: (SOURABH GUPTA) iii ABSTRACT Biometric deals with identifying individual with the help of their biological data. Human face recognition is a potential method of biometric authentication. Face is a primary focus of attention in social intercourse, playing a major role in conveying identity and emotion. The human ability to recognize faces is remarkable. People can recognize thousands of faces learned throughout their lifetime and identify familiar faces at a glance even after years of separation. This skill is quite robust, despite large changes in the visual stimulus due to viewing conditions, expression, aging, and distractions such as glasses, beards or changes in hair style etc. Face recognition is used in many applications such as security systems, credit card verification and criminal identification. Due to numerous potential applications face recognition has become a very active research area. Face recognition is an interdisciplinary research area, involving researchers from pattern recognition, computer vision, and graphics, image processing/ understanding, statistical computing and machine learning. In the present work a neural network based face recognition system has been developed. In the developed system the Gabor filter bank is used to overcome the problem of rotation. The system is commenced on convolving a face image after preprocessing the image at different scales and orientations. The neural network is used as a classifier in which the weights of the neurons are updated by supervised learning (target are set as .9 and .1) using Resilient backpropagation algorithm. Yale database has been used for training the network and for testing the authenticity of the person. If the person belongs to the trained database then the network will return the value 0.9 otherwise 0.1. With the developed system an accuracy of 90% has been achieved. iv TABLE OF CONTENTS Certificate ii Acknowledgement iii Abstract iv Table of Contents v-viii List of Figure ix-xi xii List of Table Chapter 1 Introduction 1-11 1.1 Biometrics 1 1.2 Background 2 1.3 Biometric Systems 3 1.4 Biometric Modules 5 1.4.1 Sensor Module 6 1.4.2 Feature Extraction Module 6 1.4.3 Matcher Module 6 1.4.4 System Database Module 6 1.5 Application of Biometric Systems 7 1.6 Commonly used Biometrics 8 1.6.1 Facial recognition 8 1.6.2 Fingerprint 9 1.6.3 Hand/finger Geometry 9 1.6.4 Iris Scan 9 1.6.5 Keystroke Dynamics 10 1.6.6 Dynamic Signature Verification 10 1.6.7 Speaker/ Voice Recognition 10 1.7 Problem Formulation 11 v Chapter 2 Literature Survey 13-28 2.1 Introduction 13 2.2 Human Face Recognition 14 2.3 Machine Recognition of Faces 15 2.3.1 Face Detection Methods 16 2.3.1.1 Knowledge Based Methods 16 2.3.1.2 Feature Invariant Approaches 17 2.3.1.3 Template Matching Methods 17 2.3.1.4 Appearance Based Methods 18 2.3.2 Face Recognition Method Classification 19 2.3.2.1 Holistic Approach 19 2.3.2.2 Feature Based Approach 19 2.3.2.3 Hybrid Approach 20 2.4 Face Recognition Methods 23 2.4.1 Eigenfaces Method 23 2.4.2 Nearest Feature Line Method 24 2.4.3 Hidden Markov Models Method 25 2.4.4 Hybrid Method of Component Based and Morphable Models 27 2.4.5 Gabor Filter 28 Chapter 3 Neural Network 30-48 3.1 Human Brain 30 3.2 Comparison Between Brain and Computer 32 3.3 Artificial Neuron 33 3.4 Activation Function 34 3.4.1 Identity Function 34 3.4.2 Step Function 35 3.4.3 Sigmoidal Function 35 3.4.3.1 Logistic Function (Sigmoid) 36 3.4.3.2 Symmetric Sigmoid 36 3.4.4 Radial Basis Functions 37 vi 3.5 Bias 38 3.6 Threshold 38 3.7 Learning 39 3.7.1 Fixed Networks 39 3.7.2 Adaptive Networks 39 3.7.2.1 Supervised Learning 40 3.7.2.2 Unsupervised Learning 40 3.7.2.3 Reinforcement Learning 40 3.8 Network Architecture 41 3.8.1 Single Layered Feedforward Networks 41 3.8.2 Multi Layered Feedforward Networks 41 3.8.3 Recurrent Networks 42 3.9 Learning Rules 43 3.9.1 Hebbian Learning Rule 43 3.9.2 Perceptron Learning Algorithm 43 3.9.3 Delta Learning Rule (Widrow-Hoff or Least Mean Square Rule) 44 3.9.4 Boltzamann Learning 46 3.9.5 Competitive Learning Rule 46 3.9.6 Back Propagation Algorithm 48 Chapter 4 System Implementation and Results 4.1 Introduction 51-74 51 4.1.1 Acquisition Module 52 4.1.2 Preprocessing Module 53 4.1.2.1 Histogram Equalization 53 4.1.2.2 Image Size Normailzation 57 4.1.3 Feature Extraction Module 59 4.1.4 Thresholding 67 4.1.5 Classification Module 68 4.1.5.1 Input Layer 68 4.1.5.2 Output Layer 69 vii 4.1.6 Training Set 69 4.1.6.1 Choice of Training Algorithm 69 4.1.6.2 71 Choice of Learning Rate Conclusion 75 Future Scope 75 References 76-79 viii LIST OF FIGURE S.No. Figure Number Figure Name Page No. 1. Figure 1.2.1 Different types of Biometrics 3 2. Figure 1.3.1 A Biometric System 5 3. Figure 1.4.1 Biometric Modules 7 4. Figure 2.3.1 Face Recognition System 16 5. Figure 2.4.2.1 Generalizing two prototype feature points 25 x1 and x2 6. Figure 2.4.3.1 HMM for face recognition 26 7. Figure 2.4.3.2 Block extraction from image 26 8. Figure 3.1.1 Biological Neuron 30 9. Figure 3.1.2 Relation between different parts of 31 Biological Neuron 10. Figure 3.3.1 Artificial Neural Net 33 11. Figure 3.4.1.1 Identity Function 34 12. Figure 3.4.2.1 Step Function 35 13. Figure 3.4.3.1.1 Logistic Function (Sigmoid) 36 14. Figure 3.4.3.2.1 Symmetric Sigmoid 37 15.. Figure 3.4.4.1 Radial Basis Function 37 16. Figure 3.7.1 Neural Network 39 17. Figure 3.8.2.1 A feed-forward network with a single 42 output layer of neurons (a) and a fully connected feed-forward network with one hidden layer and one output layer (b) 18. Figure 3.8.3.1 A recurrent network with hidden neurons 42 19. Figure 4.1.1 A face recognition system 51 20.. Figure 4.1.2 Yale Face Database 52 ix 21. Figure 4.1.2.1.1 Face image of Yale database 55 22. Figure 4.1.2.1.2 Histogram of image before equalization 55 23. Figure 4.1.2.1.3 Image after histogram equalization 56 24.. Figure 4.1.2.1.4 Histogram of image after equalization 56 25. Figure 4.1.2.1.5 Histogram equalized Yale Database 57 26. Figure 4.1.2.2.1 (a) Original face image, (b) reduced face 58 image 27. Figure 4.1.2.2.2 Resized image database 58 28. Figure 4.1.3.1 Gabor filter bank at frequency .18 for 60 different orientation 29. Figure 4.1.3.2 Gabor filter bank at frequency .19 for 60 different orientation 30. Figure 4.1.3.3 Gabor filter bank at frequency .20 for 61 different orientation 31. Figure 4.1.3.4 Gabor filter bank at frequency .22 for 61 different orientation 32. Figure 4.1.3.5 Gabor filter bank at frequency .24 for 62 different orientation 33. Figure 4.1.3.6 Gabor filter bank at frequency .28 for 62 different orientation 34. Figure 4.1.3.7 Gabor filter bank at frequency .30 for 63 different orientation 35. Figure 4.1.3.8 Convolved images with filter bank for 63 frequency .18 36. Figure 4.1.3.9 Convolved images with filter bank for 64 frequency .19 37. Figure 4.1.3.10 Convolved image with filter bank for 64 Convolved image with filter bank for 65 frequency .20 38. Figure 4.1.3.11 frequency .22 39. Figure 4.1.3.12 Convolved image with filter bank for x 65 frequency .24 40. Figure 4.1.3.13 Convolved image with filter bank for 66 frequency .28 41. Figure 4.1.3.14 Convolved image with filter bank for 66 frequency .30 42. Figure 4.1.4.1 Thresholded images of typical face image 68 43. Figure 4.1.6.1 Training curve for 70 (a) Gradient decent (b) Gradient decent with momentum (c) Adaptive rate (d) Resilent Backpropagation algorithm xi LIST OF TABLES S.No. Table No. Table Name Page No. 1. Table 3.2.1 Comparison of Brain and Computer 33 2. Table 3.6.1 Relation 38 between biological neural network and artificial neural network 3. Table 6.1.4.2.1 Experimental result for various learning 74 rate 4. Table 6.1.4.2.2 True test results 74 5. Table 6.1.4.2.3 Imposter test results 74 xii