简体   繁体   English

内置功能,用于在python中编码的视觉文字包

[英]Built in function for bag of visual words encoding in python

In matlab I have this function matlab我有这个功能

 function psi = encodeImage(encoder, im)

This function takes 这个功能需要

  • im which is list of names of images im是图像名称列表

  • encoder which is bovw.mat I have this file as encoder encoderbovw.mat我有这个文件作为编码器

This function does bag of visual words encoding and returns the spatial histograms of images. 该功能可以对视觉文字进行编码并返回图像的空间直方图。

I use this histograms for training in SVM classifier. 我使用这个直方图进行SVM分类器的训练。

I am doing this task in python and I don't want to implement the bag of visual words encoding as my main task is to implement SVM. 我在python中执行此任务,我不想实现可视单词编码包,因为我的主要任务是实现SVM。 Is there a built in function in python that does bag of visual words encoding and returns spatial histograms so I can train SVM classifier on histograms. 在python中是否有内置函数可以进行视觉单词编码并返回空间直方图,因此我可以在直方图上训练SVM分类器。

Are you doing something similar to this? 你在做类似的事吗?

http://www.robots.ox.ac.uk/~vgg/practicals/category-recognition/index.html http://www.robots.ox.ac.uk/~vgg/practicals/category-recognition/index.html

There is a computer vision library called Vlfeat. 有一个名为Vlfeat的计算机视觉库。 It's Matlab version is in active development state. 它的Matlab版本处于活动开发状态。 However there exists a Python interface as well. 但是也存在Python接口 Supports all major image processing features: 支持所有主要的图像处理功能:

  • Scale-Invariant Feature Transform (SIFT) 尺度不变特征变换(SIFT)

  • Dense SIFT (DSIFT) 密集的SIFT(DSIFT)

  • Integer k-means (IKM) 整数k均值(IKM)

  • Hierarchical Integer k-means (HIKM) 分层整数k-means(HIKM)

  • Maximally Stable Extremal Regions (MSER) 最大稳定极值区域(MSER)

  • Quick shift image segmentation 快速移位图像分割

I am not sure whether Pyvlfeat will be sufficient or not. 我不确定Pyvlfeat是否足够。 In fact, I was trying to do the same. 事实上,我也试图这样做。 Couldn't figure out. 想不通。 If it works, awesome, mention the trick in comment. 如果它有效,那就太棒了,请在评论中提一下。 If you have figured out some other method, please mention that too. 如果您已经找到了其他方法,请同时提及。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM