1

I found in haarcascade_frontalface_alt_tree xml as the xml file is trained with train tree of stages classifiers instead of cascade. I am wondering how to train for tree of stages classifier in OpenCV, which api to use and any example available for that. I searched and no proper information is found so far. Thanks

batuman
  • 7,066
  • 26
  • 107
  • 229

1 Answers1

2

The opencv documentation is pretty clear about cascade training with weak tree possible tunings. "opencv_traincascade" is the API training function. "Boosted classifer parameters" is what your are looking for, especially "max_depth_of_weak_tree" and "max_weak_tree_count".

Eric
  • 2,301
  • 3
  • 23
  • 30
  • Any idea, how to get decision tree for multiple classes detection such as multiple view face detection. – batuman Sep 16 '14 at 09:47
  • If you want to continue with Boosting algorithms for classification, you should read about Gradient Boosted Trees which can deal with multiclass classification. There is an OpenCV implementation of GBT. – Eric Sep 16 '14 at 09:50
  • Yes that is another option. My application has speed concern as it will be running inside an embedded platform. So I used LBP features rather than Haar. Then in this paper (http://academic.research.microsoft.com/Paper/2371001.aspx) Viola and Jones used C4.5 tree classifier. Any idea how to train C4.5 decision tree for multiple view face detection. Thanks – batuman Sep 16 '14 at 10:02
  • Perhaps see this old post: http://stackoverflow.com/questions/10757202/looking-for-a-c-implementation-of-the-c4-5-algorithm – Eric Sep 16 '14 at 10:05
  • It is true that LBP-based cascade is a little faster than Haar-based cascade. However you will have in general a 10% drop of accuracy. – Eric Sep 16 '14 at 10:07