Sunteți pe pagina 1din 5

Automatic Face Recognition System using P-tree and K-Nearest Neighbor

Classifier
Mohammad Kabir Hossain, Abu Ahmed Sayeem Reaz, Rajibul Alam, and Dr.William Perrizo*
Department of Computer Science and Engineering, North South University, Dhaka 1217
*Department of Computer Science, North Dakota State University, Fargo, ND 58105, USA
Emails: mkhossain@northsouth.edu, sayeem_reaz@yahoo.com, rajibulalam@hotmail.com,
william.perrizo@ndsu.nodak.edu

Abstract: Face recognition has recently received the paper is organized as follows: first a review of the
remarkable attention in both authentication and technology behind such an identification system and
identification systems due to high acceptability and then the proposed system.
collectability, regardless its lower circumvention and
uniqueness than other biometric verification
technologies. The basic approach with face recognition 2. RELATED CONCEPTS
commences with feature set construction from the
relevant facial traits of the users, termed enrollment [1]. Before we go through the identifier we need to know the
When a user is to be authenticated (i.e. the user's approaches and problem domains involved in such
identity is to be verified), his/her facial sample is systems.
captured and a feature set is created. This feature set is
then compared with the enrollment feature set. But 2.1 Approaches
feature set search mechanism is time consuming and Automatic face recognition divides into roughly two
sometimes exhaustive. In this paper, a very efficient and lines of inquiry: feature based approaches which rely on
time saving search mechanism is proposed that exploits a feature set small in comparison to the number of
the advantages of Peano Count Tree and K- Nearest pixels, and direct image methods which involve no
Neighbor Search techniques. intermediate feature extraction stage. The later method is
substantially susceptible to lighting condition. Whereas
in principle, feature-based schemes can be made
Keywords: Verification, Identification, Feature set, invariant to scale, rotation and/or illumination variations
Image processing, P-tree, bSQ format, Quadrant ID, and thus we are interested in them.
Euclidean similarity function, Minkwoski similarity
function, Manhattan distance, K-nearest neighbor
classifier. 2.2 Problem Domains
Face recognition system serves two problem domains-
1. INTRODUCTION verification and identification. When a user is to be
While research towards automatic face recognition authenticated (i.e. the user's identity is to be verified),
began in the late 1960's, progress has been slow. samples will be captured from the device and again a
Recently there has been renewed interest in the problem feature set is created. This feature set is then compared
due in part to its numerous security applications ranging with the enrollment feature set. If the resulting similarity
from identification of suspects in police databases to value is above a predefined threshold, the user is
identity verification at automatic teller machines [1]. considered to be authenticated. In contrast to the
Though automatic face recognition systems exhibit verification use case, with identification the (claimed)
higher FAR (False Acceptance Rate), the probability identity of the user is not known in advance, but shall be
that a sample falsely matches the presented face determined based on sample images of the user's face
identification record or feature sets, and FRR (False and a set (population) of feature sets with known
Rejection Rate), the probability that a sample of the identities. The identification system takes some samples
right person is falsely rejected, than other successful of the user's face, generates a feature set from them and
biometric systems like fingerprint or iris recognition, it is compares this feature set with each element of this
attractive because of its wide-spread acceptability, population. The elements yielding the highest
universality and easier acquisition. comparison values above a certain confidence threshold
Recognition is a step by step process and quite time- are candidates for the identity wanted. In this paper, we
consuming in case it has to deal with a large problem proposed a system that can serve both purposes.
domain. In applications like surveillance system, airport
and banking security, database search time is
significantly huge. Thus, development of real-time 3. PREVIEWS OF FACE IDENTIFIER
application is a challenging task. In this paper our prime
concern has been reduction in database search time There are three main parts of the system. They are,
during face matching phase. In order to achieve that Image processing, Recognition algorithm, and Database
objective we have made use of the techniques of peano searching mechanism.
count tree and k-nearest neighbor algorithm. The rest of
3.1 Image Processing: In this example, 55 is the number of 1's in the entire
Image capture: We can use digital camera to take an image. This root level is labeled level 0. The numbers
individual’s photo. In surveillance system video camera 16, 8, 15, and 16 found at next level (level 1) are the 1-
continuously takes photos. The video signal is converted bit count for the four major quadrants in raster order, or
to a series of digital pictures. Z order (upper left, upper right, lower left and lower
Face finding: The first problem to be solved before right). Since the first and last level-1 quadrants are
attempting face recognition is to locate the face in the composed entirely of 1-bits (called pure-1 quadrants),
image. A number of algorithms are available for the task. sub-trees are not needed, and these branches terminate.
Many authors [2,3,4] have discussed methods of Similarly, quadrants composed entirely of 0-bits are
segmenting skin-tone regions from images, particularly called pure-0 quadrants, which also cause termination of
for finding faces and hands. There are also several tree branches. This pattern is continued recursively using
algorithms for face detection based on the intensity Peano, or Z-ordering (recursive raster ordering), of the
pattern of the image. four sub-quadrants at each new level. Eventually, every
branch terminates (since, at the "leaf" level, all quadrants
3.2 Recognition Algorithm: are pure). If we were to expand all sub-trees, including
Two steps are involved: Feature extraction and feature those for pure quadrants, then the leaf sequence would
matching. be the Peano-ordering of the image. Thus we use the
name Peano Count Tree [7].
1) Feature extraction: It involves extracting specific
facial traits (e.g., relative position of nose, eyes, A spatial image can be viewed as a 2-dimensional array
chinbones, chin, etc.) and then forming a tuple or feature of pixels. Associated with each pixel are various
set of those geometric attributes. We might use distances descriptive attributes, called “bands”. For example, BMP
of facial traits instead of positions as features. Also image has 3 bands- namely, Blue, Green and Red. An
discrete cosine transform coefficients of an image can be image can also be viewed as a relational table where
used as features. Whatever the value of the features each pixel is a tuple and each band is an attribute. The
might be we are getting a feature set which is important primary key can be expressed as x-y coordinates.
for the proposed system.
4.2 Bit Sequential Format:
2) Feature matching: The feature set is then matched
with the feature sets of faces stored in the database. Data in relational table must be mapped to bit Sequencial
(bSQ) format for p-tree generation. Suppose in spatial
3.3 Database Searching: data a reflectance value in a band is a number in the
A huge number of feature sets are stored in the database. range 0-255 and is represented by a byte. We split each
Database search should not be exhaustive. Efficient band into eight separate files, one for each bit position.
search algorithm limits database search space. In figure 2 we give a very simple illustrative example of
bSQ format with only two bands in a scene having only
4. PROPOSED FACE RECOGNITION SYSTEM four pixels (two rows and two columns). P-trees are
basically z-order-run-length-compressed, representations
4.1 Introducing P-tree: of each bSQ file. So, we store the database not in
relational tables but in bSQ files.
We’ll try to explain p-tree, based on how it organizes
spatial data. A P-tree is a quadrant-based tree. It
recursively divides an entire image into quadrants and
records the count of 1-bits for each quadrant, thus
forming a quadrant count tree. P-trees are somewhat
similar in construction to other data structures in the
literature (e.g. Quadtrees [5] and HHCodes [6] ).

