0
$\begingroup$

I am new to image processing. As my project I am doing "image classifier using SVM". I have the idea of my final software "I select some image and give it as input to my software and it will classify that image. If I give the image of an animal it will classify it to cat or snake suitably"

When I google about it it says "First you need to train SVM". What it mean by Training SVM? What is the actual input to SVM in my case (image classification)?

SVM is just a classifier how it classify images. Is it necessary for me to covert image to any particular format?

$\endgroup$

2 Answers 2

0
$\begingroup$

SVM does not work on any image format directly. It just wants a set of variables, where each example has the same number of variables. So you will transform your inputs into equal size arrays. So, for example, a 3x3 greyscale image turns into $$X_1,X_2 ... X_9$$.

Since this is an applied ML task, you should thing about preprocessing and feature engineering. For example, adjusting for various lighting conditions by centering and centering luminance. If color is important, maybe moving from RGB to HSV color space allows the SVN to consider color and luminance separately.

Also keep in mind that more pixels may not always equal better performance. If the most important pixels for distinguishing are in a certain area, a scaled down, smaller image may capture the essence of the differences better because it smooths out misalignments. Keep in mind that once you convert the image to an input array, SVN loses any notion of adjacent pixels. Every pixel is a different dimension.

You may want to do some feature extraction, such as a number for the overall contrast of the image. See Wikipedia's section on image feature extraction The idea is that you can summarize the important aspects of the image in some overall variables and if they are important, SVM will discover that.

$\endgroup$
0
$\begingroup$

You can give raw pixels as your input. As preprocessing step you should adjust your pictures to the same size, probably some small size for the sake of performance. Also convert pictures to black-white, again, for performance and because color doesn't matter that much.

But anyway state of the art image recognition is deep learning, so I would better suggest that.

$\endgroup$

Your Answer

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