Report File

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Report File as PDF for free.

More details

  • Words: 5,023
  • Pages: 29
Course Project of CSE523 Advanced Artificial Neural Network Supervised by

Dr. M. Rokonuzzaman Prepared by PrOnabananda Paul ID:073764050 Fatima Nowshin Nayeema ID: 072835050 Fahmida Khanam ID: 083250050

1

Index Index....................................................................................................................................2 Executive Summary.............................................................................................................3 Introduction:.........................................................................................................................4 Concept:...............................................................................................................................5 Computer Vision:.............................................................................................................6 Artificial Neural Network:...............................................................................................6 Network Diagram:...............................................................................................................8 Software:..............................................................................................................................8 Predict Demo:..................................................................................................................8 How a Neural Network Learns....................................................................................9 What Predict Does.....................................................................................................10 GIMP-2:.........................................................................................................................11 Adobe Photoshop 7:.......................................................................................................11 Collection of real life samples of object:...........................................................................12 Collection of real life samples and figure out the logic to recognize them as human being: ............................................................................................................................................12 Selection of features and their relationship........................................................................12 Collection of images of those objects:...............................................................................14 5. Observe the presence of those features in images and figure out ways to extract these features...............................................................................................................................15 6.Collection of training set of 50 objects and the collection those features......................15 7. Analization those vectors to figure the complexity of separation or recognition or clustering............................................................................................................................17 8. Design of appropriate neural network with the training vectors....................................18 9. Training the neural network with the training vectors...................................................23 Partitioning data:........................................................................................................27 Analyzing Fields:.......................................................................................................27 Selecting variables and training:................................................................................27 Evaluating Models:....................................................................................................28 Analysis of output model:..........................................................................................28 Future Target:.....................................................................................................................29 Conclusion:........................................................................................................................29

2

Executive Summary As a part of course project CSE 523, Advance Artificial Neural Network our distinguished Instructor assigned project for each of the students of that course. As a part of that, we, PrOnabananda Paul, Fatima Nowshin Nayeema, and Fahmida Khanam were assigned a project. Our target of the project was to make a artificial neural network for reorganization of Human face. We named it as Project HuFa. Our respectable teacher Dr. M. Rokonuzzaman also provides us the guide lines for the project. At each phase of our project, we strictly followed the guide line. And whenever we have faced any kind of query, we made conference with our Instructor. And we are glad that, at each step we got a great help from him. For this reason we are grateful to him as we think except his great help we were unable to stand this project. Each of our team members was active to make the project better. And all the time we wanted to make a different aspect from traditional. After that we finished our project. We never claim it as the best, but we have tried for that. At various step we have taken help from the various websites and book. As this was not in organized manner, we are unable to mention their names as courtesy. But we are really grateful to them. We also get help from our respectable classmates. Thanks to them also.

3

Introduction: In the modern life, Human Face Recognition is an important factor as through it many complexive matters are being performed with a silly approach. The practice of human Face recognition stands as a tender condition. As it is so tough to prepare a perfect application of Human Face recognition System. For creation of Human Face Recognition System, the most important theory that is applied to the background of it is Artificial Intelligence. An in it, Neuron Network is the center of this application. The face is the most distinctive and widely used key to a person’s identity. The area of Face detection has attracted considerable attention in the advancement of human-machine interaction as it provides a natural and efficient way to communicate between humans and machines. The problem of detecting the faces and facial parts in image sequences has become a popular area of research due to emerging applications in intelligent human-computer interface, surveillance systems, content-based image retrieval, video conferencing, financial transaction, forensic applications, pedestrian detection, image database management system and so on. Face detection is essentially localising and extracting a face region from the background. This may seem like an easy task but the human face is a dynamic object and has a high degree of variability in its appearance, which makes face detection a difficult problem in computer vision. Consider the pictures in Fig. 1 these are typical images that could be used in face classification research. They have no background and are all front facing. Any face detection program should have no trouble in detecting these. As a part of the project of preparing the Human Face Recognition system, at first we, our team mates, named the project as Project HuFa. Then we followed the steps as given below: 1. Collection of concepts for standing the project theory. 2. Collection of real life samples and figure out the logic to recognize them as human being. . 3. Selection of features and their relationship. 4. Collection of images of those objects.