For example, given an 8-row-8-column image of single


bits, its P-tree is as shown in Figure 1.

Figure 2. bSQ formats for a two-band 2x2 image

4.3 Basic P-trees:

We reorganize each bit file of the bSQ format into a


basic p-tree. The definition of basic P-tree has been
Figure 1. 8x8 image and its p-tree given in [7] as written below:
simplicity we wrote Qid as 132 instead of 1.3.2 in figure
Definition 1: A basic P-tree Pi,j is a P-tree for the jth bit 3[8].
of the ith band i.
4.7 Matching Feature Set:
4.4 Logical Operations on P-tree
Each feature set can be viewed as a tuple in a relational
The basic P-trees defined in Section 4.3 can be table where each feature represents a particular attribute.
combined using simple logical operations (AND, OR This is just like pixel values of an image where a feature
and COMPLEMENT) to produce P-trees for the original corresponds to a band of the image. Each tuple might
values at any level of precision. have index of form (x, y).

4.5 Value and Tuple P-trees Let S = B1 x B2 x … x Bd be a d-dimensional feature


space and B1, B2, …, Bd are the dimensions or features
Definition 2: A value P-tree Pi (v) is the P-tree if value v of S. We consider each tuple of the table as d-
at band i. Value v can be expressed in 1-bit upto 8-bit dimensional vector v = <v1,v2, … ,vd >. Enrolled feature
precision [7]. vectors would correspond to a myriad number of points
in S for a large database. During authentication a d-
Value p-trees can be constructed by ANDing basic P- dimensional feature vector of the face to be
trees or their complements. For example, authenticated is created the enrolled feature sets are
searched for a match. A distance metric is required to
Pi (110) = Pi,1 AND Pi,2 AND Pi,3’ measure the closeness of vectors. Various distance are
available. For two data points, X = <x1, x2, x3, …, xn-1>
Definition 3: A tuple P-tree P (v1, v2, …, vn), is the P- and Y = <y1, y2, y3, …, yn-1>, the Euclidean similarity
tree of value vi at band i, for all i from 1 to n [6]. We function is defined as [8]. In this paper a new matching
have, mechanism has been proposed where k-nearest
P (v1,v2, …, vn) = P1(v1) AND P2(v2) AND …AND neighbors are searched that might use any of the distance
Pn(vn) metrics mentioned above.

