fix bug of output order

This commit is contained in:
mengyuanli 2021-07-16 10:52:15 +08:00
parent 580981a38a
commit d896a8c805
1 changed files with 3 additions and 1 deletions

View File

@ -77,7 +77,9 @@ class NMSBox {
}
area_ = (y2_ - y1_) * (x2_ - x1_);
}
inline bool operator<(const NMSBox &box) const { return score_ < box.score_; }
inline bool operator<(const NMSBox &box) const {
return score_ < box.score_ || (score_ == box.score_ && index_ > box.index_);
}
public:
float score_;