Enable log information. Disable NPU in U9

This commit is contained in:
2026-04-21 15:48:27 +10:00
parent 00f6e2f852
commit 97d814936d
18 changed files with 301 additions and 54 deletions

View File

@@ -1,4 +1,5 @@
#include "BYTETracker.h"
#include "ANSLicense.h" // ANS_DBG for tracker-state-size diagnostic
#include <algorithm>
#include <cstddef>
#include <limits>
@@ -322,6 +323,24 @@ std::vector<ByteTrack::BYTETracker::STrackPtr> ByteTrack::BYTETracker::update(co
tracked_stracks_ = tracked_stracks_out;
lost_stracks_ = lost_stracks_out;
// Diagnostic: report tracker state size at most once every 60 s per instance.
// removed_stracks_ is append-only in this implementation — watch it grow.
{
static thread_local std::chrono::steady_clock::time_point s_nextLog{};
auto now = std::chrono::steady_clock::now();
if (now >= s_nextLog) {
s_nextLog = now + std::chrono::seconds(60);
ANS_DBG("ANSMOT",
"BYTETracker state this=%p frame=%zu nextId=%zu tracked=%zu lost=%zu removed=%zu",
(void*)this,
frame_id_,
track_id_count_,
tracked_stracks_.size(),
lost_stracks_.size(),
removed_stracks_.size());
}
}
std::vector<STrackPtr> output_stracks;
for (const auto &track : tracked_stracks_)
{