forked from dsutanto/bytetrack-counter-cpp
Some more log clean up
This commit is contained in:
1 parent
1c783fd923
commit
3ebdc215e6
5 files changed
+8
-7
No files matched your search
+3
-2
@@ -270,7 +270,7 @@ std::pair<int, bool> BatchStore::record_ayam_crossing(int track_id) {
|
||||
return {current_state_["count"].get<int>(), started_new};
|
||||
}
|
||||
|
||||
bool BatchStore::record_talenan_crossing(int track_id) {
|
||||
bool BatchStore::record_talenan_crossing(int track_id, float confidence) {
|
||||
if (ignore_batch_label_) return false;
|
||||
std::lock_guard<std::mutex> lock(state_mutex_);
|
||||
{
|
||||
@@ -294,7 +294,8 @@ bool BatchStore::record_talenan_crossing(int track_id) {
|
||||
<< " | duration=" << duration_sec << "s"
|
||||
<< " | cps=" << std::fixed << std::setprecision(2) << cps
|
||||
<< " | start=" << start_time
|
||||
<< " | end=" << end_time;
|
||||
<< " | end=" << end_time
|
||||
<< " | conf=" << std::fixed << std::setprecision(3) << confidence;
|
||||
logger_(msg.str());
|
||||
}
|
||||
ignore_batch_label_fn();
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ public:
|
||||
bool check_cutoff_reset();
|
||||
|
||||
std::pair<int, bool> record_ayam_crossing(int track_id);
|
||||
bool record_talenan_crossing(int track_id);
|
||||
bool record_talenan_crossing(int track_id, float confidence);
|
||||
void end_batch(const std::string& closed_by = "manual");
|
||||
void ping_activity();
|
||||
void shutdown();
|
||||
|
||||
+2
-2
@@ -382,7 +382,7 @@ int main(int argc, char* argv[]) {
|
||||
if (crossed_line(prev_cx, cx, line_x, g_config.cross_direction) &&
|
||||
talenan_line_crossed.find(tid) == talenan_line_crossed.end()) {
|
||||
talenan_line_crossed.insert(tid);
|
||||
if (store.record_talenan_crossing(tid)) {
|
||||
if (store.record_talenan_crossing(tid, talenan_scores_vec(di))) {
|
||||
batch_closed_frame = true;
|
||||
talenan_cross_flash[tid] = g_config.cross_flash_frames;
|
||||
popups.push_back({
|
||||
@@ -410,7 +410,7 @@ int main(int argc, char* argv[]) {
|
||||
ayam_line_crossed.find(tid) == ayam_line_crossed.end()) {
|
||||
ayam_line_crossed.insert(tid);
|
||||
auto [count, started_new] = store.record_ayam_crossing(tid);
|
||||
std::cout << store.current_batch_number() << " | " << count << std::endl;
|
||||
std::cout << "[" << now_str() << "] Batch #" << store.current_batch_number() << " | count: " << count << " | conf: " << ayam_scores_vec(di) << std::endl;
|
||||
if (cross_logger) {
|
||||
std::ostringstream frame_str, tid_str;
|
||||
frame_str << frame_idx;
|
||||
|
||||
Reference in new issue
Block a user