ECE 5554 / ECE 4554: Computer Vision Fall 2018
Instructions
Due date: 11:55pm on Wed, November 28, 2018
Handin: through Canvas
Starter code and data: hw5.zip
Deliverables:
Please prepare your answer sheet using the filename of FirstName_LastName_HW5.pdf.
Include all the code you implement in each problem. Remember to set relative paths so that we can run your code out of the box.
Compress the code and answer sheet into FirstName_LastName_HW5.zip before uploading it to canvas.
Scene Cateogrization (100 points)
The goal of this assignment is to introduce you to image categorization. We will focus on the task of scene categorization.
You task is to implement image features, train a classifier using the training samples, and then evaluate the the classifier on the test set.
Dataset: In the supplemental material, we have supplied images with 8 outdoor scene categories: coast, mountain,
forest, open country, street, inside city, tall buildings and highways. The dataset has been split into a train set
(1888 images) and test set (800 images), placed in train and test folders separately.
The associated labels are stored in gs.mat, for example, label id of 42.jpg in the training folder corresponds to train_gs(42).
Its actual label name will be names{train_gs(42)}.
A. Color histogram and k-nearest neighbor (kNN) classifier (25 points)
Implement a function to compute the color histogram of an image. For example, you can use the Matlab function hist for computing marginal histogram of RGB channels.
Use nearest neighbor classifier (kNN) to categorize the test images.
B. Bag of visual words model and nearest neighbor classifier (25 points)
Implement K-means cluster algorithm to compute visual word dictionary. The feature dimension of SIFT features is 128.
Use the included SIFT word descriptors included in sift_desc.mat to build bag of visual words as your image representation.
Use nearest neighbor classifier (kNN) to categorize the test images.
C. Bag of visual words model and a discriminative classifier (25 points)
D. CNN model and a discriminative classifier (25 points)
Using pre-trained convolutional neural network as a feature extractor and a SVM for scene categorization.
You can use the ConvNet library in MATLAB MatConvNet with one of the pre-trained classification models here.
Use 1 vs. all SVM classifier to categorize the test images
Write-up
Hint
Graduate credit (max possible 30 points extra credit)
up to 10 points: For bag of visual word models, experiment with different number of visual word, e.g. K = 25, 50, 100, 200, 400, 800, 1600. Report the categorization accuracy for each K.
up to 10 points: For one specific CNN model (e.g., AlexNet or VGGNet), report the classification accuracy when you use different levels of feature activations, e.g., Pool4, Pool5, Fc6, Fc7.
In your answer sheet, describe the extra points under a separate heading.
Acknowledgements
This homework is adapted from the projects developed by Derek Hoiem (UIUC).
|