Is your feature request related to a problem? Please describe.
First of all, thank the developer for the example. Here is the frame rate that I want to test for real-time inference rtsp
import cv2
from ultralytics import YOLO
from deepsparse import Pipeline
from cv2 import getTickCount, getTickFrequency
# YOLOv8
model_path = r"/mnt/d/code/c++/myyolo/deepsparse/model.onnx"
cap = cv2.VideoCapture("rtsp://172.20.64.1:8554/cam")
# Set up the DeepSparse Pipeline
yolo_pipeline = Pipeline.create(task="yolo", model_path=model_path)
while cap.isOpened():
loop_start = getTickCount()
success, frame = cap.read()
if success:
results =yolo_pipeline(images=[frame])
print(results)
annotated_frame = # dont know how to write this part , in yolov8 we can use results[0].plot()
loop_time = getTickCount() - loop_start
total_time = loop_time / (getTickFrequency())
FPS = int(1 / total_time)
fps_text = f"FPS: {FPS:.2f}"
font = cv2.FONT_HERSHEY_SIMPLEX
font_scale = 1
font_thickness = 2
text_color = (0, 0, 255)
text_position = (10, 30)
cv2.putText(annotated_frame, fps_text, text_position, font, font_scale, text_color, font_thickness)
cv2.imshow('img', annotated_frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
I would like to know if we provide an API for directly plotting results
What coordinate system are we using for the results of yolo?
Where are the corresponding locations of these codes?
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe. First of all, thank the developer for the example. Here is the frame rate that I want to test for real-time inference rtsp
Describe the solution you'd like
i got error like below
I would like to know if we provide an API for directly plotting results What coordinate system are we using for the results of yolo? Where are the corresponding locations of these codes?
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.