ByteTrack-Eigen is a C++ implementation of the ByteTrack object tracking method, leveraging the Eigen library for high-performance matrix and vector operations.
The member variable removed_tracks defined in the class BYTETracker is not properly cleaned up, which can lead to memory growth and decreased code execution speed.
I suggest adding the following line at the end of the member function void BYTETracker::handle_lost_and_removed_tracks:
OS: ubuntu20.04
After setting the CMake option: -DCMAKE_BUILD_TYPE=Debug, and compiling the code, when running the executable program, the following error is reported:
when setting the CMake option: -DCMAKE_BUILD_TYPE=Release, The above error will not occur.
I think we can optimize the following function to fix this bug.
Eigen::Vector4d KalmanBBoxTrack::tlwh() const {
if (mean.isZero(0)) { // Checking if 'mean' is uninitialized or zeroreturn _tlwh;
}
// Eigen::Vector4d ret = mean;
Eigen::Vector4d ret = mean.head(4); //modified
ret[2] *= ret[3];
ret[0] -= ret[2] / 2.0;
ret[1] -= ret[3] / 2.0;
return ret;
}