YOLOv8: Real-Time Object Detection with Webcam

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024

ความคิดเห็น • 109

  • @NicolaiAI
    @NicolaiAI  ปีที่แล้ว +7

    Join My AI Career Program
    www.nicolai-nielsen.com/aicareer
    Enroll in My School and Technical Courses
    www.nicos-school.com

    • @lewywaish2587
      @lewywaish2587 ปีที่แล้ว

      Your videos are are big inspirstion to young programmers like me,massive appreciation.

  • @adekojoadeyemi2596
    @adekojoadeyemi2596 ปีที่แล้ว +8

    Is it possible to use different custom trained models in a single project with webcam. I trained a model with ASL alphabet and another models with ASL action, how can I join both models together on my live webcam project so that it can detect both alphabet and action. I am using ultralytics python library.

    • @fishfooties9850
      @fishfooties9850 2 หลายเดือนก่อน

      hey may i know about your asl action? im currently working on a tennis gesture program for my highschool project.

  • @ArumugaTamilSelvan
    @ArumugaTamilSelvan 6 หลายเดือนก่อน +3

    1000th like...❤

    • @NicolaiAI
      @NicolaiAI  6 หลายเดือนก่อน +1

      Wow what a milestone! Thanks for watching. Never thought this was a possibility when I made the video

  • @TravelwithRasel.
    @TravelwithRasel. 4 หลายเดือนก่อน +1

    results = model.predict(source="0", show=True) # accepts all formats - img/folder/vid. - what would be the rest of part?

  • @fahadzhossain
    @fahadzhossain 8 หลายเดือนก่อน +6

    Hi. this video is great. I have trained a model. I installed ultralytics using pip but when I run the code in visual studio for prediction it is showing
    "from ultralytics.yolo.v8.detect.predict import DetectionPredictor
    ModuleNotFoundError: No module named 'ultralytics.yolo' " Please help me with this

    • @supapholkodtom517
      @supapholkodtom517 6 หลายเดือนก่อน +1

      Maybe have use with miniconda3 and create virtual environment(option)

    • @GraTen
      @GraTen 4 หลายเดือนก่อน

      Had the same issue, and found out you don't need the line completely, so just delete it or comment it out and you'll be good.

  • @tinycat5349
    @tinycat5349 7 หลายเดือนก่อน +1

    dude thanks this brought my dog back

  • @fedorlaputin9119
    @fedorlaputin9119 ปีที่แล้ว +2

    Where can I see the full yolov8 architecture for object detection?

  • @starioa
    @starioa ปีที่แล้ว +3

    How did you know that the "zero" in model.predict( source = 0 is the webcam. I want to send live camera content from an android app to the windows machine then do Real-Time Object Detection with YOLOv8 and then in the phone screen to print labels with the prediction just like 11:35 in your video. How could I do that?
    Thanks

    • @emiralkan6016
      @emiralkan6016 ปีที่แล้ว

      source = 0 is most of the time is the inbuilt webcam by default. About other question no idea sorry

  • @nochance7167
    @nochance7167 3 หลายเดือนก่อน +1

    Hello, Nicolai! Very good video. How can I count and memorise in a variable the objects that the model detects and display the maximum number of the objects from a class into the console? Thank you!

    • @NicolaiAI
      @NicolaiAI  3 หลายเดือนก่อน

      You will need to run object tracking on top of that! Thanks a lot for watching

  • @abeltamikasetiarini2469
    @abeltamikasetiarini2469 ปีที่แล้ว +2

    how to script to display the number of each class on the camera screen?

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      I show that in the tracking video on my channel

  • @StaMariaRock
    @StaMariaRock ปีที่แล้ว +3

    Nice video, I'm struggling like hell to install this yolo in anaconda with GPU, I'm following all the steps but is running on CPU, can you do a video about it?
    I'm trying to train a model, but the torch is picking my CPU

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว +2

      I’d just uninstall torch, torch vision and install the gpu version

    • @StaMariaRock
      @StaMariaRock ปีที่แล้ว

      @@NicolaiAI yeah! you were right, I uninstall torch and torchvision, reinstalled with the pip (the conda seems like is not working well) and after it I run conda update --all and done, is working now
      Amazing advice! thanks so much

  • @benjaminlines6387
    @benjaminlines6387 ปีที่แล้ว +2

    Do you still have to install CUDA on your machine? Because somewhere I read that torch comes with its own toolkit. I kinda don't want to mess up my other projects, that are using CUDA 10.0

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      U Can install it directly with pytorch. Think u Can use 10 as well

  • @rajands65
    @rajands65 ปีที่แล้ว +2

    where can i get the code for this

  • @maiquelkappel7745
    @maiquelkappel7745 ปีที่แล้ว +2

    Congratulations on the job. Can you make a video of yolov8, mss and numpay, capturing the image directly from the monitor screen?

    • @morttthewart7134
      @morttthewart7134 ปีที่แล้ว

      did you ever get an answer to this?

    • @ditya.aditya16
      @ditya.aditya16 ปีที่แล้ว

      I am waiting for a solution to this question

    • @tonaarea-js3fd
      @tonaarea-js3fd ปีที่แล้ว

      @@ditya.aditya16 yes

    • @tonaarea-js3fd
      @tonaarea-js3fd ปีที่แล้ว

      @@morttthewart7134 I GOT TO DEVELOP.

  • @와드남-y6l
    @와드남-y6l 3 หลายเดือนก่อน

    Is it possible to proceed with the vehicle speed estimation, which is a whole project, in real time through YOLO-World?

  • @BimaAgungSaputra-gt4px
    @BimaAgungSaputra-gt4px 7 หลายเดือนก่อน +2

    hi! good tutorials btw. im new using yolo model, when i run your code in my machine it said "import ultralytucs.yolo.v8.detect.predict could not be resolved". am i missing a step here? because i already installed ultralytics and opencv libraries, or maybe i have to install another libraries? thanks in advance

    • @AI_mod
      @AI_mod 5 หลายเดือนก่อน

      try from ultralytics.models.yolo.detect import DetectionPredictor

  • @FBal28
    @FBal28 ปีที่แล้ว +2

    Just wanted to mention I had to change print(results) to print(*results) to make this work. otherwise it just took a single picture and quit.
    Also, what specs are you running on? I'm getting around 80ms per frame

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว +1

      Thanks for the tip! Im running on a Rtx 4090. Make sure u are on gpu if u have that

    • @FBal28
      @FBal28 ปีที่แล้ว

      ​@@NicolaiAI Yep, looks adding device='mpu' as an argument to model.predict is needed for mac users. Unfortunately, they haven't finished adding support for it, so mac users are stuck with cpu for now

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      @@yyyuyu-je9mo in my tracking video I go over how to extract the results

    • @yyyuyu-je9mo
      @yyyuyu-je9mo ปีที่แล้ว +1

      @@NicolaiAI im watching it rn, thank you for the tutorials

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      @@yyyuyu-je9mo thanks a lot for watching!

  • @mohammadhaadiakhter2869
    @mohammadhaadiakhter2869 ปีที่แล้ว +1

    Can you please make a video on making a yolov8 model for custom dataset please?

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว +1

      I already did that with instance segmentation and will upload a video today with custom object detection

  • @РемонтКитайскихГаджетов
    @РемонтКитайскихГаджетов 7 หลายเดือนก่อน +1

    Что то ты не договариваешь покажи полный код где строчка которая запускает камеру?

  • @badaldesai3743
    @badaldesai3743 ปีที่แล้ว +1

    Can we detect distance between two different classes using Yolo v8. I mean (dist. btw a human and chair) ?

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      Only relative distance in the frame ynkes u have 3D information

  • @gased7317
    @gased7317 ปีที่แล้ว

    Can you try how many FPS would you get on TensorRT Yolov5 torch as you have RTX 4090ti? You should get at least 170fps

  • @Yogeshyadav-ks9tq
    @Yogeshyadav-ks9tq ปีที่แล้ว +1

    can you please share your system configuration for Realtime detection

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      I’m running this on a Rtx 4090. But it can run real-time with way lower end hardware

  • @EgeSener
    @EgeSener ปีที่แล้ว +1

    hello my model working much slower than yours. What can i add to this code ?

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      Have u tried with one of the smaller models and are u running on a gpu? Just remember that I’m running this on a Rtx 4090 so not comparable for most

  • @MuhammadHussain-ws1xs
    @MuhammadHussain-ws1xs ปีที่แล้ว +1

    the webcam doesn't turn on for me but i can see the predictions in the terminal, any idea?

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      Do u set show = true?

    • @fitshake5380
      @fitshake5380 ปีที่แล้ว

      Same for me. Any solution for it? Even I have put show = true

  • @snoppjonte
    @snoppjonte ปีที่แล้ว +1

    how do you terminate the stream without using ctrl+c?

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      U Can check for key presses with opencv as I do in the bottom of the while loop. Then u will terminate and release resources

    • @snoppjonte
      @snoppjonte ปีที่แล้ว

      @@NicolaiAI What while loop? The code (test.py) that you show only have like 3 imports and 3 lines of code.

  • @vovvas6490
    @vovvas6490 6 หลายเดือนก่อน

    If I am trying to use yolo8 and opencv to show bbox of the objects the video starts to run in a slow motion. Any ideas why it's happening?

  • @lphonehacks
    @lphonehacks 4 หลายเดือนก่อน

    getting a syntax error at step 1.. anyone knows how to fix?

  • @jugalsheth-x8w
    @jugalsheth-x8w 11 หลายเดือนก่อน

    @NicolaiNielsen
    how to implement 2nd stage classifier after detection in yolov8
    Thank you

    • @harshans7712
      @harshans7712 6 หลายเดือนก่อน

      I too have the same doubt

  • @zrlcproject
    @zrlcproject ปีที่แล้ว

    why when I try with the yolov8n model the fps drops and touches 15 ms?

  • @ishankamadhuranga3729
    @ishankamadhuranga3729 ปีที่แล้ว +1

    Can you show how to predict movement of object or give me idea how to do that

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      U Can get more information about that in the tracking video I have with Yolov8

  • @ToryHwang
    @ToryHwang ปีที่แล้ว +1

    How do I get the full source of real-time object detection of camera images using YoLo8?

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      U Can check out my latest Yolov8 video

  • @moahaimen
    @moahaimen ปีที่แล้ว

    i need to do the same for a youtube video , ,my problem detection happens but i need to show the video it doesnt exist

  • @붓따-b3f
    @붓따-b3f ปีที่แล้ว +1

    The results function stores class names, and I need that information Can't class information be extracted during real-time object detection?

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      Yeah I have a video here on the channel where I implement a custom function

    • @붓따-b3f
      @붓따-b3f ปีที่แล้ว +1

      @@NicolaiAI Thank you for your answer! If possible, can I know the TH-cam link or title containing the content?

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      Simple YOLOv8 Class for Object Detection with Webcam in Real-time
      th-cam.com/video/O9Jbdy5xOow/w-d-xo.html

    • @붓따-b3f
      @붓따-b3f ปีที่แล้ว +1

      @@NicolaiAI Thanks!!!

  • @cesarriat
    @cesarriat ปีที่แล้ว +1

    how do you change the size, there are different webcams and with different resolutions, not all of them are 640. Like when an .mp4 video is processed?

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      I think u can specify it as an argument. But it also preprocesses the image before hand and resizes the images

    • @houdabekkourialami3581
      @houdabekkourialami3581 8 หลายเดือนก่อน

      Hi. I know i'm late but for other people who need this, y'all can check another video tutorial called "yolov8 object counting in real-time with webcam" from roboflow

  • @TheLordOfWolves
    @TheLordOfWolves ปีที่แล้ว +1

    What version of pytorch and cuda toolkit are you using ?

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      I’m using 1.13.1 and cuda 11.7

    • @TheLordOfWolves
      @TheLordOfWolves ปีที่แล้ว

      @@NicolaiAI thank you

  • @alfibima4247
    @alfibima4247 ปีที่แล้ว +1

    I'm trying YOLOv8 to detect live video streaming on TH-cam. but the speed is very slow. how to boost the speed so that object detection can be realtime? I use GTX 1650 GPU

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      Try to use google colab instead

  • @jupiterjs031
    @jupiterjs031 ปีที่แล้ว +1

    hi
    Can't I get class id or name detected in object detection?
    For example, I want to write python code that sends an alert mail when a person is detected.

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว +1

      U can import the model as in my yolov7 course. In that course I show different ways how to deploy the models and extract the information

    • @붓따-b3f
      @붓따-b3f ปีที่แล้ว

      혹시 해결하셨나요?
      저도 class이름 가져와서 감지된 class name에 따라 gpio제어할려고 해서요..

  • @aoeu256
    @aoeu256 6 หลายเดือนก่อน

    I want to use this to build a language immersion environment to learn Chinese.
    我想用这个来搭建一个语言沉浸式环境来学习中文。
    Is there a way that not only shows "person" but also the parts that make up the person, but also in very small fonts, such as hands eyes, nose, mouth. On “monitor” it will be able to detect text, windows, buttons etc... My program will also show some related words like verb (like it will say eat with food), classification (tool),
    有没有一种方法,不仅可以显示“人”,还可以显示构成人的各个部分,而且还可以用很小的字体,例如手、眼睛、鼻子、嘴巴。在“监视器”上,它将能够检测文本、窗口、按钮等...我的程序还将显示一些相关的单词,例如动词(就像它会说与食物一起吃)、分类(工具)、

  • @houdabekkourialami3581
    @houdabekkourialami3581 8 หลายเดือนก่อน

    I have a problem. When i run the vscode script i get the results printed in the terminal but the webcam isn't displayed. What can be the source of the problem? Knowing that my webcam works fine (when i execute the cv2.imshow() it's displayed)

    • @saudiorchestra6443
      @saudiorchestra6443 5 หลายเดือนก่อน +1

      I have the same issue on Windows. I have set show=True, but still nothing. But, I noticed that I am getting this error:
      cv2.error: OpenCV(4.8.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1272: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'
      so, I ran these and it fixed it:
      pip uninstall opencv-python opencv-python-headless
      pip install opencv-python

  • @viniciusgardim5154
    @viniciusgardim5154 หลายเดือนก่อน

    how can i do it with my personal trained model? i tried to compress a zip and use my best.pt (best weight) and its not woring. the file its in the right place btw. Do i need to make a inference or something? Or do i nedd to do something like:
    rf = Roboflow(api_key="roboflow API key")
    project = rf.workspace().project("project name")
    model = project.version("1").model
    can anyone help me? i realy need to do this

  • @Adilkhan0
    @Adilkhan0 ปีที่แล้ว

    I have trained my custom model but I'm facing an issue, how to add easyocr for licensee plate recognition in real-time, please help I'm having a really hard time with it

    • @maddestruction1
      @maddestruction1 6 หลายเดือนก่อน

      Did you figure out how to do it? I also need to extract license plate numbers in real-time using easyOCR. I’d appreciate any help.

  • @ToezzyTV
    @ToezzyTV ปีที่แล้ว +1

    Hello I just have a question how to retrieve the processing times per image that are displayed in the terminal on yolov8?

  • @benjaminlines6387
    @benjaminlines6387 ปีที่แล้ว +2

    In the results... should be a tensor, right? Because in older versions you could do:
    results = model("image.png")
    And in the results would be your bounding box data. Now it tells me that there are 2 persons and 1 tie in that image (and it's also correctly saved in predict folder) but if im trying to print the result it prints none. Is there some extra method of getting results? Not working with camera right now, just an static image.

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว +1

      U can check out my new video with tracking. Then u can see how to extract the information

    • @andyhayes2018
      @andyhayes2018 ปีที่แล้ว

      I specifically have a YOLOG model I’m interested in networking with knowledgeable CSI guys

  • @yaminipandranki339
    @yaminipandranki339 9 หลายเดือนก่อน

    Can you please provide the code for wild animal detection using yolo .
    And if possible can you please provide source code for this project

    • @SAITAMA-07-13
      @SAITAMA-07-13 8 หลายเดือนก่อน

      Have you got the code ?

  • @divyejoshi1348
    @divyejoshi1348 ปีที่แล้ว +1

    Hey ! I have used yolo v8 with my rtx 3050 and I am getting good training and predictions on the coco128 dataset
    BUT the problem arises when I try to use a custom dataset, the training goes well, but when I see predictions it just gives the same image with no bounding boxes. The labels are correctly placed because it gives the bounding boxes for the already defined labels, but not any for predicted ones . Any solutions ?

    • @gongallateja5969
      @gongallateja5969 6 หลายเดือนก่อน

      hey could you send me the zip file of the github repository which would be helpful for my project

  • @HavokBWR
    @HavokBWR ปีที่แล้ว

    Would this software be able to track an object in 3d space? Say if you had an AR/VR environment and you wanted to track the position of objects in the room that might get moved around?

  • @SAITAMA-07-13
    @SAITAMA-07-13 8 หลายเดือนก่อน

    I want to classify different classes like types of cars model how can i achieved it?

  • @Cam022
    @Cam022 6 หลายเดือนก่อน

    So I don’t need to worry about open cv from source for GPU support for this? Just need the PyTorch with GPU support?

  • @winnuayi3266
    @winnuayi3266 7 หลายเดือนก่อน

    I've tried computer vision application using RTX 3060 12GB. The GPU can only run object detection on 3 CCTVs. I wonder how many CCTVs RTX 4090 24 GB can handle?

    • @harshans7712
      @harshans7712 6 หลายเดือนก่อน

      What is the resolution of the cctv camera's video?

    • @winnuayi
      @winnuayi 6 หลายเดือนก่อน

      @@harshans7712 we used resolution at 360p. Around 30fps for each cctv. The inferenced streaming videos are displayed in the web at the same time.

  • @lobnaahmed-wb8cg
    @lobnaahmed-wb8cg 6 หลายเดือนก่อน

    can you send the link of the repo plz

  • @SE70GaureshTambe
    @SE70GaureshTambe ปีที่แล้ว

    how to get those tensor data 12:23