Factory class for the generation of search predictors. More...
#include <cvb/polimago/search_predictor_factory.hpp>
Inherits PredictorFactoryBase.
Public Member Functions | |
SearchPredictorFactory () | |
Constructor. More... | |
int | SampleSize () const noexcept |
Gets the sample size that has been used in each training set. More... | |
void | SetSampleSize (int sampleSize) |
Sets the sample size that has been used in each training set. More... | |
double | ExtractionRadius () const noexcept |
Gets the radius for extracting positive search instances. More... | |
void | SetExtractionRadius (double radius) |
Sets the radius for extracting positive search instances. More... | |
ValueRange< Angle > | AngleRange () const |
Gets the range of angles to be covered during classifier training. More... | |
void | SetAngleRange (ValueRange< Angle > range) |
Sets the range of angles to be covered during classifier training. More... | |
ValueRange< double > | ScaleRange () const |
Gets the range of scale factors to be covered during classifier training. Only meaningful if the invariance type RotationScaleTranslation has been set. More... | |
void | SetScaleRange (ValueRange< double > range) |
Sets the range of scale factors to be covered during classifier training. Only meaningful if the invariance type RotationScaleTranslation has been set. More... | |
ValueRange< double > | SingularValueRange () const |
Gets the range of permissible singular values to be covered during classifier training. Only meaningful if the invariance type AffineGroup has been set. More... | |
void | SetSingularValueRange (ValueRange< double > range) |
Sets the range of permissible singular values to be covered during classifier training. Only meaningful if the invariance type AffineGroup has been set. More... | |
InvarianceType | Invariances () const noexcept |
Gets the invariances to be used for generating the classifier. More... | |
void | SetInvariances (InvarianceType invariances) |
Sets the invariances to be used for generating the classifier. More... | |
int | NumClassificationSteps () const noexcept |
Gets the number of classification steps during search operation. More... | |
void | SetNumClassificationSteps (int numSteps) |
Sets the number of classification steps during search operation. More... | |
int | FeatureResolutionStep1And2 () const noexcept |
Gets the feature resolution (determines the size of the classification retina) for search step 1 and 2. More... | |
void | SetFeatureResolutionStep1And2 (int resolution) |
Sets the feature resolution (determines the size of the classification retina) for search step 1 and 2. More... | |
int | FeatureResolutionRest () const noexcept |
Gets the feature resolution (determines the size of the classification retina) for step 3 and up. More... | |
void | SetFeatureResolutionRest (int resolution) |
Sets the feature resolution (determines the size of the classification retina) for step 3 and up. More... | |
void | UseSettingsFromPredictor (const SearchPredictor &clf) |
Copy the predictor generation settings from a predictor. More... | |
Public Member Functions inherited from PredictorFactoryBase | |
double | Lambda () const noexcept |
Gets the regularization value to be used for generating the object. More... | |
void | SetLambda (double lambda) |
Sets the regularization value to be used for generating the object. Possible values range from 0 to 10, good starting values for experiments are usually around 0.01. More... | |
String | Preprocessing () const |
Get preprocessing code with which the object is to be generated. More... | |
void | SetPreprocessing (const String &code) |
Set preprocessing code with which the object is to be generated. More... | |
Static Public Member Functions | |
static ValueRange< double > | ScaleFactorRangeDefault () |
Default value for the scale factor range. | |
static ValueRange< double > | SingularValueRangeDefault () |
Default value for the singular value range. | |
static ValueRange< double > | ScaleFactorRange () |
Acceptable scale factor range for search classifier training. | |
Static Public Member Functions inherited from PredictorFactoryBase | |
static ValueRange< double > | LambdaRange () |
Acceptable scale factor range for search classifier training. | |
static ValueRange< int > | FeatureResolutionRange () |
Valid range of feature resolution value. | |
static constexpr std::array< char, 4 > | PreprocessingValidCharacters () |
Characters that a preprocessing string may contain. | |
static String | FormatPreprocessingCode (const String &input) |
Correct a preprocessing code to make sure that no invalid characters are in the code and the code does not exceed the maximum length. More... | |
Static Public Attributes | |
static constexpr int | NumClassificationStepsMin = 3 |
Minimum classification step count. | |
static constexpr int | SampleSizeMin = 1 |
Absolute minimum value for SampleSize. | |
Static Public Attributes inherited from PredictorFactoryBase | |
static constexpr double | LambdaDefault = 0.1 |
Default value for lambda. | |
static constexpr int | FeatureResolutionDefault = 1 |
Default value for feature resolution. | |
static constexpr int | PreprocessingMaxLength = 15 |
Maximum length of a preprocessing code (excluding the terminating zero). | |
Factory class for the generation of search predictors.
|
inline |
Constructor.
Any | exception derived from std::exception including CvbException. |
|
inline |
Gets the range of angles to be covered during classifier training.
Any | exception derived from std::exception including CvbException. |
|
inlinenoexcept |
Gets the radius for extracting positive search instances.
Does | not throw any exception. |
The unit size is the size of the feature window, i.e. a value of 0.5 means that positive samples can be extracted from withing a range of +/- Feature Window Width and +/- Feature Window Height around each trained instance. Smaller values will necessitate a finer search grid but may yield better results on difficult search tasks.
|
inlinenoexcept |
Gets the feature resolution (determines the size of the classification retina) for step 3 and up.
Does | not throw any exception. |
|
inlinenoexcept |
Gets the feature resolution (determines the size of the classification retina) for search step 1 and 2.
Does | not throw any exception. |
|
inlinenoexcept |
Gets the invariances to be used for generating the classifier.
Does | not throw any exception. |
|
inlinenoexcept |
Gets the number of classification steps during search operation.
Does | not throw any exception. |
|
inlinenoexcept |
Gets the sample size that has been used in each training set.
Does | not throw any exception. |
|
inline |
Gets the range of scale factors to be covered during classifier training. Only meaningful if the invariance type RotationScaleTranslation has been set.
Any | exception derived from std::exception including CvbException. |
|
inline |
Sets the range of angles to be covered during classifier training.
[in] | range | The angle range. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Sets the radius for extracting positive search instances.
[in] | radius | The extration radius. |
Any | exception derived from std::exception including CvbException. |
The unit size is the size of the feature window, i.e. a value of 0.5 means that positive samples can be extracted from withing a range of +/- Feature Window Width and +/- Feature Window Height around each trained instance. Smaller values will necessitate a finer search grid but may yield better results on difficult search tasks.
|
inline |
Sets the feature resolution (determines the size of the classification retina) for step 3 and up.
[in] | resolution | The feature resolution. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Sets the feature resolution (determines the size of the classification retina) for search step 1 and 2.
[in] | resolution | The feature resolution. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Sets the invariances to be used for generating the classifier.
[in] | invariances | The invariance type. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Sets the number of classification steps during search operation.
[in] | numSteps | The number of steps. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Sets the sample size that has been used in each training set.
[in] | sampleSize | The sample size. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Sets the range of scale factors to be covered during classifier training. Only meaningful if the invariance type RotationScaleTranslation has been set.
[in] | range | The scale range. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Sets the range of permissible singular values to be covered during classifier training. Only meaningful if the invariance type AffineGroup has been set.
[in] | range | The singular value range. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Gets the range of permissible singular values to be covered during classifier training. Only meaningful if the invariance type AffineGroup has been set.
Any | exception derived from std::exception including CvbException. |
|
inline |
Copy the predictor generation settings from a predictor.
[in] | clf | Predictor to take the settings from. |
Any | exception derived from std::exception including CvbException. |