Git Product home page Git Product logo

opencv_image_classifier's Introduction

ImClass

This is a tool for performing image classification. This project primarily serves as a starting point for developing and experimenting with more sophisticated image classification algorithms using c++. This project is intentionally small for the purpose of being flexible and easy to understand.

Getting Started

ImClass is only known to build and run on Mac OS 10.8, however other systems will probably work as well.

ImClass has the following dependencies:

If you are on a mac and have homebrew, you can install each of them with the following:

brew tap homebrew/science
brew install opencv
brew install boost
brew install unittest-cpp

Once you have all of the dependencies installed, you can compile the program and run the tests using CMake and Make as follows:

mkdir build
cd build
cmake ..
make
make test

Example Programs

The example programs are relatively simple. The program visual_vocabulary generates the visual vocabulary which is basically a set of image feature descriptors that will be counted in each image.

$> visual_vocabulary directory/with/images [output.vv]

The program classifier uses a set of classified images in a directory expected to have the layout:

images/apples/foo.png ... images/apples/bar.png
images/bananas/alpha.png ... images/bananas/omega.png
...

Along with the visual vocabulary to train a bag-of-words classifier.

$> classifier directory/with/images vocab.vv [classifier.cls]

The last program classify uses a visual vocabulary and a classifier to determine the class of an unknown image.

$> classify mysteryimage.png vocab.vv classifier.cls
5
$>

It prints out a number corresponding to the internal representation of the determined class.

Testing

In the test directory, there are a number of test image sets.

  • images - a set of images that the classifier performs well for
  • photos - a set of images that the classifier performs poorly on
  • bad_images - a set of images that are designed to break the classifier

opencv_image_classifier's People

Contributors

rsteiger avatar

Stargazers

 avatar William Entriken avatar  avatar  avatar  avatar yanyong avatar  avatar Ivan Petrov avatar Roman Dutchak avatar Alex avatar Andrews Cordolino Sobral avatar Sreekumar Thaithara Balan avatar

Watchers

Andrews Cordolino Sobral avatar  avatar qiuhan avatar

opencv_image_classifier's Issues

Build instructions

This project looks awesome. The but build instructions no longer work. Does anyone know how to properly get this running on macOS?

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.