Assignment 1, due October 21, 5% of class score
Instructions
- Submit through OWL by the midnight of the due date
- You may discuss the assignment with other students, but all code/report must be your own work
- Assignment is to be done in Matlab
- Deliverables: matlab code that you write yourself, and assignment write-up
- You are allowed to use any matlab functions and
VLFeat library. Make sure you run vl_setup before using vlfeat library.
- Indoor scene classification data
for the assignment. There are ten different scene classes. Each scene class is in its own subdirectory. Each subdirectory contains 100 scenes (examples).
- Useful matlab commands: fitcknn, predict, crossval, kfoldLoss, hist
- Useful VLFeat commands: vl_ikmeans, vl_ikmeanspush, vl_hog, vl_covdet
- Problem 1 (20%): Use 80 samples for training, 20 for testing. Use grayscale pixel representation and kNN classifier. Report test error for several values of k of your choice.
- Problem 2 (20%): Use 80 samples for training, 20 for testing. Use global color histogram and kNN classifier. Report test error for several values of k of your choice.
- Problem 3 (20%): Use local color histogram with kNN classifier. Use 10-fold cross-validation to choose how many local regions to use for the local histogram and the value of k for the kNN classifier. Use all 100 samples for cross validation. Report cross validation error for each case you try.
- Problem 4 (20%): Use HOG features and kNN classifier. Use 10-fold cross validation to find a good value for number of orientations, cell size, and k for kNN classifier. Report cross validation error for each parameter choice you try. In this case, you want to reduce images to be the same size so that the number of HOG features is the same of each sample. I suggest reducing each image to 250 rows and 250 columns.
- Problem 5 (20%): Use 80 images for training, 20 for testing. Build a dictionary from local image patches. Recommended patch size is from 10 by 10 to 40 by 40, and vocabulary size (number of codewords) from 50 to 400. I reccommend using at most 1% of all possible patches to build dictionary, otherwise kmeans algorithm is too slow. Make sure all patches are normalized to have mean of zero and variance of 1. Use patch-based global histograms and kNN classifier. Report test error for several of your choices for k, patch size, dictionary size. Display the dictionary you "learn" (like slide 42, lecture 4).