Skip to content

NVR with realtime local object detection for IP cameras

Fixes (#14668)

Nicolas Mowen357ce0382ece
diff --git a/frigate/config/env.py b/frigate/config/env.py
index e4e6842cb9..0a9b92e8f7 100644
--- a/frigate/config/env.py
+++ b/frigate/config/env.py
@@ -23,7 +23,7 @@ EnvString = Annotated[str, AfterValidator(validate_env_string)]
def validate_env_vars(v: dict[str, str], info: ValidationInfo) -> dict[str, str]:
if isinstance(info.context, dict) and info.context.get("install", False):
- for k, v in v:
+ for k, v in v.items():
os.environ[k] = v
return v
diff --git a/frigate/detectors/plugins/rocm.py b/frigate/detectors/plugins/rocm.py
index 655973dfd2..60118d1294 100644
--- a/frigate/detectors/plugins/rocm.py
+++ b/frigate/detectors/plugins/rocm.py
@@ -98,9 +98,7 @@ class ROCmDetector(DetectionApi):
else:
logger.info(f"AMD/ROCm: loading model from {path}")
- if path.endswith(".onnx"):
- self.model = migraphx.parse_onnx(path)
- elif (
+ if (
path.endswith(".tf")
or path.endswith(".tf2")
or path.endswith(".tflite")
@@ -108,7 +106,7 @@ class ROCmDetector(DetectionApi):
# untested
self.model = migraphx.parse_tf(path)
else:
- raise Exception(f"AMD/ROCm: unknown model format {path}")
+ self.model = migraphx.parse_onnx(path)
logger.info("AMD/ROCm: compiling the model")
diff --git a/frigate/util/config.py b/frigate/util/config.py
index 729215e9ec..a9a9666d95 100644
--- a/frigate/util/config.py
+++ b/frigate/util/config.py
@@ -29,6 +29,10 @@ def migrate_frigate_config(config_file: str):
with open(config_file, "r") as f:
config: dict[str, dict[str, any]] = yaml.load(f)
+ if config is None:
+ logger.error(f"Failed to load config at {config_file}")
+ return
+
previous_version = str(config.get("version", "0.13"))
if previous_version == CURRENT_CONFIG_VERSION: