How can I convert OpenVino predict output to boxes?

69 Views Asked by At

I've deployed my YOLO model by using openvino/model_server:latest image, and I run `import numpy as np from classes import imagenet_classes from ovmsclient import make_grpc_client

client = make_grpc_client("localhost:9000")

with open("zebra.jpeg", "rb") as f: img = f.read()

output = client.predict({"images": img}, "yolo") print(output.shape)` this code, then I got (1, 84, 8400) this output. How can I use this output to draw boxes and verify which object is predict?

1

There are 1 best solutions below

0
Hairul_Intel On

Based on your output tensor results, you can obtain the bounding boxes using this YOLOv8-OpenCV-ONNX-Python script which seems to load an ONNX model (which has the same output format), and convert the results into boxes with associated scores.