Live Inference using YoloV8 #78
Answered
by
SkalskiP
PiyushKamboj1503
asked this question in
Q&A
-
Search before asking
QuestionThe argument show=True give the live inference in YoloV8 with it own bounding boxes. AdditionalNo response |
Beta Was this translation helpful? Give feedback.
Answered by
SkalskiP
Apr 27, 2023
Replies: 2 comments
-
Hi 👋🏻! Given the fact that it is not an issue related to the library itself, I'll move that conversation to our Q&A discussions |
Beta Was this translation helpful? Give feedback.
0 replies
-
Here is a pseudo-code possibly would require some fixing but could be useful as the first iteration. import cv2
import supervision as sv
from ultralytics import YOLO
model = YOLO('yolov8s.pt')
annotator = BoxAnnotator()
for frame in sv.get_video_frames_generator(source_path='source_video.mp4'):
yolov8_results = model(frame)[0]
detections = sv.Detections.from_yolov8(yolov8_results)
annotated_frame = annotator.annotate(scene=frame.copy(), detections=detections)
cv2.imshow('image window', annotated_frame) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
PiyushKamboj1503
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Detections
objectimshow
to display annotated images.Here is a pseudo-code possibly would require some fixing but could be useful as the first iteration.