Presentation is loading. Please wait.

Presentation is loading. Please wait.

Detection, Recognition, and Transformation of Faces

Similar presentations


Presentation on theme: "Detection, Recognition, and Transformation of Faces"— Presentation transcript:

1 Detection, Recognition, and Transformation of Faces
Understanding Faces 12/5/17 Detection, Recognition, and Transformation of Faces Chuck Close, self portrait Lucas by Chuck Close Some slides from Amin Sadeghi, Lana Lazebnik, Silvio Savarese, Fei-Fei Li

2 Exams Exams handed back in office hours Go over common mistakes today
Better grade distribution than 2015 2015 2017 12% 20% 27% 40% 42% 24% 15% 13% 4% 3% 40-49 0% 1%

3 Face detection and recognition
“Sally”

4 Applications of Face Recognition
Digital photography

5 Applications of Face Recognition
Digital photography Surveillance

6 Applications of Face Recognition
Digital photography Surveillance Album organization

7 Consumer application: iPhoto 2009

8 Consumer application: iPhoto 2009
Can be trained to recognize pets!

9 Face detection Detection

10 What does a face look like?

11 What does a face look like?

12 What makes face detection hard?
Expression

13 What makes face detection hard?
Viewpoint

14 What makes face detection hard?
Occlusion

15 What makes face detection and recognition hard?
Coincidental textures

16 Consumer application: iPhoto 2009
Things iPhoto thinks are faces

17 How to find faces anywhere in an image?
Filter Image with a face?

18 Train a Filter Normalize mean and standard deviation SVM

19 Face detection: sliding windows
Filter/Template Multiple scales

20 What features? Intensity Patterns (with NNs)
(Rowley Baluja Kanade 1996) Exemplars (Sung Poggio 1994) Edge (Wavelet) Pyramids (Schneiderman Kanade 1998) Haar Filters (Viola Jones 2000)

21 How to classify? Many ways Neural networks Adaboost SVMs
Nearest neighbor

22 Face classifier Training Testing Training Labels Training Images
Image Features Classifier Training Trained Classifier Testing Image Features Trained Classifier Prediction Face Test Image

23 Face recognition Detection Recognition “Sally”

24 Face recognition Typical scenario: few examples per face, identify or verify test example What’s hard: changes in expression, lighting, age, occlusion, viewpoint Basic approaches (all nearest neighbor) Project into a new subspace (or kernel space) (e.g., “Eigenfaces”=PCA) Measure face features Make 3d face model, compare shape+appearance (e.g., AAM)

25 Simple technique Treat pixels as a vector
Recognize face by nearest neighbor

26 State-of-the-art Face Recognizers
Most recent research focuses on “faces in the wild”, recognizing faces in normal photos Classification: assign identity to face Verification: say whether two people are the same Important steps Detect Align Represent Classify

27 Example of recent approach
DeepFace: Closing the Gap to Human-Level Performance in Face Verification Taigman, Yang, Ranzato, & Wolf (Facebook, Tel Aviv), CVPR 2014 Following slides adapted from Daphne Tsatsoulis

28 Face Alignment 1. Detect a face and 6 fiducial markers using a support vector regressor (SVR) 2. Iteratively scale, rotate, and translate image until it aligns with a target face 3. Localize 67 fiducial points in the 2D aligned crop 4. Create a generic 3D shape model by taking the average of 3D scans from the USF Human-ID database and manually annotate the 67 anchor points 5.Fit an affine 3D-to-2D projection and use it to frontally warp the face

29 Train DNN classifier on aligned faces
Architecture (deep neural network classifier) Two convolutional layers (with one pooling layer) 3 locally connected and 2 fully connected layers > 120 million parameters Train on dataset with 4400 individuals, ~1000 images each Train to identify face among set of possible people Face matching (verification) is done by comparing features at last layer for two faces

30 Results: Labeled Faces in the Wild Dataset
Performs similarly to humans! (note: humans would do better with uncropped faces) Experiments show that alignment is crucial (0.97 vs 0.88) and that deep features help (0.97 vs. 0.91)

31 Transforming faces

32 Figure-centric averages
Another usage is to show a significant trend. ----- Meeting Notes (10/4/11 17:12) ----- Aligned through translation and scale average 32 Figure-centric averages Need to Align Position Scale Orientation Antonio Torralba & Aude Oliva (2002) Averages: Hundreds of images containing a person are averaged to reveal regularities in the intensity patterns across all the images.

33 How do we average faces?

34 Morphing image #1 image #2 warp warp morphing

35 Cross-Dissolve vs. Morphing
Average of Appearance Vectors ----- Meeting Notes (10/4/11 17:12) ----- the demo Average of Shape Vectors Images from James Hays

36 Aligning Faces Need to Align Position Scale Orientation Key-points
The more key-points, the finer alignment Images from Alyosha Efros

37 Appearance Vectors vs. Shape Vectors
Vector of 200*150*3 Dimensions 200*150 pixels (RGB) You can think about faces in different ways. You can represent this way or that way. These are complements. Shape Vector Vector of 43*2 Dimensions 43 coordinates (x,y)

38 Average of two Faces Input face keypoints
Pairwise average keypoint coordinates Triangulate the faces Warp: transform every face triangle Average the pixels

39 Average of multiple faces
1. Warp to mean shape 2. Average pixels

40 Average Men of the world

41 Average Women of the world
You will notice that women from every place is very attractive because the …..

42 Subpopulation means Other Examples: Average female Average kid
Average Kids Happy Males Etc. Average female We might be curious what different populations of faces look like. Average kid Average happy male Average male

43 How to represent variations?
Training images x1,…,xN

44 The space of all face images
Eigenface idea: construct a low-dimensional linear subspace that best explains the variation in the set of face images

45 PCA General dimensionality reduction technique
Finds major directions of variation Preserves most of variance with a much more compact representation Lower storage requirements (eigenvectors + a few numbers per face) Faster matching/retrieval

46 Principal Component Analysis
Given a point set , in an M-dim space, PCA finds a basis such that The most variation is in the first basis vector The second most, in the second vector that is orthogonal to the first vector The third… 2nd principal component The goal of PCA is to find orthogonal vectors that the first r vectors have the highest variance of all. ----- Meeting Notes (10/4/11 17:12) ----- Write it more mathematically say what PCA is solving x1 x0 1st principal component 2nd principal component 1st principal component

47 Principal Component Analysis (PCA)
Given: N data points x1, … ,xN in Rd We want to find a new set of features that are linear combinations of original ones: u(xi) = uT(xi – µ) (µ: mean of data points) Choose unit vector u in Rd that captures the most data variance Forsyth & Ponce, Sec ,

48 Principal Component Analysis
Direction that maximizes the variance of the projected data: N Maximize subject to ||u||=1 Projection of data point N 1/N Covariance matrix of data The direction that maximizes the variance is the eigenvector associated with the largest eigenvalue of Σ (can be derived using Raleigh’s quotient or Lagrange multiplier)

49 PCA in MATLAB x=rand(3,10);%10 3D examples mu=mean(x,2);
x_norm = x-repmat(mu,[1 n]); x_covariance = x_norm*x_norm'; [U, E] = eig(x_covariance) U = E =

50 Principal Component Analysis
First r < M basis vectors provide an approximate basis that minimizes the mean-squared-error (MSE) of reconstructing the original points Choosing subspace dimension r: look at decay of the eigenvalues as a function of r Larger r means lower expected error in the subspace data approximation r M 1 eigenvalues

51 Eigenfaces example (PCA of face images)
Top eigenvectors: u1,…uk Mean: μ

52 Visualization of eigenfaces (appearance variation)
Principal component (eigenvector) uk μ + 3σkuk μ – 3σkuk

53 Can represent face in appearance or shape space
Vector 200*150 pixels (RGB) You can think about faces in different ways. You can represent this way or that way. These are complements. Shape Vector 43 coordinates (x,y)

54 First 3 Shape Bases with PCA
Mean appearance ----- Meeting Notes (10/4/11 17:12) ----- show both extremes

55 Manipulating faces How can we make a face look more female/male, young/old, happy/sad, etc.? Current face Prototype 2 Prototype 1 ----- Meeting Notes (10/4/11 17:24) ----- Add a matlab thing to show the differences. show how to use PCA in matlab.

56 Human Perception

57 Prince Charles, Woody Allen, Bill Clinton, Saddam Hussein, Richard Nixon and Princess Diana

58 Jim Carrey (left) and Kevin Costner

59 Nixon and Winona Ryder

60

61

62 Things to remember Face Detection: train face vs. non-face model and scan over multi-scale image Face Recognition: detect, align, compute features, and compute similarity Represent faces with an appearance vector and a shape vector Use PCA for compression or to model main directions of variance Can transform faces by moving shape vector in a given direction and warping


Download ppt "Detection, Recognition, and Transformation of Faces"

Similar presentations


Ads by Google