Skip to content

Commit

Permalink
Merge pull request #61 from MirrorYuChen/master
Browse files Browse the repository at this point in the history
fix bug in NMS
  • Loading branch information
ywlife authored Mar 5, 2020
2 parents 7492696 + b4d5b8a commit c932596
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions prj-mnn/cpp/centerface.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "centerface.h"

#include <algorithm>
#include <iostream>
#include <string>

Expand Down Expand Up @@ -133,6 +134,10 @@ int Centerface::Detect(const cv::Mat & img_src, std::vector<FaceInfo>* faces) {
faces_tmp.push_back(face_info);
}
}
std::sort(faces_tmp.begin(), faces_tmp.end(),
[](const FaceInfo& a, const FaceInfo& b) {
return a.score_ < b.score_;
});
NMS(faces_tmp, faces, nmsThreshold_);
std::cout << "end detect." << std::endl;
return 0;
Expand Down

0 comments on commit c932596

Please sign in to comment.