Support Vector Machine in Matlab - matlab

I need some help. I got *.mat Matlab file after extract the features from 2D static image. The extraction process was used 2D Haar Wavelet in Matlab Apps.
The problems are: 1. How I want to use the *.mat Matlab file as an input to the SVM program in Matlab?
Addition information: i. The image is the iris image.
ii. Link for the screen capture image of the example output after the extraction process
Based on the image, what is suitable/relevant data to be used in SVM in order to classify the image into 2 classes such as class 1 = Healthy Iris or class 2 = unhealthy iris. Or maybe somebody already got the sample Matlab code that similar with this case study, hope you willing to share the code.
TQ in advanced for the help.

Related

How can I make confusion matrix in Matlab

Here, I have already build a detector .xml file by SVM with HOG features to detect human face with two classes (face and notFace). Now I want to evaluate the performance by confusion matrix. I have train samples of 2 classes. As a test sample, I want to use a picture which contains few faces. Are there any way in Matlab to evaluate the performance of this .xml detector file using these data?

Head detection using HOG and SVM

I am currently trying to detect heads in a sequence of real-footage images and am using HOG feature descriptor and SVM as classifier.
Currently I am using Dalal's HOG implementation code in MATLAB found in this link:
http://www.mathworks.com/matlabcentral/fileexchange/46408-histogram-of-oriented-gradients--hog--code-using-matlab
Currently I am using libSVM MATLAB version found in this link:
http://www.csie.ntu.edu.tw/~cjlin/libsvm/
I prepared 350 positive training images and 1243 negative training images.
The hog feature vectors extracted from the training images are converted to libsvmFormat and inputted in the libsvm training method, to obtain a model. The hog vector length is that of 1764.
Regarding the libSVM I chose these as parameters:
-s 0 (i.e. C-SVC)
-c 1 (i.e. cost = 1)
-t 2 (i.e. kernel = RBF)
-g 3 (i.e. gamma = 3 (this is for kernel))
Regarding the HOG version, I left the cell, bin & block parameters as they were in the implementation shown in the link above.
I am using a scanning window of size 128x128 and 256x256 to scan through the whole image to detect possible heads. At each window, the hog feature vector is extracted for each image and is inputted in libsvm predict, to test whether it should be classified as a head or not.
However, after doing all the above, I have a numerous amount of false negatives and can't figure out what I am doing wrong.
Can someone experience please offer some advice on what is possibly wrong? I really need to figure this out please. Much appreciated!

MPCA (Multi Linear Priciple Componont Analysis) code to find the pattern of the gabor filtered image

Hi i want to develop the matlab code for the gabor filterd images , to find the pattern from these images, which can be further used to classify the test face in different class for age estimation.
i have prodused the gabor filtered image , now i want to write the matlab code for Multilinear Princiuple Compononty Analysis, which is simmilar to PCA , but operates in multimode.(2 mode for 100*1,100*1 for 100*100 images )
please give me a idea to write the code.

Using feature vector .mat file for LIBSVM in matlab

I'm new to matlab as well as LIBSVM. I calculated feature vector for every point stating r,g,b values of point in single vector and stored it in .mat file. Currently I'm having around 420 points and 4 classes viz Red/Green/Blue/Other. Now I want to pass this .mat file to train libsvm and based on that classify the newly arriving test point, whether it is red or blue or green or other. Need not to mention, its a multiclass classification and I don't even know how to deal with it ?
svmtrain(TrainingSet,Groups,'kernel_function','rbf'); where TrainingSet is my 420*4 feature vector set and Groups is class name.
Thanks in advance for help.

Ideas for extracting features of an object using keypoints of image

I'll be appreciated if you help me to create a feature vector of an simple object using keypoints. For now, I use ETH-80 dataset, objects have an almost blue background and pictures are took from different views. Like this:
After creating a feature vector, I want to train a neural network with this vector and use that neural network to recognize an input image of an object. I don't want make it complex, input images will be as simple as train images.
I asked similar questions before, some one suggested using average value of 20x20 neighborhood of keypoints. I tried it, It seems it's not working with ETH-80 images, because of different views of images. It's why I asked another question.
SURF or SIFT. Look for interest point detectors. A MATLAB SIFT implementation is freely available.
Update: Object Recognition from Local Scale-Invariant Features
SIFT and SURF features consist of two parts, the detector and the descriptor. The detector finds the point in some n-dimensional space (4D for SIFT), the descriptor is used to robustly describe the surroundings of said points. The latter is increasingly used for image categorization and identification in what is commonly known as the "bag of word" or "visual words" approach. In the most simple form, one can collect all data from all descriptors from all images and cluster them, for example using k-means. Every original image then has descriptors that contribute to a number of clusters. The centroids of these clusters, i.e. the visual words, can be used as a new descriptor for the image. The VLfeat website contains a nice demo of this approach, classifying the caltech 101 dataset:
http://www.vlfeat.org/applications/apps.html#apps.caltech-101