Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image classification using SVM Python

I am currently working on a projet to perform image recognition. There is a big set of images and I have to predict whether or not an image contains given characteristics. For example, the output could be whether or not there is a banana in the picture.

I would like to implement a classifier using SVM with output yes or no the image contains the given characteristics. What is the simplest way to train a SVM classifier on images with 2 outputs? Is there any template to use in Python? Thanks a lot.

like image 401
Matt Avatar asked Apr 17 '16 14:04

Matt


People also ask

Can we use SVM for image classification?

The main advantage of SVM is that it can be used for both classification and regression problems. SVM draws a decision boundary which is a hyperplane between any two classes in order to separate them or classify them. SVM also used in Object Detection and image classification.

Is SVM faster than CNN?

Detection of ships in satellite imagery successfully uses machine learning and computer vision algorithms. By comparing SVM and CNN on this data, it can be seen that CNN has higher accuracy and is considered better in detecting ship objects. CNN has more steps so that the time needed to run it is longer than SVM does.

What is SVM in digital image processing?

SVM: Support Vector Machine is a supervised classification algorithm where we draw a line between two different categories to differentiate between them. SVM is also known as the support vector network.

Why does CNN use SVM?

The SVM-Linear, SVM-RBF and CNN model is used to extract useful high-level features automatically given that it provides results comparable with each other, including hyperspectral image classification.


1 Answers

With SVM you can classify set of images.For example You can train svm with set of car and plane images.Once you trained it can predict the class of an unknown images as whether it is car or plane.There is also multiclass SVM.

In your case,Make two sets of images for training SVM

  1. Set of images that contain given characteristics(banana)
  2. Set of images that doesn't contain that characteristics

Once your training phase completed it will output to which class the given image belong.If its in banana class you can output as Yes otherwise No.

Usefull links

  1. Hand written Digit Recognition using python opencv
  2. Squirrel and Bird Classifier using java

Edit

  1. Fruit classifier using python
like image 172
Emmanu Avatar answered Oct 01 '22 13:10

Emmanu