Giter Site home page Giter Site logo

pic-numero's Introduction

Pic-Numero

This is a project exploring the counting of objects in images. While the project makes use of the example of counting wheat grains in images of wheat plants, it can be applied to objects of any kind. A very high-level description of the way the system works is that it trains a classifier to recognise images of the object being counted then attempts to recognise instances of this object in any given image and returns the number of recognised matches. As such, the count returned is really an estimate.

The system can make use of different classifiers depending on your choice (currently SVM, MLP neural net and CNN). It might be useful to know that the results of the classifications of the last count can be found in src/Results. "_0" means it was classified as false (not an object being counted) while "_1" means it was classified as true (object being counted).

Usage

First, to train the system to identify objects you want, all you have to do is populate the "train" folder (which contains "positive" and "negative" subfolders) with your training images appropriately.

Then in your code be sure to add from PicNumero import PicNumero.

You can then use PicNumero.run_with_svm() PicNumero.run_with_mlp() or PicNumero.run_with_cnn() with the filename of the image whose objects are to be counted as the argument.

from PicNumero import PicNumero

imagePath = "Path/To/Your/Image.png"
count = PicNumero.run_with_cnn(imagePath)

PicNumero also includes a helper standalone program for ROI extraction however it is only available for Mac OS X and certain flavours of Linux at this time. Can be found in dist/gui/. Run from terminal with the command "./dist/gui/gui". Source is contained in "gui.py" and "gui_checkbox_handlers.py".

Dependencies

Makes use of Python 2.7 and the scikit machine learning and image processing libraries (which can be found here and here).

Note: TensorFlow is required to use the CNN functionality (CNN.py). If you do not have TensorFlow already installed, visit here for detailed instructions on how to install it.

Compatibility

Tested and working on OS X and certain flavours of Linux. Should work on Windows too but could potentially need some tweaking; I've never tried to run it on windows before.

Credits

Made use of Google's excellent TensorFlow library

pic-numero's People

Contributors

oduwa avatar

Watchers

James Cloos avatar Ivan Dilber 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.