CSE 455 Autumn 2014: HW4
Skin Finding

Date released: Thursday, October 23, 2014

Date due: Thursday, October 30, 2014 11.59pm

(Late policy: 5% off per day late till Nov 1 )

This assignment follows from HW3. No additional software is provided or needed.

Download the images you need:
1. Faces training set
2. Faces testing set
3. Faces training groundtruth set
4. Faces testing groundtruth

In this assignment, you will use the best clustering algorithm you developed for HW3 to find clusters in normalized r-g space and use them to classify the skin areas on images containing faces. You will use training data to train the Naive Bayes classifier in the WEKA package to determine which clusters are skin pixels and which are not. You will then apply the trained classifier to the test data set and calculate your percentage of accuracy, using the groundtruth we provide.

face image segmented by color skin pixels highlighted

What You Should Do

The goal of this assignment is to develop a very simple skin detector from the results of HW3. For this part of the homework, you will work in normalized RGB space.

The common RGB representation of color images is not suitable for characterizing skin-color. In the RGB space, the triple component (R, G, B) represents not only color, but also luminance. Luminance may vary across a person's face due to the ambient lighting and is not a reliable measure in separating skin from non-skin regions. Luminance can be removed from the color representation in the normalized RGB space or chromatic color space. Chromatic colors, also known as "pure" colors in the absence of luminance, are defined by the simple normalization process shown below:

r = R/(R+G+B)

g = G/(R+G+B)

Note: r+g+b = 1, so you don't need b.

  1. Start with the face training image set (face-training.zip).
  2. Run your K-means algorithm on the face training set to get K clusters with small K, ie K < 9.
  3. Keep the information of the cluster index for each pixel and the cluster centroid (average r and g value).
  4. Use the groundtruth images (face-training-grountruth.zip) to assign the final cluster label (skin or non skin) for training. You can use majority vote of the pixels in each cluster as the cluster label.
  5. Use a classifier to learn the skin model. You can use WEKA and test out your model using the Naive Bayes classifier and at least one other. A short WEKA tutorial is provided here You will need to generate your training and testing data file in the proper ARFF format. The training and testing data file will contain the cluster centroid and the cluster label (Sample of training and testing ARFF file). You want to obtain a skin model with as high classification accuracy as possible.
  6. Test your skin model on both the face training image set and the face test image set. Since you trained the classifier based on clusters, you will also test it based on clusters. The classifier will give you the confusion matrix and cluster accuracy score for that image in terms of correct and incorrect cluster labels.
  7. Report on its performance: classification accuracy and include images of results as well. For the output image results, you can use binary images or you can use color images and turn the pixels of the clusters classified as skin to a color that stands out from the rest. For the accuracy you report, please compute pixel accuracy for each image, rather than cluster label accuracy. You merely label the pixels of the image with their cluster labels and use the groundtruth to determine what percentage of the pixels have correct labels. Finally, make sure you include accuracy and image results for the following face images: face01, face04, face05, face08, face10, face23, face28.

What You Should Turn In

Evaluation

Dropbox

Upload your report and code to the homework dropbox HERE. Any modification made after the deadline will not be counted for your grade.

Homework is due on October 30 (Thursday) by 11:59 PM. Please plan your work early. You can submit until November 1 but you will lose 5% of your grade for every late day.

This is a one-person assignment. You may discuss it, but please turn in your own individual work.