aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasil Zlatanov <v@skozl.com>2019-02-12 18:05:28 +0000
committerVasil Zlatanov <v@skozl.com>2019-02-12 18:05:28 +0000
commit8bb27a18fdb6468367d60ccbb4d639b5ae546e59 (patch)
treeab9ae186a12c2342cf38d98f481541229978a28a
parentba8a1b942685ce6eb1a85d2594ada107dc2b888c (diff)
parent19fb52cbe3e1b234000abcdd0347da6b2d28b980 (diff)
downloade4-vision-8bb27a18fdb6468367d60ccbb4d639b5ae546e59.tar.gz
e4-vision-8bb27a18fdb6468367d60ccbb4d639b5ae546e59.tar.bz2
e4-vision-8bb27a18fdb6468367d60ccbb4d639b5ae546e59.zip
Merge branch 'master' of skozl.com:e4-vision
-rw-r--r--report/fig/testhist.pdfbin0 -> 28694 bytes
-rw-r--r--report/fig/trainhist.pdfbin0 -> 23744 bytes
-rw-r--r--report/paper.md17
3 files changed, 4 insertions, 13 deletions
diff --git a/report/fig/testhist.pdf b/report/fig/testhist.pdf
new file mode 100644
index 0000000..271ee29
--- /dev/null
+++ b/report/fig/testhist.pdf
Binary files differ
diff --git a/report/fig/trainhist.pdf b/report/fig/trainhist.pdf
new file mode 100644
index 0000000..3872951
--- /dev/null
+++ b/report/fig/trainhist.pdf
Binary files differ
diff --git a/report/paper.md b/report/paper.md
index 1333c31..d74ea0d 100644
--- a/report/paper.md
+++ b/report/paper.md
@@ -15,7 +15,7 @@ The number of clusters or the number of centroids determines the vocabulary size
## Bag-of-words histogram quantisation of descriptor vectors
-An example histogram for training image shown on figure \ref{fig:histo_tr}, computed with a vocubulary size of 100. A corresponding testing image of the same class is shown in figure \ref{fig:histo_te}. The histograms appear to have similar counts for the same words, demonstrating they had a descriptors which matched the *keywowrds* in similar proportions. We later look at the effect of the vocubalary size (as determined by the number of K-means centroids) on the classificaiton accuracy in figure \ref{fig:km_vocsize}. A small vocabulary size turns out to misrepresent the information contained in the different patches, resulting in poor classification accuracy. When the vocabulary size gets too big (too many K-means centroids), the result is instead overfitting. Figure \ref{fig:km_vocsize} shows a plateau after 60 cluster centers.
+An example histograms for training and testing images is shown on figure \ref{fig:histo_tr}, computed with a vocubulary size of 100. The histograms appear to have similar counts for the same words, demonstrating they had a descriptors which matched the *keywowrds* in similar proportions. We later look at the effect of the vocubalary size (as determined by the number of K-means centroids) on the classificaiton accuracy in figure \ref{fig:km_vocsize}. A small vocabulary size turns out to misrepresent the information contained in the different patches, resulting in poor classification accuracy. When the vocabulary size gets too big (too many k-mean centroids), the result is instead overfitting. Figure \ref{fig:km_vocsize} shows a plateau after 60 cluster centers.
The time complexity of quantisation with a K-means codebooks is $O(n^{dk+1})$ , where n is the number of entities to be clustered, d is the dimension and k is the cluster count @cite[km-complexity]. As the computation time is high, the tests we use a subsample of descriptors to compute the centroids. An alternative method we tried is applying PCA to the descriptors vecotrs to improve time performance. However in this case the descriptors' size is relatively small, and for such reason we opted to avoid PCA for further training.
@@ -27,22 +27,13 @@ this coursework, only leading to an increase in execution time.
\begin{figure}[H]
\begin{center}
-\includegraphics[height=4em]{fig/hist_test.jpg}
-\includegraphics[width=20em]{fig/km-histogram.pdf}
-\caption{Bag-of-words Training histogram}
+\includegraphics[width=12em]{fig/trainhist.pdf}
+\includegraphics[width=12em]{fig/testhist.pdf}
+\caption{Bag-of-words histograms; Training left, Testing right}
\label{fig:histo_tr}
\end{center}
\end{figure}
-\begin{figure}[H]
-\begin{center}
-\includegraphics[height=4em]{fig/hist_train.jpg}
-\includegraphics[width=20em]{fig/km-histtest.pdf}
-\caption{Bag-of-words Testing histogram}
-\label{fig:histo_te}
-\end{center}
-\end{figure}
-
# RF classifier
## Hyperparameters tuning