Face Detection using Template Matching

19
Face Detection using Template Matching Deepesh Jain Husrev Tolga Ilhan Subbu Meiyappan EE 368 – Digital Image Processing Spring 2002-2003 05/30/03

description

Face Detection using Template Matching. Deepesh Jain Husrev Tolga Ilhan Subbu Meiyappan. EE 368 – Digital Image Processing Spring 2002-2003 05/30/03. Face Detection. Objectives System Architecture Skin Color Segmentation Studied Methods Iterative Template Matching Classification - PowerPoint PPT Presentation

Transcript of Face Detection using Template Matching

Page 1: Face Detection using  Template Matching

Face Detection using Template Matching

Deepesh JainHusrev Tolga IlhanSubbu Meiyappan

EE 368 – Digital Image ProcessingSpring 2002-2003

05/30/03

Page 2: Face Detection using  Template Matching

Face Detection

• Objectives

• System Architecture

• Skin Color Segmentation

• Studied Methods

• Iterative Template Matching

• Classification

• Experimental Results

• Conclusions

Page 3: Face Detection using  Template Matching

Objectives

• Devise Simple and Fast algorithm for face detection

• Detect as many faces as possible in the training images, including occluded ones

• Minimize detection of non-faces and multiple detects Results for Training_1.jpg

Page 4: Face Detection using  Template Matching

System Architecture

SkinSegmentation

RGB to YCbCrRGB to HSVThreshold to

determine skinregions

Multi-resolutionIterative

TemplateMatching

Using normxcorr2

Classifier

Input RGB JPEGImage

SkinPixels

AverageFace Threshold

Face/Non-Face

Page 5: Face Detection using  Template Matching

Skin Segmentation

• Skin segmentation using (Cr, Cb, Hue) space.

• Cleanup using morphological operators

rgb2ycbcr()

rgb2hsv()

Skin pixel If142 < Cr < 160

100 < Cb < 1500.9 < Hue, Hue < 0.1

Skin PixelsInputImage

Page 6: Face Detection using  Template Matching

Skin Segmentation Results

Page 7: Face Detection using  Template Matching

• Eigen Decomposition of faces –Dropped, eigenimages could not classify occluded images – For full face images, had 100% accuracy for both face detection and gender recognition

• Template Matching –Template matching with various average face pyramid levels

• Wavelets and Neural Nets– Wavelets for multiresoltion analysis and ANNs for classification (Linear Vector Quantization approach)

Investigated Methods for Face Detection

1 2 3 4 5 6 7 8

Page 8: Face Detection using  Template Matching

Eigen Decomposition

1 2 3 4 5 6 7 8

original

MSE = 1.19e-022reconstructed

First 8 Eigen Images

Original and Reconstructed Images

•Sirovich and Kirby method•MSE Calculation (original & reconstructed)

Page 9: Face Detection using  Template Matching

Start

SkinSegmentation

Cross Correlationbetween Image Blocks and

all scaled average faces

Find Face Location

Face Loc = Pos(Max corr)Face Size = Size(avg face)

Blank out the Face

Using Face Loc &Size just found

Max(xcorr) >Threshold

Next Block

All BlocksDone?

Stop

No

No

Yes Yes

FaceCandidates

Average Faces

Template Matching

Page 10: Face Detection using  Template Matching

Temple Matching – Initially

image block

image

Page 11: Face Detection using  Template Matching

Temple Matching – Step 1

image

image block

Page 12: Face Detection using  Template Matching

Temple Matching – Step 2

image

image block

Page 13: Face Detection using  Template Matching

Temple Matching – Step 3

image

image block

Page 14: Face Detection using  Template Matching

Temple Matching - Finally

image

image block - residue

Page 15: Face Detection using  Template Matching

Results on a Sample Image

Results for Training_1.jpg

Training_1.jpg

Page 16: Face Detection using  Template Matching

Results

TrainingImage

Final Score

Detect Score

# Hits # Repeat

s

# False Positiv

es

Dist. to Centroi

d

CPU time

Training_1

21 21 21 0 0 12.10 163.87

Training_2

20 20 23 1 2 16.61 172.76

Training_3

23 23 25 0 2 8.84 161.54

Training_4

21 21 24 1 2 15.87 133.66

Training_5

23 23 23 0 0 11.91 146.11

Training_6

23 23 24 0 1 9.46 147.51

Training_7

20 20 22 1 0 17.55 198.78

Page 17: Face Detection using  Template Matching

Conclusion

• Good skin segmentation is a key factor for good face recognition

• Eigenimages did not do well with occluded faces

• Template matching did very well for face detection– Fast algorithm (<4 mins)

• “Multi-resolution Pyramid” scheme necessary to match faces of various sizes

Page 18: Face Detection using  Template Matching
Page 19: Face Detection using  Template Matching

17

16

15

14

13

5 (0)4 (19)12

5 (0)12 (08)11

2 (1)2 (20)10

2 (1)1 (22)9

1 (2)10 (14)8

5 (0)9 (16)7

5 (0)8 (17)6

5 (0)11 (13)5

5 (0)6 (18)4

5 (0)6 (18)3

5 (0)2 (20)2

2 (1)4 (19)1

Gender RecognitionFace Detection

17

16

15

14

13

5 (0)4 (19)12

5 (0)12 (08)11

2 (1)2 (20)10

2 (1)1 (22)9

1 (2)10 (14)8

5 (0)9 (16)7

5 (0)8 (17)6

5 (0)11 (13)5

5 (0)6 (18)4

5 (0)6 (18)3

5 (0)2 (20)2

2 (1)4 (19)1

Gender RecognitionFace Detection