4

5. Observe the presence of those features in images and figure out ways to extract these features. 6. Collection of training set of 50 objects and the collection those features. 7. Annalization those vectors to figure the complexity of separation or recognition or clustering. 8. Design of appropriate neural network with the training vectors. 9. Training the neural network with the training vectors. 10. Selection of he 10 objects to test the training network. And perform testing to asses the performance of the training neural network.

Concept: The developing of face recognition system is quite difficult because human faces are quite complex, multidimensional and corresponding on environment changes. For that reason the human machine recognition of human faces is a challenching problem due the changes in the face identity and variation between images of the same due to illumination and viewing direction. The issues are how the features adopted to represent a face under environmental changes and how we classify a new face image based on the chosen representation. Computers that recognize human faces systems have been applied in many applications such as security system, mug shot matching and model-based video coding.

5

We are in need of two subjects for creating our project. They are 1. Computer Vision 2. Artificial Neural Network

Computer Vision: Computer Vision deals with the Images. It acts as an intermediate of the computer and the other parts of the systems Each image should be preprocessing for making it perfect for our next step. All the calculations are performed on the basis of data collecting from the images. For this purposes we can use various operator and algorithm of computer vision techniques. Edge detection is one of the most used procedures for calculating the distance from the images that are used as attributes for the project. This is the most important part for creating our type of project. But in our project there is no active participation of it. As all the works for which we need the help of Computer Vision is performed by the human perception. Otherwise we become detached from our concentration. We have insisted on the Neural Network part mostly.

Artificial Neural Network: An artificial Neural Network is a computational model capable of computing various complex operations. That is inspired by natural neurons. An ANN consists of nodes that are known as neurons. All of them are computing elements for the network. An artificial neural network learns what it should do from the learning spaces after that it is tested for its performance. And we run an ANN for the getting related output from it. ANN can be of two types:

6

1. Single Layer ANN 2. Multiple Layer ANN Layers are also of two types 1. Simple Layer 2. Hidden Layer At Hidden layer no input from the user is applied directly. All the inputs of hidden layer are from the previous layer output. Each computing element consists of two parts. 1. Integrating part All the values coming to the node are integrated in this part 2. Computation part. Based on the previous part here the output is calculated. For learning the ANN, various algorithms are used/ 1. Supervised Learning: It denotes a method in which some input vectors are collected and presented to the network.  The output computed by the network is observed and the deviation from the expected answer is measured.  The weights are corrected according to the magnitude of the error in the way defined by the learning algorithm.  This kind of learning is also called learning with a teacher, since a control process knows the correct answer for the set of selected input vectors. 2. Unsupervised Learning Unsupervised learning is used when, for a given input, the exact numerical output a network should produce is unknown. a. Assume, for example, that some points in two-dimensional space are to be classified into three clusters. b. For this task we can use a classifier network with three output lines, one for each class. c. Each of the three computing units at the output must specialize by firing only for inputs corresponding to elements of each cluster. d. If one unit fires, the others must keep silent. In this case we do not know a priori which unit is going to specialize on which cluster. In our project, we simulate software for creating the Neural Network. Learning is also performed by that software. So, our concentration is to select the Input Vectors properly and run of it through simulating it.

7

Network Diagram:

For sketching the diagram, we have just used the general concept of ANN> as we have used the simulator of ANN, we have ignored the internal connections of the network. We have just insisted on the input and the output layer of the network. Hidden layer is not concerned by us. So, the units or nodes of the hidden layer are not known to me. For this reason, we have is pictorize the diagram of the ANN. The input layer consists only 17 units, as the featured vector contains just 17 features. On the results, the output layer consists of 50 units. Whatever input is given to the network, we get the output from the given 50.

