1) The document describes a personal matching recommendation system called TinderBox that uses face detection, eigenface analysis, and k-nearest neighbors classification.
2) It explains how the Viola-Jones algorithm is used for face detection, eigenface analysis projects faces into vectors, and k-nearest neighbors is used as the recommendation algorithm.
3) The recommendation system collects user samples to build models and determine suitable matches for users based on similarity analysis of eigenfaces and k-nearest neighbors classification.
2. Overview
• We will cover Viola Jones Face Detection
Algorithm
• Eigen Face Detection Algorithm and
PCA(Principal Component Analysis)
• K-Nearest Neighbor Classification Algorithm
http://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm 2
3. Overview 2
• What is the TinderBox?
3
TinderBox is Tinder based application!
4. Then, what is the Tinder?
• Very simple, very compressed dating system
4
Tinder is a social dating application
11. How would it be possible?
• Viola Jones – Face Detection
• Eigen Face – Project Image to Vector Matrix
• K-Nearest Neighbor – Recommendation Algorithm
11
12. Viola Jones Face Detection Algorithm
“Robust Real-Time Face Detection”
Paul Viola
Microsoft Research
Michel J. Jones
Mitsubishi Lab
2001
“Training is slow, but detection is very fast”
12
13. Viola Jones Face Detection Algorithm
• Use Rectangle filter
13
f(x): sum of rectangle (also called ‘integral image’)
x: pixel rate (usually 0 ~ 255 value, gray scale)
ϑ: threshold (constant)
α: usually 1
β: usually 0 (polarity)
t: t-th classifier index
i: index of pixel
14. Viola Jones Face Detection Algorithm
• Define ‘one’ classifier will be..
14
Variety of ht(x)s’
h(x): 0 – 1 polarity function
b: bias
ϑ: classifier weight
t: t-th classifier index
15. Viola Jones Face Detection Algorithm
• Boosting Correctness with Cascaded Classifier
• In TinderBox, they use this algorithm for cropping
face
15
“Training is slow, but detection is very fast”
usually saved ‘. xml’constant file
16. Eigen Face – Convert Images to Vectors
16
“Face Recognition Using EigenFaces”
Mattew A. Turk / Alex P. Pentland
Vision and Modeling Group, The Media Laboratory
Massachusetts Institute of Technology
1991, IEEE
17. Eigen Face – Convert Images to Vectors
• Basic Idea
17
Face Recognition is a simple matching problem
But N x N dimensional space is so high
Let’s mapping N x N matrix into a
lower-dimensionality space
How can we find a suitable lower-dimensional space?
“Maybe PCA will be a great solution”
Principal Component Analysis
18. Eigen Face – Image Matrix
(Training Samples)
• Consider about N x K size of image, Eigen
Face converts it into gray scale image. Thus,
N x K matrix’s values will be 0 ~ 255 range.
18
0 ~ 255 value
I’m watching you
19. Eigen Face – Find Mean Matrix
(Training Samples)
19
To find central vectors from sample images,
we sum up all of sample images with pixel by
pixel and divide it into M. (# of samples)
Why?
That makes possible to construct Covariance
Matrix to apply PCA dimensional reduction.
Average Face Vector: Ψ
i-th Image vector: Γi
20. Eigen Face – Find Mean Matrix
(Training Samples)
20
Average Face Vector: Ψ
i-th Image vector: Γi
Now move its’ derivation into origin space
ϕi = Γi - Ψ
Now let’s find covariance matrix C
21. Eigen Face – Find Mean Matrix
(Training Samples)
21
Now let’s find covariance matrix C
We have to find eigenvectors of ui for projection.
However, AAT (N2 x N2) Matrix is too large!
# of training sets
Don’t give up!
Let’s consider about ATA’s eigenvector vi (M x 1 matrix)
Computable constant
What is eigenvector? : http://darkpgmr.tistory.com/105
How to compute? : http://www.vision.jhu.edu/teaching/vision08/Handouts/case_study_pca1.pdf
Because of eigenvector’s
meaning!
22. Eigen Face – Find Mean Matrix
(Training Samples)
22
Don’t give up!
Let’s consider about ATA’s eigenvector vi (M x 1 matrix)
Computable constant
What is eigenvector? : http://darkpgmr.tistory.com/105
How to compute? : http://www.vision.jhu.edu/teaching/vision08/Handouts/case_study_pca1.pdf
Then?
CAvi = μiAvi
(Since C = AAT)
Singular Value Decomposition
23. Eigen Face – Find Mean Matrix
(Training Samples)
23
Don’t give up!
Let’s consider about ATA’s eigenvector vi (M x M matrix)
Computable constant
What is eigenvector? : http://darkpgmr.tistory.com/105
How to compute? : http://www.vision.jhu.edu/teaching/vision08/Handouts/case_study_pca1.pdf
Then?
CAvi = μiAvi
(Since C = AAT)
24. Eigen Face – Find Mean Matrix
(Training Samples)
24
What is eigenvector? : http://darkpgmr.tistory.com/105
How to compute? : http://www.vision.jhu.edu/teaching/vision08/Handouts/case_study_pca1.pdf
Then?
CAvi = μiAvi
(Since C = AAT)
Now let’s consider Avi = ωi
(Anonymous vector ωi)
Computable constant
CAvi = μiAvi = Cωi = μiωi
Isn’t
it
eigenvalue
and
eigenvector?
25. Eigen Face – Find Mean Matrix
(Training Samples)
25
Isn’t
it
eigenvalue
and
eigenvector?
Therefore,
ωi = ui = Avi
“Which means we can get N2 x N2 matrix’s eigenvector (ui)
with M x M (smaller) matrix’s eigenvector (vi).”
26. Eigen Face – Find Mean Matrix
(Training Samples)
26
Isn’t
it
eigenvalue
and
eigenvector?
Therefore,
ωi = ui = Avi
27. 27
Eigen Face – Find Mean Matrix
(Training Samples)
“When we got an anonymous image, which user select ‘like’label or ‘nope’one.
Then, we can get a K-th dimensional face vector as a sample feature.”
28. K-Nearest Neighbor Algorithm
for polarity classification (1 or 0)
• K-Nearest Neighbor Classification (in short K-NN)
28
“An introduction to kernel and nearest-neighbor
nonparametric regression”
Altman, N. S.
Cornell University
1992, The American Statisticain
29. K-NN is not K-means
• K-NN is supervised. We define unknown sample x’s label
from k number of samples’ label (voting). The way we
calculate its distance is smallest Euclidian distance, absolute
difference, maximum distance, and Minkowski distance.
• K-means is unsupervised. We define k number of points for
initial central cluster position. Iteratively, define smallest
Euclidian distance sample as a nearest cluster’s member.
And re-calculate cluster’s central point based on its cluster
members. (until central point’s coordination stable)
29
클러스터링과 다르다! 클러스터와는
30. K-NN’s distance example
30Sources from: http://www-01.ibm.com/support/knowledgecenter/SSLVMB_21.0.0/com.ibm.spss.statistics.help/alg_knn.htm?lang=ko
32. Minkowski distance
• Similar with Euclidian distance but generalized
distance. (= Manhattan distance)
32
Distance will be
(p is order)
If p reaching infinity, we obtain the Chebyshev distance.
Sources from: http://en.wikipedia.org/wiki/Minkowski_distance