Chapter 1 INTRODUCTION
1.1 Motivation:
"Friend, the old days were better when the instructor use to call out the names and take the attendance. Now the proxy attendance has become a dream by the advent of this new automated system". Well, the day is not far when the students will be talking likewise while coming out of the lecture halls. Here, we present one such attempt towards making this dream come true. 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 todays larger, more complex society, it isnt that simple. In fact, as more interactions take place electronically, it becomes even more important to have an electronic verification of a persons identity. Until recently, electronic verification took one of two forms. It was based on something the person had in their possession, like a magnetic swipe card, or something they knew, like a password.
Page 1
To cater this need and using the observations of human psychophysics, face recognition as a field emerged. Different approaches have been tried by several groups, working world wide, to solve this problem. Many commercial products have also found their way into the market using one or the other technique. But so far no system / technique exists which has shown satisfactory results in all circumstances. A comparison of these techniques needs to be done. Reliable automatic recognition of persons has long been an attractive goal. In face recognition, difficulties arise from the fact that the face is a changeable social organ displaying a variety of expressions, as well as being an active 3D object whose image varies with viewing angle, pose, illumination, accoutrements, and age. It has been shown that for facial images taken at least one year apart, even the best current algorithms have error rates of 43% to 50% . An Artificial Neural Network (ANN) system provides automatic recognition of an individual based on some sort of unique feature or characteristic possessed by the individual.ANN systems have been developed based on fingerprints, facial features, voice, hand geometry, handwriting, the retina etc.
Page 2
The biometric template will provide a normalized, efficient and highly discriminating representation of the feature, which can then be objectively compared with other templates in order to determine identity. Most ANN systems allow two modes of operation. An enrolment mode for adding templates to a database, and an identification mode, where a template is created for an individual and then a match is searched for in the database of pre-enrolled templates.
Fig:A Generic representation of face detection system A good ANN is characterized by use of a feature that is; highly unique so that the chance of any two people having the same characteristic will be minimal, stable so that the feature does not change over time, and be easily captured in order to provide convenience to the user, and prevent misrepresentation of the feature.
1.5 Applications:
Page 3
Page 4
Chapter 2
REVIEW OF LITERATURE
Existing Biometrics
y y y
Fingerprint
Fingerprint scan method is gaining a lead ahead of other biometric systems, as it is least intrusive and less harmful to the user. It needs a high-resolution snapshot of the finger, which is easy and effective. Common examples are criminal records, forensic and access-control mechanisms in high-security establishments. It is based on the uniqueness of ones fingerprint. This process however began as a highly manual function where individuals would spend weeks or months trying to match the hard copy fingerprints that were on file with those obtained elsewhere. In many cases matches were difficult if not impossible to make and it was not uncommon for misidentifications to occur. With advancements in computer technology, electronic archives that allow the matching process to occur much faster and with a much lower error rate were procured. The below figure2.1 shows the example of finger print recognition system.
Signature recognition
Signature Recognition technology consists primarily of a pen and a specialized writing tablet, which are then connected to a local or central computer for template processing and verification. In order to start the data acquisition phase of the enrollment process, the individual must sign their name multiple times on the writing tablet. The robustness of the Signature Recognition enrollment template is a direct function of the quality of the writing tablet that is utilized. A high quality writing tablet will be able to capture all of the behavioral variables (timing, pressure, and speed) of the signature, whereas a lower end writing tablet may not be able to capture all of the variables. However, there are a number of constraints in the data acquisition phase. First, a signature cannot be too long or too short. If a signature is too long, there will be too much behavioral data presented, and as a result, it will be difficult for the Signature Recognition system to identify consistent and unique data points. If a signature is too short, there will not be enough data present, and as a result, this will lead to a higher False Accept Rate (for example, an impostor being authorized by the Signature Recognition system). Second, the individual must complete the enrollment and verification processes in the same type of environment and conditions. For example, if the individual was standing in the enrollment phase, but sitting in the verification phase, and resting their arm in one phase and not in the other phase while signing, can cause the enrollment and verification templates to be substantially different from each other. This constraint of a consistent environment is also faced by another biometric technology-Facial Recognition. Voice recognition Today, when we call most large companies, a person doesn't usually answer the phone. Instead, an automated voice recording answers and instructs you to press buttons to move through option menus. Many companies have moved beyond requiring you to press buttons, though. Often you can just speak certain words (again, as instructed by a recording) to get what you need. The system that makes this possible is a type of speech recognition program -- an automated phone system.
Page 6
weeks or months trying to match the hard copy fingerprints that were on file with those obtained elsewhere. Signature recognition
y
If a signature is too long, there will be too much behavioral data presented, it will be difficult for the Signature Recognition system to identify consistent and unique data points.
If a signature is too short, there will not be enough data present, and as a result, this will lead to a higher False Accept Rate.
Voice recognition
y
Small-vocabulary/many-users: usage is limited to a small number of predetermined commands and inputs, such as basic menu options or numbers.
Large-vocabulary/limited-users: These systems work best in a business environment where a small number of users will work with the program. While these systems work with a good degree of accuracy (85 percent or higher with an expert user) and have vocabularies in the tens of thousands, you must train them to work best with a small number of primary users. The accuracy rate will fall drastically with any other user.
Page 7
Limitations of Existing System Existing system is unable to adapt to the external conditions. Accuracy of identification is less. Time consuming. But in the case of proposed system we are extracting a pattern and create NN files rather than a complete image and it is from this pattern that the Neural Networks does the identification.
1.Accuracy: Simply put, Face recognition is the most accurate form of identification known to man. More accurate than even DNA matching. Due to the process of chaotic morphogenesis, every iris is unique to a degree that the probability of 2 irises being identical is 1 in 10 to the power of 78. Additionally, our iris recognition system captures over 249 'degrees of freedom' or points of interest.
2.Speed: No other biometric technology is designed to deliver 1-n searching of large databases in real time. This technology has nearly 20 times more matches per minute than its closest competitor. Looking at speed in conjunction with accuracy, there's simply no other technology that can deliver high accuracy authentication in anything close to the real-time performance of Face recognition.
3.Stability: The Face image remains stable from the age of about 10 months up until death. This means that an face image need only be captured once and does not need to be updated. Other biometric measures change over time. Hands and fingers grow, our voices change, our skin degrades and other biometric measures are subject to labor, health, genetics, climate and age. What this means is that the performance of such systems is unreliable and frequent re-enrolments are required to accommodate these changes.
DEPT OF CSE,PESITM SHIMOGGA Page 8
4. Robust recognition: face recognition system works well, even with gazing-away eyes or narrowed eyelids and scrapped faces.
2.3. Applications
The face recognition system covers a wide range of application in authenticating persons It can be deployed in:
y y y y y y y y
Border control system Airports Biometric passports Banking systems, ATMs Authorized access to healthcare records, intellectual property, etc Identification of criminals In Govt. organization where restricted access exists. Productivity enhancing applications like time and attendance.
Page 9
Chapter 3 METHODOLOGY
3.1 Basics of image color models:
3.1.1 RGB color model:
The RGB color model is an additive color model in which red, green, and blue light are added together in various ways to reproduce a broad array of colors.
Fig 3.1 RGB color model The RGB model, this is represented by a cube using non-negative values within a 01 range, assigning black to the origin at the vertex (0, 0, 0), and with increasing intensity values running along the three axes up to white at the vertex (1, 1, 1), diagonally opposite black. An RGB triplet (r, g, b) represents the three-dimensional coordinate of the point of the given color within the cube or its faces or along its edges. Below is a original RGB image with each of red, green and blue frames extracted from the image separately.
Page 10
Fig 3.3 Grayscale image The intensity of a pixel is expressed within a given range between a minimum and a maximum, inclusive.
Page 11
This range is represented in an abstract way as a range from 0 (total absence, black) and 1 (total presence, white), with any fractional values in between. This notation is used in academic papers, but it must be noted that this does not define what "black" or "white" is in terms of colorimetric.
Fig 3.4 Binary image Binary images often arise in digital image processing as masks or as the result of certain operations such as segmentation, thresholding, and dithering.
3.1.4 Thresholding:
Thresholding is the simplest method of image segmentation. From a grayscale image, thresholding can be used to create binary images.
Page 12
The fig3.5 is the original image which is the converted into fig3.6 using the thresholding method. During the thresholding process, individual pixels in an image are marked as object pixels if their value is greater than some threshold value (assuming an object to be brighter than the background) and as background pixels otherwise. This convention is known as threshold above. Variants include threshold below, which is opposite of threshold above; threshold inside, where a pixel is labeled "object" if its value is between two thresholds; and threshold outside, which is the opposite of threshold inside. Typically, an object pixel is given a value of 1 while a background pixel is given a value of 0. Finally, a binary image is created by coloring each pixel white or black, depending on a pixel's labels.
3.2 MATLAB:
The proposed system can be developed in any platform, C#/C++, MATLAB and Java. We have chosen to develop the program in MATLAB, a high-performance programming language, good in matrix manipulation and numerical computing with an easy-to-use environment. The main reason of the current choice is MATLABs Image Processing Toolbox which provides a comprehensive set of graphical tools and reference-standard algorithms ideal for image processing. The toolbox comes with the programming language and it is highly integrated with it. All of its functions are carefully planned and developed to keep performance high and produce accurate results. As the proposed project mainly deals with images, MATLAB is the ideal language to be used. No other programming language offers such a large collection of built-in functions supporting image analysis and enhancement. Overall MATLAB is an excellent programming language which enables us to write efficient code and develop GUIs fast with comparatively little effort. It has two main disadvantages; The first disadvantage of the language is that it can be considered slow compared to C#/C++ and Java, as these languages can compute calculations, execute methods and return results faster. MATLABs GUI is particularly slow as it needs some time to update all the fields when this is required in an application. A
Page 13
complete installation of the programming language occupies a large amount of hard drive space.
Features of MATLAB:
y y y y
High-level language for technical computing. Development environment for managing code, files, and data . Interactive tools for iterative exploration, design, and problem solving. Mathematical functions for linear algebra, statistics, Fourier analysis, filtering, optimization, and numerical integration .
y y y
2-D and 3-D graphics functions for visualizing data . Tools for building custom graphical user interfaces . Functions for integrating MATLAB based algorithms with external applications and languages, such as C, C++, Fortran, Java, COM, and Microsoft Excel.
Page 14
These are essentially simple mathematical models defining a function Each type of ANN model corresponds to a class of such functions.
Fig 3.42 Multilayer perceptron A neural network is an interconnected group of nodes, akin to the vast network of neurons in the human brain. The most significant feature of neural networks is the possibility of learning, which in practice means the following: Given a specific task to solve, and a class of functions F, learning means using a set of observations, in order to find sense. There are three major learning paradigms, each corresponding to a particular abstract learning task. These are supervised learning, unsupervised learning and reinforcement learning. which solves the task in an optimal
Page 15
Fig 3.43 Synaptic weights Neuron mathematically can be determined by the equations:
The annotation of (X1Xn) represents the input signal, Wkn represents the neuron synaptic weights, Uk is the adder output, Yk represents the output and psi function represent the activation function. Sigmoid function is one of the most common activation function used in neural network. It is a increasing function of S-shaped graph.
Page 16
FAC REC
The learning process will still be in progress unless an error signal hit the predestined minimum value. Thus, we need to shuffle the order of the presentation of the training examples between epochs. There are two t pe of back propagation learning for the given training set: The sequential mode referred as online, pattern mode and the weights will be updated after the training example The batch mode referred to weights will update after the training is presented to the network.
3.3.3 T
and the aim is to find a function f in the allowed class of functions that matches the examples. In other words, we wish to i fer the mapping implied by the data; the cost function is related to the mismatch between our mapping and the data and it implicitly contains prior knowledge about the problem domain. A commonly used cost is the mean-squared error which tries to minimise the average error between the network's output, f(x), and the target value y over all the example pairs. When one tries to minimise this cost using gradient descent for the class of neural networks called Multi- ayer Perceptrons, one obtains the well-known backpropagation algorithm for training neural networks.
Tasks that fall within the paradigm of supervised learning are pattern recognition (also known as classification) and regression (also known as function approximation). The supervised learning paradigm is also applicable to sequential data (e.g., for speech and gesture recognition). This can be thought of as learning with a "teacher," in the form of a function that provides continuous feedback on the quality of solutions obtained thus far. Unsupervised learning In unsupervised learning we are given some data x, and the cost function to be minimised can be any function of the data x and the network's output, f. The cost function is dependent on the task (what we are trying to model) and our a priori assumptions (the implicit properties of our model, its parameters and the observed variables). As a trivial example, consider the model f(x) = a, where a is a constant and the cost C = (E[x] f(x))2. Minimising this cost will give us a value of a that is equal to the mean of the data. The cost function can be much more complicated. Its form depends on the application: For example in compression it could be related to the mutual information between x and y. In statistical modelling, it could be related to the posterior probability of the model given the data. (Note that in both of those examples those quantities would be maximised rather than minimised).
Fig3.45 Unsupervised learning Tasks that fall within the paradigm of unsupervised learning are in general estimation problems; the applications include clustering, the estimation of statistical distributions, compression and filtering.
Page 18
Fig: Single Neuron example neural network The above Figure shows an example of a single neural processor, or neuron.
DEPT OF CSE,PESITM SHIMOGGA Page 19
Neurons have many weighted inputs, that is to say each input (p1, p2, p3 pm) has a related weighting (w1, w2, w3 wm) according to its importance. Each of these inputs is a scalar, representing the data. In the case of face detection, the shade of GRAY of each pixel could be presented to the neuron in parallel (thus for a 10x10 pixel image, there would be 100 input lines p1 to p100,with respective weightings w1 to w100, corresponding to the 100 pixels in the input image).The weighted inputs are combined together, and if present, a bias (b) is added. This is then passed as the argument to a transfer function (typically a pure linear, hardlimit, or log-sigmoid function),which outputs a value (a) representing the chosen classification.
Page 20
Fig 3.42 Multilayer perceptron The majority implementations of neural networks available are however custom implementations in various programming languages and on various platforms. Basic types of neural networks are simple to implement directly. There are also many programming libraries that contain neural network functionality and that can be used in custom implementations. The tasks to which artificial neural networks are applied tend to fall within the following broad categories: Function approximation, or regression analysis, including time series prediction and modeling. Classification, including pattern and sequence recognition, novelty detection and sequential decision making. Data processing, including filtering, clustering, blind source separation and compression. Application areas include system identification and control, game-playing and decision making , pattern recognition , sequence recognition, medical diagnosis, financial applications, data mining , visualization and e-mail spam filtering.
Page 21
acting on vectors. Eigenvalues, eigenvectors and eigenspaces are properties of a matrix. They are computed by a method described below, give important information about the matrix, and can be used in matrix factori ation. They have applications in areas of applied mathematics as diverse as finance and quantum mechanics. In general, a matrix acts on a vector by changing both its magnitude and its direction. However, a matrix may act on certain vectors by changing only their magnitude, and leaving their direction unchanged (or possibly reversing it). These vectors are the eigenvectors of the matrix. A matrix acts on an eigenvector by multiplying its magnitude by a factor, which is positive if its direction is unchanged and negative if its direction is reversed. This factor is the eigenvalue associated with that eigenvector. An eigenspace is the set of all eigenvectors that have the same eigenvalue, together with the zero vector. The concepts cannot be formally defined without prerequisites, including an understanding of matrices, vectors, and linear transformations. The technical details are given below. Formally, if A is a linear transformation, a vector x is an eigenvector of A if there is a scalar such that
Page 22
Banking
y
Neural networks are used to spot unusual credit card activity that might possibly be associated with loss of a credit card
Defense
y
Weapon steering, target tracking, object discrimination, facial recognition, new kinds of sensors, sonar, radar and image signal processing including data compression, feature extraction and noise suppression, signal/ image identification.
Electronics
y
Code sequence prediction, integrated circuit chip laying, process control, chip failure analysis, machine vision voice synthesis, nonlinear modeling.
Entertainment
y
Financial
y
Real estate appraisals, loan advisor, mortgage screening, corporate bond rating, credit-line use analysis, and portfolio trading program, corporate financial analysis, and currency price prediction.
Industrial
y
Neural networks are being trained to predict the output gasses of furnaces and other industrial process. They then replace complex and costly equipment used for this purpose in the past.
Insurance
y
Manufacturing
y
Neural networks are used in manufacturing process control, product design and analysis, process and machine diagnosis, real-time particle identification, visual quality analysis, paper quality prediction, computer chip quality analysis, analysis of grinding operations, chemical product design analysis,
Page 23
machine maintenance analysis, project bidding, planning and management, dynamic modeling of chemical process system. Medical
y
Neural networks are used in breast cancer cell analysis, EEG and ECG analysis, prosthesis design, optimization of transplant times, hospital expense reduction, hospital quality improvement, and emergency room test advisement.
Robotics
y
Neural networks are used in trajectory control, forklift robot, manipulator controllers, vision systems
Other application
y y y y y y y
Artificial intelligence Character recognition Image understanding Logistics Optimization Quality Control Visualization
Page 24
Tansig
Fig:Tan-Sigmoid Transfer Function Syntax Description tansig is a neural transfer function. Transfer functions calculate a layer's output from its net input. tansig(N,FP) takes N and optional function parameters, N S x Q matrix of net input (column) vectors A = tansig(N,FP) dA_dN = tansig('dn',N,A,FP) info = tansig(code)
Page 25
and returns A, the S x Q matrix of N's elements squashed into [-1 1]. tansig('dn',N,A,FP) returns the derivative of A with respect to N. If A or FP is not supplied or is set to [], FP reverts to the default parameters, and A is calculated from N. tansig('name') returns the name of this function. tansig('output',FP) returns the [min max] output range. tansig('active',FP) returns the [min max] active input range. tansig('fullderiv') returns 1 or 0, depending on whether dA_dN is S x S x Q or S x Q. tansig('fpnames') returns the names of the function parameters. tansig('fpdefaults') returns the default function parameters.
Examples Here is the code to create a plot of the tansig transfer function.
net.layers{i}.transferFcn = 'tansig';
Page 26
y initnw
Purpose Nguyen-Widrow layer initialization function Syntax
y
net = initnw(net,i)
Description initnw is a layer initialization function that initializes a layer's weights and biases according to the Nguyen-Widrow initialization algorithm. This algorithm chooses values in order to distribute the active region of each neuron in the layer approximately evenly across the layer's input space. The values contain a degree of randomness, so they are not the same each time this function is called. initnw requires that the layer it initializes have a transfer function with a finite active input range. This includes transfer functions such as tansig and satlin, but not purelin, whose active input range is the infinite interval [-inf, inf]. Transfer functions, such as tansig, will return their active input range as follows:
y y y
and returns the network with layer i's weights and biases updated.
Page 27
There is a random element to Nguyen-Widrow initialization. Unless the default random generator is set to the same seed before each call to initnw, it will generate different weight and bias values each time. Network Use You can create a standard network that uses initnw by calling newff or newcf. To prepare a custom network to be initialized with initnw, 1. Set net.initFcn to 'initlay'. This sets net.initParam to the empty matrix [], because initlay has no initialization parameters. 2. Set net.layers{i}.initFcn to 'initnw'. To initialize the network, call init.
y Initlay
Purpose Layer-by-layer network initialization function
Syntax
y y
Description initlay is a network initialization function that initializes each layer i according to its own initialization function net.layers{i}.initFcn. initlay(net) takes net Neural network
Page 28
and returns the network with each layer updated. initlay(code) returns useful information for each code string: 'pnames' Names of initialization parameters
initlay does not have any initialization parameters. Network Use You can create a standard network that uses initlay by calling newp, newlin, newff, newcf, and many other new network functions. To prepare a custom network to be initialized with initlay, 1. Set net.initFcn to 'initlay'. This sets net.initParam to the empty matrix [], because initlay has no initialization parameters. 2. Set each net.layers{i}.initFcn to a layer initialization function. (Examples of such functions are initwb and initnw.) To initialize the network, call init.
y msereg
Purpose Mean squared error with regularization performance function Syntax
y y y y
Page 29
Description msereg is a network performance function. It measures network performance as the weight sum of two factors: the mean squared error and the mean squared weight and bias values. msereg(E,Y,X,FP) takes E and optional function parameters, E Y X Matrix or cell array of error vectors Matrix or cell array of output vectors (ignored) Vector of all weight and bias values
and returns the mean squared error plus FP.ratio times the mean squared weights. msereg('dy',E,Y,X,perf,FP) returns the derivative of perf with respect to Y. msereg('dx',E,Y,X,perf,FP) returns the derivative of perf with respect to X. msereg('name') returns the name of this function. msereg('pnames') returns the names of the training parameters. msereg('pdefaults') returns the default function parameters. Examples Here a two-layer feed-forward network is created with a one-element input ranging from -2 to 2, four hidden tansig neurons, and one purelin output neuron.
y y
Page 30
The network is given a batch of inputs P. The error is calculated by subtracting the output A from target T. Then the mean squared error is calculated using a ratio of 20/(20+1). (Errors are 20 times as important as weight and bias values).
y y y y y y y
Network Use You can create a standard network that uses msereg with newff, newcf, or newelm. To prepare a custom network to be trained with msereg, set net.performFcn to 'msereg'. This automatically sets net.performParam to msereg's default performance parameters. In either case, calling train or adapt results in msereg's being used to calculate performance.
trainscg
Purpose Scaled conjugate gradient backpropagation Syntax
y y
Description trainscg is a network training function that updates weight and bias values according to the scaled conjugate gradient method.
DEPT OF CSE,PESITM SHIMOGGA Page 31
trainscg(net,TR,trainV,valV,testV) takes these inputs, net TR Neural network Initial training record created by train
trainV Training data created by train valV testV Validation data created by train Test data created by train
Each argument trainV, valV, and testV is a structure of these fields: X N x TS cell array of inputs for N inputs and TS time steps. X{i,ts} is an Ri x Q matrix for the ith input and TS time step. Xi N x Nid cell array of input delay states for N inputs and Nid delays. Xi{i,j} is an Ri x Q matrix for the ith input and jth state. Pd N x S x Nid cell array of delayed input states. T No x TS cell array of targets for No outputs and TS time steps. T{i,ts} is an Si x Q matrix for the ith output and TS time step. Tl Nl x TS cell array of targets for Nl layers and TS time steps. Tl{i,ts} is an Si x Q matrix for the ith layer and TS time step. Ai Nl x TS cell array of layer delays states for Nl layers, TS time steps. Ai{i,j} is an Si x Q matrix of delayed outputs for layer i, delay j.
Page 32
Network Use You can create a standard network that uses trainscg with newff, newcf, or newelm. To prepare a custom network to be trained with trainscg, 1. Set net.trainFcn to 'trainscg'. This sets net.trainParam to trainscg's default parameters. 2. Set net.trainParam properties to desired values. In either case, calling train with the resulting network trains the network with trainscg. Examples Here is a problem consisting of inputs p and targets t to be solved with a network.
y y
p = [0 1 2 3 4 5]; t = [0 0 0 1 1 1];
Here a two-layer feed-forward network is created. The network's input ranges from [0 to 10]. The first layer has two tansig neurons, and the second layer has one logsig neuron. The trainscg network training function is to be used.
y y
Page 33
Page 34
Run: Save and run the current GUI. M-File Editor: Display, in your default editor, the code file associated with the GUI. Position Readouts: Continuously display the mouse cursor position and the positions of selected objects
This GUI has 2 tools as shown in figure. They are, Push Button Static Text Push Button: Each of the push buttons creates a different type of plot using the data specified by the current selection in the pop-up menu. The push button callbacks get data from the handles structure and then plot it. Static text: Display text in window with same background of the window.
Page 36
Description network creates new custom networks. It is used to create networks that are then customized by functions such as newp, newlin, newff, etc. network takes these optional arguments (shown with default values): numInputs numLayers biasConnect inputConnect layerConnect Number of inputs, 0 Number of layers, 0 numLayers-by-1 Boolean vector, zeros numLayers-by-numInputs Boolean matrix, zeros numLayers-by-numLayers Boolean matrix, zeros
net New network with the given property values Load Database: Click on the load database Button, It will Loading all faces to the database db, it will load the each face sets in a separate folders. after completion of the loading process it will print the message as Database Created.
Page 37
Train Network: Click on the Train Network button. Here trainscg is a network training function that updates weight and bias values according to the scaled conjugate gradient method and neural network tool will be displayed as shown bellow.
Training occurs according to trainscg's training parameters, shown here with their default values: net.trainParam.epochs net.trainParam.show 500 25 Maximum number of epochs to train Epochs between displays (NaN for nodisplays) net.trainParam.showCommandLine 0 Generate command-line output
Page 38
Show training GUI Performance goal Maximum time to train in seconds Minimum performance gradient Maximum validation failures Determine change in weight for second derivative approximation Parameter for regulating the indefiniteness of the Hessian
net.trainParam.lambda
5.0e7
trainscg('info') returns useful information about this function. trainscg can train any network as long as its weight, net input, and transfer functions have derivative functions. Backpropagation is used to calculate derivatives of performance perf with respect to the weight and bias variables X. The scaled conjugate gradient algorithm is based on conjugate directions, as in traincgp, traincgf, and traincgb, but this algorithm does not perform a line search at each iteration. Training stops when any of these conditions occurs:
y y y y y
The maximum number of epochs (repetitions) is reached. The maximum amount of time is exceeded. Performance is minimized to the goal. The performance gradient falls below min_grad. Validation performance has increased more than max_fail times since the last time it decreased (when using validation).
Test on Faces: Click on the Test on Faces button. It opens the testface folders to test on the faces which are given and display the result in a separate window with file name and corresponding person number.
Page 39
Exit: Click on the Exit button. Function is to clear all the things which parameters stored as a variables and it clears all the datas and exit the window. Following code is to clear all functions and variables. close all; clear all; clc
Page 40
Chapter 4
IMPLEMENTATIONANDTESTING
4.1 IMPLEMENTATION
Implementation is the stage in the project where the theoretical design of the project is turned into a working system. The images are extracted and compared with the original image stored in a file. It is a stage where the operation of the system is monitored to ensure that it continues to work effectively. Education and training of the users are also essential to ensure smooth functioning of the system. The main aim of the system is to implement how the persons are identified by using their face patterns. First the image is captured and then the identifiable patterns from the captured image are extracted. An identifiable pattern is obtained for each image in the image extraction phase. For storing these face patterns, here we are using the concept of Neural Network. In this it stores the pattern as binary values and from this an NN file is generated. When a subject wishes to be identified the system checks the NN file. If any match is found it shows his/her details along with his photograph or else the subject remains unidentified. The Face Recognition Network is implemented in matlab platform. Using Neural
Project Schema
Page 41
Page 42
Page 43
4.3 TESTING:
When a system is developed, it is hoped that it performs properly. In practice, however some errors always occur. The main purpose of testing an information system is to find the error and correct them. A successful test is one that finds an error. System testing is a critical aspect of Software Quality Assurance and represents the ultimate review of specification, design and coding. Testing is the process of executing a program with the intent of finding an as yet undiscovered error. Nothing is complete without testing. Testing is vital to the success of the system. The main objectives of the system testing are: To ensure during operation the system will perform as per specification. To make sure that the system meets user requirements during operation. To verify that the controls incorporated in the system function as intended.
If the testing conducted successfully, it will uncover errors in the software. As a secondary benefit, testing demonstrates that the software functions appear to be working according to specification and that performance requirements appear to have been satisfied. The system Face Recognition Using Neural Networks is tested in such a way that almost all errors that may occur are found and corrected. The test process carried out in this system includes the following:
Page 44
conducted which are given below: Peak load test This determines whether the new system will handle the volume of activities when the system is at the peak of its processing demand. The test has revealed that the new software for the agency is capable of handling the demands at the peak time.
Page 45
Storage testing This determines the capacity of the new system to store transaction data on a disk or on other files. The proposed software has the required storage space available.
Performance time testing. This test determines the length of the time used by the system to process transaction data.
Page 46
Chapter 5 CONCLUSION
Face recognition is a very valuable technology as it enables to achieve nonintrusive and convenient security system. It is challenging as the projected image depends on the persons pose, expression, lighting conditions, perspective angle and distance with respect to the camera. We intend to address the problem using Artificial Neural Network, a technology inspired by human brain mechanism, which is capable of solving complex problems such as face recognition by feed-back and learning techniques. There are two main approaches to accomplish this task: estimation of distances between the facial landmarks, or performing geometrical analysis over graylevel appearances. We choose to use the gray-level analysis approach based on eigen faces, as it is proven to be 96% accurate for classification compared to 77.9-90.3% accuracy of geometric approach. We are considering three types of neural network architectures: Perceptron, Linear Associator and Neocognitron. Perceptron is the most commonly used neural network architecture and considerably easy to implement. Using multilayer perceptron along with back propagation algorithm would help achieve a reliable system with ability to learn and classify with high accuracy. Neocognitron is a complex multilayer neural network architecure specifically made for image processing applications. So, Neocognitron is considerably complicated, but it can handle positional shifts and distortion more effectively. The third possible approach is the Linear Associator which uses basic feed forward mechanism to produce output in a single computation. It is the simplest and firststudied model of associative memory in neural network. It can be implemented easily and due to its singular and linear computational feasibility, it can provide integration for a large number of cells in a network. Linear associator can perform poorly when a lot of noise is added to the input. However, pre-processing of input helps drastically overcome noise problem. The Face Recognition System system successfully overcomes strict and severe validation checks performed using the test data. The Face Recognition System can be used in Airport for avoiding the terrorists entry in a country.
Page 47
5.2 APPLICATIONS
Security/Counter terrorism: Access control, comparing surveillance images to Known terrorists. Immigration: Rapid progression through Customs. Correctional institutions/prisons: Inmate tracking, employee access. Day Care: Verify identity of individuals picking up the children. Gaming Industry: Find card counters and thieves. Residential Security: Alert homeowners of approaching personnel. Internet, E-commerce: Verify identity for Internet purchases.
Page 48
APPENDIX A:
y y
imshow(RGB) displays the true color image RGB imshow(BW) displays the binary image BW. imshow displays pixels with the value 0 (zero) as black and pixels with the value 1 as white.
y y
imshow(I) displays the grayscale image I. I = rgb2gray(RGB) converts the truecolor image RGB to the grayscale intensity image I. rgb2gray converts RGB images to grayscale by eliminating the hue and saturation information while retaining the luminance.
info = trainscg('info') trainscg is a network training function that updates weight and bias values according to the scaled conjugate gradient method.
A = tansig(N,FP) tansig is a neural transfer function. Transfer functions calculate a layer's output from its net input. tansig(N,FP) takes N and optional function parameters,
net = initnw(net,i) initnw is a layer initialization function that initializes a layer's weights and biases according to the Nguyen-Widrow initialization algorithm. This algorithm chooses values in order to distribute the active region of each neuron in the layer approximately evenly across the layer's input space. The values contain a degree of randomness, so they are not the same each time this function is called.
net = initlay(net) initlay is a network initialization function that initializes each layer i according to its own initialization function net.layers{i}.initFcn.
perf = msereg(E,Y,X,FP) msereg is a network performance function. It measures network performance as the weight sum of two factors: the mean squared error and the mean squared weight and bias values. msereg(E,Y,X,FP) takes E and optional function parameters,
info = initlay(code) initlay(code) returns useful information for each code string, initlay does not have any initialization parameters.
Page 49
Bibliography
References books:-y
Introduction to Artificial Neural Network, by Jacek M. Zurada; Jaico Publishing House, 1999.
y y
An Introduction to Neural Network, by James A. Anderson; PHI, 1999. Elements of Artificial Neural Network, K. Mehrotra, C.K. Mohan and Sanjay ranka, MIT Press, 1997.
y y
Neural Network nad Fuzzy System, by Bart Kosko; PHI, 1992. Neural Network A comprehensive foundation, Simon Haykin, Macmillan Publishing Co., Newyork, 1993.
y y y y
www.google.com www.wikipedia.org MATLAB user community Optical character recognition using novel feature extraction and neural network classification technique. B. Gatos, D. Karras.
y y
Character recognition using neural networks a MATLAB tutorial. A feature extraction technique based on character geometry for character recognition by Dinesh Dileep.
Reference sites
y http://www.cs.stir.ac.uk/~lss/NNInro/invSlides.htm y http://www.bitstar.com/nnet.htm y http://www.pmsi.fr/sxcxmpa.htm y http://www.pmsi.fr/neurinia.htm
Page 50