DOC PREVIEW
Stanford EE 368 - Study Notes

This preview shows page 1-2-3-4-5 out of 14 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

EE368 ProjectFACE DETECTION AND GENDER RECOGNITIONMichael Bax, Chunlei Liu, and Ping Li26 May 20031 IntroductionThe full face detection and gender recognition system de-scribed here is made up of a series of components con-nected in both serial and parallel, as illustrated in Figure 2.The successive stages are explained in detail in the bodyof this report.2 Colour-based segmentationThe first step in this face detection algorithm is that ofcolour segmentation. The goal is to remove the maxi-mum number of non-face pixels from the images in or-der to narrow the focus to the remaining predominantlyskin-coloured regions.2.1 Colour space selectionThe first step in performing colour-based segmentationis choosing an appropriate colour space in which to op-erate from the wide variety of choices such as RGB,HSV, CMYK, YCbCr, etc [1]. Of these, RGB (red-green-blue) and HSV (hue-saturation-value) have been the mostwidely used. Figure 1 illustrates the geometries of the twospaces.By way of example, HSV representation has certain ad-vantages over RGB when it comes to face detection. AsGarcia et al [2] note, skin colours are sensitive to the light-ing condition. In the RGB space, each of the three com-ponents may exhibit substantial variation under differentlighting environments. In HSV space, however, the hueand saturation components are virtually unchanged.Figure 3 shows the histograms of RGB component val-ues of both face and non-face pixels overall seven traininginput images. Similarly, Figure 4 shows the histograms ofthe same images in HSV space, where the S componentand in particular the H component are well-clustered forface-pixels, while H and S are spread over a wide rangefor the remainder of the image. This observation favoursusing an HSV colour space if only a simple thresholdingcolour segmentation is desired.GRBMagentaBlackWhiteCyanYellowGreenRedBlue(a) RGB modelSHVGreen YellowMagentaBlueBlackWhiteRedCyan(b) HSV modelFigure 1: The RGB and HSV colour models.1MaximaselectionAverage facetemplate matchingMulti−inputanalysisConservative faceregion isolationRegionclassifierRegionclassifierAggressive faceregion isolationRegionlabellingMorphologicaloperationsPrecision face centretemplate matchingMaximaselectionMaximaselectionIndividual female facetemplate matchingGreyscale pyramidcompositionMorphologicaloperationscolour−segmentationHistogram−basedFace location and genderPhotographFigure 2: The face detection system schematic.2The same is true of the YCbCr colour-space, but theclustering does not quite as readily lend itself to projectiononto the axial dimensions, and hence requires a somewhatmore complicated 2D basis for segmentation.Manual segmentations of this type suffer as a conse-quence of approximating a complex bounding region us-ing simple geometric relations. Given that the unknownimages were taken in similar lighting and with similarequipment to the training images, a probability-based seg-mentation may be used.In this case, the choice of spatial domain is not as sig-nificant. However, the fundamental characteristics of acolour space can complicate processing — for example,the non-Cartesian nature of the HSV colour cone indicatesthat non-uniform quantization may be appropriate.2.2 Probability-based classificationDue to the large number of pixels in the training images,there is enough data to create a reasonable estimate of theunderlying probability density functions for both face andnon-face skin colours. LetfX(x|X ∈ Φ)be the colour space probability density function for a pixelvector X in the set of face pixels Φ; the vector componentsXirepresent the colour components — R, G and B in thiscase. Similarly, letfX(x|X /∈ Φ)be the probability density function for non-face skin pix-els. These two density functions can be estimated fromthe empirical distribution of the pixels in the training im-ages.Conversely, let the probability that a given colour pixelis part of a face bepX(X ∈ Φ|X = x).The Bayesian formula [5] givesR =pX(X ∈ Φ|X = x)pX(X /∈ Φ|X = x)=fX(x|X ∈ Φ)fX(x|X /∈ Φ)×πΦπ¯Φ(1)where πΦand π¯Φare the prior probabilities of a randomly-selected pixel falling in a face or the background, respec-tively. Without further information, the ratio ofπΦπ¯Φcan beestimated from the ratio of the total number of face pixelsto the total number of non-face pixels.For convenience, Equation 1 may be reformulated aslogR = logpX(X ∈ Φ|X = x)pX(X /∈ Φ|X = x)= logfX(x|X ∈ Φ)fX(x|X /∈ Φ)+ logπΦπ¯Φ. (2)If the prior information is known, the classification rulewould normally be:X ∈ Φ R ≥ R0= 1, i.e. logR ≥ logR0= 0X /∈ Φ otherwise.However, the prior information is not necessarily avail-able; conversely, in many situations it is desirable to ad-just the classification threshold R0. For example, since inthis approach colour-based segmentation is used for sub-sequent face detection, it is desirable to bias towards mis-classifying a non-face pixel as a face pixel rather than thereverse. Consideration of these factors yields the follow-ing classification ruleX ∈ Φ logfX(x|X ∈ Φ)fX(x|X /∈ Φ)+ α ≥ 0X /∈ Φ otherwise, (3)whereα = logπΦπ¯Φ− logR0(4)is the undecided parameter to be chosen.A range of values for α for image pixel classification inboth RGB and HSV space were evaluated, the results ofwhich are shown in Figure 5. The total classification erroris composed of false positive error (mis-classifying non-face pixels as face pixels) and false negative error (mis-classifying face pixels as non-face pixels).The two sub-figures are quite similar. The false nega-tive error increases with α, while false positive error de-creases with increasing α. The total error reaches mini-mum at α = 3. This optimal value of α is supported bythe observation that, over all 7 training images, the ratioof the total number of face pixels to non-face pixels isroughly116; log116= −2.77.Because this colour-based segmentation is only the firststep in the larger face detection algorithm, it is best to re-tain as many face pixels as possible, minimizing false neg-ative error (even at the cost of including additional non-face pixels), leading to the chosen value of α ≈ 2.Although the performance differences between RGBand HSV colour space are quite small, RGB is nonethe-less superior [3], and that was the colour space chosen forthis algorithm.In practice an empirical histogram derived from man-ual image segmentation is somewhat


View Full Document

Stanford EE 368 - Study Notes

Documents in this Course
Load more
Download Study Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Study Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Study Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?