Monday, February 27, 2012

HAAR xml file

Because many people have asked for it, I believe that it will make your life easier I give you my trained hand HAAR cascade xml file.
It's trained on about 20k positives and 20k negatives and works on any orientation.
Watch for high false positive rates. It also works with the cuda version of OpenCV.

It will help you but it won't make you happy.

The xml download. In a later post I will show you how to make haar cascade perform even better.


  1. Do you know how to convert new type cascades (generated with opencv_traincascade) to old type (generated with opencv_haartraining)?
    I have a cascade generated with traincascade, but now I want to use it with CUDA, and GPU cascade classifier don't support the new cascade.
    Thanks. Regards

  2. What code do you use to detect an open hand? I'm using standard opencv function CvDetectObjects -- it works fine with haarcascade_frontalface_default.xml but not with your haar xml. What am I doing wrong?

  3. Thanks a lot for the haar file, it works good.
    what else can we make to make the detection better?

  4. This detects everything but hand? :-)

    1. I forgot to mention, it works far better if you pass a filter through the image for detecting skin colour, otherwise it is pretty useless.

    2. can you please share the code with using haarcascade + detecting skin colour??