This document discusses developing a hair consultant application. It proposes using computer vision techniques like Viola-Jones face detection and modeling faces as densely connected graphs or mixtures of trees to extract features from a user's face photo. These features would then be used to search a database and recommend suitable hairstyles. The document outlines the Viola-Jones algorithm and explains concepts like Haar features, integral images, AdaBoost and cascading. It also compares modeling faces as densely connected graphs versus mixtures of trees. The goal is to build a demo that can detect a user's face, analyze features, and suggest hairstyles tailored to their facial structure.
2. Scenario
• Each time I walk into the hair salon, my hair
designer show me a bunch of photos of hair
style to choose. However, those guys on the
magazine are always white and skinny. They
just look nothing like me!
MMAI term project: Hair Consultant 2
3. Intent
• Recommend user some nice hair styles
according to user’s eyes, nose, eyebrow,
mouth, skin color, the contour of the shape of
user’s face …
• FUN, mocking others. However, in a scientific
way.
MMAI term project: Hair Consultant 3
4. roadmap
MMAI term project: Hair Consultant 4
User Query
Extract Face
Modeling Face
Extract Feature
Searching in DB
5. Face detection with Viola-Jones algorithm
• Using Viola-Jones detection algorithm and a
trained classification model for detection.
– Robust
– Low False Positive rate
– Real time
– The goal is to distinguish faces from non-faces
MMAI term project: Hair Consultant 5
6. Viola-Jones algorithm
• Haar features
• Integral image
• Adaboost(face or not face)
• Cascading
MMAI term project: Hair Consultant 6
7. Haar feature -> integral image ->
adaboost -> cascading
• Feature of difference between sum of
intensity of regions
• Nose-like Haar feature
• Eyes-like Haar feature
MMAI term project: Hair Consultant 7
8. Haar feature -> integral image ->
adaboost -> cascading
• Data Structure !(DP)
• Shaded region sum =
MMAI term project: Hair Consultant 8
9. Haar feature -> integral image ->
adaboost -> cascading
• Go ask Hsuan-Tien Lin
MMAI term project: Hair Consultant 9
10. Haar feature -> integral image ->
adaboost -> cascading
• Goal: real time (but too many windows…)
• Observe that on average, only 0.01% of all
sub-windows get positive response(face)
– Cascading architecture
MMAI term project: Hair Consultant 10
11. Modeling Face
• 2 choice
– Densely Connected Graph
– Mixture of trees
MMAI term project: Hair Consultant 11
13. Modeling by Densely Connected Graph
• Jet:
The set of convolution coefficients for kernels of
different orientations and frequencies at one image
pixel is called a jet.
MMAI term project: Hair Consultant 13
14. Modeling by Densely Connected Graph
MMAI term project: Hair Consultant 14
Local feature measured by convolution with Gabor wavelets
5 type of kernel with 8 orientation
15. Modeling by Densely Connected Graph
• Local feature by Gabor wavelets
MMAI term project: Hair Consultant 15
16. Modeling by Densely Connected Graph
MMAI term project: Hair Consultant 16
Face Bunch Graph
17. Modeling by Densely Connected Graph
MMAI term project: Hair Consultant 17
The scoring function:
Taylor
expension
Displacement estimated in the optimizing process
18. Modeling by Mixture of Trees
• mixture of trees with a shared pool of parts V
• Highly efficient, much faster than densely
connected graph(FBG)
• Precise enough for our application
MMAI term project: Hair Consultant 18
19. Modeling by Mixture of Trees
MMAI term project: Hair Consultant 19
Mixture of trees ?
20. Modeling by Mixture of Trees
MMAI term project: Hair Consultant 20
Local feature(e.g.HOG)
21. Modeling by Mixture of Trees
MMAI term project: Hair Consultant 21
Best mixture
22. Modeling by Mixture of Trees
• Learning:
– Fully supervised data
– Learn the trees using Chow-Liu tree algorithm
(data compression or inference)
– Learn the appearance and deformation jointly using
SVM
MMAI term project: Hair Consultant 22
這裡的x向量其實就是一個pixel的位置(x, y)
K => wave vector
A jet J is defined as the set {Jj} of 40 complex coefficients obtained for one image point.
小j => 每一種kernel(共40種)
only 3 frequencies and 4 orientations are represented in the figure
這是recognition的部分 非常簡單
In practice, 用啟發式演算法(heuristic algorithm) to come close to the optimum within a reasonable time
Database裡的model怎麼出來的 => 先手動打幾個model
Assuming that two jets J and J’refer to object locations with small relative displacement d vector,
Use known model as rigid model(landa =>inf) to find the most likely FBG
coarse to fine approach
再來每一輪放寬landa來產生更具代表性的model
The best scoring mixture m* specifies the estimated viewpoint, and the best scoring locations L* specify the estimated landmarks locations.
we search over multiple scales on an image pyramid.
Establishing the model
M indicate the mixture, I indicate the image, L indicate the “configuration of parts”
Phi => feature, Hog in our implement
Shape的input沒有I => 只在乎mixture的合理性
concatenate appearance weights and deformation weights together as the weight vector
Chow-liu algorithm => information theorem(representing data as a tree with little information loss)