Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/Detector/tensorrt_onnx/YoloONNXv26_bb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class YOLOv26_bb_onnx : public YoloONNX
auto ind = i * m_outpuDims[0].d[2];

float classConf = output[ind + 4];
int64_t classId = output[ind + 5];
int classId = static_cast<int>(output[ind + 5]);

if (classConf >= m_params.m_confThreshold)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Detector/tensorrt_onnx/YoloONNXv26_instance.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class YOLOv26_instance_onnx : public YoloONNX
size_t k = i * dimensions;

float objectConf = output[k + 4];
int classId = output[k + 5];
int classId = static_cast<int>(output[k + 5]);

if (objectConf >= m_params.m_confThreshold)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Detector/tensorrt_onnx/YoloONNXv26_obb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class YOLOv26_obb_onnx : public YoloONNX
auto ind = i * m_outpuDims[0].d[2];

float classConf = output[ind + 4];
int64_t classId = output[ind + 5];
int classId = static_cast<int>(output[ind + 5]);

if (classConf >= m_params.m_confThreshold)
{
Expand Down
8 changes: 4 additions & 4 deletions src/Tracker/TrackerSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ bool ParseTrackerSettings(const std::string& settingsFile, TrackerSettings& trac
trackerSettings.m_useAbandonedDetection = reader.GetInteger("tracking", "detect_abandoned", 0) != 0;
trackerSettings.m_minStaticTime = reader.GetInteger("tracking", "min_static_time", 5);
trackerSettings.m_maxStaticTime = reader.GetInteger("tracking", "max_static_time", 25);
trackerSettings.m_maxSpeedForStatic = reader.GetInteger("tracking", "max_speed_for_static", 10);
trackerSettings.m_maxSpeedForStatic = static_cast<track_t>(reader.GetReal("tracking", "max_speed_for_static", 0.5));

trackerSettings.m_byteTrackSettings.m_trackBuffer = reader.GetInteger("tracking", "bytetrack_track_buffer", 30);
trackerSettings.m_byteTrackSettings.m_trackThresh = reader.GetReal("tracking", "bytetrack_track_thresh", 0.5);
trackerSettings.m_byteTrackSettings.m_highThresh = reader.GetReal("tracking", "bytetrack_high_thresh", 0.5);
trackerSettings.m_byteTrackSettings.m_matchThresh = reader.GetReal("tracking", "bytetrack_match_thresh", 0.8);
trackerSettings.m_byteTrackSettings.m_trackThresh = static_cast<float>(reader.GetReal("tracking", "bytetrack_track_thresh", 0.5));
trackerSettings.m_byteTrackSettings.m_highThresh = static_cast<float>(reader.GetReal("tracking", "bytetrack_high_thresh", 0.5));
trackerSettings.m_byteTrackSettings.m_matchThresh = static_cast<float>(reader.GetReal("tracking", "bytetrack_match_thresh", 0.8));

// Read detection settings
trackerSettings.m_nnWeights = reader.GetString("detection", "nn_weights", "data/yolov4-tiny_best.weights");
Expand Down
13 changes: 3 additions & 10 deletions src/Tracker/byte_track/BYTETracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ void byte_track::BYTETracker::removeDuplicateStracks(const std::vector<STrackPtr
std::vector<bool> a_overlapping(a_stracks.size(), false), b_overlapping(b_stracks.size(), false);
for (const auto &[a_idx, b_idx] : overlapping_combinations)
{
const int timep = a_stracks[a_idx]->getFrameId() - a_stracks[a_idx]->getStartFrameId();
const int timeq = b_stracks[b_idx]->getFrameId() - b_stracks[b_idx]->getStartFrameId();
const size_t timep = a_stracks[a_idx]->getFrameId() - a_stracks[a_idx]->getStartFrameId();
const size_t timeq = b_stracks[b_idx]->getFrameId() - b_stracks[b_idx]->getStartFrameId();
if (timep > timeq)
b_overlapping[b_idx] = true;
else
Expand Down Expand Up @@ -359,16 +359,9 @@ void byte_track::BYTETracker::linearAssignment(const std::vector<std::vector<flo
for (size_t i = 0; i < rowsol.size(); i++)
{
if (rowsol[i] >= 0)
{
std::vector<int> match;
match.push_back(i);
match.push_back(rowsol[i]);
matches.push_back(match);
}
matches.push_back({ (int)i, rowsol[i] });
else
{
a_unmatched.push_back(i);
}
}

for (size_t i = 0; i < colsol.size(); i++)
Expand Down
Loading