Coder Social home page Coder Social logo

svm-classifier's Introduction

SVM-Classifier

Example code for how to write a SVM classifier in MATLAB.

How to Run:

To run the code, create two directories to store two categorical sets of image data. These directories of images will be used to train an SVM classifier.

Then, set the two variables in main_script, image_set_directory and image_set_complement_directory,equal to the directory paths where the training images are currently being stored. Finally run the main script to generate an SVM classifier data structure. The SVM classifier data structure can then be used to determine what category an unclassified image best fits.

The default configuration of the main_script.m file is two create a SVM classifier to make a classification decision of whether an unclassifed image best fits within a set of flower images, or set of foliage images. The script then proceeds to test how well the generated SVM classifier works by classifying a set unlabeled images and comparing its results to whether the image content is actually a picture of flowers or foliage.

The main_script can be changed to skip the testing of the SVM classifier and just return the SVM data structure needed for image classification.

Basic Principle:

The code works using the Support Vector Machine (SVM) classification algorithm (see en.wikipedia.org/wiki/Support_vector_machine for more information). It is important to keep in mind that an SVM is only capable of making a binary classifiaction. In other words, an SVM can only be trained to differentiate between two categories of training data at a time. Therefore, differentiating between more than two categories at a time is beyond the scope of this program.

The SVM in this code is used classify sets of images. To do this, a set of general statisics is generated by finding the corner points in an image and calculating the average and standard deviation of the pixel intesities around the cornor points.

svm-classifier's People

Contributors

rich-hart avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.