Integratng Neural Networks and PCA for Fast Covert Survellance Hazem M. El-Bakry, and Mamoon H. Mamoon Faculty of Computer Scence & Informaton Systems, Mansoura Unversty, EGYPT E-mal: helbakry0@yahoo.com Abstract In ths paper, a fast algorthm for covert survellance s presented. Such algorthm uses fast neural networks (FNNs) for human face detecton. The proposed FNNs apples cross correlaton n the frequency doman between the nput mage and the weghts of neural networks. For the purpose of effcent observaton and montorng by hgher admnstraton, we need to transfer the detected face to hgher admnstraton. Therefore, effcent compresson algorthm s needed. Here, the hybrd method k-pca s used. It s proved mathematcally and practcally that the proposed combned algorthms are effcent for face detecton and compresson. Keywords: Image Compresson, Vector Quantzaton, k-pca, Cross Correlaton, Frequency Doman, Covert Survellance I. Introducton Bometrcs offers new solutons for personal dentfcaton. Such solutons are user frendly and allow secure access. Bometrcs works by nspectng bologcal features of ourselves that dstngush us from others. Examples nclude fngerprnts, hand geometry, and voce recognton. It would be preferable to base recognton decsons upon features whch had very lttle genetc varatons, and stable over lfetme of the ndvduals. Among dfferent bometrcs technques, face recognton s the only sutable method for polce covert survellance. The human face s a complex pattern. Fndng human faces automatcally n a scene s a dffcult yet sgnfcant problem. It s the frst step n fully automatc human face recognton system. Face detecton s the fundamental step before the face recognton or dentfcaton procedure. Its relablty and tme response have a major nfluence on the performance and usablty of the whole face recognton system. For web ndexaton applcatons, the processng tme must be kept as low as possble as the number of mages on the web ncreases contnuously [19]. Among other technques [], neural networks are effcent face detectors [19-1]. admnstraton for montorng. Therefore, an effcent compresson algorthm s needed. In recent years, prncpal component analyss (PCA) has attracted great attenton n mage compresson. However, snce the compressed mage data nclude both the transformaton matrx (the egenvectors) and the transformed coeffcents, PCA cannot produce the performance lke DCT (dscrete cosne transform) n respect of compresson rato. In usng DCT, we need only to preserve the coeffcents after transformaton, because the transformaton matrx s unversal n the sense that t can be used to compress all mages. The authors [9-1] buld a unversal PCA by proposng a hybrd method called k-pca. The basc dea s to construct k sets of egenvectors for dfferent mage blocks wth dstnct characterstcs usng some tranng data. The k sets of egenvectors are then used to compress all mages. Vector quantzaton (VQ) s adopted to splt the tranng data space. Ths paper s organzed as follows: fast face detecton by usng hgh speed neural networks s gven n secton. In secton 3, the k-pca approach by combnng VQ and PCA s dscussed. Concluson s gven n secton 4. After face recognton, the detected face s requred to be transferred through computer networks to hgher. Fast Face Detecton by usng Hgh Speed Neural Networks ISSN: 1790-5117 161 ISBN: 978-960-474-179-3
Frst neural networks are traned to classfy sub-mages whch contan face from those whch do not and ths s done n the spatal doman. In the test phase, each submage n the nput mage (under test) s tested for the presence or absence of human faces. At each pxel poston n the nput mage each sub-mage s multpled by a wndow of weghts, whch has the same sze as the sub-mage. Ths multplcaton s done n the spatal doman. The outputs of neurons n the hdden layer are multpled by the weghts of the output layer. When the fnal output s hgh ths means that the sub-mage under test contan human moton and vce versa. Thus, we may conclude that ths searchng problem s cross correlaton n the spatal doman between the mage under test and the nput weghts of neural networks. In ths secton, a fast algorthm for detectng human moton based on two dmensonal cross correlatons that take place between the tested mage and the sldng wndow (0x0 pxels) s descrbed. Such wndow s represented by the neural network weghts stuated between the nput unt and the hdden layer. The convoluton theorem n mathematcal analyss says that a convoluton of f wth h s dentcal to the result of the followng steps: let F and H be the results of the Fourer transformaton of f and h n the frequency doman. Multply F and H n the frequency doman pont by pont and then transform ths product nto spatal doman va the nverse Fourer transform [14-18]. As a result, these cross correlatons can be represented by a product n the frequency doman. Thus, by usng cross correlaton n the frequency doman a speed up n an order of magntude can be acheved durng the detecton process [14-18]. In the detecton phase, a sub-mage X of sze mxz (sldng wndow) s extracted from the tested mage, whch has a sze PxT, and fed to the neural network. Let W be the vector of weghts between the nput submage and the hdden layer. Ths vector has a sze of mxz and can be represented as mxz matrx. The output of hdden neurons h can be calculated as follows: z m h = g = W (j,k)x(j,k) + b j 1k = 1 (1) where g s the actvaton functon and b s the bas of each hdden neuron (). Eq.1 represents the output of each hdden neuron for a partcular sub-mage I. It can be computed for the whole mage Ψ as follows: h (u, v) = m/ z/ g W (j,k)ψ(u + j,v+ k) + b j = m/k = z/ () Eq. represents a cross correlaton operaton. Gven any two functons f and g, ther cross correlaton can be obtaned by []: g(x,y) f(x,y) = g(m,z)f(x+ m,y + z ) m= z= Therefore, Eq.3 can be wrtten as follows [14-19]: ( Ψ ) (3) h = g W + b (4) where h s the output of the hdden neuron () and h (u,v) s the actvty of the hdden unt () when the sldng wndow s located at poston (u,v) n the nput mage Ψ and (u,v) [P-m+1,T-n+1]. Now, the above cross correlaton can be expressed n terms of the Fourer Transform [14-19]: W Ψ = F 1 ( F( Ψ ) F* ( ) W (5) (*) means the conjugate of the FFT for the weght matrx. Hence, by evaluatng ths cross correlaton, a speed up rato can be obtaned comparable to conventonal neural networks. Also, the fnal output of the neural network can be evaluated as follows [14-19]: q O(u, v) = g = Wo() h (u,v) + bo (6) 1 where q s the number of neurons n the hdden layer. O(u,v) s the output of the neural network when the sldng wndow located at the poston (u,v) n the nput mage Ψ. W o s the weght matrx between hdden and output layer. The complexty of cross correlaton n the frequency doman can be analyzed as follows: 1. For a tested mage of NxN pxels, the D-FFT requres a number equal to N log N of complex computaton steps. Also, the same number of complex computaton steps s requred for computng the D- ISSN: 1790-5117 16 ISBN: 978-960-474-179-3
FFT of the weght matrx for each neuron n the hdden layer.. At each neuron n the hdden layer, the nverse D- FFT s computed. So, q backward and (1+q) forward transforms have to be computed. Therefore, for an mage under test, the total number of the D-FFT to compute s (q+1)n log N. 3. The nput mage and the weghts should be multpled n the frequency doman. Therefore, a number of complex computaton steps equal to qn should be added. 4. The number of computaton steps requred by the fast neural networks s complex and must be converted nto a real verson. It s known that the two dmensonal Fast Fourer Transform requres (N /)log N complex multplcatons and N log N complex addtons [13]. Every complex multplcaton s realzed by sx real floatng pont operatons and every complex addton s mplemented by two real floatng pont operatons. So, the total number of computaton steps requred to obtan the D-FFT of an NxN mage s: whch may be smplfed to: ρ=6((n /)log N ) + (N log N ) (7) ρ=5n log N (8) Performng complex dot product n the frequency doman also requres 6qN real operatons. 5. In order to perform cross correlaton n the frequency doman, the weght matrx must have the same sze as the nput mage. Assume that the nput object has a sze of (nxn) dmensons. So, the search process wll be done over sub-mages of (nxn) dmensons and the weght matrx wll have the same sze. Therefore, a number of zeros = (N -n ) must be added to the weght matrx. Ths requres a total real number of computaton steps = q(n -n ) for all neurons. Moreover, after computng the D-FFT for the weght matrx, the conjugate of ths matrx must be obtaned. So, a real number of computaton steps =qn should be added n order to obtan the conjugate of the weght matrx for all neurons. Also, a number of real computaton steps equal to N s requred to create butterfles complex numbers (e -jk(πn/n) ), where 0<K<L. These (N/) complex numbers are multpled by the elements of the nput mage or by prevous complex numbers durng the computaton of the D-FFT. To create a complex number requres two real floatng pont operatons. So, the total number of computaton steps requred for the fast neural networks becomes: σ=(q+1)(5n log N ) +6qN +q(n - )+qn +N (9) whch can be reformulated as: σ=(q+1)(5n log N ) +q(8n -n ) +N (10) 6. Usng a sldng wndow of sze nxn for the same mage of NxN pxels, q(n -1)(N-n+1) computaton steps are requred when usng tradtonal neural networks for object detecton process. The theoretcal speed up factor η can be evaluated as follows: q(n -1)(N- n+ 1) η = (11) (q+ 1)(5N log N ) q(8n - n + ) + N The theoretcal speed up rato Eq. 11 wth dfferent szes of the nput mage and dfferent n sze weght matrces s lsted n Table 1. Practcal speed up rato for manpulatng mages of dfferent szes and dfferent n sze weght matrces s lsted n Table usng.7 GHz processor and MATLAB. An nterestng property wth FNNs s that the number of computaton steps does not depend on ether the sze of the nput sub-mage or the sze of the weght matrx (n). The effect of (n) on the number of computaton steps s very small and can be gnored. Ths s n contrast to CNNs n whch the number of computaton steps s ncreased wth the sze of both the nput sub-mage and the weght matrx (n). 3. Image Compresson by usng K-PCA By mplementng PCA t s known that, we should buld one partcular transformaton matrx consstng of egenvectors. So, when reconstructng the mage, not only the transformed coeffcents but also the transform matrx s requred. Furthermore PCA s a lnear approach; t cannot approxmate all areas of the mage equally well. In other words, one PCA cannot smultaneously capture the features of all regons. To resolve the above problems, MPC has been studed [- 7]. The procedure s as follows: before PCA, dvde the problem space nto a number of sub-spaces, and then fnd a set of egenvectors for each sub-space. If enough tranng data are gven, MPC can construct a system whch mantans a good generalty. It s nterestng to note that an MPC can be used as a unversal encoder f the generalzaton ablty s hgh enough. In ths case, we do not have to preserve the MPC parameters n the compressed data. Only the transformed coeffcents (the output of the system for each nput mage block) are needed. So far researches have been focused on how to dvde the problem space effcently. In [7,8], Donny proposed an optmally adaptve transform codng method. It s composed of a number of GHA neural networks. Fg. 1 ISSN: 1790-5117 163 ISBN: 978-960-474-179-3
llustrates how the approprate GHA s selected to learn from the current nput vector. The tranng algorthm s as follows [7,8]: Step 1: Intalze (at random) K transformaton matrcesw, W, 1 L, W K, where W j s the weght matrx of the j-th GHA network. Step : For each tranng nput vector x, classfy t to the -th sub-space, f P = W T where. W Px K max P x = (1) j=1 Update the weghts accordng to the followng rule: W new old old = W + αz( x, W ) (13) Where α s the learnng rate and Z s a GHA learnng rule whch converges to the prncpal components. Step 3: Iteratvely mplement the above tranng procedure untl the weghts are stable. In [7], the tranng parameters are: 1) the number of sub-spaces s 64 and ) the number of tranng teratons s 80,000. Note that to use the MPC as a unversal encoder; we must tran t usng many data. The above algorthm clearly s not good enough because t s too tme consumng. In [8], several methods were proposed to speed up the tranng process and decrease the dstorton. These methods nclude growth by class nserton, growth by components addton and tree structured network. The essenta l ssue s that the convergent speed of GHA s very slow [9-1]. To enhance the operaton of PCA, the authors [9-1] proposed K-PCA. The encodng and decodng procedure of the K-PCA method s gven n Fg.. Step 1: Dvde the nput mage nto n n small blocks (n=8). For the entre nput data, fnd an 8-D PCA encoder By so dong, the dmenson of the problem space can be reduced from 64 to 8. j Step : Fnd a codebook wth k (k=64 n our experments) code words usng the LBG algorthm, for the 8-D vectors obtaned n the last step, and record the ndex of each nput vector. Step 3: Based on the codebook, the problem space can be dvded nto k clusters. For each cluster, we can fnd an M-D (M=4) PCA encoder. Step 4: For each nput vector, compress t to an 8- D vector usng the PCA encoder found n Step 1, then fnd the ndex of the nearest code word found n Step, and fnally compress t to an M-D vector. The M-D vector along wth the ndex of the nearest code word s used as the code of the nput vector. The purpose of Step 1 s to reduce the computatonal cost of VQ. Through experments t has been found that an 8-D PCA encoder can represent the orgnal mage very well. The codebook obtaned based on the 8-D vectors performs almost the same as that obtaned from the orgnal 64-D vectors. The above encodng method s called k-pca. Note that f k-pca s traned by usng enough data, t can be used as a unversal encoder, and do not have to nclude the egenvectors nto the compressed data. Thus, the compresson rato can be ncreased. The reconstructon (decodng) procedure s as follows [9-1]: Step 1: Read n the codes one by one. Step : Fnd the bass vectors for the cluster specfed by the ndex, and transform the M-D vector back to the 8-D vector. Step 3: Transform the 8-D vector back to vector, and put t to the mage n order. 4. Conclusons n n -D A new fast algorthm for covert survellance has been presented. Ths has been acheved by performng cross correlaton n the frequency doman between nput mage and the nput weghts of fast neural networks (FNNs). It has been proved mathematcally and practcally that the number of computaton steps requred for the presented FNNs s less than that needed by conventonal neural networks (CNNs). For effcent mage compresson a hybrd approach called k-pca has been used. It s well traned unversal egenvectors act as a common transformaton matrx lke cosne functon n DCT, and the VQ has been used to dvde ISSN: 1790-5117 164 ISBN: 978-960-474-179-3
the tranng data nto k clusters. A pre-pca has also been used to reduce the tme for buldng the VQ codebook. Smulaton results usng MATLAB has confrmed the theoretcal computatons. References [1] Y. Lnde, A. Buzo and R. M. Gray, "An Algorthm for Vector Quantzaton," IEEE Trans. On Communcatons, Vol. 8, No.1, pp.84-95, 1980. [] R. Klette, and Zamperon, "Handbook of mage processng operators," John Wley & Sonsltd, 1996. [3] E. Oja, "A smplfed neuron model as a prncpal component analyzer", J. Math. Bology 15, pp. 67-73, 198. [4] S. Carrato, Neural networks for mage compresson, Neural Networks: Adv. and Appl. ed., Gelenbe Pub,North-Holland, Amsterdam, 199, pp. 177-198. [5] T. D. Sanger, "Optmal unsupervsed learnng n a sngle-layer lnear feedforward neural network", Neural Networks, pp. 459-473, 1989. [6] S. Y. Kung and K. I. Damantaras, "A neural network learnng algorthm for adaptve prncpal component extracton (APEX)", n Proc. IEEE Int. Conf. Acoustcs, Speech, and Sgnal Processng 90, pp. 861-864, (Al-burqurque, NM), Aprl 3-6 1990. [7] R. D. Dony, "Adaptve Transform Codng of Images Usng a Mxture of Prncpal Components". PhD thess, McMaster Unversty, Hamlton, Ontaro, Canada, July 1995. [8] R. D. Dony, "A Comparson of Hebban Learnng Methods for Image Compresson usng the Mxture of Prncpal Components Network" Proceedngs of SPIE, v 3307, Applcatons of Artfcal Neural Networks n Image Processng III, pp. 64-75, 1998. [9] C. F. Lv, Q. F. Zhao, and Z. W. Lu, "A flexble non-lnear PCA encoder for stll mage compresson," Proc. 7th IEEE Internatonal Conference on Computer and Informaton Technology (CIT07), pp. 645-650, Oct. 007. [10] C. F. Lv and Q. F. Zhao, "k-pca: a sem-unversal encoder for mage compresson," Internatonal Journal of Pervasve Computng and Communcatons, Vol. 3, No., pp. 05-0, 007. [11] C. F. Lv and Q. F. Zhao, "e-lbg: an extended LBG algorthm for constructng unversal k-pca," WSEA Trans. on Sgnal Processng, Issue 3, Vol. 1, pp. 45-431, 005. [1] C. F. Lv and Q. Zhao, " A unversal PCA for Image Compresson," Proc. of the nternatonal Conf. on Embedded and Ubqutous, Nagasak, Japan, 005, pp. 910-919. [13] J. W. Cooley and J. W. Tukey, An algorthm for the machne calculaton of complex Fourer seres, Math. Comput. 19, 1965, pp. 97 301. [14] H. M. El-Bakry, and Q. Zhao, Speedng-up Normalzed Neural Networks for Face/Object Detecton, Machne Graphcs & Vson Journal (MG&V), vol. 14, No.1, 005, pp. 9-59. [15] H. M. El-Bakry, "A Novel Hgh Speed Neural Model for Fast Pattern Recognton," Soft Computng Journal, vol. 14, no. 6, 010, pp. 647-666. [16] H. M. El-Bakry, "A New Neural Desgn for Faster Pattern Detecton Usng Cross Correlaton and Matrx Decomposton," Neural World journal, Neural World Journal, 009, vol. 19, no., pp. 131-164. [17] H. M. El-Bakry, "An Effcent Algorthm for Pattern Detecton usng Combned Classfers and Data Fuson," Informaton Fuson Journal, vol. 11, 010, pp. 133-148. [18] H. M. El-Bakry, "New Faster Normalzed Neural Networks for Sub-Matrx Detecton usng Cross Correlaton n the Frequency Doman and Matrx Decomposton," Appled Soft Computng journal, vol. 8, ssue, March 008, pp. 1131-1149. [19] R. Feraud, O. Berner, J. E. Vallet, and M. Collobert, " A Fast and Accurate Face Detector for Indexaton of Face Images," Fourth IEEE Internatonal Conference on Automatc Face and Gesture Recognton, Grenoble, France, 8-30 March, 000. [0] H. Schnederman and T. Kanade, "Probablstc modelng of local appearance and spatal relatonshps for object recognton, " In IEEE Conference on Computer Vson and Pattern Recognton (CVPR), pp. 45-51, SantaBarbara, CA, 1998. [1] H. A. Rowley, S. Baluja, and T. Kanade, " Neural Network - Based Face Detecton, " IEEE Trans. on Pattern Analyss and Machne Intellgence, Vol. 0, No. 1, pp. 3-38, 1998. ISSN: 1790-5117 165 ISBN: 978-960-474-179-3
Fg. 1: Basc structure of the MPC. 8D PCA Input X 8D VQ Encode k-pca PCs k-pca Decode 8D VQ Output X Fg. : The flow-chat of the K-PCA [9-1]. Table 1: The theoretcal speed up rato for mages wth dfferent szes. ISSN: 1790-5117 166 ISBN: 978-960-474-179-3
Image sze Speed up rato (n=0) Speed up rato (n=5) Speed up rato (n=30) 100x100 3.67 5.04 6.34 00x00 4.01 5.9 8.05 300x300 4.00 6.03 8.37 400x400 3.95 6.01 8.4 500x500 3.89 5.95 8.39 600x600 3.83 5.88 8.33 700x700 3.78 5.8 8.6 800x800 3.73 5.76 8.19 900x900 3.69 5.70 8.1 1000x1000 3.65 5.65 8.05 1100x1100 3.6 5.60 7.99 100x100 3.58 5.55 7.93 1300x1300 3.55 5.51 7.93 1400x1400 3.53 5.47 7.8 1500x1500 3.50 5.43 7.77 1600x1600 3.48 5.43 7.7 1700x1700 3.45 5.37 7.68 1800x1800 3.43 5.34 7.64 1900x1900 3.41 5.31 7.60 000x000 3.40 5.8 7.56 Table : Practcal speed up rato for mages wth dfferent szes usng MATLAB. Image sze Speed up rato (n=0) Speed up rato (n=5) Speed up rato (n=30) 100x100 7.88 10.75 14.69 00x00 6.1 9.19 13.17 300x300 5.54 8.43 1.1 400x400 4.78 7.45 11.41 500x500 4.68 7.13 10.79 600x600 4.46 6.97 10.8 700x700 4.34 6.83 9.81 800x800 4.7 6.68 9.60 900x900 4.31 6.79 9.7 1000x1000 4.19 6.59 9.46 1100x1100 4.4 6.66 9.6 100x100 4.0 6.6 9.57 1300x1300 4.17 6.57 9.53 1400x1400 4.13 6.53 9.49 1500x1500 4.10 6.49 9.45 1600x1600 4.07 6.45 9.41 1700x1700 4.03 6.41 9.37 1800x1800 4.00 6.38 9.3 1900x1900 3.97 6.35 9.8 000x000 3.94 6.31 9.5 ISSN: 1790-5117 167 ISBN: 978-960-474-179-3