简体   繁体   English

使用SVM Python进行图像分类

[英]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. 我想使用SVM实现分类器,输出是或否图像包含给定的特征。 What is the simplest way to train a SVM classifier on images with 2 outputs? 在具有2个输出的图像上训练SVM分类器的最简单方法是什么? Is there any template to use in Python? 是否有在Python中使用的模板? Thanks a lot. 非常感谢。

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. 使用SVM,您可以对图像集进行分类。例如,您可以使用一组汽车和平面图像训练svm。一旦训练,它可以预测未知图像的类别,无论是汽车还是平面。还有多类SVM。

In your case,Make two sets of images for training SVM 在您的情况下,制作两组图像用于训练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 使用python opencv手写数字识别
  2. Squirrel and Bird Classifier using java 使用java的松鼠和鸟分类器

Edit 编辑

  1. Fruit classifier using python 使用python的水果分类器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM