YOLOv8 Object Counting in Real-time with Webcam, OpenCV and Supervision

preview_player
Показать описание
Curious about how to build an application capable of detecting objects on a camera stream in real time? You are in the right place! Together we will learn how to access the webcam using OpenCV, detect objects with YOLOv8, and count them with Supervision.

Chapters:

0:00 Introduction
0:38 Webcam inference with YOLOv8 CLI
02:12 Accessing webcam with OpenCV
07:05 Webcam inference with YOLOv8 SDK
08:25 Drawing bounding boxes
10:05 Using polygon zones to count detections
14:28 Eliminating double detections with agnostic NMS
16:07 Few extra tricks
18:59 Conclusion

Resources:

Рекомендации по теме
Комментарии
Автор

I get this error: "...too many values to unpack (expected 4)" pointing inside the labels array. Why am I getting this error this error? What should I do to fix it? :)

pip list: ...numpy 1.24.2, torch 2.0.0, torchvision 0.15.1, ultralytics 8.0.82, supervision 0.6.0

pcsolutionsezcloudsystems
Автор

Your content has become the best content I've watched on YT in a while and I love the Supervision package, it's making my work easier. Thanks

onyekaokonji
Автор

omg thank you so much, everyone is using yolo on it's own and not with OpenCV and that's exactly what I needed

SphinxKingStone
Автор

Hello sir,
How can I develop real-time webcam functionality using a dataset I've created?

MedexRND
Автор

When the number of objects increases, my model does not display the label format that I specified and only displays the object code, how can I display the specified label in any case?

amirsabbagh
Автор

it was great to see how easy is it to remove a class from detections! Great job @roboflow!😁

qqhmovo
Автор

what changes do i need to make if I were to use Raspberry Pi 4 + Raspberry Camera?

aaronfoo
Автор

i am getting this error
AttributeError: module 'supervision' has no attribute 'BoxAnnotator'

deepakkarmaDK
Автор

Thanks for your complete step by step coding video. Kinna like it. I followed yolo since v3, but never know we can filter out hand or other unrelated object to be detected

vickyfikriachri
Автор

It's so cool, thank you for showing basic function to work with YOLO, i'm having a small task that required learning object detection and I was frustrated to find some tutorial, this was really a big help

phamtienthinh
Автор

I am using a windows 11 and it doesn't show me the webcam only the terminal in vscode

talhanadeem
Автор

Hi, your video is great. I've been using your code with my own model to count bacteria inside the zone and it works perfectly! Thank you for sharing the knowledge.

wishnu
Автор

how do you create a virtual environment at 00:45? on my end it says invalid syntax

lphonehacks
Автор

thank you for this video! very helpful.
but i am a problem. the line "import cv2" in not identified what should i do?

danielmeshulam
Автор

Hello Amin! I get the error: AttributeError: type object 'Detections' has no attribute 'from_yolov8''

ThongMr
Автор

Hi, thank you for the tutorial. I'm working on my project right now and it helps me a lot. But this project require me to know the fps, is there a way to show it?

gisanimrahma
Автор

Is it possible to do multiple polygon zones inside 1 frame?

kiangg
Автор

hi, the pre trained model that u used how can we use if i want to train a custom dataset and then use it? like how to use it for model trained on custom dataset on collab but i want to detect in real time how to get that? can i download the already trained model on collab on my pc?

AdityaSingh-hmky
Автор

If I have remote camera on hill and I am monitoring wildfire how to get alert from camera and is it possible to work? What i need of equipment?

boskobuha
Автор

Well explained @Peter. Useful and informative video that can cover multiple use-cases. Thanks a lot!

UZMAALFATMI