NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
yolo nas: do not invalidate model when input shape is different (#18799)
Simonas Kazlauskas4ff81d58777b
diff --git a/frigate/detectors/plugins/openvino.py b/frigate/detectors/plugins/openvino.pyindex 70c2d47254..066b6d311b 100644--- a/frigate/detectors/plugins/openvino.py+++ b/frigate/detectors/plugins/openvino.py@@ -59,7 +59,6 @@ class OvDetector(DetectionApi):)self.model_invalid = True- # Ensure the SSD model has the right input and output shapesif self.ov_model_type == ModelTypeEnum.ssd:model_inputs = self.interpreter.inputsmodel_outputs = self.interpreter.outputs@@ -75,12 +74,6 @@ class OvDetector(DetectionApi):)self.model_invalid = True- if model_inputs[0].get_shape() != ov.Shape([1, self.w, self.h, 3]):- logger.error(- f"SSD model input doesn't match. Found {model_inputs[0].get_shape()}."- )- self.model_invalid = True-output_shape = model_outputs[0].get_shape()if output_shape[0] != 1 or output_shape[1] != 1 or output_shape[3] != 7:logger.error(f"SSD model output doesn't match. Found {output_shape}.")@@ -100,13 +93,6 @@ class OvDetector(DetectionApi):f"YoloNAS models must be exported in flat format and only have 1 output. Found {len(model_outputs)}.")self.model_invalid = True-- if model_inputs[0].get_shape() != ov.Shape([1, 3, self.w, self.h]):- logger.error(- f"YoloNAS model input doesn't match. Found {model_inputs[0].get_shape()}, but expected {[1, 3, self.w, self.h]}."- )- self.model_invalid = True-output_shape = model_outputs[0].partial_shapeif output_shape[-1] != 7:logger.error(