Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions deploy/TensorRT/cpp/include/bytetrack/BYTETracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@

#include "STrack.h"

// struct Object
// {
// cv::Rect_<float> rect;
// int label;
// float prob;
// };

namespace bytetrack {

struct Object
{
cv::Rect_<float> rect;
int label;
float prob;
};

namespace bytetrack {

class BYTETracker
{
public:
Expand Down
9 changes: 6 additions & 3 deletions deploy/TensorRT/cpp/include/bytetrack/STrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
using namespace cv;
using namespace std;

namespace bytetrack {

enum TrackState { New = 0, Tracked, Lost, Removed };

class STrack
{
class STrack {
public:
STrack(vector<float> tlwh_, float score);
~STrack();
Expand Down Expand Up @@ -47,4 +48,6 @@ class STrack

private:
byte_kalman::KalmanFilter kalman_filter;
};
};

} // namespace bytetrack
6 changes: 5 additions & 1 deletion deploy/TensorRT/cpp/src/STrack.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "STrack.h"

namespace bytetrack {

STrack::STrack(vector<float> tlwh_, float score)
{
_tlwh.resize(4);
Expand Down Expand Up @@ -189,4 +191,6 @@ void STrack::multi_predict(vector<STrack*> &stracks, byte_kalman::KalmanFilter &
}
kalman_filter.predict(stracks[i]->mean, stracks[i]->covariance);
}
}
}

} // namespace bytetrack