First Commit

This commit is contained in:
proitlab committed 2026-07-01 13:38:05 +07:00
1 parent 267107ff05
commit 37fe4eee3a
53 files changed
+15098 -2

No files matched your search

+68
View File
@@ -0,0 +1,68 @@
#pragma once
#include <string>
#include <cstdint>
struct AppConfig {
std::string output_dir = "/opt/bytetrack-counter-cpp";
std::string db_path;
std::string state_file;
std::string source = "rtsp://user:pass@192.168.0.100:554/stream1";
std::string model_path = "/opt/models/yolo.rknn";
std::string camera_name = "CC1";
std::string object_label = "ayam-potong";
std::string class_ayam = "ayam";
std::string class_talenan = "talenan";
int line_x = -1;
float line_x_frac = 0.5f;
std::string cross_direction = "rtl";
int imgsz = 320;
bool half = false;
float conf = 0.3f;
int device = 0;
int core_mask = 1;
int num_classes = 2;
bool score_sigmoid = false;
float track_high_thresh = 0.5f;
float track_low_thresh = 0.1f;
float track_match_thresh = 0.8f;
int track_buffer = 30;
int track_min_hits = 3;
std::string daily_cutoff_time = "20:00";
float batch_timeout_seconds = 300.0f;
float ignore_batch_label_timeout = 30.0f;
int min_object_per_batch = 60;
int min_duration_per_batch = 60;
bool export_csv = true;
std::string cross_csv;
int warmup_frames = 30;
int reconnect_delay_sec = 3;
int max_reconnect_attempts = 0;
int flush_every_n_frames = 100;
int tracked_prune_sec = 300;
bool record_video = false;
int video_segment_sec = 3600;
int output_fps = 15;
bool live_stream_enabled = false;
std::string live_stream_frame_path = "/dev/shm/bytetrack-counter/live_frame.jpg";
int live_stream_quality = 75;
int live_stream_every_n = 2;
std::string rtsp_ffmpeg_options = "rtsp_transport;tcp|fflags;nobuffer|flags;low_delay";
int cross_flash_frames = 12;
int popup_lifetime = 20;
int line_pulse_frames = 12;
int count_pulse_frames = 15;
int batch_pulse_frames = 20;
void load_from_env(const char* env_path = nullptr);
};
extern AppConfig g_config;