What it mean by Training SVM

…衆ロ難τιáo~ 提交于 2019-12-08 10:05:03

问题


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?.please help.


回答1:


Support Vector Machine (SVM) is a machine learning model for supervised data classification. SVMs essentially learn a hyper-plane which separates the data space into 2 regions (in 2 class case). In your case, suppose you have images of snakes and cats and you need to classify them. The steps you'll need to follow are

Extract 'features' from the images.

These 'features' may be functions of appearance of snake/cat in your case e.g colour of the animal, shape of the animal etc. By concatenating these features you can get a multi-dimensional feature vector.

Train an SVM classifier

Training essentially learns a separating hyper-plane between the feature vectors of snake class and cat class . For example, if your feature vector is 2-dimensional, training an SVM classifier would amount to 'learning' a line which best separates your labeled-data/training-data. You could use any of the multitude of freely available libraries of machine learning. In case you speak python, you could use sklearn for the task. This task of learning (hyper-plane in linear SVM) is referred to training.

Classify the images.

Once you have trained your model, you could then use it classify images whose class is not known.

Note: I am simplifying a lot of details/issues involved in this answer. I suggest you should read-up about SVM




回答2:


You should look into dlib, a python module that does image processing and recognition:

http://dlib.net/

Specifically the examples for object detectors in python:

http://dlib.net/train_object_detector.py.html

It gives detailed explanations and instructions for installation.



来源:https://stackoverflow.com/questions/35250087/what-it-mean-by-training-svm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!