1
$\begingroup$

I'm quite new to this; I'm try to classify textures as defective or non-defective. I've used a Gabor filter bank with Matlab which outputs a column vector of the Gabor features of an image. I have a data set of non-defective images and defective images.

My question is, what can I now do with this (or these) feature vectors to classify the texture? I've read about many types of classification (SVMs, Neural networts, nearest neighbour etc.), but couldn't find any similar types of implementation to help me get an idea of what I'm doing - perhaps someone could point me towards a practical example to help my understanding. Many thanks.

$\endgroup$

1 Answer 1

1
$\begingroup$

You have pairs of features-target's which is the first step.

I'm no expert in texture classification, there are probably specialized and/or well-known good methods.

To make it easy for a beginner, I would take a look at the examples for the Python library scikit-learn: http://scikit-learn.org/stable/auto_examples/index.html#general-examples and see what looks interesting, for example a few different random forest examples http://scikit-learn.org/stable/auto_examples/ensemble/plot_forest_iris.html

What you need to run these is a matrix with the filter responses features (the same shape as iris.data in the example (number of examples on the first axis and number of features on the second)) and a binary vector of targets (the same shape as iris.target (number of examples on the first axis)) basically you are replacing the "iris" dataset with your own dataset.

to load text data import numpy as np features = np.loadtxt('data.csv')

(as a side note: numpy works much like the builtin matrix stuff in matlab)

Try out a few different classifiers with a few different parameters and see what happens with the results http://scikit-learn.org/stable/modules/generated/sklearn.metrics.classification_report.html.

Make sure you split the data into train and test data http://scikit-learn.org/stable/modules/generated/sklearn.cross_validation.train_test_split.html or use cross-validation http://scikit-learn.org/stable/modules/cross_validation.html to avoid overfitting, again there is examples of use under the scikit-learn homepage.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.