Open Detection
1.0
|
Class for training HOG based detector. More...
#include <ODHOGTrainer.h>
Public Member Functions | |
ODHOGTrainer (std::string const &training_input_location_="", std::string const &trained_data_location_="", cv::Size winsize=cv::Size(64, 128), cv::Size blocksize=cv::Size(16, 16), cv::Size blockstride=cv::Size(8, 8), cv::Size cellsize=cv::Size(8, 8), float hitshreshold=0.0) | |
int | train () |
void | init () |
std::string const & | getPosSamplesDir () const |
void | setPosSamplesDir (std::string const &posSamplesDir) |
std::string const & | getNegSamplesDir () const |
void | setNegSamplesDir (std::string const &negSamplesDir) |
int | getNOFeaturesNeg () const |
void | setNOFeaturesNeg (int featno) |
cv::Point const & | getStartHogPos () const |
void | setStartHogPos (cv::Point const &start_hog_pos) |
cv::Size const & | getWinSize () const |
void | setWinSize (cv::Size const &winSize) |
cv::Size const & | getBlockSize () const |
void | setBlockSize (cv::Size const &blockSize) |
cv::Size const & | getBlockStride () const |
void | setBlockStride (cv::Size const &blockStride) |
cv::Size const & | getCellSize () const |
void | setCellSize (cv::Size const &cellSize) |
cv::Size const & | getTrainingPadding () const |
void | setTrainingPadding (cv::Size const &trainingPadding) |
bool | isTrainHardNegetive () const |
void | setTrainHardNegetive (bool train_hard_negetive) |
double | getHitThreshold () const |
![]() | |
ODTrainer (std::string const &training_input_location="", std::string const &training_data_location="") | |
![]() | |
ODDetectorCommon (std::string const &trained_data_location_="") | |
std::string | getTrainingInputLocation () const |
Gets/Sets the directory containing the data for training. More... | |
void | setTrainingInputLocation (std::string training_input_location_) |
Gets/Sets the directory containing the data for training. More... | |
std::string | getTrainedDataLocation () const |
Gets/Sets the base directory for trained data. More... | |
virtual void | setTrainedDataLocation (std::string trained_data_location_) |
The base directory for trained data. More... | |
std::string | getSpecificTrainingDataLocation () |
Gets the specific directory for a Trainer or a Detector inside trained_data_location_. More... | |
std::string | getSpecificTrainingData () |
std::string const & | getTrainedDataID () const |
void | setTrainedDataID (std::string const &trainedDataID) |
Protected Attributes | |
cv::Size | winSize |
cv::Size | blockSize |
cv::Size | blockStride |
cv::Size | cellSize |
cv::HOGDescriptor | hog_ |
cv::Size | trainingPadding |
cv::Point | start_hog_pos |
int | nofeatures_neg |
cv::Size | winStride |
bool | train_hard_negetive_ |
std::string | posSamplesDir |
std::string | negSamplesDir |
double | hitThreshold |
![]() | |
std::string | training_input_location_ |
std::string | trained_data_location_ |
std::string | TRAINED_DATA_ID_ |
std::string | TRAINED_LOCATION_DENTIFIER_ |
Class for training HOG based detector.
Use ODHOGDetector after training with this class. This is the training class for training HOG based detector. SVMlight is used here to train linear SVM on the HOG features. It supports the usage of multiple random windows in negetive training images to increase the number of negetive features by the function 'setNOFeaturesNeg'. It also supports "Hard negetive" training which collects all the false positive windows after initial training to retrain and obtain a new feature vector. Use the function 'setTrainHardNegetive' to enable this feature.
Definition at line 53 of file ODHOGTrainer.h.
|
inline |
Definition at line 57 of file ODHOGTrainer.h.
References od::FileUtils::createTrainingDir(), od::ODDetectorCommon::getSpecificTrainingDataLocation(), negSamplesDir, nofeatures_neg, posSamplesDir, start_hog_pos, train_hard_negetive_, od::ODDetectorCommon::TRAINED_DATA_ID_, od::ODDetectorCommon::trained_data_location_, od::ODDetectorCommon::TRAINED_LOCATION_DENTIFIER_, od::ODDetectorCommon::training_input_location_, trainingPadding, and winStride.
|
inline |
Definition at line 144 of file ODHOGTrainer.h.
References blockSize.
|
inline |
Definition at line 154 of file ODHOGTrainer.h.
References blockStride.
|
inline |
Definition at line 164 of file ODHOGTrainer.h.
References cellSize.
|
inline |
Definition at line 194 of file ODHOGTrainer.h.
References hitThreshold.
|
inline |
Definition at line 104 of file ODHOGTrainer.h.
References negSamplesDir.
|
inline |
Definition at line 114 of file ODHOGTrainer.h.
References nofeatures_neg.
|
inline |
Definition at line 94 of file ODHOGTrainer.h.
References posSamplesDir.
|
inline |
Definition at line 124 of file ODHOGTrainer.h.
References start_hog_pos.
|
inline |
Definition at line 174 of file ODHOGTrainer.h.
References trainingPadding.
|
inline |
Definition at line 134 of file ODHOGTrainer.h.
References winSize.
|
inlinevirtual |
Implements od::ODDetectorCommon.
Definition at line 92 of file ODHOGTrainer.h.
|
inline |
Definition at line 184 of file ODHOGTrainer.h.
References train_hard_negetive_.
|
inline |
Definition at line 149 of file ODHOGTrainer.h.
References blockSize.
|
inline |
Definition at line 159 of file ODHOGTrainer.h.
References blockStride.
|
inline |
Definition at line 169 of file ODHOGTrainer.h.
References cellSize.
|
inline |
Definition at line 109 of file ODHOGTrainer.h.
References negSamplesDir.
|
inline |
Definition at line 119 of file ODHOGTrainer.h.
References nofeatures_neg.
|
inline |
Definition at line 99 of file ODHOGTrainer.h.
References posSamplesDir.
|
inline |
Definition at line 129 of file ODHOGTrainer.h.
References start_hog_pos.
|
inline |
Definition at line 189 of file ODHOGTrainer.h.
References train_hard_negetive_.
|
inline |
Definition at line 179 of file ODHOGTrainer.h.
References trainingPadding.
|
inline |
Definition at line 139 of file ODHOGTrainer.h.
References winSize.
|
virtual |
Implements od::ODTrainer.
|
protected |
Definition at line 202 of file ODHOGTrainer.h.
Referenced by getBlockSize(), and setBlockSize().
|
protected |
Definition at line 203 of file ODHOGTrainer.h.
Referenced by getBlockStride(), and setBlockStride().
|
protected |
Definition at line 204 of file ODHOGTrainer.h.
Referenced by getCellSize(), and setCellSize().
|
protected |
Definition at line 220 of file ODHOGTrainer.h.
Referenced by getHitThreshold().
|
protected |
Definition at line 206 of file ODHOGTrainer.h.
|
protected |
Definition at line 217 of file ODHOGTrainer.h.
Referenced by getNegSamplesDir(), ODHOGTrainer(), and setNegSamplesDir().
|
protected |
Definition at line 211 of file ODHOGTrainer.h.
Referenced by getNOFeaturesNeg(), ODHOGTrainer(), and setNOFeaturesNeg().
|
protected |
Definition at line 216 of file ODHOGTrainer.h.
Referenced by getPosSamplesDir(), ODHOGTrainer(), and setPosSamplesDir().
|
protected |
Definition at line 210 of file ODHOGTrainer.h.
Referenced by getStartHogPos(), ODHOGTrainer(), and setStartHogPos().
|
protected |
Definition at line 213 of file ODHOGTrainer.h.
Referenced by isTrainHardNegetive(), ODHOGTrainer(), and setTrainHardNegetive().
|
protected |
Definition at line 209 of file ODHOGTrainer.h.
Referenced by getTrainingPadding(), ODHOGTrainer(), and setTrainingPadding().
|
protected |
Definition at line 201 of file ODHOGTrainer.h.
Referenced by getWinSize(), and setWinSize().
|
protected |
Definition at line 212 of file ODHOGTrainer.h.
Referenced by ODHOGTrainer().