分享

Fast and Robust Face Detection / Rare Event D...又一个AdaBoost实现。训练速度快。

 oskycar 2012-05-31

Fast and Robust Face / Rare Event Detection



In this project we improved the Viola-Jones cascade face detector in both training speed and detection accuracy.


Face Detection is a rare event detection problem, in the sense that faces are extremely rare compared to non-faces. In the example image, there are only 3 faces, but there exist millions of non-face windows. A cascade detector is composed of a series of node classifiers. It scans every possible window in a image at all positions and scales, and determine whether it is a face or not. When examining a window, it quickly determines “this is not a face” as soon as any node classifier say that window is not a face. This property makes a cascade classifier has very fast testing speed.
Our contribution to this problem includes the following:
  1. We revise the implementation of the AdaBoost algorithm (which is used to train node classifiers by Viola and Jones) such that it is 2 orders of magnitude faster;
  2. In training a node classifier, we propose a Forward Feature Selection (FFS) algorithm to replace AdaBoost. FFS is a greedy algorithm that always selects a feature which maximally reduces training error of the entire node classifier. In contrast, AdaBoost chooses a feature which minimize the weighted error rate of the currently selected feature. FFS is about two times faster than the fast AdaBoost implementation, and achieves approximately the same accuracy as AdaBoost;
  3. We show that the node classifiers has different learning goals than normal classifiers: They need to correctly classify almost all faces correctly (e.g. >99.9%) but only needs to be correct on a moderate number of non-faces (e.g. 50%). We formalized this problem into a constrained optimization problem, and give an closed-form approximate solution to this problem, which we call Linear Asymmetric Classifier (LAC).
  4. We show that the entire cascade can be optimized as a whole – i.e. the goals of all node classifiers can be coordinated to give a fast and precise cascade.

The source code for fast AdaBoost implementation, FFS and LAC are available.

  • C++ source code in the Windows platform with Visual C++ is here. Please pay attention to the following
    1. If you got compile error concerning "OptionDialog", please don't use the project file to open the VC++ project; instead, please use the solution file (.sln file).
    2. Please read the Readme.txt in the zip file before you play with the code and executable. Note that if you want to use the attached (trained) face detector, you need to replace the content of the empty cascade.txt with one of the cascade_*.txt in the data/ directory.
    3. In IntImage.cpp, within the function IntImage::Load, after the line "img = cvLoadImage(filename,0);", add the following line:
           "if(img==NULL) return;"  (added June 2, 2011 to fix OpenCV issues)
    4. If you want to train a classifier of your own, you will need the non-face dataset. See the Readme.txt for details.
We also provide a live demo executables (again running in Windows) and a demo video.

If you use the provided source code, please cite the following paper:

Fast Asymmetric Learning for Cascade Face Detection
Jianxin Wu, S. Charles Brubaker, Matthew D. Mullin, and James M. Rehg
IEEE Transactions on Pattern Analysis and Machine Intelligence, 30(3), 2008: pp. 369-382.

For more details, please refer to papers in the publication page, with journal papers [J5] and conference papers [C3][C4] describing FFS and LAC, while journal paper [J5] describing the global framework that optimize the entire cascade by moving operating points of node classifiers.
[Back to homepage]

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多