Auxilliary Tool:
A tool for evaluating the performance of a whole-image-object-detector, such as a GentleBoostCascadedClassifier, for performance on an ImageDataSet.
More...
#include <DetectionEvaluator2.h>
List of all members.
Public Member Functions |
| DetectionEvaluator2 () |
| Default Constructor.
|
| DetectionEvaluator2 (const DetectionEvaluator2 ©) |
| Copy Constructor.
|
DetectionEvaluator2 & | operator= (const DetectionEvaluator2 &rhs) |
| Assignment operator.
|
| DetectionEvaluator2 (const ImageDataSet2 &imageDataSet) |
| Constructor.
|
| DetectionEvaluator2 (const std::string &fileListFile, const std::string &labelFile) |
| Constructor.
|
| ~DetectionEvaluator2 () |
| Destructor.
|
void | setDataSet (const ImageDataSet2 &imageDataSet) |
| Set data source.
|
void | setDataSet (const std::string &fileListFile, const std::string &labelFile) |
| Set data source.
|
std::vector< std::string > | getFileNames () const |
| Get the names of the images used for evaluation. In contrast to the ImageDataSet format, these names are unique.
|
std::vector< std::vector
< cv::Rect > > | getTargetLocations () const |
| Get the location of the images used for evaluation. There can be several in each image; there is one vector per file name, and possibly several elements per vector.
|
EvaluationMetrics | evaluateImagePerformanceWithThreshold (int imNum, std::vector< SearchResult > boxes, double threshold) const |
| Evaluate the number of hits, misses, and false alarms on a given image with a given threshold. The object detector output must be supplied in the form of a vector of SearchResults.
|
std::vector< EvaluationMetrics > | evaluateImagePerformance (int imNum, const std::vector< SearchResult > &boxes) const |
| Evaluate the number of hits, misses, and false alarms on a given image across a range of thresholds. The object detector output must be supplied in the form of a vector of SearchResults.
|
std::vector< EvaluationMetrics > | evaluatePerformance (const std::vector< std::vector< SearchResult > > &imBoxes) const |
| Evaluate the number of hits, misses, and false alarms on all dataset images across a range of thresholds. The object detector output must be supplied in the form of a vector of SearchResults vectors, one per image.
|
std::string | outputOpenCVDescriptionFormatForHaarTraining () const |
| Get the "Description Format" used by OpenCV for Haar Training.
|
size_t | dataSetSize () const |
int | empty () const |
Static Public Attributes |
static double | acceptArea = .5 |
| Match parameter: defines the overlap requirement between detected objects and known dataset objects. Should be (0-1].
|
Detailed Description
Auxilliary Tool:
A tool for evaluating the performance of a whole-image-object-detector, such as a GentleBoostCascadedClassifier, for performance on an ImageDataSet.
Specifically, the evaluation method is fashioned after the "miss-rate as
a function of false positives per image" introduced by Dollar et al. in P. Dollar, C. Wojek, B. Schiele, and P. Perona. Pedestrian detection: A benchmark. In CVPR, June 2009.
- Author:
- Nicholas Butko
- Date:
- 2010
- Version:
- 0.4
Constructor & Destructor Documentation
DetectionEvaluator2::DetectionEvaluator2 |
( |
const ImageDataSet2 & |
imageDataSet ) |
|
Constructor.
- Parameters:
-
imageDataSet | The labeled images that we want to use to evaluate for object detector performance. |
DetectionEvaluator2::DetectionEvaluator2 |
( |
const std::string & |
fileListFile, |
|
|
const std::string & |
labelFile |
|
) |
| |
Constructor.
- Parameters:
-
fileListFile | Path to a file containing file names of images in the dataset. One file name corresponds to the location of one object, so the same filename may be listed multiple times. |
labelFile | Path to a file containing object locations in the images listed in fileListFile. Each line is a triple containing object center x, object center y, and object width/height. This is the same format used by ImageDataSet. |
Member Function Documentation
size_t DetectionEvaluator2::dataSetSize |
( |
) |
const |
Get the number of images in the dataset.
int DetectionEvaluator2::empty |
( |
) |
const |
Check whether a valid dataset has been loaded.
Evaluate the number of hits, misses, and false alarms on a given image across a range of thresholds. The object detector output must be supplied in the form of a vector of SearchResults.
- Parameters:
-
- Returns:
- Performance on a single image for a range of thresholds, in terms of hits, misses, and false_alarms.
EvaluationMetrics DetectionEvaluator2::evaluateImagePerformanceWithThreshold |
( |
int |
imNum, |
|
|
std::vector< SearchResult > |
boxes, |
|
|
double |
threshold |
|
) |
| const |
Evaluate the number of hits, misses, and false alarms on a given image with a given threshold. The object detector output must be supplied in the form of a vector of SearchResults.
- Parameters:
-
- Returns:
- Performance on a single image for a given threshold, in terms of hits, misses, and false_alarms.
Evaluate the number of hits, misses, and false alarms on all dataset images across a range of thresholds. The object detector output must be supplied in the form of a vector of SearchResults vectors, one per image.
- Parameters:
-
- Returns:
- Performance on all images for a range of thresholds, in terms of hits, misses, and false_alarms.
vector< string > DetectionEvaluator2::getFileNames |
( |
) |
const |
Get the names of the images used for evaluation. In contrast to the ImageDataSet format, these names are unique.
- Returns:
- A list of file names containing images in the dataset, one entry per image.
vector< vector< Rect > > DetectionEvaluator2::getTargetLocations |
( |
) |
const |
Get the location of the images used for evaluation. There can be several in each image; there is one vector per file name, and possibly several elements per vector.
- Returns:
- A list of target location lists.
string DetectionEvaluator2::outputOpenCVDescriptionFormatForHaarTraining |
( |
) |
const |
Get the "Description Format" used by OpenCV for Haar Training.
This is useful for converting between an ImageDataset and OpenCV's format which is more closely mirrored by DetectionEvaluator's internal data structures.
- Returns:
- A string, suitable for writing to a file, that can be used to specify the data needed to train an OpenCV Haar Cascade.
void DetectionEvaluator2::setDataSet |
( |
const ImageDataSet2 & |
imageDataSet ) |
|
Set data source.
- Parameters:
-
imageDataSet | The labeled images that we want to use to evaluate for object detector performance. |
void DetectionEvaluator2::setDataSet |
( |
const std::string & |
fileListFile, |
|
|
const std::string & |
labelFile |
|
) |
| |
Set data source.
- Parameters:
-
fileListFile | Path to a file containing file names of images in the dataset. One file name corresponds to the location of one object, so the same filename may be listed multiple times. |
labelFile | Path to a file containing object locations in the images listed in fileListFile. Each line is a triple containing object center x, object center y, and object width/height. This is the same format used by ImageDataSet. |
Member Data Documentation
Match parameter: defines the overlap requirement between detected objects and known dataset objects. Should be (0-1].
Specifically, a "hit" is recorded if the area union of a reported bounding box and a dataset object bounding box is acceptArea * intersection. 1 means the overlap must be perfect. The default value, .5, means the union must be at least half of the intersection.
The documentation for this class was generated from the following files:
- /Users/nick/projects/NickThesis/Code/OpenCV/src/DetectionEvaluator2.h
- /Users/nick/projects/NickThesis/Code/OpenCV/src/DetectionEvaluator2.cpp