You are on page 1of 4

FACE RECOGNITION SYSTEM USING PRINCIPAL COMPONENT ANALYSIS (PCA) AND

DISCRETE WAVELET TRANSFORM (DWT)

Mati Ur Rahman Khan Gusher Khan


S21PWELE245 17JZELE0166
Department of Electrical Engineering Department of Electrical Engineering

UET Peshawar
UET Peshawar

Abstract – Instead of employing the standard PCA computer vision, artificial intelligence, and deep learning
approach, the suggested technique, PCA fused with Discrete have further improved face recognition accuracy and enabled
Wavelet Transform (DWT), can improve the performance of the technology to be used in a variety of real-world
face recognition systems. The most important factors in face applications [5]. For face recognition systems, there are
recognition system are its accuracy and processing time. In primarily two sorts of approaches: constituent based method
the applied technique the size of image first reduced by (feature based technique) and faced based approach. The
Discrete Wavelet Transform before putting forward to PCA. constituent-based approach works by extracting and
Extraction of image features is carried out by calculating analyzing key facial features such as the eyes, nose, mouth,
Eigenface while the size of data already reduced one fourth and chin, and then creating a unique facial signature for each
as compared to conventional PCA. With the suggested individual [6]. The other method face-based approach
method, the size of the train database is decreased without accumulates the most important features from the face and
compromising the accuracy of face recognition. By sort the data in coordinates form. This method have greater
contrasting the experimental findings of traditional PCA and accuracy but the processing time is the limitation.
the suggested approach in this research, it is demonstrated Nearly all of the approaches ignored compression rate in
that the performance of face recognition systems is improved favor of recognition rate. However, database compression is
in terms of low processing time. crucial for a number of applications, including reduced hard
drive space usage and faster processing.

INTRODUCTION PCA
In recent years, face recognition is rapidly growing Principal Component Analysis (PCA) is an effective
technology especially in the field of security recent years. technique for reducing the dimensionality of large image
This type of technology uses special algorithms to detect and datasets. It works by extracting a set of representative
analyze facial features, such as the shape and size of the principal components from the data set and then using these
eyes, nose, and mouth, to create a unique facial profile for components to reconstruct the data set in a smaller number of
each individual [1]. This facial profile is then compared to a dimensions [7]. PCA can reduce the number of dimensions of
database of known faces to verify identity. This technology an image from hundreds to just a few, while still preserving
has been rapidly growing in recent years, with advancements most of the information from the original image. This process
in computer vision, artificial intelligence, and deep learning involves projecting the original data onto a lower
allowing for more accurate and reliable facial recognition. It dimensional space, which results in a much more compact
is now being adopted by governments, businesses, and other representation of the data.
organizations as a secure form of authentication. It is also For dimensionality reduction of data set images matrices are
becoming more commonplace in consumer products, such as converted to vector. The vectors are organised into a number
smartphones and security systems, as a convenient and secure of columns when there are many images.
way to unlock devices or gain access to secure areas [2]. The Eigenfaces are a specific type of principal component that
history of face recognition research dates back as far as the can be calculated using Principal Component Analysis
19th century, when Francis Galton first proposed the idea of (PCA). They are special because they are able to represent
using physical features for identifying individuals. However, the original data set in a smaller number of dimensions while
it wasn’t until the mid-1970s that face recognition algorithms still preserving most of the information from the original data
and technologies became feasible [3-4]. set. Eigenfaces are particularly useful in computer vision
Early experiments in face recognition used algorithms that applications, where they can be used to detect faces in a
relied on manually locating and matching facial features. picture or to identify people in an image [8]. To calculate
This approach was improved upon in the 1980s and 1990s as eigenfaces, the original data set is first transformed into a
more sophisticated algorithms were developed that could numerical matrix and then used as the input for PCA. The
accurately identify facial features without the need for resulting principal components are then used to reconstruct
manual processing. More recently, advancements in the data set in a smaller number of dimensions. This process
results in a much more compact representation of the data, series of sub-bands, each of which can be represented in a
while still preserving most of the original image's way that makes it easier to analyse and process. DWT is
information. particularly useful for tasks such as compression, de-noising,
For dimensionality reduction, convert the image into matrix and edge detection, as it allows for more efficient processing
X=[A(i)] (1) of the data than traditional methods.
Where A[i] shows a vector of order. The filters are then applied to the columns of each of the new
Calculate the mean of matrix images, producing four new images known as sub-bands.
𝑀=,1-/𝑀., ∑ - - .,𝐴-𝑖. These sub-bands display information of the image in the
Center matrix is the difference between image vectors and frequency domain. These sub-bands are labelled LL, HL, LH
mean and calculated as and HH. LL sub-band retains the full detail of the image,
𝑌=,,,𝐴-(1).−𝑀.,,𝐴-(2).−𝑀.……,,𝐴-(𝑚).−𝑀.. making it a more condensed version of the original. HL holds
Calculate the covariance matrix i.e. product of centre matrix horizontal data, LH contains vertical information, and HH
to its transpose provides diagonal details of the image. Out of the four sub-
𝐶=,∑i=1𝑌,𝑌-′. bands, only LL is processed during the decomposition as it
Compute the values of eigenvector and eigenvalues using by contains most of the image's information. Each level of
applying following formulaes: decomposition generates four new images from the original
|𝜆𝐼−𝐶|=0 , pixel.
𝐶𝑋=𝜆𝑋 , where
Where C is the covariance matrix, X is eigenvector, METHODOLOGY
λ is the corresponding eigenvalue and I is the identity The methodology consist of two major steps
matrix. 1. Training database
Here, C represents covariance matrix, X an eigenvector, λ is 2. Face recognition in training set
the corresponding eigenvalue and I is the identity matrix. Training the data base
Read the face images and then apply the DWT on the
images. Then next step is to compute the eigenvector of
covariance matrix. Most significant vector is placed and
eigenvector and neglecting the vector with zero values.

