From 3f20a0d856669412bca4a0d4bf0d01a3186ade81 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 28 Mar 2024 08:25:25 -0600 Subject: [PATCH] Fix lint --- frigate/detectors/plugins/onnx.py | 4 +--- frigate/detectors/plugins/rocm.py | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/frigate/detectors/plugins/onnx.py b/frigate/detectors/plugins/onnx.py index f7f4637ab..6b124f6c9 100644 --- a/frigate/detectors/plugins/onnx.py +++ b/frigate/detectors/plugins/onnx.py @@ -1,4 +1,3 @@ -import glob import logging import numpy as np @@ -39,9 +38,8 @@ class ONNXDetector(DetectionApi): def detect_raw(self, tensor_input): model_input_name = self.model.get_inputs()[0].name model_input_shape = self.model.get_inputs()[0].shape - tensor_input = preprocess(tensor_input, model_input_shape, np.float32) - + # ruff: noqa: F841 tensor_output = self.model.run(None, {model_input_name: tensor_input})[0] raise Exception( diff --git a/frigate/detectors/plugins/rocm.py b/frigate/detectors/plugins/rocm.py index 76b8542e8..ea237a306 100644 --- a/frigate/detectors/plugins/rocm.py +++ b/frigate/detectors/plugins/rocm.py @@ -114,6 +114,7 @@ class ROCmDetector(DetectionApi): detector_result = self.model.run({model_input_name: tensor_input})[0] addr = ctypes.cast(detector_result.data_ptr(), ctypes.POINTER(ctypes.c_float)) + # ruff: noqa: F841 tensor_output = np.ctypeslib.as_array( addr, shape=detector_result.get_shape().lens() )