Skip to content

Commit

Permalink
face recognition support score show
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutree committed Oct 25, 2024
1 parent 833f1c8 commit 5fff820
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/nn/include/maix_nn_face_recognizer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,11 @@ namespace maix::nn
for (size_t i = 0; i < features.size(); ++i)
{
float score = _feature_compare(feature, features[i].data(), fea_len);
if (score > max_score && score > compare_th)
if (score > max_score)
{
max_score = score;
max_i = i;
if(score > compare_th)
max_i = i;
}
}
nn::FaceObject face(obj->x, obj->y, obj->w, obj->h, max_i + 1, max_score);
Expand Down

0 comments on commit 5fff820

Please sign in to comment.