diff --git a/deploy/TensorRT/cpp/src/BYTETracker.cpp b/deploy/TensorRT/cpp/src/BYTETracker.cpp index 7e036e99..e0c03d02 100644 --- a/deploy/TensorRT/cpp/src/BYTETracker.cpp +++ b/deploy/TensorRT/cpp/src/BYTETracker.cpp @@ -218,6 +218,7 @@ vector BYTETracker::update(const vector& objects) } this->lost_stracks = sub_stracks(this->lost_stracks, this->removed_stracks); + this->removed_stracks.clear(); for (int i = 0; i < removed_stracks.size(); i++) { this->removed_stracks.push_back(removed_stracks[i]); @@ -238,4 +239,4 @@ vector BYTETracker::update(const vector& objects) } } return output_stracks; -} \ No newline at end of file +} diff --git a/deploy/ncnn/cpp/src/BYTETracker.cpp b/deploy/ncnn/cpp/src/BYTETracker.cpp index 7e036e99..e0c03d02 100644 --- a/deploy/ncnn/cpp/src/BYTETracker.cpp +++ b/deploy/ncnn/cpp/src/BYTETracker.cpp @@ -218,6 +218,7 @@ vector BYTETracker::update(const vector& objects) } this->lost_stracks = sub_stracks(this->lost_stracks, this->removed_stracks); + this->removed_stracks.clear(); for (int i = 0; i < removed_stracks.size(); i++) { this->removed_stracks.push_back(removed_stracks[i]); @@ -238,4 +239,4 @@ vector BYTETracker::update(const vector& objects) } } return output_stracks; -} \ No newline at end of file +}