Ask Your Question

Revision history [back]

I think your suggestion of training a classifier is indeed the way to go. What you need to do is the following and repeat this for each object class you want to detect.

  1. Collect enough training data: positive images in all possible situations you want to detect and negative images of all possible backgrounds. However, since you are making an app that needs to be versatile, and applicable in many situations, you will need heaps of training data, since this is basically detecting 'in the wild'.
  2. Annotate all your training data, selecting the objects in your input images, which is a very time consuming step.
  3. Use the data to train a classifier. For openCV the best way to go for now is using the train cascade classifier algorithm.
  4. Use that model to detect objects and make an inventory.

However, you will need quite some time for data collection and annotation. A good idea might be to take a look at the 'deformable parts model' approach by Pedro Felzenzswalb, which is the leading detector for objects on the Pascal Voc Challenge.

The challenge contains several models for objects, including benches, which could be reused for your purposes.

Interesting links:

  • http://pascallin.ecs.soton.ac.uk/challenges/VOC/
  • http://www.cs.berkeley.edu/~rbg/latent/