mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 23:25:25 +03:00
Cleanup tensor input
This commit is contained in:
parent
f532c9c333
commit
e00238e297
@ -77,6 +77,7 @@ class ONNXDetector(DetectionApi):
|
|||||||
|
|
||||||
logger.info(f"ONNX: {path} loaded")
|
logger.info(f"ONNX: {path} loaded")
|
||||||
|
|
||||||
|
# ruff: noqa: F841
|
||||||
def detect_raw(self, tensor_input):
|
def detect_raw(self, tensor_input):
|
||||||
model_input_name = self.model.get_inputs()[0].name
|
model_input_name = self.model.get_inputs()[0].name
|
||||||
model_input_shape = self.model.get_inputs()[0].shape
|
model_input_shape = self.model.get_inputs()[0].shape
|
||||||
|
|||||||
@ -126,7 +126,7 @@ class ROCmDetector(DetectionApi):
|
|||||||
tensor_input = cv2.dnn.blobFromImage(
|
tensor_input = cv2.dnn.blobFromImage(
|
||||||
tensor_input[0],
|
tensor_input[0],
|
||||||
1.0 / 255,
|
1.0 / 255,
|
||||||
model_input_shape,
|
(model_input_shape[2], model_input_shape[3]),
|
||||||
None,
|
None,
|
||||||
swapRB=False,
|
swapRB=False,
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user