How To Get Class And Bounding Box Coordinates From Yolov5 Predictions?
I am trying to perform inference on my custom YOLOv5 model. The official documentation uses the default detect.py script for inference. I have written my own python script but I ca
Solution 1:
results = model(input_images)
labels, cord_thres = results.xyxyn[0][:, -1].numpy(), results.xyxyn[0][:, :-1].numpy()
This will give you labels, coordinates, and thresholds for each object detected, you can use it to plot bounding boxes. You can check out this repo for more detailed code.
Post a Comment for "How To Get Class And Bounding Box Coordinates From Yolov5 Predictions?"