- As a group, use the Open-IMAJ library to develop three scene recognition image classifiers.
- The specification of the classifiers is as follows:
- Classifier 1 : A K-Nearest Neighbour Classifier using the Tiny Image feature as the feature vector for each image.
- Classifier 2 : A set of 15 one-vs-all Linear Classifiers using a Bag-of-Visual-Words feature based on fixed size densely-sampled pixel patches.
- Classifier 3 : The best possible Classifier the group can implement (i.e., free to make whatever classifier desired with the goal of maximising performance.)
- After trialing three different classifiers, the team chose a Naive Bayes Classifier that uses a Pyramid Histogram of Words feature vector based on Dense SIFT features.
- Each of these classifiers must then be trained on provided training data and used to classify provided testing data.
- The application of each classifier to the testing data is referred to as a Run (i.e., classifier 1 = run 1, classifier 2 = run 2, ...)
- Three directories:
Run1: Contains the implementation of the first classifier (K-Nearest Neighbour Classifier).Run2: Contains the implementation of the second classifier (Linear Classifiers).Run3: Contains the implementation of the third classifier (best possible classifier).- Each directory contains one file for the classifier used in the run, and one file for the feature extractor.
- The following
javafiles: App.java: Program used to evaluate the performance of each classifier, and run it on the provided testing data.MyClassifier.javaandTuple.java: Helper classes for the classifier implementations.
Documentation.pdf: A description of the group's implementation of all three classifiers.
- Only the
App.javaclass is runnable. - The
App.javaclass defines methods (run1(),run1()andrun3()) that evaluate and run each of the classifiers on the provided training and testing data. - In the
App.javamain method, by default, these methods are all called. - The results of evaluating the classifiers as well as general status messages are outputted to the console.
- The results of classifying the provided testing data with the classifiers are written to text files (
run1.txt,run2.txtandrun3.txt) as a list of pairs of<image name> <classification>. - Calls to each of these methods can be removed/commetted out in order to evaluate and run individual classifiers.
- All three of the implemented classifiers extend the
MyClassifier.javaclass, which defines the basic structure and methods of all of the three classifiers. - One of these methods is
makeGuesses():
public ArrayList<Tuple<String, String>> makeGuesses(VFSListDataset<FImage> dataset) { ... }- After a classifier instance has been instantiated with training data, the
makeGuesses()method can be used to annotate a set of unlabelled images. - The images are passed in as a
VFSListDataset, and the method returns anArrayListofTuples, where each tuple is aString, Stringpair, with the first element being the name of the image, and the second being the annotation of this image.