From a85468d243056ee3bcabf335771c631eda84b7f1 Mon Sep 17 00:00:00 2001 From: Nate Meyer Date: Tue, 25 Oct 2022 22:35:56 -0400 Subject: [PATCH] Print all available output tensors --- frigate/detectors/openvino.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frigate/detectors/openvino.py b/frigate/detectors/openvino.py index a63dae317..02bfa1b42 100644 --- a/frigate/detectors/openvino.py +++ b/frigate/detectors/openvino.py @@ -17,7 +17,15 @@ class OvDetector(DetectionApi): model=self.ov_model, device_name=det_device ) logger.info(f"Model Input Shape: {self.interpreter.input(0).shape}") - logger.info(f"Model Output Shape: {self.interpreter.output(0).shape}") + self.output_indexes = 0 + while True: + try: + tensor_shape = self.interpreter.output(self.output_indexes).shape + logger.info(f"Model Output-{self.output_indexes} Shape: {tensor_shape}") + self.output_indexes += 1 + except: + logger.info(f"Model has {self.output_indexes} Output Tensors") + break def detect_raw(self, tensor_input):