Skip to content

Commit

Permalink
Fixed a bug with inconsistent inference results
Browse files Browse the repository at this point in the history
  • Loading branch information
stbidtf committed Mar 24, 2024
1 parent f12bbe0 commit 6d9538b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions yolov8/src/postprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ static float iou(float lbox[4], float rbox[4]) {
}

static bool cmp(const Detection &a, const Detection &b) {
if (a.conf == b.conf) {
return a.bbox[0] > b.bbox[0]
}
return a.conf > b.conf;
}

Expand Down

0 comments on commit 6d9538b

Please sign in to comment.