A Name Recommendation Photo Album Using Probability Neural Network Ding-Hrong Chen and Shiang-En Tang Department of Computer Science and Information, Southern Taiwan University, TAIWAN chendh@mail.stut.edu.tw, m95g0223@webmail.stut.edu.tw Abstract In this paper, we propose a name recommendation mechanism used in the photo albums. We apply a light compensation method to improve the image quality, and then a face detection algorithm is applied to detect the face region in each image. We adopt the modified probabilistic neural network (MPNN) to train the sample faces for each individual’s photos. After training, the new adding face photos can be recognized and a name tag is recommended to this face. The experiments show a promising result for an accurate name tag annotation. The proposed method is very appropriate to provide a name recommendation function applied in photo album. 1. Introduction 2. The face recommendation architecture The proposed system architecture is shown in Fig. 1. The proposed system contains two steps: the first is the pre-processing step and the second is the name recommendation system. For the training purpose, the face positions in each photo are obtained by user selection. A lighting compensation is used as a preprocessing step to normalize the brightness distribution to adjust each training photo to the same contrast range [6]. We applied the OpenCV library to detect the human faces. A standard face detection technologies for facial image normalization [10][2] is also used for further refinement. After pre-processing, we will use the PNN to train each sample faces. By the PNN learning and recalling process, the training samples are used for the face detection phase. Pre-Processing Due to the mass amount population of digital photos, the face detection and face recognition technology [5][3] has been highly applied in many different fields. If a face detection and name tag annotation mechanism can be added into web photo albums, it will be more convenient for users to search a specific photo via different ways. The face recognition technology is also used in public transportation safety monitoring in 2008 Beijing Olympic[9]. In this paper, we present a new method that locate and annotate the human faces in each photos. The modified probability neural network (MPNN) approach is used to train the annotated example faces. After training, if a new photo is added to the album, the system will detect the new face, and gives this face a name tag from the existed database. This paper is organized as follows. In Section 2, we describe the proposed system architecture. The face recommendation method that obtains the new name tag and their ranking is presented in Section 3. In Section 4, we present the training result of the proposed method. The conclusion and future work are described in Section 5. Sample Face Images Light Compensation Normalized Sample Faces Face Detection Name Tags Learning New Adding Images Recalling Name Recommendation Modified PNN Figure 1. System flowchart 3. Face recommendation algorithms The above described pre-processing step can obtain the sample faces, and this result will be treated as the PNN input data. According the different user categories, we give the name tags for these sample face data. When a new photo is added to the album, a proper name will be assigned to this photo. 3.1 Probabilistic neural network (PNN) hi ci f i ( X ) h j c j f j ( X ) j i, The probability neural network is proposed by D. F. Specht for solving the problem of classification in 1988 [1]. The theoretical foundation is developed based on Bayes decision theory, and implemented in a feedforward network architecture. The Bayesian decision theory is the principle concept of classification that uses statistical inference, mainly to find the maximum expectation of the smallest risk. The Bayes theory is used to solve the classification problem in huge amount raw data, but a problem is occurred that we need to know the probability density function in advance. To solve this problem, Parzen window method was proposed by Parzen in 1962[4]. Parzen uses a feature vector to estimate a class distribution; the training data for each sample is represented by an eigen-value as the center of the Gaussian curve. The data point is assigned to a specific class by comparing the probability density function values to each class. The probability neural network architecture is a four-neuron layers network model as shown in Fig. 1. These four layers include the input unit, the pattern unit, the summation unit and the output unit. The input unit contains a number of input image data and the pattern unit node number equal the number of training data, the output unit represents the classification results. X1 X2 X3 where hk is the prior probability of class k; ck is the Input Unit With the above equation, X and W ip have been normalized with their unit length: ( X W ip ) t ( X W ip ) Pi ( X ) exp 2 2 The summation unit will be calculated from the pattern unit by summarizing and averaging the output of N i neurons to generate an output probability vector, I1 P1 I3 I2 P2 P3 S1 P4 S2 O1 Pattern Unit Summation Unit Output Unit Fig. 1 The probabilistic neural network architecture The raw data are divided into k classes, which represent the k situations to be explained. Each class has m-dimensional observations, i.e. X [ X 1 , X 2 , X m ] . The following Bayes decision rule is used to classify the raw data into k classes: representative center that belongs to the class k, but the loss function has been a miscarriage of justice; and f k is the probability density function of class k The probability density function for each class can be expressed as follow: ( x xij ) t ( x xij ) 1 1 Ni f i ( x) exp d N i j 1 2 2 d 2 (2 ) where fi (x) denotes the dimension of training vector, is the smoothing parameter and d is the dimension of training vector. N ij denotes the total number of training vector in category i , and xij is the neruon vector and x is test vector. When a new input image X is added, the pattern unit will be calculated with the individual weight vector W ip of the product to make a nonlinear transformation to Z i : Z i X W ip . The probability of neural network with back propagation networks can approximate any continuous nonlinear function. In this paper, we use the Gaussian function as the activation function: Z 1 P( Z i ) exp ( i 2 ) i.e. Si ( X ) 1 Ni ( X W ip ) t ( X W ip ) exp 2 2 p 1 Ni Finally, one or many larger values are chosen as the output unit that indicates these data points are in the same class via a competition transfer function from the output of summation unit [7], i.e. O( X ) arg max( Si ( X )), i 1,2, , m 3.2 Modified probabilistic neural network The PNN can process the classification problem effectively, but it’s a hard clustering method. Zaknick proposed a modified probabilistic neural network (MPNN) architecture in 1995[8]. The major difference between MPNN and PNN is that MPNN calculates the output unit with a “centroid method” instead of the “winner-take-all” method used in PNN. If f i (x) is the Gaussian activation function, and There are 5 users and their corresponding name tags are used in this experiment. We divide the image database into two sets. One is used for training, and the other is used for recalling. The image sets are as shown in Fig. 5. yi is the representative of pattern unit, then the output unit is computed by: M Oi Z y f ( x) i 1 M i Z i 1 i i i f i ( x) 4. Experimental Results We adopt the experimental samples of this study from the HiAnts[11]. There are total 5110 photos in the album; and 2697 photos have been annotated as the training samples. The experimental steps are performed with image pre-processing and face detection. Then the modified probability neural network is used as the training kernel. Fig. 2 shows a 16x16 standard face and Fig. 3 is the result of the face detection using OpenCV library. We also adopt the light compensation to make the image quality homogenous as shown in Fig. 4. Fig. 2 Standard image face Fig. 3 Sample faces detection (a) (b) Fig. 4. (a) The images before light compensation (b) The images before light compensation (a) (b) Fig. 5. (a) The training image set (b) The images used in the recalling experiments We randomly pick 10 training samples of 5 categories in the training image set to train the MPNN, and then chose other un-recommended 50 images in the recalling image set to test the name recommendation performance. We repeat this process 5 times and compute its average recalling rate as shown in Table. 1. Table 1 shows the recalling rate for a new testing face image is more than 70%. Table 1. The recalling success rate user no. A B C D E 1 11 8 9 12 10 2 8 11 11 10 10 3 8 7 10 11 14 4 9 11 6 10 14 5 8 12 9 10 11 error 15 14 12 11 7 Recalling rate 70% 72% 76% 78% 86% We perform another experiment to validate the recognition accuracy. For each specific user, we selected arbitrary 20 images for testing. We want to know the accuracy rate of a testing image is annotated correctly to its category. The result is shown in Table 2. Table 2. The recognition accuracy for 5 categories user A B C D E Accuracy A 0.78 0.70 0.73 0.66 0.75 75% B 0.68 0.86 0.72 0.75 0.76 100% C 0.72 0.75 0.76 0.73 0.75 30% D 0.63 0.74 0.70 0.78 0.70 85% E 0.73 0.74 0.73 0.69 0.79 75% The result in Table 2 shows that the user’s photo has better recognition accuracy in his own category, but the difference is not significant comparing with other categories. For example, the recognition accuracy of user C is almost equal in every category, which will make a miss classification in the recalling. One of the possible reason is the facial expression of each users makes the training performance is not so good. We also test the different face sizes used in training. Table 3 shows the size effects for the recalling experiment. Table 3. Recommend result of different sizes Training Test Correct Size samples samples Rate 16×16 50 50 41 [2] G.T. Suen,” A Study on Personal Identification by Face Recognition Based on Neural Networks” Master Thesis, National Kaohsiung First University of Science and Technology,Taiwan,2003. [3] Mpiperis, I.,Malassiotis, S.,Strintzis, M.G., “3-D Face Recognition With the Geodesic Polar Representation”, IEEE Trans., Information Forensics and Security, Vol. 2, pp 537 – 547, Sept. 2007. [4] Parzen, E, “On estimation of a probability density function and mode.” Annals of Mathematical Statistics, Vol. 33, pp. 1065-1076, 1962. [5] Pentland, T. Choudhury, “Face Recognition for Smart Environments,” Computer, Vol. 33, no. 2, pp. 50-, Feb. 2000. [6] T.S. Hung, “A Smart Digital Surveillance System with Face Tracking and Recognition Capability” Master Thesis, University of chung yuan christian,Taiwan,2004. Accuracy 82% 32×32 50 50 38 76% 64×64 50 50 37 74% 5. Concluding remarks In this paper, we proposed a MPNN method for human face name recommendation used in album. A light compensation method is performed to adjust the image contrast distribution to provide a much more homogenous training patterns. We use a number of standard faces with name tags to train the MPNN. After training is complete, the MPNN can detect other images with name tags and suggest a proper name to this face. The MPNN owns several advantages as the training kernel. The training speed is fast and that’s make it suitable for a large amount of image dataset. The choice of the sample faces will also affect the training result. Although this study is still need to improve its consistence and integrity, the proposed method is very appropriate to provide a name recommendation function applied in photo album. 6. References [1]D. F. Specht, “Probabilistic Neural Network for Classification, Mapping, or Associative Memory,” Proceeding of the IEEE International Conference on Neural Networks, Vol. 1,pp.525-532,1988. [7] Whei-Min Lin, Chia-Hung Lin, and Zheng-Chi Sun, “Adaptive MultipleFault Detection and Alarm Processing for Loop System with Probabilistic Network,” Power delivery, IEEE Transactions on, Vol.19, Issue:1, Jan. 2000 Pages:6469. [8] Zakinch, A. “Introduction to the Modified Probabilistic Neural Network for general signal processing applications” IEEE Transactions on Signal Processing, 1998, Vol. 46, pp. 1980-1990. [9] http://www.eepw.com.cn/article/62775.htm [10] http://pages.cs.wisc.edu/~beechung/facedet/report.html 123 [11] http://hiants.tw