We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1cf9f0 commit a1f9bffCopy full SHA for a1f9bff
1 file changed
yolox_ros_cpp/yolox_cpp/include/yolox_cpp/core.hpp
@@ -15,9 +15,6 @@ namespace yolox_cpp
15
cv::Rect_<float> rect;
16
int label;
17
float prob;
18
- bool operator<(const Object &right) const {
19
- return prob < right.prob;
20
- }
21
};
22
23
struct GridAndStride
@@ -246,8 +243,12 @@ namespace yolox_cpp
246
243
std::vector<Object> proposals;
247
244
generate_yolox_proposals(grid_strides, prob, bbox_conf_thresh, proposals);
248
245
249
- // descent
250
- std::sort(std::rbegin(proposals), std::rend(proposals));
+ std::sort(
+ proposals.begin(), proposals.end(),
+ [](const Object &a, const Object &b)
+ {
+ return a.prob > b.prob; // descent
251
+ });
252
253
std::vector<int> picked;
254
nms_sorted_bboxes(proposals, picked, nms_thresh_);
0 commit comments