Machine Perception Primitive:
An implementation of a GentleBoost cascaded classifier for full image object search.
More...
#include <GentleBoostCascadedClassifier2.h>
Public Member Functions | |
GentleBoostCascadedClassifier2 () | |
Constructor. | |
GentleBoostCascadedClassifier2 (const GentleBoostCascadedClassifier2 ©) | |
Copy Constructor. | |
GentleBoostCascadedClassifier2 & | operator= (const GentleBoostCascadedClassifier2 &rhs) |
Assignment operator. | |
~GentleBoostCascadedClassifier2 () | |
Destructor. | |
void | setTrainingParams (double maxPosRejects=0.001) |
Set parameters used to determine the rejection threshold for each cascade step. | |
virtual PerformanceMetrics | trainOneRound (int patience=1, int boostRounds=1) |
Train boosted classifier for one round by searching for one good feature, and adding it. | |
void | setHardNegativeTrainingExamplesFromBGImages () |
Replace the rejected negative example patches in the current training set with patches in taken from background images that haven't yet been rejected. The background image pool is specified with setBGTrainingImagesFromImageDataset(). | |
bool | exhaustedAllNegPatches () |
Returns "yes" if all known negative patches have been rejected. This is a good time to stop training. | |
Static Public Member Functions | |
static double | featureCost (const PerformanceMetrics &a) |
Machine Perception Primitive:
An implementation of a GentleBoost cascaded classifier for full image object search.
The GentleBoost approach is described in Fasel's "Learning Real-Time Object Detectors: Probabilistic Generative Approaches", 2006 (see Related Publications).
GentleBoostCascadedClassifier is designed for full frame object detection.
double GentleBoostCascadedClassifier2::featureCost | ( | const PerformanceMetrics & | a ) | [static] |
Write to file. Read from file.
Reimplemented from GentleBoostClassifier2.
void GentleBoostCascadedClassifier2::setTrainingParams | ( | double | maxPosRejects = 0.001 ) |
Set parameters used to determine the rejection threshold for each cascade step.
The threshold is chosen as soon as more than a fraction maxPosRejects of the remaining positive patches have been rejected, or when a fraction desiredNegRejects of the remaining negative patches have been rejected.
maxPosRejects | Max fraction of remaining positive patches rejected per training round. |
desiredNegRejects | Desired fraction of remaining negative patches rejected per training round. |
PerformanceMetrics GentleBoostCascadedClassifier2::trainOneRound | ( | int | patience = 1 , |
int | boostRounds = 1 |
||
) | [virtual] |
Train boosted classifier for one round by searching for one good feature, and adding it.
patience | How long do you want to wait to find a good feature? |
boostRounds | Train for multiple rounds of boosting on one feature: makes the classifier more discriminative but more prone to overfit. |
Reimplemented from GentleBoostClassifier2.