From 150c8e63937b2570e2be68320747cd0ea9c5b5a6 Mon Sep 17 00:00:00 2001 From: renkaifei Date: Thu, 27 Mar 2025 11:15:14 +0800 Subject: [PATCH] a little optimization at joint_stracks --- deploy/TensorRT/cpp/src/utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/TensorRT/cpp/src/utils.cpp b/deploy/TensorRT/cpp/src/utils.cpp index eac5e1b4..1a608b64 100644 --- a/deploy/TensorRT/cpp/src/utils.cpp +++ b/deploy/TensorRT/cpp/src/utils.cpp @@ -34,7 +34,7 @@ vector BYTETracker::joint_stracks(vector &tlista, vector for (int i = 0; i < tlistb.size(); i++) { int tid = tlistb[i].track_id; - if (!exists[tid] || exists.count(tid) == 0) + if (exists.count(tid) == 0 || !exists[tid]) { exists[tid] = 1; res.push_back(tlistb[i]);