Software: We have used two types of software for establishing our project. They are: 1. Predict Demo of Neural Ware 2. GIMP 2: Image Handler of Linux Ubuntu. 3.Photoshop 7

Predict Demo: Artificial neural networks were inspired in large part by research into the function of neurons in the human brain. Artificial neural networks process information in a way that resembles the way the brain works. Like the brain, neural networks “learn” from experience during a process called

8

training. You can use neural networks when unknown relationships exist in historical data. A historical dataset consists of recorded input values and their corresponding output values. Neural networks can detect patterns in data, generalize about relationships in data, and generate an output value when given a new set of input values from the problem domain. Analysts who lack extensive domain knowledge can use neural networks to solve problems that prove too complex for more conventional analytical techniques. A neural network is a non-linear estimation technique. The neural network itself is a mathematical function (given a set of input values, it produces an output value). The structure of the network, as often depicted by pictures of circles and lines, is just a way to represent the mathematical function graphically instead of using a conventional (and usually very lengthy) equation. The neural network is the core of the model that Predict builds. The model refers not only to the neural network but also to all of the pre- and post-processing steps required to produce an output value given a set of input values.

How a Neural Network Learns The human brain is a very complex system of interconnected neurons. Similarly, a neural network is an interconnected system of artificial “neurons.” In neural network terminology, neurons are called Processing Elements or nodes. Like a neuron in the brain, each Processing Element (PE) can accept input data, process the data, and pass it to the next PE. A PE processes data using one of several types of mathematical functions. In effect an entire neural network represents a composite of the functions represented by all PEs. The key to building a robust neural network is to collect many examples (or records) of input values and corresponding output values over time. The neural network uses this historical data to determine (learn) a mathematical relationship between the input data and the output data. Network Architecture As with a neuron in the brain, a single PE has limited ability. However, when connected in a system (a network), the neurons or PEs become a powerful analytic tool. In a neural network, PEs can be interconnected in various ways. Typically, PEs are structured into layers and the output values of PEs in one layer serve as input values for PEs in the next layer. Each connection has a weight associated with it. In most cases, a Processing Element calculates a weighted sum of incoming values (the sum the outputs of the PEs connected from the next lower level multiplied by their connection weights). This sum is called the activation value. The activation value is then passed to the PE’s non-linear transfer function to produce an output for that PE. This combination of PEs, connections, weights, and transfer functions form the network architecture. This architecture then represents a complex mathematical formula that has been derived from historical data. What Yuser Do Collecting and Pre-processing Data

This step involves defining the problem you want to solve, collecting data, and analyzing and transforming the data so that Predict can build the best possible network.

9

• Problem Definition. This means that you define exactly what the input and output variable(s) should be. • Data Collection. It is best to have as many data examples as possible. You should attempt to collect a nearly equal number of examples for each expected possible target value or range of values. • Data Analysis and Transformation. Perform any preliminary data manipulation or problem restructuring that is appropriate for the particular problem you are trying to solve. How NeuralWorks Predict Helps user

Based on data and model information you provide, Predict automatically builds a network. However, Predict also provides full access to the network architecture so that as you become more experienced you can finetune the core network and model parameters that control Predict’s automated analysis processes.

What Predict Does Building a network consists of dividing available input data into train, test and validation sets, augmenting the preliminary data analysis and transformation you perform, selecting the important variables from the input examples, and then training the network. A detailed discussion of these steps can be found in the NeuralWorks Predict User Guide. • Train, Test, and Validation Set Selection. Predict automatically selects train, test, and validation sets from the historical data you supply. • Data Analysis and Transformation. Predict automatically analyzes data and converts it into a form suitable for building an effective network. This may include converting string inputs to categorical inputs, scaling and transforming data, and removing outliers. • Variable Selection. Predict automatically selects input variables (or transformations of input variables) that are the most influential in predicting target values. A genetic algorithm is used to search through the space of combinations of input variables. • Network Architecture. Predict automatically adds PEs to the network, and sets up other network parameters. • Training. Based on information you supply, Predict chooses one of two available learning rules in order to achieve the best results. Testing and Validating the Network

