Ask Your Question
0

Multiblock Local Binary Pattern in object detect module confusion.

asked 2015-08-06 08:15:46 -0600

warmspringwinds gravatar image

Hello.

Recently I was following the original paper about the gentle adaboost training.

I was a little bit confused by the fact that in the paper they use multi-branch tree with 256 values, but the implementation of traincascade and cascade xml files have a two branch tree. Is it a problem or a special trick. I didn't find any information in documentation. I would be really glad if someone briefly explains this thing or point me out the part in documentation where this thing is described.

I am trying to implement the training stage myself and I am interested in how it's made under the hood of OpenCV. Because the the way that the authors of the paper fit the tree and the way it is done in the OpenCV is clearly different and I didn't find any documentation on that.

Thank you.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-08-07 02:13:15 -0600

The default setting of OpenCV is to use stumps as weak classifiers, which means we use decisions trees based on only a single feature value. Then the weak features are combined into a stage that has to reach a certain performance, which is indicated by the parameters -maxFalseAlarmRate and -minHitRate.

You can however change how the feature decision trees are built this by playing round with the following parameters

  • -maxDepth < max_depth_of_weak_tree > is the parameter that defines how many splits deep a decision tree can go. OpenCV uses stumps because it is the fastest possible decision tree to evaluate and the fast way to benefit the most of the early rejection principle.
  • -maxWeakCount < max_weak_tree_count > is the parameter that defines how many weak trees there can be in a single stage before you need to move on. This is to avoid very long stages that take a lot of time and features to calculate and to result into a classifier that does not apply the early rejection principle.

If you can wait until october, then pre-order the latest book I helped one, which has a complete chapter of the book explaining the cascade classifier training with every little detail. Look here!

edit flag offensive delete link more

Comments

Thank you for your response.

Really sorry but my question is more about the theory behind the scenes. I am interested in how OpenCV creates a binary tree out of Local Binary Patterns. In case of the Haar features it's obvious as they are continious and the decision boundary can be easily found. But Local Binary Patterns are not continious, it's just simple categorial values. And in the paper they use a tree with 256 branches (all the possible values of Local Binary Patterns). My question is how OpenCV manages to create binary tree in case of Local Binary Patterns.

Once again really sorry: I think I made my question a little bit vague and you misunderstood it.

warmspringwinds gravatar imagewarmspringwinds ( 2015-08-07 03:17:26 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2015-08-06 08:15:46 -0600

Seen: 372 times

Last updated: Aug 07 '15