0

I am implementing Viola-Jones face detection algorithm and bit confused about haar-feature threshold. I am calculating the threshold of haar-feature using follow. steps:

a) Calculate the haar-feature value in all positive(face) images respective to the same position. b) Get all the feature values that lie in between minimum feature value and average feature value to get list, MinToAvg = [] c) For each value in MinToAvg classify data (Positive and Negative) and get Number of pos. images(Pos.) it classify as face and number of false positive (FP). d) Feature Value is consider as a threshold for particular feature for which I get max(Pos-FP).

For each round of boosting the threshold for the Haar-feature remain same on the contrary, threshold of Haar-feature as discussed in Viola-Jones paper change with every round of boosting.

My Question is: 1) Am I doing right way for calculation of Haar-feature threshold? 2) For each round of boosting the threshold need to be change?

I am using Python.

Thanks!

user2766019
  • 577
  • 4
  • 7
  • 20
  • It seems that you're far from doing the same as Viola and Jones did. Could you please clarify your question? It is hard to understand what you mean. – Ramiro Oct 04 '13 at 17:05
  • Oh, and what you're probably looking for is shown in detail in section 3.4.2 of Freund and Schapire's book "Boosting: Foundations and Algorithms". BTW, you currently can preview a part of this book's section at Amazon. – Ramiro Oct 04 '13 at 17:29
  • The careful reading of Viola and Jones' "Robust Real-Time Face Detection" section 3.1 might give you some insight. Also, you might find useful reading "Fast Asymmetric Learning for Cascade Face Detection" section 4.2. – Ramiro Oct 04 '13 at 17:31
  • @Ramiro: I am doing same as the Viola-Jones but differ in threshold calculation. In Viola-Jones as described in "Robust Real-Time Face Detection" section 3.1, the threshold of Haar-feature is calculated in each round of boosting whereas I am calculating the threshold of each haar feature before Boosting starts. And this is done just for one time for every strong classifier. Each round of boosting use same threshold for haar feature. – user2766019 Oct 06 '13 at 11:43
  • From what you wrote in the question, it seems that what you're doing is completely different from what Viola and Jones did to set the weak classifiers thresholds. I'm not sure, so I asked you to clarify your explanation. Decision stumps like those used in Viola and Jones' work have their thresholds set every round because the training data weights change in every boosting round. With that, your best weak classifier threshold might also be pretty different from the previous rounds. You sure can set a fixed threshold for each classifier, but I'd wager that its performance will be pretty bad. – Ramiro Oct 07 '13 at 17:46

1 Answers1

0

@Ramiro,user2766019: I just have one doubt from your previous comment. How does training weights affect threshold? Aren't the thresholds decided only using the feature value on each training samples and then calculating the error for each of that feature value by the equation:

e = MIN((S+) + (T-) - (S-), (S-) + (T+) - (S+))

I meant the threshold of weak classifier(single feature) which is used to calculate the error as the sum of weights of misclassified samples. Am I right or did I got wrong at somewhere? Thank you.

aswin raj
  • 1
  • 1