After Predict has generated and trained the network, you can verify its performance using the train, test, and validation sets of data. Predict compares the predicted output values for these sets of data with the target values and, when using the Excel interface, writes the results to an Excel spreadsheet. When all steps are completed and network performance with both test and validation data is good, the neural network is ready to deploy and process new data for which the desired output value is unknown.

The Microsoft Excel Interface To effectively use Predict, it is helpful both to know how to take advantage of the Microsoft Excel features that Predict relies on, and to know about problems in Microsoft Excel that user want to avoid. In general, user should know:

10

- how to open and save files; - about ranges and how to select them; - how to copy blocks of cells; - how to paste functions; and - how to use Excel charting functions.

Selecting Ranges Since all the data that Predict uses to build a model is obtained from an Excel Workbook, it is important to know how to best enter Excel ranges when necessary. All dialog boxes that require data from Excel use a special range text box that is similar to the text boxes in the illustration below. Note that the special range text boxes have a small Control box, containing an underscore, on the right side. Any text box that contains the small Control behaves in a special way when you click first in the text box, and then in a cell in the Worksheet. Unlike normal text boxes, if you click in a range text box and then click in the Worksheet, you can scroll the Worksheet to make the area you are interested in easier to view. Also, if you click in a range text box, and then click and drag in the Worksheet, the dialog box that contains the range text box will be minimized so that you can view much more of the Worksheet. When you release the primary mouse button to end dragging, the dialog box returns to its normal size. For example, after first clicking in the Field Names range text box illustrated above, clicking and dragging (starting in cell A1) in the Worksheet results in the Worksheet appearance becoming similar to the following: Releasing the primary mouse button causes the dialog box to be restored, and the selected range to be placed in the range text box. As an alternative, if an area where you need to click and drag is hidden by a dialog box, instead of clicking in the range text box and then clicking in the Worksheet, click the Control in the range text box. Clicking the Control causes the dialog box to automatically minimize as illustrated below - you do not have to click in the Worksheet. You can then click in the upper left cell of the range you want and drag to select all the cells in the range. Note that in this example, since the range text box contained A1 when the Control was clicked, cell A1 is selected when the dialog box minimizes. While the dialog box is minimized, you may move it around by ragging its title bar, and you may select any range in the active Worksheet by simply clicking in an appropriate cell and dragging until the range you want has been selected (as indicated by the Excel dashed selection box). To restore the dialog box to full view, click the Control box again (note that when the dialog box is minimized, the Control box has a small red arrow to indicate it can be expanded).

GIMP-2: It is the opensource software providing by the Ubuntu of Linux Kernel.This software is a helpful one for making the standard image for our project. As well as, by this software, we can calculate the distance between two points. The procedure of distance calculation is also easier than any software.

Adobe Photoshop 7: This is the product of Adobe software. For resizing the images, we use this software. This also used for proper illumination.

11

Collection of real life samples of object: For collecting the images of the same type we choose a different policy. As for us, it was really tough to collect same type of images, as we are not the professional photographer. But we are in the need of same type images for suitable illumination and camera position. For this reason, we went to different studios for collecting images. In this case we respect the following criteria: • • • • •

We choose the studios where there is only one cameraman, as for that case there is a great probability of getting same images of different objects All the images should be of Passport size. The images of male should be except beard. The images should be captured by the same lens. The distance of camera should be exact.

Collection of real life samples and figure out the logic to recognize them as human being: After collecting the images, we observe the images carefully and used our intuitive mind for figure out the logic to recognize the images from each other. For this reason, we have done the following task: 1. For making the more proper illuminated picture by using layer. 2. For resizing the images. All the images were made of the same size. Otherwise the calculation will not be absolute. For this reason, by using the Photoshop at first we crop the face of the images and then we resize the images at the size of pixel size 352X480. As all the measurement is performed on by the human being, the more the size of the image will be , the more it will be depicted and easy for the person to calculate the distance of it. But as we need the easiest way to calculate the distance, we select this size, as for this size we need not the scroll the images up and down.