4.6 Root-Count and Quadrant ID of a P-tree Example:

The total number of 1’s in a P-tree is called the root This example has been taken from [10]. The following
count. The root count of a p-tree indicates the total relation table contains 4 features of 4-bit data values.
number of 1’s in the image from where the P-tree was
built. We will assume P-trees are coded in a depth-first Table 1. Feature sets in relational table
ordering of the paths to each 1-quadrant. We use a
hierarchical quadrant id scheme to identify quadrants as Index Features
delineated in figure 3. At each level we append a sub- X Y B1 B2 B3 B4
quadrant id number (0 means upper left, 1 means upper 0,0 0011 0111 1000 1011
right, 2 means lower left, and 3 means lower right). 0,1 0011 0011 1000 1111
0,2 0111 0011 0100 1011
0,3 0111 0010 0101 1011
1,0 0011 0111 1000 1011
1,1 0011 0011 1000 1011
1,2 0111 0011 0100 1011
1,3 0111 0010 0101 1011
2,0 0010 1011 1000 1111
2,1 0010 1011 1000 1111
2,2 1010 1010 0100 1011
2,3 1111 1010 0100 1011
3,0 0010 1011 1000 1111
3,1 1010 1011 1000 1111
Figure 3. Quadrant id (Qid) 3,2 1111 1010 0100 1011
3,3 1111 1010 0100 1011
For a spatial data set with 2n-row and 2n-column, there is
a mapping from raster coordinates (x,y) to Peano This dataset is converted in bSQ format. The feature-1
coordinates (called quadrant id or Qid). If x and y are bit-bands would be like below if we display the bSQ
expressed as n-bit strings, x1x2…xn and y1 y2…yn then the format in 2- dimension:
mapping is (x,y) = (x1x2…xn, y1 y2…yn) → (x1 y1.x2 y2…
.xnyn). Thus in an 8 by 8 image, the pixel at (3,6) =
(011,110) has quadrant id 01.11.10 = (1.3.2). For
B11 B12 B13 B14 2) Feature vector of the person to be recognized is
0000 0011 1111 1111 extracted.
0000 0011 1111 1111 3) A tuple p-tree of this feature vector is generated
0011 0001 1111 0001 based on the basic p-trees.
0111 0011 1111 0011
4) If the root count of this tuple p-tree is more than
There is a constraint on bSQ formation. P-tree requires zero, then we have one or more matches. The
the number of rows and columns in bSQ file be multiple indexes of those matched tuples at the relational
of four. In case, the number of tuples in database is not a database can be figured out using Qid to (x,y)
multiple of four we need to pad zero vectors at the end; co-ordinate conversion technique discussed
so that it is. above.

Now, for feature-1, basic p-trees are as follows (tree This is a nice way of feature matching, as it doesn’t need
pointers are omitted). to scan the database at all. A few algebraic operations
perform the job. Besides, the AND operation which
P1,1 P1,2 P1,3 P1,4 produce the tuple p-trees is fast [11] Thus, we have a
5 7 16 11 framework for real-time recognition system.
0014 0403 4403
0001 0111 0111 4.8 Some Improvements:

