Cleanup tensor input

This commit is contained in:
Nicolas Mowen 2024-07-02 10:05:46 -06:00
parent f532c9c333
commit e00238e297
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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,
)