From 00de1ce7b3223098f0a03f210891f8082d26d3b4 Mon Sep 17 00:00:00 2001 From: FlyingFathead Date: Tue, 3 Dec 2024 07:51:50 +0200 Subject: [PATCH] date change fixes to webui --- config.ini | 4 ++-- remote_sync.py | 6 ++++++ version.py | 2 +- yolov8_live_rtmp_stream_detection.py | 3 +++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/config.ini b/config.ini index 3e786cd..d6e108e 100644 --- a/config.ini +++ b/config.ini @@ -82,7 +82,7 @@ tts_cooldown = 2 # Too high of a value may introduce lag or dropouts while saving. # 10 or 20 might be a good starter for many. Can be easily 100-1000. # Set to 0 or negative for unlimited queue size. -image_save_queue_maxsize = 1000 +image_save_queue_maxsize = 5000 [logging] enable_detection_logging_to_file = True @@ -173,4 +173,4 @@ max_workers = 1 # Interval in seconds to batch files before syncing. # Set to 0 to disable batching (sync files immediately). # ATTN: the batch interval is currently NOT implemented. -batch_interval = 1 \ No newline at end of file +batch_interval = 1 diff --git a/remote_sync.py b/remote_sync.py index 0e57212..fa627e2 100644 --- a/remote_sync.py +++ b/remote_sync.py @@ -52,6 +52,12 @@ def __init__(self, config, main_logger, save_dir_base, aggregated_detections_fil self.MAX_RETRIES = config.getint('remote_sync', 'max_retries', fallback=3) self.RETRY_DELAY = config.getint('remote_sync', 'retry_delay', fallback=5) + # **Batch Processing Configuration** + self.BATCH_SIZE = config.getint('remote_sync', 'batch_size', fallback=10) + self.BATCH_TIME = config.getint('remote_sync', 'batch_time', fallback=5) + + self.logger.info(f"Batch processing enabled with batch size: {self.BATCH_SIZE} and batch time: {self.BATCH_TIME} seconds.") + # Queue Configuration self.REMOTE_SYNC_QUEUE_MAXSIZE = config.getint('remote_sync', 'remote_sync_queue_maxsize', fallback=1000) self.remote_sync_queue = Queue(maxsize=self.REMOTE_SYNC_QUEUE_MAXSIZE) diff --git a/version.py b/version.py index 446635d..7ff6432 100644 --- a/version.py +++ b/version.py @@ -1,3 +1,3 @@ # version.py -version_number = "0.1614.1 (Nov 29 2024)" \ No newline at end of file +version_number = "0.1614.2 (Dec 3 2024)" \ No newline at end of file diff --git a/yolov8_live_rtmp_stream_detection.py b/yolov8_live_rtmp_stream_detection.py index 34d19b7..3b11d75 100755 --- a/yolov8_live_rtmp_stream_detection.py +++ b/yolov8_live_rtmp_stream_detection.py @@ -614,6 +614,9 @@ def frame_processing_thread(frame_queue, stop_event, conf_threshold, draw_rectan # Assign timestamp here timestamp = datetime.now().strftime('%Y-%m-%d %H:%M:%S') + # Update SAVE_DIR to the current date-based directory + SAVE_DIR = get_current_save_dir() + for detection_index, detection in enumerate(detections): x1, y1, x2, y2, confidence, class_idx = detection