问题
In the Bag of Features/Visual Words paradigm we have a vector V
in k
-dimensions, where V[i]=j
if the i
-th centroid (obtained by k
-means algorithm) is the closest one among all the k
-centroids for j
visual descriptors (e.g. SIFT descriptors).
AFAIK, the resulting visual vector is very sparse (it means that most of entries are 0-value) since k
is really big, but my question is: what is a reasonable value for k
(and so the vector size)? Hundreds of dimensions? Thousands? Especially considering that k
-means execution time depends from k
.
回答1:
Depends on your data, really. Here is the rule of thumb:
Too small K: your clusters will not represent for all patches. Too large K: you may get quantization artifacts and probably overfitting.
来源:https://stackoverflow.com/questions/39829213/bag-of-visual-words-what-is-a-reasonable-word-vector-dimension