Final4 ٣٨ Al-khwarizmi Engineering Journal Al-Khwarizmi Engineering Journal, vol.1, no.1,pp 38-45, (2005) Human Face Recognition Using GABOR Filter And Different Self Organizing Maps Neural Networks Dr. Tarik Zeyad Electrical Engineering Dept./College of Engineering/ University of Baghdad Abstract. This work implements the face recognition system based on two stages, the first stage is feature extraction stage and the second stage is the classification stage. The feature extraction stage consists of Self-Organizing Maps (SOM) in a hierarchical format in conjunction with Gabor Filters and local image sampling. Different types of SOM’s were used and a comparison between the results from these SOM’s was given. The next stage is the classification stage, and consists of self-organizing map neural network; the goal of this stage is to find the similar image to the input image. The proposal method algorithm implemented by using C++ packages, this work is successful classifier for a face database consist of 20 people with six images for each person and a measure of the time differences between the methods is given. Keyword: Self-Organizing Map, Gabor filter. Introduction. Face recognition may seem an easy task for humans eyes providing that the recognized face is seen before, and yet computerized face recognition system still cannot achieve a completely reliable performance. The difficulties arise due to large variation in facial appearance, head size, orientation and change in environment conditions. Such difficulties make face recognition one of the fundamental problems in pattern analysis. In recent years there has been a growing interest in machine recognition of faces due to potential commercial application such as film processing, law enforcement, person identification, access control systems, etc [1]. A complete conventional human face recognition system should include three stages. The first stage involves detecting the location of face in arbitrary images. The second stage requires extraction of pertinent features from the localized image obtained in the first stage. Finally the third stage involves classification of facial images based on the derived feature vector obtained in the previous stage [2]. A number of image classification systems based on the combination of outputs of different classifier systems have been proposed. Different structures for combining classifier systems can be grouped in three configurations. In the first group, the classifier systems are connected in cascade to create pipeline structure. Tarik Zeyad /Al-khwarizmi Engineering Journal ,vol.1, no. 1,PP 38-45 (2005) ٣٩ In the second one, the classifier systems are used in parallel and their outputs are combined named parallel structure. Finally the hybrid structure is a combination of the pipeline and parallel structures. [3]. Finally in this work self- organizing map (SOM) neural network is used as the classifier. Recently SOM neural networks have been found to be very attractive for many engineering problems. An important property of SOM neural networks is that they form a unifying link among many different research fields such as function approximation, regularization, noisy interpolation and pattern recognition. Gabor Wavelets. Dennis Gabor first proposed Gabor functions as tools for signal detection in noise. Gabor filter showed that there exists a “quantum principle” for information; the conjoint time- frequency domain for 1- D signals must necessarily be quantized so that no signal or filter can occupy less than certain minimal area in it. However, there is a trade off between time resolution and frequency resolution. Gabor discovered that Gaussian modulated complex exponentials provide the best trade off. For such a case, the original Gabor elementary functions are generated with a fixed Gaussian, while the frequency of the modulating wave varies [4]. Gabor filters, rediscovered and generalized to 2D, are now being used extensively in various computer vision applications. Daugman [5] generalized Gabor function to the following 2D form in order to model the receptive fields of the orientation selective simple cells: ( )         − σ =Ψ σ σ 22 2 2 2 2 22 eee k x xkj xk i i i i rr rrr r …..(1) Each iΨ is a plane wave characterized by the vector ik r enveloped by a Gaussian function, where σ is the standard deviation of this Gaussian. The center frequency of ith filter given by the characteristic wave vector is shown below [5]:       θ θ =     = µ µ sink cosk k k k v v iy ix i r …..(2) Having a scale and orientation given by (kv, θµ), the first term in the brackets (1) determines the oscillatory part of the kernel, and the second term compensates for the DC value of the kernel. Subtracting the DC response, Gabor filters becomes insensitive to the overall level of illumination [5]. Since the Gabor wavelet transform is introduced to computer vision area, one of the most important application areas for 2D Gabor wavelet representation is face recognition. In the U.S. Government activity (FERET program) to find the best face recognition system, a system based on Gabor wavelet representation of the face image is performed among other systems on several tests. Although the recognition performance of this system shows qualitative similarities to that of humans by now means, it still leaves plenty of room for improvement. [6]. Gabor filter can capture salient visual properties such as spatial localization, orientation selectivity, and spatial frequency characteristics. Considering these excellent capacities and its great success in face recognition, Gabor features are chosen to represent the face image. Gabor filters are defined as follows: Tarik Zeyad /Al-khwarizmi Engineering Journal ,vol.1, no. 1,PP 38-45 (2005) ٤٠ ( )         − σ =Ψ σ σ 22 2 2 2 2 22 eee k x zkj zk v,u v,u v,u i r rr r …..(3) where u j vv,u ekk φ= and v max v f k k = gives the frequency and ( )π∈φπ=φ ,,u uu 08 gives the orientation and z=(x,y). zjk v,ue is the oscillatory wave function, whose real part and imaginary part are cosine function and sinusoid function respectively. In equation (2), v controls the scale of Gabor filter, which mainly determines the center of the Gabor filter in the frequency domain; u controls the orientation of Gabor filters [4]. The Gabor filters are used with the following parameters: five scales v ε { 0 , 1 , 2 , 3 , 4 , 5 } and eight orientations u ε { 0, 1 , 2 , 3 , 4 , 5 , 6 , 7 } with σ = 2π, maxk = π / 2, and f= 2 [7]. The Proposed Face Recognition Method The objective of this section is to put a block diagram which stands for the suggested model, convert each block into a suitable mathematical model , and finally define model parameters in order to improve its qualification , Figure (1) shows the proposed face recognition model. Tarik Zeyad /Al-khwarizmi Engineering Journal ,vol.1, no. 1,PP 38-45 (2005) ٤١ Step -1- step-3- step -2 B - The feature extraction model. step -4 C - Classification model. Gabor Feature Extraction. The Gabor filter has been successfully used in conjunction with the Multilayer Self-Organizing Maps (MSOM) as a feature extraction for face recognition. Gabor filters are orientation and frequency sensitive band pass filters that provide optimal resolution in both the space and spatial-frequency domains. For these reasons, they are suitable for extracting frequency dependent information like edge features from a small area. Gabor filters have also been used in other pattern recognition systems. The two- dimensional Gabor filter was described by equation (1). Here linear and nonlinear shapes were chosen for the analysis using Self-Organizing Maps. The linear shapes were squares, circles and hexagonal grids. The nonlinear grids were taken in a shape close to the cross. The feature extraction system is a combination of the Gabor filter and three self-organizing maps (SOM). Each time the system is applied to an image the output is a set of 500 feature values, corresponding to 500 x and y position on the original images. The two 2-dimension SOMS are trained by the unsupervised method, with each node storing the eight values corresponding to a Gabor jet. The 1- dimension SOM has 256 nodes and each map has six values. Local Image Sampling. Local Image Sampling is a used as an attempt to identify distinguishing features by presenting a small portion of the image to a system such as a Self- Organizing Map. This SOM job is then to identify the presented image portion as a useful feature. Thus by Gabor feature extraction Image sampling 1- Dimension SOM 2- dimension SOM SELF ORGANIZING MAP (SOM) Linear and nonlinear Tarik Zeyad /Al-khwarizmi Engineering Journal ,vol.1, no. 1,PP 38-45 (2005) ٤٢ unsupervised learning the SOM will learn what different image portions represent. This is however not an ideal form of input into a one dimensional single layer SOM classifier as used in this work. There are two methods for obtaining the Image Sample Vectors. These are described as follows: 1. The first method simply creates a vector from a local window on the image using the intensity values at each point in the window. Let xij be the intensity at the ith row and the jth column of the given image. If the local window is a square of sides 2W + 1 long, centered on xij, then the vector associated with this window is simply [xi-W,j-W, xi-W,j-W+ 1, ... xij, ... xi+ W,j+ W-1, xi+ W,j+ W]. 2. The second method creates a representation of the local sample by forming a vector of the intensity of the centre pixel and all other pixels within the square. The vector is given by [xij – xi-W,j-W, xij – xi-W,j-W+ 1, ... xij, ... xij – xi+ W,j+ W-1, xij – xi+ W,j+ W]. The resulting representation becomes partially invariant to variations in the intensity of the complete sample. Self Feature Clustering Self- organizing Maps. Self-Organizing Maps (SOM) were initially developed by Kohonen [8]. The SOM can be arranged to perform classification and feature extraction, although in this section the SOM is only presented as a feature extraction method, in the next section the SOM will be re-examined as a classifier. The theoretical study of the SOM will be explained in the next step, as this knowledge is not essential when comparing feature extraction methods. The SOM is an ideal method to use in conjunction with another feature extraction such as the Gabor filter, or local image sampling as the feature values are topologically organized without using any prior knowledge. The 2-dimension SOM’s are trained by the unsupervised method, which is explained in the next step, with each node storing the eight values corresponding to a Gabor jet. The 1- dimension SOM has 256 nodes and each map has six values. The main advantages of this system are the reduced training time; data compression rate, distortion tolerant feature extraction, and the ability to train unsupervised the feature extraction stage. Further analysis and expansion in terms of the face database size is required so that more quantitative results can be obtained to further determine the potential of SOM-based feature extraction and model-free networks for face recognition. Classification. The Self-organizing Map as a Classifier. The Self-Organizing Map (SOM) as introduced by Teuvo Kohonen is one of the most widely used neural network structures in pattern recognition. The SOM has also been applied to various other applications such as speech analysis, process control systems, robotics and telecommunications [8]. Self-Organizing Maps are generally less computationally expensive and perform better with large complex data compared to the traditional neural networks. The learning and topological arrangement of the Self-Organizing Map has been observed to be similar to the behavior observed in higher animals’ primary visual cortex. Thus going back to the original motivation of neural networks: to model the operation of the human brain. Tarik Zeyad /Al-khwarizmi Engineering Journal ,vol.1, no. 1,PP 38-45 (2005) ٤٣ Algorithm:- 1. Specify the type of the grid used in the SOM. 2.[ Initialize weights] : Initialize weights wij (1 < i < N) to small random values. Set the initial radius of the neighborhood around node j to Nj(t). 3.[Present input]: The vector x0, x1, …, xN-1, where xi is the input to node j at time t. 4. [Calculate distance dj] : Calculate distance between the input and each node j, given by Dj = ΣN [xi(t) – wij(t)]2 . 5. [Determine dj*]: Determine dj* which is the minimum value of dj. 6.[Update weights] Update weights for node j* and its neighbors defined by Nj*(t). New weights are: wij(t+1) = wij(t) + a(t) [xi(t) – wij(t)] for j in Nj*(t) where a(t) is a learning rate and both a(t) and Nj*(t) decrease in t. 7. [Repeat]: Repeat by going to step 2 if the stopping condition, (t = b) is not satisfied, where b represents the total number of iterations. The time dependent values of a(t) and Nj(t) are calculated by the following RESULTS OF TESTING PROPOSED ALGORITHM. In this section, the properties of the suggested face recognition system are discussed using (20) different persons pictures. Each person has (6) different images. Each of these images is of 256 × 256 pixel. For the training of the feature extraction methods, Gabor and Local Sampling, the number of reported iterations is constant. This is because for every time an image is used to train the three SOMS. The constant training time for all the input images is required; each SOM is actually presented with 500 sets of input data and is required to update the SOMs 500 times for each image. The two 2-D SOMs in the feature extraction contain (10x10) nodes and each node store eight values corresponding to Gabor jets and the one-dimensional SOM has 256 nodes and stores six values. In local image sampling training, the number of features that is used is larger than for the Gabor feature, the two 2- dimension SOM contains (10×10) node and one dimension contains 256 nodes. This state of programs uses 7 exemplars. The following figure gives the output of a square linear SOM grid. Figure (1). The program output with parameter (0.1) learning rate, 140 exemplars, and 0.9 threshold. Conclusions. This work presents a human face recognition system based on the extraction of features using several types of SOM’s. For the linear grids SOM’s the hexagonal grid SOM gave the best results between the three linear grids used in the recognition procedure (square, circle and hexagonal) since the square contains more neighbors than the hexagonal and the circle grid contains neighbors on their circumference. The training procedure using the hexagonal neighbor is less than that of the other two linear grids used. Tarik Zeyad /Al-khwarizmi Engineering Journal ,vol.1, no. 1,PP 38-45 (2005) ٤٤ The nonlinear SOM grid gave more accurate recognition than all linear grid SOM’s. the number of neighbors were less than the neighbors in all the linear grids. Even so, the nonlinear SOM grid gave a better recognition speed and results. The total speed of the recognition process in all the grid methods depends on the size of the database used in the recognition process which were smaller in the nonlinear case. References 1. R. Brunelli, T. Poggio. Face Recognition: Features versus Temples. IEEE Transactions on Pattern Analysis and Machine Intelligence , 11(6):1042– 1052, 1993. 2. Haddadnia, "N-Feature Neural Network Human Face Recognition", Electrical and Computer Engineering Department, University of Windsor, 1997. 3. S. Marcelja, “Mathematical Description of the Responses of Simple Cortical Cells”, J. Optical Soc. Am., Vol. 70, pp. 1297-1300, 1980. 4. D. Gabor, “Theory of Communication”, J. IEE, vol. 93, , pp. 429-459, 1946. 5. D. Perkins, “ A definition of Caricature and Recognition”, Studies in the Anthropology of Visual Communication, Vol. 2, pp. 1-24, 1975. 6. L. Fausett, “Fundamentals of Neural Networks”, Prentice Hall International, Inc., 1994 7. P. Yang, S. Shan, W. Gao, " Face Recognition Using Ada- Boosted Feature", Institute of Computing Technology of Chinese Academy Science, 2000. 8. T. K. Ho, J. J. Hull and S. N. Srihari, “Decision Combination in Multiple Classifier Systems”, IEEE Trans. On Patt. Anal. and Mach. Intel., Vol. 16, No. 1, pp. 66-75,Jan. 1994 9. B. Kepenekci, " Face Recognition Using Gabor Wavelet Transform'”, A Thesis to the Graduate School of Natural Sciences of the Middle East Technical University, the Department of Electrical and Electronics Engineering, 2001. Tarik Zeyad /Al-khwarizmi Engineering Journal ,vol.1, no. 1,PP 38-45 (2005) ٤٥ وانواع مختلفة من الشبكات العصبية GABORتمييز االوجه البشرية باستعمال المرشح من نوع التنظيم الذاتي طارق زياد.د جامعة بغداد/كلية الهندسة/قسم الهندسة الكهربائية :الخالصة قاعدة بيانات والثانية هي المرحلة األولى هي بناء . تم في هذا البحث بناء منظومة لتمييز األوجه متكونة من مرحلتين في مرحلة بناء قاعدة البيانات تم استعمال شبكات عصبية نوع التنظيم الذاتي . هذه في عملية التمييز استعمال قواعد البيانات وبناءا عليه تم االستنتاج بأن النموذج الالخطي يعمل أفضل من ) خطية وال خطية(بأنواع مختلفة وتم المقارنة بين هذه األنواع . GABORالنموذج الخطي وكذلك استخدام المرشح نوع كلغة برمجة في ++Cتم استخدام قاعدة بيانات متالفةمن عشرين شخص ولكل شخص تم استخدام ستة صور مع استخدام لغة . بناء المنظومة