NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
0.17 tweaks (#18892)
Nicolas Mowenceeb6543f53d
diff --git a/Makefile b/Makefileindex e414ed65cd..1c4e137a19 100644--- a/Makefile+++ b/Makefile@@ -1,7 +1,7 @@default_target: localCOMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)-VERSION = 0.16.1+VERSION = 0.17.0IMAGE_REPO ?= ghcr.io/blakeblackshear/frigateGITHUB_REF_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)BOARDS= #Initialized emptydiff --git a/frigate/data_processing/real_time/bird.py b/frigate/data_processing/real_time/bird.pyindex 8d2c598fc3..a51c7a7e82 100644--- a/frigate/data_processing/real_time/bird.py+++ b/frigate/data_processing/real_time/bird.py@@ -13,6 +13,7 @@ from frigate.comms.event_metadata_updater import ()from frigate.config import FrigateConfigfrom frigate.const import MODEL_CACHE_DIR+from frigate.log import redirect_output_to_loggerfrom frigate.util.object import calculate_regionfrom ..types import DataProcessorMetrics@@ -76,6 +77,7 @@ class BirdRealTimeProcessor(RealTimeProcessorApi):except Exception as e:logger.error(f"Failed to download {path}: {e}")+ @redirect_output_to_logger(logger, logging.DEBUG)def __build_detector(self) -> None:self.interpreter = Interpreter(model_path=os.path.join(MODEL_CACHE_DIR, "bird/bird.tflite"),diff --git a/frigate/log.py b/frigate/log.pyindex 11f2da254e..f2171ffe00 100644--- a/frigate/log.py+++ b/frigate/log.py@@ -80,6 +80,7 @@ def apply_log_levels(default: str, log_levels: dict[str, LogLevel]) -> None:log_levels = {"absl": LogLevel.error,"httpx": LogLevel.error,+ "matplotlib": LogLevel.error,"tensorflow": LogLevel.error,"werkzeug": LogLevel.error,"ws4py": LogLevel.error,@@ -193,7 +194,7 @@ class LogRedirect(io.StringIO):@contextmanager-def redirect_fd_to_queue(queue: Queue[str]) -> Generator[None, None, None]:+def __redirect_fd_to_queue(queue: Queue[str]) -> Generator[None, None, None]:"""Redirect file descriptor 1 (stdout) to a pipe and capture output in a queue."""stdout_fd = os.dup(1)read_fd, write_fd = os.pipe()@@ -249,7 +250,7 @@ def redirect_output_to_logger(logger: logging.Logger, level: int) -> Any:try:# Redirect C-level stdout- with redirect_fd_to_queue(queue):+ with __redirect_fd_to_queue(queue):result = func(*args, **kwargs)finally:# Restore Python stdout/stderr