Visual Servoing Platform
version 3.5.1 under development (2023-06-13)
|
#include <visp3/detection/vpDetectorDNNOpenCV.h>
Public Member Functions | |
NetConfig (float confThresh, const float &nmsThresh, const std::vector< std::string > &classNames, const cv::Size &dnnInputSize, const double &filterSizeRatio=0.) | |
NetConfig (float confThresh, const float &nmsThresh, const std::string &classNamesFile, const cv::Size &dnnInputSize, const double &filterSizeRatio=0.) | |
Static Public Member Functions | |
static std::vector< std::string > | parseClassNamesFile (const std::string &filename) |
Public Attributes | |
float | m_confThreshold |
float | m_nmsThreshold |
std::vector< std::string > | m_classNames |
cv::Size | m_inputSize |
double | m_filterSizeRatio |
Structure containing some information required for the configuration of a vpDetectorDNNOpenCV object.
Definition at line 171 of file vpDetectorDNNOpenCV.h.
|
inline |
Construct a new Net Config object.
confThresh | The confidence threshold to keep a detection. |
nmsThresh | The Non-Maximum Suppression threshold to merge overlapping detections. |
classNames | A vector containing the list of classes the DNN can detect. |
dnnInputSize | The size of the input that the DNN is expecting. |
filterSizeRatio | The threshold for the size filter that the user can chose to activate or not (see vpDetectorDNNOpenCV::filterDetectionSingleClassInput and vpDetectorDNNOpenCV::filterDetectionMultiClassInput methods for more information). |
Definition at line 241 of file vpDetectorDNNOpenCV.h.
|
inline |
Construct a new Net Config object.
confThresh | The confidence threshold to keep a detection. |
nmsThresh | The Non-Maximum Suppression threshold to merge overlapping detections. |
classNamesFile | The path towards the file containing the classes names, written as a YAML string array or one class name by line. |
dnnInputSize | The size of the input that the DNN is expecting. |
filterSizeRatio | The threshold for the size filter that the user can chose to activate or not (see vpDetectorDNNOpenCV::filterDetectionSingleClassInput and vpDetectorDNNOpenCV::filterDetectionMultiClassInput methods for more information). |
Definition at line 260 of file vpDetectorDNNOpenCV.h.
|
inlinestatic |
Parse the file containing the list of classes the DNN can detect. These classes can be written either as a YAML array (i.e. ["classname_0", ... ,"classname_last"]) or with one classname by row (without quotes).
For example, in the case of a yaml file called my-classes.yaml
, one content could be:
$ cat my-classes.yaml [ "person", "bicycle", "car"]
And in the case of a text file called my-classes.txt
, similar content could be:
$ cat my-classes.txt person bicycle car
filename | The path towards the file containing the list of classes the DNN can detect. |
Definition at line 202 of file vpDetectorDNNOpenCV.h.
Referenced by vpDetectorDNNOpenCV::parseClassNamesFile().
std::vector<std::string> vpDetectorDNNOpenCV::NetConfig::m_classNames |
Vector containing the names of the different classes the DNN can detect.
Definition at line 175 of file vpDetectorDNNOpenCV.h.
Referenced by vpDetectorDNNOpenCV::detect().
float vpDetectorDNNOpenCV::NetConfig::m_confThreshold |
Threshold to filter detections by confidence.
Definition at line 173 of file vpDetectorDNNOpenCV.h.
Referenced by vpDetectorDNNOpenCV::postProcess(), vpDetectorDNNOpenCV::postProcess_FasterRCNN(), vpDetectorDNNOpenCV::postProcess_ResNet_10(), vpDetectorDNNOpenCV::postProcess_SSD_MobileNet(), vpDetectorDNNOpenCV::postProcess_YoloV3_V4(), vpDetectorDNNOpenCV::postProcess_YoloV5_V7(), vpDetectorDNNOpenCV::postProcess_YoloV8(), and vpDetectorDNNOpenCV::setConfidenceThreshold().
double vpDetectorDNNOpenCV::NetConfig::m_filterSizeRatio |
Size ratio used by the vpDetectorDNNOpenCV::filterDetectionSingleClassInput and vpDetectorDNNOpenCV::filterDetectionMultiClassInput methods. If <= 0., the vpDetectorDNNOpenCV::filterDetectionSingleClassInput and vpDetectorDNNOpenCV::filterDetectionMultiClassInput methods are not used.
Definition at line 177 of file vpDetectorDNNOpenCV.h.
Referenced by vpDetectorDNNOpenCV::detect(), vpDetectorDNNOpenCV::setDetectionFilterSizeRatio(), vpDetectorDNNOpenCV::setNetConfig(), and vpDetectorDNNOpenCV::vpDetectorDNNOpenCV().
cv::Size vpDetectorDNNOpenCV::NetConfig::m_inputSize |
Size of the images the DNN can manipulate. The input images will be resized to match these dimensions.
Definition at line 176 of file vpDetectorDNNOpenCV.h.
Referenced by vpDetectorDNNOpenCV::detect(), vpDetectorDNNOpenCV::postProcess_YoloV5_V7(), vpDetectorDNNOpenCV::postProcess_YoloV8(), and vpDetectorDNNOpenCV::setInputSize().
float vpDetectorDNNOpenCV::NetConfig::m_nmsThreshold |
Threshold for Non-Maximum Suppression.
Definition at line 174 of file vpDetectorDNNOpenCV.h.
Referenced by vpDetectorDNNOpenCV::postProcess(), and vpDetectorDNNOpenCV::setNMSThreshold().