File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
yolox_ros_cpp/yolox_cpp/include/yolox_cpp Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,6 @@ namespace yolox_cpp
1515 cv::Rect_<float > rect;
1616 int label;
1717 float prob;
18- bool operator <(const Object &right) const {
19- return prob < right.prob ;
20- }
2118 };
2219
2320 struct GridAndStride
@@ -246,8 +243,12 @@ namespace yolox_cpp
246243 std::vector<Object> proposals;
247244 generate_yolox_proposals (grid_strides, prob, bbox_conf_thresh, proposals);
248245
249- // descent
250- std::sort (std::rbegin (proposals), std::rend (proposals));
246+ std::sort (
247+ proposals.begin (), proposals.end (),
248+ [](const Object &a, const Object &b)
249+ {
250+ return a.prob > b.prob ; // descent
251+ });
251252
252253 std::vector<int > picked;
253254 nms_sorted_bboxes (proposals, picked, nms_thresh_);
You can’t perform that action at this time.
0 commit comments