From e00238e297d720e3fd92c70a383fbb6180a5c0d8 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 2 Jul 2024 10:05:46 -0600 Subject: [PATCH] Cleanup tensor input --- frigate/detectors/plugins/onnx.py | 1 + frigate/detectors/plugins/rocm.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frigate/detectors/plugins/onnx.py b/frigate/detectors/plugins/onnx.py index 117cdae02..7d300bb9a 100644 --- a/frigate/detectors/plugins/onnx.py +++ b/frigate/detectors/plugins/onnx.py @@ -77,6 +77,7 @@ class ONNXDetector(DetectionApi): logger.info(f"ONNX: {path} loaded") + # ruff: noqa: F841 def detect_raw(self, tensor_input): model_input_name = self.model.get_inputs()[0].name model_input_shape = self.model.get_inputs()[0].shape diff --git a/frigate/detectors/plugins/rocm.py b/frigate/detectors/plugins/rocm.py index 0f2c9acf8..4b8526135 100644 --- a/frigate/detectors/plugins/rocm.py +++ b/frigate/detectors/plugins/rocm.py @@ -126,7 +126,7 @@ class ROCmDetector(DetectionApi): tensor_input = cv2.dnn.blobFromImage( tensor_input[0], 1.0 / 255, - model_input_shape, + (model_input_shape[2], model_input_shape[3]), None, swapRB=False, )