简体   繁体   English

显示 python opencv 中的视觉词袋中的视觉词示例/样本

[英]Displaying examples/samples of Visual word from Bag of Visual Words in python opencv

I have been working with the Bag of visual words method on my project and would like to produce a visual example of my image words.我一直在我的项目中使用视觉词袋方法,并想为我的形象词制作一个视觉示例。

My Bag of Visual words method, coded in python on opencv3, operates correctly, creating the vocabulary and the image vectors as required.我的视觉词袋方法,在 opencv3 上的 python 中编码,运行正确,根据需要创建词汇表和图像向量。

However I'd like to be able to have some sort of visual output for the clusters, much like this example:但是,我希望能够为集群提供某种视觉 output,就像这个例子:

例子

What would be a way to achieve this?有什么方法可以实现这一目标? I have tried feature matching utilizing the vocabulary versus a singular image form my data sets descriptors but since the image word is a descriptor not a key point, this method does not work out.我已经尝试利用词汇表与单一图像形式的数据集描述符进行特征匹配,但由于图像词是描述符而不是关键点,因此这种方法行不通。

Any help would be greatly appreciated.任何帮助将不胜感激。

Are you trying to just get the data displayed that way?您是否试图以这种方式显示数据? If so, the fastest way would be to look through the AI explainability libraries already created:如果是这样,最快的方法是查看已经创建的 AI 可解释性库:

https://github.com/EthicalML/awesome-production-machine-learning#explaining-black-box-models-and-datasets https://github.com/EthicalML/awesome-production-machine-learning#explaining-black-box-models-and-datasets

If you want to build that, note that the individual neurons in most neural networks (variational autoencoders are an exception) don't easily produce images that look as nice as the ones in those images, so you will want to look at the research papers listed in the explainability projects, like this one: https://github.com/yosinski/deep-visualization-toolbox如果你想构建它,请注意大多数神经网络中的单个神经元(变分自动编码器是一个例外)不容易生成看起来像那些图像中的那样漂亮的图像,所以你需要查看研究论文列在可解释性项目中,例如: https://github.com/yosinski/deep-visualization-toolbox

However, if you do have convolutions with tensors that look exactly like that when displayed, then this is a problem of organizing and displaying those in some GUI, like pyQT or kivy.但是,如果您确实有与显示时完全相同的张量的卷积,那么这是在某些 GUI 中组织和显示这些张量的问题,例如 pyQT 或 kivy。

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

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