aboutsummaryrefslogtreecommitdiff
path: root/report/paper.md
blob: 037d0dfaa66238b1def4829cda44acf614c8cb66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# K-means codebook 

We randomly select 100k descriptors for K-means clustering for building the visual vocabulary
(due to memory issue). Open the main_guideline.m and select/load the dataset.
```
[data_train, data_test] = getData('Caltech');
```
Set 'showImg = 0' in getData.m if you want to stop displaying training and testing images.
Complete getData.m by writing your own lines of code to obtain the visual vocabulary and the
bag-of-words histograms for both training and testing data. Show, measure and
discuss the followings: 

## Vocabulary size 

## Bag-of-words histograms of example training/testing images

## Vector quantisation process

# RF classifier 

Train and test Random Forest using the training and testing data set in the form of bag-of-words
obtained in Q1. Change the RF parameters (including the number of trees, the depth of trees, the
degree of randomness parameter, the type of weak-learners: e.g. axis-aligned or two-pixel test),
and show and discuss the results:

## recognition accuracy, confusion matrix,

## example success/failures,

## time-efficiency of training/testing, 

## impact of the vocabulary size on classification accuracy. 

# RF codebook

In Q1, replace the K-means with the random forest codebook, i.e. applying RF to 128 dimensional
descriptor vectors with their image category labels, and using the RF leaves as the visual
vocabulary. With the bag-of-words representations of images obtained by the RF codebook, train
and test Random Forest classifier similar to Q2. Try different parameters of the RF codebook and
RF classifier, and show/discuss the results in comparison with the results of Q2, including the
vector quantisation complexity. 

# Pictures

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/256t1_e200D5_cm.pdf}
\caption{Part 3 confusion matrix e100k256d5cm}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/Depth_Trees_P2.pdf}
\caption{DepthTreesP2}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/Depth_Trees_P3.pdf}
\caption{DepthTreesP3}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/Depth_Trees_P3_fixedestimators.pdf}
\caption{DepthTreesP3fixedestimators}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/e100k256d5_cm.pdf}
\caption{e100k256d5cm Kmean Confusion Matrix}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/error_depth_kmean100.pdf}
\caption{errordepthkmean100}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/error_depth_p3.pdf}
\caption{errordepthp3}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/kmean_rand.pdf}
\caption{kmeanrand}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/kmeans_vocsize.pdf}
\caption{kmeansvocsize}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/new_kmean_random.pdf}
\caption{newkmeanrandom}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/p3_colormap.pdf}
\caption{p3colormap}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/p3_rand.pdf}
\caption{p3rand}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/p3_time.pdf}
\caption{p3time}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/p3_vocsize.pdf}
\caption{p3vocsize}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/time_kmeans.pdf}
\caption{timekmeans}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/trees_kmean.pdf}
\caption{treeskmean}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=18em]{fig/trees_p3.pdf}
\caption{treesp3}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=10em]{fig/success_km.pdf}
\includegraphics[width=10em]{fig/fail_km.pdf}
\caption{Kmean: Success on the left; Failure on the right}
\label{fig:rerank}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\includegraphics[width=10em]{fig/success_3.pdf}
\includegraphics[width=10em]{fig/fail_3.pdf}
\caption{Part3: Success on the left; Failure on the right}
\label{fig:rerank}
\end{center}
\end{figure}

# References