saw*_*yer 5 python opencv machine-learning image-processing computer-vision
我想实现这个讨论的分类文件.我已经实现了除特征提取之外的所有功能.在5.1节中,作者写道:
"对于每个超像素,提取两种特征类型:使用有符号的平方根和L a b颜色值进行变换的密集冲浪.在我们的实验中,证明有利于提取超像素周围的特征,即在其边界框内,包括更多背景.使用改进Fisher矢量两者冲浪和颜色值被编码为在VlFeat和实现与64种模式GMM,我们执行在两个特征频道PCA增白,在端部的两个编码的特征向量被串接,产生具有致密的载体8 '576值."
这里发生了很多事情,我对执行这些步骤的顺序以及数据集的哪个部分感到困惑.
这是我在伪python中的解释:
def getFeatures(images):
surfs_arr = []
colors_arr = []
for image in images:
superpixels = findSuperpixels
for superpixel in superpixels:
box = boundingBox(superpixel)
surfs = findDenseSURFs(box)
colors = findColorValues(box)
surfs_arr.append(surfs)
colors_arr.append(colors)
surfs_sample = (randomly choose X samples from surfs_arr)
colors_sample = (randomly choose Y samples from colors_arr) #or histogram?
# gmm has covariances, means properties
gmm_surf = GMM(modes=64, surfs_sample)
gmm_color = GMM(modes=64, colors_sample)
surfs_as_fisher_vectors = IFV(gmm_surf, surfs_arr)
colors_as_fisher_vectors = IFV(gmm_color, color_arr)
pca_surfs = PCA(ifv_surfs, whiten, n_components = 64)
pca_colors = PCA(ifv_colors, whiten, n_components = 64
features = concatenate((pca_surfs, pca_colors), axis=1)
return features
Run Code Online (Sandbox Code Playgroud)
我的问题:
一世.应该在创建GMM之前执行PCA美白吗?(就像在这个例子中)
II.在将它们编码为Fisher Vectors之前,我应该分别从surfs_arr和colors_arr中删除surfs_sample和colors_sample集吗?
III.就描述颜色值而言,最好是将它们保留原样还是创建直方图?
IV.作者声称他使用了密集的SURF,但没有提到它的密度.你推荐一个特定的起点吗?4x4,16x16?我误解了吗?
v.有什么想法作者提出"具有8,576个值的密集向量"?为了得到具有不同尺寸超像素的一致数量的特征,在我看来他一定是
1)使用直方图来表示颜色值,或者
2a)调整每个超像素的大小,或
2b)改变他的SURF网格的密度.
我正在使用python w/numpy,opencv,scikit-learn,mahotas和从VLFeat移植的fisher矢量实现.
谢谢.
| 归档时间: |
|
| 查看次数: |
965 次 |
| 最近记录: |