0

When we use AdaBoost for object detection we need to set TPR and FPR for each stage (iteration of AdaBoost).

We need high TPR and low FPR.

As I understand as a result we have:

total TPR = (stage1 TPR)(stage2 TPR)...(stageN TPR)

for example 0.9*0.9*0.9~=0.729

total FPR = (stage1 FPR)(stage2 FPR)...(stageN FPR)

and same for FPR 0.5*0.5*0.5= 0.125

So the more stages you use the lower FPR you get, but TPR also decrease.

So why not to use stage TPR = 0.9999(9) and FPR = 0.00001 at each stage and have small number of stages?

How TPR and FPR at each stage must be choosed? How it dependes on number of stages?

mrgloom
  • 20,061
  • 36
  • 171
  • 301

1 Answers1

2

You are right in how to compute the total fpr and tpr and the observation that with more stages the total fpr and tpr decrease. The reason why we don't use a tpr of 0.999999 and a fpr of 0.000001 is that it would cause the boosting process to generate stages with many weak classifiers to achieve these rates. What you are aiming for is a high tpr and a low for the whole cascade, but if you train the stages with such extreme values, you would only need one stage because it already is a good classifier with these rates.

So, the reason why we usually use values like tpr = 0.99 and fpr = 0.5 is to keep the stages small and simple and to use the cascade structure to recover from wrong classifications. Essentially, a tpr of 0.99 and a fpr of 0.5 means that any stage must detect 99% of the positive samples as such while it is allowed to classify 50% of the negative samples as positive. Anything that is classified positive by the first stage is then passed over to the second that then deals with the false positives. Of those it accepts again at most 50% which are passed to the third stage and so on. The advantage of many stages is that if the first stage rejects a sample, you don't have to evaluate any other stage, which saves you a lot of time.

Assume we have fpr = 0.5, tpr = 0.99 and 20 stages, then the final fpr is 0.5^20 = 9.5*10e-7 and the final tpr is 0.99^20 = 0.82.

Depending on what the algorithm allows you to choose you can compute the corresponding fpr and tpr. If for example the number of stages N and the final fpr are given you can take the N-th root of the final fpr to get the stage fpr. If instead the stage and final fpr are given you use the log10 and can compute the number of stage you need at least to achieve the final fpr (N = log10(final fpr)/log10(stage fpr).

thomas
  • 624
  • 1
  • 12
  • 27
  • I have an object detection task and final tpr 0.82 is not acceptible, so I need to reduce number of stages or make stage tpr higher? Can it be that on some stage adaboost can't reach desired tpr or fpr? How can I detect it? What if I use 1 stage and many weak classifers the problem is reduced to feature selection? – mrgloom Jun 03 '15 at 13:24
  • You can always reduce the number of stages but this will also increase the fpr. Increasing the stage tpr is another option (e.g. stage tpr = 0.999 => final tpr = 0.98) but this will blow up your stages. The stage tpr can always be reached (e.g. if the stage always answers 1 its tpr will be 1). For the stage fpr it is not guaranteed but it makes sense because otherwise learning will never stop. Do you have to use boosted cascades? Depending on the features you're using and the prediction time you're aiming for, it might be better to use something else. – thomas Jun 03 '15 at 13:53