mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-10 13:15:25 +03:00
Fix lint
This commit is contained in:
parent
8494fa1cfe
commit
3f20a0d856
@ -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(
|
||||
|
||||
@ -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()
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user