简体   繁体   English

从Gabor过滤器制作特征向量进行分类

[英]Making feature vector from Gabor filters for classification

My aim is to classify types of cars (Sedans,SUV,Hatchbacks) and earlier I was using corner features for classification but it didn't work out very well so now I am trying Gabor features. 我的目标是对汽车类型(轿车,SUV,两厢车)进行分类,之前我使用角落功能进行分类但是效果并不好,所以现在我正在尝试Gabor功能。

code from here 来自这里的代码

Now the features are extracted and suppose when I give an image as input then for 5 scales and 8 orientations I get 2 [1x40] matrices. 现在提取特征并假设当我将图像作为输入时,然后对于5个刻度和8个方向,我得到2 [1x40]矩阵。

1. 40 columns of squared Energy. 1. 40列平方能量。

2. 40 colums of mean Amplitude. 2. 40列平均幅度。

Problem is I want to use these two matrices for classification and I have about 230 images of 3 classes (SUV,sedan,hatchback). 问题是我想使用这两个矩阵进行分类,我有大约230个3类图像(SUV,轿车,掀背车)。

I do not know how to create a [N x 230] matrix which can be taken as vInputs by the neural netowrk in matlab.(where N be the total features of one image). 我不知道如何创建一个[N x 230]矩阵,它可以被matlab中的神经网络用作vInputs。(其中N是一个图像的总特征)。

My question: 我的问题:

  1. How to create a one dimensional image vector from the 2 [1x40] matrices for one image.(should I append the mean Amplitude to square energy matrix to get a [1x80] matrix or something else?) 如何从2 [1x40]矩阵为一个图像创建一维图像矢量。(我应该将平均幅度附加到平方能量矩阵以获得[1x80]矩阵或其他什么?)

  2. Should I be using these gabor features for my purpose of classification in first place? 我是否应该首先使用这些gabor功能进行分类? if not then what? 如果不是那么什么?

Thanks in advance 提前致谢

In general, there is nothing to think about - simple neural network requires one dimensional feature vector and does not care about the ordering, so you can simply concatenate any number of feature vectors into one (and even do it in random order - it does not matter). 一般来说,没有什么可考虑的 - 简单的神经网络需要一维特征向量而不关心排序,因此您可以简单地将任意数量的特征向量连接成一个(甚至以随机顺序进行 - 它不会物)。 In particular if you have same feature matrices you also concatenate each of its row to create a vectorized format. 特别是如果你有相同的特征矩阵,你也可以连接它的每一行来创建一个矢量化格式。

The only exception is when your data actually has some underlying geometrical dependicies, for example - matrix is actualy a pixels matrix. 唯一的例外是当您的数据实际上具有一些基础几何依赖时,例如 - 矩阵实际上是像素矩阵。 In such case architectures like PyraNet, Convolutional Neural Networks and others, which apply some kind of receptive fields based on this 2d structure - should be better. 在这种情况下,像PyraNet,卷积神经网络和其他的架构,应用某种基于这个2d结构的感受域 - 应该更好。 But those implementations simply accept 2d feature vector as an input. 但这些实现只是接受2d特征向量作为输入。

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

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