Selection of features and their relationship. For selecting the features we used our intuitive mind and our general concept. We select the features as a way that we can make different among the images. We select the features as below:

12

The Image ID: The image Size: 352X480 pixel Breadth of Right Eye: BRE Height of Right Eye: HRE Breadth of Left Eye: BLE Height of Left Eye: HLE Length of Right Eyebrow:  REB Length of Left Eyebrow: LEB Inner breadth of Nose: IBN Length of nose:   LNO Distance of nose to Lip:    DNLP Length if lip: LLP Height of Lower Lip: HLP Breadth at Lip Zone:  BLZ Face Breadth at Ear height:    FBEH Height of Forehead:  HFH Value of Pixel from Nose Area:  PXL­R­for Red value PXL­G for Green value PXL­B for Blue value

13

Collection of images of those objects: After selecting the features from the images, we gather the images

We have collected this type of images of 50 numbers. For saving the images we are not including all of them here.

14

5. Observe the presence of those features in images and figure out ways to extract these features. After that, we apply the feature of step 3 into the step of step 4. And by this way we made our input vectors. For this calculation we use the GIMP software for measuring the distance between the points.

Through this software, we take all the features from the images and from all the images of it.

6.Collection of training set of 50 objects and the collection those features. By using the above software, we make the measurement of the images and store them at a word file with the corresponding ID as below: The Image ID:15 The image Size: Breadth of Right Eye: Height of Right Eye:

352X480 pixel BRE.........62.2 HRE.........23

15

Breadth of Left Eye: Height of Left Eye: Length of Right Eyebrow:  Length of Left Eyebrow: Inner breadth of Nose: Length of nose:  Distance of nose to Lip: Length if lip: Height of Lower Lip: Breadth at Lip Zone:  Face Breadth at Ear height:  Height of Forehead:        Gender:

BLE.........65.4 HLE.........26 REB.........77.3 LEB.........69 IBN.........46 LNO.........92 DNLP........31 LLP.........94.1 HLP.........25 BLZ.........223.1 FBEH........257 HFH.........117 Male/Female:­F

Value of Pixel from Nose Area:                 

PXL­R........227 PXL­G........167 PXL­V........141

Image ID 22

The Image ID:22 The image Size: 352X480 pixel Breadth of Right Eye: BRE.........58.2 Height of Right Eye: HRE.........27 Breadth of Left Eye: BLE.........54.2 Height of Left Eye: HLE.........21 Length of Right Eyebrow: REB.........84.3 Length of Left Eyebrow: LEB.........81 Inner breadth of Nose: IBN.........55 Length of nose:  LNO.........97 Distance of nose to Lip: DNLP........26.1 Length if lip: LLP.........113 Height of Lower Lip: HLP.........32 Breadth at Lip Zone:  BLZ.........229 Face Breadth at Ear height:  FBEH........253.1 Height of Forehead:  HFH.........117       Gender: Male/Female:­M Value of Pixel from Nose Area:                 

PXL­R........241 PXL­G........195 PXL­V........171

Image ID 37 The Image ID:37 The image Size: 352X480 pixel Breadth of Right Eye: Height of Right Eye: Breadth of Left Eye:

BRE.........58.3 HRE.........21 BLE.........59.1

16

Height of Left Eye: HLE.........22 Length of Right Eyebrow: REB.........94 Length of Left Eyebrow: LEB.........87 Inner breadth of Nose: IBN.........43 Length of nose:  LNO.........91 Distance of nose to Lip: DNLP........27 Length if lip: LLP.........88.1 Height of Lower Lip: HLP.........28 Breadth at Lip Zone:  BLZ.........214 Face Breadth at Ear height:  FBEH........237 Height of Forehead:  HFH.........118       Gender: Male/Female:­M Value of Pixel from Nose Area:                 

PXL­R........219 PXL­G........163 PXL­V........150

7. Analization those vectors to figure the complexity of separation or recognition or clustering. After collecting the features from the images, we select the features that make more images uniquely identified. Suppose, if we select the color of hairs for the images, we will get mostly same value from the images. This will not make the images uniquely identified. So, we select the features as the figure given above of the feature selection. as, the length of the nose of the images may be of different size from each other and that remove the complexity of separation or recognition or clustering. In our model building, we have used 17 dimension features vector that maps into 50 dimensional o/p vector. As it is so large for proper annalization. As, the input vector contains 17 data for recognizing a class. If we want to pictorize the analysis, it is not possible to show depictly. It is just the concept for our project. If we do not include any one feature on the feature vector, the reorganization power is gradually decreased. Suppose, if we do not include, the distance from nose to leap the reorganization power diminished to 23 out of 50 only. By these, practical application of our concept we have reached t our present condition. As, the o/p of our model is not the value based, we can not show it on on the graph.

17

8. Design of appropriate neural network with the training vectors. After that we use the Predict demo, the demo version of Neural Works software. We know, for building the neural network, we need to use the excel file. That excel file is made up of the information collecting from all the features vectors of the images. The data are given in te file Data.xls. After that we run the excel file through Predict Demo. We follow the steps given below gradually. Select->Program Files->Microsoft Office-> Excel-> Open the Corresponding Excel file. Afetr that select the Predict Menu from the Menulist. Select New from the Predict Menu.

18

19

20

21

22

9. Training the neural network with the training vectors. For training the Network we also get the help of the software. We train the network as well as test the network as the following way:

23

24

10. Selection of he 10 objects to test the training network. And perform testing to asses the performance of the training neural network. After all of them, we take the testing vector at sheet 2 of the same file. And run the network for testing the output for all of them. In this case we will get the similarity among the given input and the images of the Database( that is given before)

25

26

Performance Measurement:

Whenever, we run the model for testing we get the abov window as a performance report. From the above we come to know about the performance of our model: Here, we see the total test is performed in 4 steps: 1. Partitioning Data: 2. Analyzing Fields 3. Selecting Variables and training 4. Evaluating Models

Partitioning data: At this step, at first the given data are partitioned into required groups for the further processing. It requires .77 second to perform.

Analyzing Fields: After that, all the given Input features are treated as fields. From the analyzing, the model tries to learn the relativity relationship from the data. It requires 17.43 seconds to perform.

Selecting variables and training: After analyzing the fields, the required variables are selected to build the network and for further training. It performs with in 43.07 seconds. 27

Evaluating Models: After selection of the data from the imput vectors, the model is evaluated. This requires . 77 second to perform. After all of the, processing, when we run the model for the input of the given test, we can see that only 34 images can be recognized out of 50 images. And the performance can be given at the following table:

Figure: Performance table

Analysis of output model: For analyzing the output model we get the help of our simulator:

After clicking on the Run button we get the output for the given test set. In this case, we get the similar type of values of the given input of before.

28

Future Target: We can improve this project as an automated system; i.e camera will automatically capture the images from of the object. After that applying computer vision method, we can measure the distance among the various point easily and correctly. That will provide the more absolute result. If we become more concise and smart to select the feature of the input vector, we will get the most distinguish result. Though the entire targets are so enough to perform, we can try gradually to our dream.

Conclusion: For the shortage of time, we are not able to reach peak of out target. And as it was the first project, we were not good at for all steps of it. And we think if we use another software for simulating it, we get different taste of output. As the used software is a demo version, we were not able to get all the fexiability of the software. So, at the next time at first we target to get the full version of the software After all, through it we have got the taste of using Artificial Neural Network. And we think this project has created a thirst of creating ANN for various complex calculation in our mind.

29

Related Documents

Report File
June 2020 0
File
November 2019 29
File
April 2020 14
File
May 2020 13
File
November 2019 22
File
May 2020 10