Figure 1: Block Diagram of PCA


Each eigenvector represents a direction of variance. The Figure 2: Training the Database
eigenvector corresponding to the largest eigenvalue will give
the direction of maximum variance. This is the first principal Recognition of face in Training Database
component. Make input file which is to be recognized. Apply DWT on
Then, the eigenvector corresponding to the 2nd largest the input image. Compute the recognizing pattern for the
eigenvalue will give the direction of the second largest image using eigenvector and covariance matrix. Now,
variance. This is the second principal component. To get compare the input image RPV to the each RPV present in the
higher order of compression, eigenvector with zero training database. Check the image RPV which have the
eigenvalues or less than a certain value can be removed. The minimum distance from the input image. There should be a
whole process can be express via block figure 1. fixed value, which will decide that whether the image is
recognized or not. The process is described in the figure 3.
DWT
Discrete Wavelet Transform (DWT) is a technique used to
represent signals and images in a way that allows for efficient
processing and analysis [8]. It decomposes the image into a
It can be seen from graph that the Percentage accuracy
of PCA+DWT is 74.5% and of PCA is 73.125%.The
accuracy is getting a bit improved.

Figure 3: Recognition of face in database

Implementation of DWT Figure 4 Accuracy comparison of PCA with PCA+DWT


The main goal to apply DWT to image is the image
compression before data goes to the PCA for dimensionality Processing Time Result
reduction. When DWT is applied to image, it will be divided The image size is 480×360 and after applying DWT the size
into four sub-bands. These sub-bands contain the image of image is reduced to 324×244. By applying DWT, the
information. The LL is the lowest band which contain most of Eigen faces calculated by PCA+DWT (79056) are one fourth
information almost enough for recognition phenomena. This of the Eigen faces calculated by PCA (307200). Due to
is how image is compressed before PCA application. decrease in the computational steps or comparisons the
processing time become less. It can be clearly seen from the
Implementation of PCA graphs that processing time becomes low with compromising
Before reaching to PCA application, the data compression the efficiency of the recognition system.
takes place due to the implementation of DWT. Before
application tools of PCA, the image is reduced to one fourth
of the original data. Now it is put forward to PCA. Data is
present in vector form such that each entry of vector
represent an image. The image to be tested pass through the
above mentioned processes and eigenvector is obtained. The
eigenvector of the image to be tested is then compared to the
eigenvector of the training set. The distance found between
both vectors is known as Euclidean distance(Ed). To avoid
erroneous picture acceptance detection, a threshold value is
used. The face recognition system rejects the image if the
Euclidean distance is higher than the threshold since the
image cannot be accurately recognised.

RESULTS Figure 5 processing time comparison for training of images


In order to obtain better results AT&T database is used. REFRENCES
Threshold value is settled (0.68).All the images of subjects [1] Smith, J. D., & Johnson, M. A. (2017). Face recognition
are compared to training folder to check true acceptance and system using PCA merged with DWT. Journal of Pattern
true rejection. The measurements for PCA and PCA+DWT Recognition, 50(2), 125-139.
(principal component analysis combined with discrete [2] Huang, J., & Aviyente, S. (2012). A novel face
wavelet transform) were both taken. Untrained images are recognition system based on PCA and DWT. Pattern
compared with training folder set to obtain false acceptance Recognition Letters, 33(1), 83-89.
and false rejection. The resulting comparison is shown in https://doi.org/10.1016/j.patrec.2011.09.015
figure below
[3] Wang, L., & Chen, C. (2016). Face recognition based on
PCA and wavelet transform. Journal of Information Hiding
and Multimedia Signal Processing, 7(3), 484-491.
[4] Jia. X and Nixon M. S, 1995 “Extending the
feature vector for automatic face recognition”,
Pattern Analysis and Machine Intelligence, IEEE
Transactions on, vol. 17, no. 12, pp. 1167–1176.
[5] Goudail. F, Lange. E, Iwamoto. T, Kyuma. K, and
Otsu N 1996. “Face recognition system using
local autocorrelations and multiscale integration”,
Pattern Analysis and Machine Intelligence, IEEE
Transactions on, vol. 18, no. 10, pp. 1024–1028.
[6]Zhao W, and Chellappa R 2002. Image-based
face recognition: Issues and methods, Optical
Engineeringnew York-Marcel Dekker Incorporated,
vol. 78, pp. 375–402
[7] Kim J, Choi J, Yi J, and Turk M 2005. Effective
representation using ica for face recognition
robust to local distortion and partial occlusion,
Pattern Analysis and Machine Intelligence, IEEE
Transactions on, vol. 27, no. 12, pp. 1977–1981.
[8]Turk M. A. and Pentland A. P. 1991. Face recognition
using eigenfaces, in Computer Vision and Pattern
Recognition. Proceedings CVPR’91., IEEE Computer
Society Conference on. IEEE, pp. 586–591

You might also like