0

I've built a classifier that has high accuracy in classifying certain objects of interest, given images that focus only on those objects.

However, when this same classifier is applied to an object detector that scans a larger image using selective search or sliding windows, the detector's performance is dismally low.

I don't understand why. Is this normal in computer vision? And what's the solution?

user961627
  • 12,379
  • 42
  • 136
  • 210

1 Answers1

0

You would have to be more specific. What does "dismally low" mean? Are you seeing a lot of false positives? A lot of false negatives? Also, what kind of objects are you trying to detect?

One thing to keep in mind is when you do sliding-window object detection, you typically get multiple detections around the actual location of the object of interest. The usual way to deal with this issue is to merge the overlapping detections. For example, the Computer Vision System Toolbox for MATLAB provides selectStrongestBbox function for this.

Another possible issue could be the variation in aspect ratio of the objects of interest. Typically, when you train a cascade classifier all the positive images are resized to be the same "training size" (e.g. 32x32 pixels). Then, when you do sliding windows, the aspect ratio of your window is the same as that of the training size. This results in good detection accuracy only if the aspect ratio of your objects of interest stays roughly the same. For example, this works well for faces. This will not work as well for a class of objects with varying aspect ratios, such as a category that includes both regular cars and stretched limousines.

And, of course, don't forget that haar cascade detectors do not tolerate in-plane or out-of-plane rotation very well.

Dima
  • 38,860
  • 14
  • 75
  • 115
  • I'm seeing a plethora of false positives. Out of a 100 images, I have about 60 true positives detected, but over a thousand false positives. I'm detecting vehicles, using a python implementation of a multi-class version of cascaded gentleboost classification. By dismal I mean as low as precision being about 0.02. But when performing classification, the accuracy of the same classifier is around 70%. – user961627 Jan 06 '15 at 17:26
  • Are you merging the overlapping detections? Maybe you could also use more negative images. It sounds like your classifier is not as good as you think. – Dima Jan 06 '15 at 18:08