Value P-trees can be constructed from basic p-trees Feature extraction method might introduce some
applying a series of AND and COMPLEMENT distortion or addition of noise, which is unavoidable. In
operations. Value p-tree construction process of P1,0011 such cases, some disparity between extracted and
has been shown below as an example: enrolled feature vectors of the same person might occur.
The above-mentioned system expects to match feature
P1,0011 = P1,1’ AND P1,2’ AND P1,3 AND P1,4 vectors exactly. If an exact match is not found it fails to
4 11 9 16 11 recognize. So, we assume the feature extraction process
4000 4430 4041 4403 to be perfect or propose some improvement.
1110 1000 0111
If root count of the tuple p-tree for target feature vector
From the value p-trees, we can generate tuple p-trees. is zero we know there is no exact match. But it is
As an example tuple p-tree of tuple possible to know what are the nearest matches. We
0010,1011,1000,1111 is: propose K-nearest neighbor classifier to achieve that
objective, as it is simple and effective [13].
3
Given an unknown sample, a k-nearest neighbor
0 0 3 0 classifier searches the pattern space for the k training
samples that are closest to the unknown sample. These k
1 1 1 0 training samples are the k “nearest neighbors” of the
unknown sample [12]. “Closeness” is defined in terms of
Figure 4. Tuple p-tree P0010,1011,1000,1111 Euclidean distance, where Euclidean distance between
two feature vectors, X = (x1, x2, …, xn) and Y = (y1, y2,
Here 3 is the root count indicating the relational table …, yn) is
has three such tuples. The three leaves with value 1
indicate the quadrants where these tuples are residing. n −1
These quadrants can be trivially mapped to indexes of d 2( X , Y ) = ( xi − yi ) 2
the relational table. In the example, the three leaves with i =1
. It can be generalized to
value 1 has Qids 2.0, 2.1 and 2.2 as read from the left to
Minkowski similarity function,
right. The three Qid’s are mapped such way:
n −1

2.0 = 10.00 → 10,00 = (2,0) dq ( X ,Y ) = q wi | xi − yi |q


i =1
2.1 = 10.01 → 10,01 = (2,1) . If q = 1, it gives the
2.2 = 10.10 → 11,00 = (3,0) Manhattan distance, which is
n −1

Based on this idea, to identify a person, the recognition d1 ( X , Y ) = | xi − yi |


system works as follows: i =1 .
Any selected distance metric can be used to find the k-
1) Basic p-trees of the enrolled feature sets are nearest neighbors. More on how lazy classifier works
constructed as preprocessing. This is a one-time using p-trees is given in [13].
job.
5. CONCLUSION
[11] “Association rule mining on remotely sensed
In this paper, we have tried to show, how we can apply images using peano count trees,” Pacific-Asia
p-tree concept in face recognition. Though, framework Conference on Knowledge Discovery and Data Mining,
for a whole system has been developed in this paper, we pp. 66-79, 2002.
concentrated only on database search mechanism. The
proposed mechanism can be applied not only in face but [12] J. Han and M. Kamber, “Data mining: concepts and
also in other recognition system successfully for real- techniques”,Ed., San Francisco, USA: Morgan
time system development. Kaufmann Publishers, 2001, pp. 314-315.

[13] W. Perrizo, Q. Ding, and A. Denton, “Lazy


REFERENCES classifiers using p-trees”. Available at:
"http://www.citeseer.nj.nec.com/perrizo02lazy.html"
[1] “User guide -face recognition concepts “
Available at: http://www.cognitecsystems.de
/documentation/frsdk_public/u_biometrics.html

[2] Ingemar L. Cox, Joumana Ghosn, Peter N. Yianilos


“Feature-based face recognition system using mixture-
distance”, International Conference on Computer Vision
and Pattern recognition, IEEE, pp. 209-216, 1996.

[3] Jean Christophe Terrillon, Martin David, and Shigeru


Akamatsu, “Automatic detection of human faces in
natural scene image by use of a skin color model and
of invariant moments”, in International Conference on
Face and Gesture Recognition, number-3, pp. 112-117.
IEEE, April 1998.

[4] T. Darrell, G. Gordon, J. Woodfill, and M. Harville,


“A virtual mirror interface using real-time robust face
tracking”, in International Conference on Face and
Gesture Recognition, number-3, pp. 616-621. IEEE,
April 1998.

[5] H. Samet, “Quadtree and related hierarchical data


structure”, ACM Computing Surveys, 16(2): 187-260,
June 1984.

[6] HH-codes. Available at


http://www.statkart.no/nlhdb/iveher/hhtext.htm,
03.10.2000

[7] Qin Ding, Maleq Khan, Amalendu Roy and William


Perizzo, “The p-tree algebra”, Proceedings of ACM
Symposium on applied Computing (SAC’02), Madrid,
Spain, March 2002, pp. 426-431.

[8] William Perrizo, Qin Ding, and Anne Denton, “Lazy


classifiers using p-trees”, Proceedings of 15th
International Conference on Computer Applications in
Industry and Engineering (CAINE'02), San Diego, CA,
Nov. 2002, pp. 176-179

[9] M. K. Hossain and W. Perrizo, “Automatic


fingerprint identification system using p-tree”

[10] Qiang ding, William Perrizo, “Cluster analysis of


spatial data using peano count tree”, Proceedings of
CATA2002, San Francisco, USA, April 4-6, 2002.

S-ar putea să vă placă și