Quantcast
Channel: Borglabs » opencv
Viewing all articles
Browse latest Browse all 2

Thoughts on OpenCV and the Numenta Vision Software

$
0
0

My game plan for building a vision system for my robot project has taken a sharp turn. Initially I had intended to use OpenCV’s object detection modules to build a classifier that can tell apart different kinds of common household objects: ball, doll, shoe, etc.– you know, things that a roaming bot would likely encounter. After sifting through numerous blog posts and tech papers online, I learned a few unsavory bits about Haartraining that prompted me to reconsider.

They are:

  1. Huge number of  training samples needed. Several individuals commented that you need hundreds to thousands of positive images per object category and a comparable number of negative examples to get decent results. Amassing this large collection of images is a daunting task and in my view, not scalable (practical).
  2. Long training time. Several sources have said it takes days to train the classifier on hundreds/thousands of images.
  3. Hard-to-train model. The OpenCV Haar-based classifier, a form of boosting algorithm, is composed of a chain of (typically ~20 to 25?) simpler classifiers working in concert. Each classifier makes the best decision it can while the next one in the chain tries to compensate for the mistakes of the previous, such that at the end of the chain, you get a highly filtered and accurate result.  The beauty of this approach is that, in effect, you get high recognition performance from a series of weaker parts.

So far, so good. But how do you as a designer tweak system’s behavior, besides adding ever more positive or negative images? Where are the levers of control? Hmm… Prompted by these concerns, I searched for a better mousetrap.

Enter Numenta

My search led me to Numenta which, as you may know, is Jeff Hawkin’s long-term venture to build a computing technology that mimics the brain (neocortex, to be more precise). I read his book “On Intelligence” some time ago and skimmed through documents on their early version of NuPIC platform. However at the time (circa 2008?), but I felt that it lacked the necessary support tools and user documentation to be readily used by an outsider.

Things have changed.

  • NuPIC v1.7.1, their toolkit that allows you to build your own computer “brain”, now comes with many examples, scripts and technical documentation to help you get started. The learning curve is still steep, Numenta itself admits, but made more palatable.
  • The Numenta Vision Toolkit is an easy to use GUI app for putting together an object recognition system. At first I was skeptical, but I cobbled an experiment (5 object categories, with ~50-200 training images per category) and was sufficiently convinced that: (1) training is fast… in minutes/hours, not days, (2) baseline accuracy is good. I was getting around 60-80% accuracy but mind you, I was using a some tough test images.

Here are a couple of results from my experiment. Note how the classifier recognized the spiky ornament and the ball of yarn as a “ball” (correct for my test, since they resemble a ball more than the other objects).

Correct recognition results from the Numenta Vision Toolkit: balls

An example of dolls misclassified as a “ball”. Anyone know why?

Incorrect recognition results from the Numenta Vision Toolkit: dolls as balls

Bottom line? Although it’s too early to tell, I like the initial results… enough to invest more time to explore the capabilities of the Numenta software.

Incidentally, the Vision Toolkit is officially supported only on Windows and Mac OS X. But I managed to successfully run it easily on Linux (Ubuntu 9.10). Here’s how:

  1. Install Wine (“Windows emulator”). I don’t exactly recall where I found the instruction… maybe in the Ubuntu Wine documentation page
  2. Then right click on the NumentaVisionToolkit-<version>.exe, select “Open with Wine Windows Program Loader” and follow the standard Windows instructions.
  3. When the install completes, you should see an icon on your desktop. Double-click and prepare to conquer the world.  :)


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images