DXMPsych2012Project: Difference between revisions

From Psych 221 Image Systems Engineering
Jump to navigation Jump to search
imported>Psych2012
imported>Psych2012
Line 57: Line 57:
We define 1 to indicate skin, and 0 to indicate non-skin. A pixel <math>I</math> with chromatic features <math>[r \; g \; Cb \; Cr \; H \; S \; x \; y \; a \; b]</math> is classified to be either 1 or 0 with following equations. We only present classification using RGB classifier <math>C_{rg}</math>, since classification using classifiers in other color spaces are applied in similar ways.  
We define 1 to indicate skin, and 0 to indicate non-skin. A pixel <math>I</math> with chromatic features <math>[r \; g \; Cb \; Cr \; H \; S \; x \; y \; a \; b]</math> is classified to be either 1 or 0 with following equations. We only present classification using RGB classifier <math>C_{rg}</math>, since classification using classifiers in other color spaces are applied in similar ways.  
:<math> \quad I_{classify} = C_{rg}[i,j] </math>
:<math> \quad I_{classify} = C_{rg}[i,j] </math>
<math> \quad i = floor(\frac{r}{\tau}) \quad j = ceiling(\frac{g}{\tau})</math>
:<math> i = floor(\frac{r}{\tau}) \quad j = ceiling(\frac{g}{\tau})</math>
 
Note that <math>\tau</math> is a hyperparameter that is specific to the classifier. <math>\tau</math> of a diffident classifier will take on a different value.
We evaluate the performance of a classifier by computing the false dismissal rate <math>\epsilon_{FN}</math> and the false detection rate <math>\epsilon_{FP}</math> of the classifier.





Revision as of 22:42, 19 March 2012

Back to Psych 221 Projects 2012




Introduction

With the proliferation of digital cameras and advancement of processors, software image processing and image perception applications have become increasing important and widely-used. In applications such as face localization, human detection and pose classification, skin detection is usually the first step for segmentation. Skin detection using color information has been long studied. Color based skin detection is fast and simple to implement, however, it usually suffer from high false detection error due to metamerism, i.e. nonskin surface have the same color space value as skin. This project will evaluate performance of skin detection in different color spaces, and answer the question - is there a color space that is the best for skin detection?. In this project, I will build skin classifiers in RGB, YCbCr, HSV, xyY and CIELAB, and evaluate their performance based on the false detection and false dismissal rate. In addition, we construct hybrid skin detectors that combine information of multiple color spaces.


Figure 1

Below is another example of a reinotopic map in a different subject.
Figure 2

Once you upload the images, they look like this. Note that you can control many features of the images, like whether to show a thumbnail, and the display resolution.

Figure 3


Methods

Color Space

We use a pixel based histogram approach to construct skin detectors. For each pixel, we extract the chromatic values in all 5 color spaces, we call these values chromatic features. These chromatic features are used to construct histogram-based skin detectors. There are 10 chromatic values in a pixel, [rgCbCrHSxyab]. We ignore brightness and lightness values in the color spaces in order to achieve illuminant invariance in the skin detectors. In the next section, we will explain how the chromatic features are defined.

RGB

[rg] are the chromatic features in RGB color space. They are normalized red and green values that are defined as

[rg]=[RG]R+G+B

YCbCr

[CbCr] are the blue-difference and red-difference values in YCbCr color space. They are normalized to range between 0 and 1 for this project.

HSV

[HS] are the hue and saturation values in HSV color space.

xyY

xyY color space is a normalized presentation of XYZ color space. [xy] are defined as,

[xy]=[XY]X+Y+Z

CIELAB

[ab] are normalized a* and b* values in CIELAB color space. a and b range between 0 and 1. a=0 indicates green and a=1 indicates red, similarly, b=0 indicates blue and b=1 indicates yellow.

Classifier

We used MCG-Skin dataset to train, validate and test our skin detectors. MCG-Skin consist of 1000 images of people collected from the internet, the dataset also contains the ground-truth of human skin for the 1000 images. From the MCG-Skin dataset, We chose 100 images for training, 100 images from validation, and 100 images for testing. With all the chromatic features define, we constructed a two-dimensional histogram for each color space from a training set images. Let Hrg be the histogram of RGB color space, and Hrg(i,j) is the value of bin [i,j] of the histogram. Let N(k) be the number of pixels in training image k, and I(k,l) be the lth pixel of kth image. Define r(k,l) and g(k,l) to be the r and g values of I(k,l). In addition, we denote the bin size of the histogram as τ. The histogram can be expressed as

Hrg[i,j]=k=1100l=1N(k)𝟏{iτrk,l<(i+1)τ}𝟏{jτgk,l<(j+1)τ}(𝟏{isskin(Ik,l)}𝟏{¬isskin(Ik,l)})

In other word, Hrg(i,j) is the number of skin pixels minus the number of non-skin pixels in the range that is specified by bin )(i,j). We then normalize the histogram to [0,1] by

Hrg[i,j]=max(Hrg(i,j),0)max(Hrg)

The histogram is further smoother by a 2D Gaussian filter Gσ whose variance is σ2.

Hrg[i,j]=(HrgGσ)[i,j]

Histograms for other color spaces HCbCr, HHS, Hxy and Hab are similarly constructed. The classifier for a color space is a binary matrix that has the same size as the corresponding histogram. Let Crg be the classifier of RGB color space, and let Trg be the threshold for Hrg. Then

Crg[i,j]=𝟏{Hrg[i,j]>Trg}

classifiers for other color spaces CCbCr, CHS, Cxy and Cab are similarly constructed. We define 1 to indicate skin, and 0 to indicate non-skin. A pixel I with chromatic features [rgCbCrHSxyab] is classified to be either 1 or 0 with following equations. We only present classification using RGB classifier Crg, since classification using classifiers in other color spaces are applied in similar ways.

Iclassify=Crg[i,j]
i=floor(rτ)j=ceiling(gτ)

Note that τ is a hyperparameter that is specific to the classifier. τ of a diffident classifier will take on a different value. We evaluate the performance of a classifier by computing the false dismissal rate ϵFN and the false detection rate ϵFP of the classifier.


In constructing classifiers, we need to find the value of hyperparameters τ, σ, and T for each color space.

proposed method

What is the proposed method

Results - What you found

Results in different color spaces

Some text. Some analysis. Some figures. Maybe some equations.

Results with combined method

Some text. Some analysis. Some figures. Maybe some equations.

Conclusions

Here is where you say what your results mean.

References

[1] Cahi, D. and Ngan, K. N., “Face Segmentation Using Skin-Color Map in Videophone Applications”, IEEE Transaction on Circuit and Systems for Video Technology, Vol. 9, pp. 551-564 (1999).

[2] Crowley, J. L. and Coutaz, J., “vision for Man Machine Interaction”, Robotics and Autonomous Systems, Vol. 19, pp. 347-358 (1997).

[3] Kjeldsen, R. and Kender., J., “Finding Skin in Color Images”, Proceedings of the Second International Conference on Automatic Face and Gesture Recognition, pp 312-217 (1996).

[4] Singh, S. K., Chauhan, D. S., Vatsa, M. And Singh, R., “A Robust Skin Color Based Face Detection Algorithm”, Tamkang Journal of Science and Engineering, Vol. 6, No. 4, pp. 227-234 (2003).

Appendix I - Code and Data

Code

File:CodeFile.zip

Data

zip file with my data

Appendix II - Work partition (if a group project)

Brian and Bob gave the lectures. Jon mucked around on the wiki.