COS 429 - Computer Vision |
Fall 2009 |
Course home | Outline and lecture notes | Assignments |
This assignment is about image classification, using a "bag of features" approach. It begins with a training phase:
For each class: For each training image in the class: For each patch: Find the nearest vector in the codebook, and increment a counter for that codeword's entry in a 100-dimensional histogram for the class.
Now, you will classify each image in the test set, using the Naive Bayes method, as described in this document. Implement the following:
For each image in test set: Set the (un-normalized) probability of each class to 1 For each of n randomly-selected patches: Find the nearest codeword in the codebook, and multiply the probability of each class by one plus the count of that codeword in the class's histogram Select the class with the Maximum A Posteriori (MAP) probability.
Report the confusion matrix for the classification. That is, form a matrix of 10 rows and 10 columns (where 10 is the number of classes), such that the entry in the i-th column and j-th row equals the probability that a query for an image of class i yields a result of class j.
This assignment is due Friday, December 18, 2009 at 11:59 PM. Please see the general notes on submitting your assignments, as well as the late policy and the collaboration policy.
Please submit the URL to a .zip file with the following: