4
#ifndef _OPENCV_DNN_OBJDETECT_CORE_DETECT_HPP_
5
#define _OPENCV_DNN_OBJDETECT_CORE_DETECT_HPP_
10
#include <opencv2/imgproc.hpp>
17
namespace
dnn_objdetect
30
std::string label_name;
71
std::vector<std::vector<double> > *post);
86
std::vector<std::vector<double> > *boxes,
87
std::vector<std::vector<double> > &top_n_boxes,
88
std::vector<size_t> &top_n_idxs,
89
std::vector<double> &top_n_probs);
96
void
nms_wrapper(std::vector<std::vector<double> > &top_n_boxes,
97
std::vector<size_t> &top_n_idxs,
98
std::vector<double> &top_n_probs);
105
*boxes, std::vector<double> *probs);
113
std::vector<double> *base_box, std::vector<double> *iou);
115
static
inline
bool
comparator (std::pair<double, size_t> l1,
116
std::pair<double, size_t> l2)
118
return
l1.first > l2.first;
126
unsigned
int
image_width;
127
unsigned
int
image_height;
130
std::vector<std::vector<double> > anchors_values;
131
std::vector<std::pair<double, double> > anchor_center;
132
std::vector<std::pair<double, double> > anchor_shapes;
134
std::vector<std::string> label_map;
136
unsigned
int
num_classes;
137
unsigned
int
anchors_per_grid;
139
double
intersection_thresh;
140
double
nms_intersection_thresh;
141
size_t
n_top_detections;
n-dimensional dense array class
Definition:
mat.hpp:802
A class to post process model predictions
Definition:
core_detect.hpp:38
void transform_bboxes(std::vector< std::vector< double > > *bboxes)
Transform relative coordinates from ConvDet to bounding box coordinates
void filter(double thresh=0.8)
Filters the bounding boxes.
void transform_bboxes_inv(std::vector< std::vector< double > > *pre, std::vector< std::vector< double > > *post)
Transform bounding boxes from [x, y, h, w] to [xmin, ymin, xmax, ymax]
InferBbox(Mat _delta_bbox, Mat _class_scores, Mat _conf_scores)
Default constructer
std::vector< bool > non_maximal_suppression(std::vector< std::vector< double > > *boxes, std::vector< double > *probs)
Applies Non-Maximal Supression
std::vector< object > detections
Vector which holds the final detections of the model
Definition:
core_detect.hpp:53
void nms_wrapper(std::vector< std::vector< double > > &top_n_boxes, std::vector< size_t > &top_n_idxs, std::vector< double > &top_n_probs)
Wrapper to apply Non-Maximal Supression
void final_probability_dist(std::vector< std::vector< double > > *final_probs)
Computes final probability values of each bounding box
void assert_predictions(std::vector< std::vector< double > > *min_max_boxes)
Ensures that the bounding box values are within image boundaries
void filter_top_n(std::vector< std::vector< double > > *probs, std::vector< std::vector< double > > *boxes, std::vector< std::vector< double > > &top_n_boxes, std::vector< size_t > &top_n_idxs, std::vector< double > &top_n_probs)
Filter top n predictions
void intersection_over_union(std::vector< std::vector< double > > *boxes, std::vector< double > *base_box, std::vector< double > *iou)
Computes intersection over union of bounding boxes
"black box" representation of the file storage associated with a file on disk.
Definition:
aruco.hpp:75
Structure to hold the details pertaining to a single bounding box
Definition:
core_detect.hpp:26