Real Time Object Detection with YOLOv9 and Webcam

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ก.ค. 2024
  • Unleash the power of YOLOv9, the cutting-edge object detection model, and learn how to perform real-time object detection using your webcam. In this tutorial, we'll guide you through the step-by-step process, from cloning the YOLOv9 repository to running the detect.py script with the right parameters. Get ready to witness the incredible accuracy and speed of YOLOv9 as it detects objects in real-time! Upgrade your computer vision skills today and bring your projects to life. Let's dive into the world of real-time object detection!
    Join Discord: / discord
    Mail: felixsam922@gmail.com.
    Instagram: / tech_watt
    Facebook: share/PhYbQP...
    Twitter (X): x.com/felixsa41013626
    LinkedIn: / felix-sam-nanor-4599b2204
    WhatsApp Community: chat.whatsapp.com/FZR4CoaPObn...
    Patreon: / techwatt
    Link to YOLOV9 repository: github.com/WongKinYiu/yolov9
    #objectdetection #YOLOv9 #RealTimeDetection #ComputerVision #WebcamDetection #deeplearningtutorial #ai #machinelearning
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @aaryadesai6224
    @aaryadesai6224 6 วันที่ผ่านมา +1

    I faced the same issue of no module named torch. In the directory of YOLOV9 there is a file called requirements.txt, this file lists all the required dependencies.
    use this command in the terminal (pip install -r requirements.txt). this installed everything for me.
    I faced another issue where it could not find the source. I am using a usb webcam, but had to change my source from 1 to 0 for it to work.
    Thanks for this amazing and easy tutorial.

    • @tech_watt
      @tech_watt  5 วันที่ผ่านมา

      Love it 😍 thanks for your explanation. You’ve help me a lot 👍

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

    Thank you for this video. You made it very straightforward and very useful. I have been looking for 5 months for a good object detection video and you have done that.

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

      Thanks 😊 so much for your kind words. Am super excited you’ve finally found this tutorial

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

    Great tutorial dude. You make everything very easy to understand.

  • @dakaradakaradakara699
    @dakaradakaradakara699 22 วันที่ผ่านมา +1

    Please do this with the custom dataset on roboflow ?

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

    It's so awesome and simple damn!!

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

      Thanks 😊

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

    Thank you

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

      You're welcome

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

    Great video!! dude. Can you please make a video using CSI camera

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

      Yes but I don’t have it

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

    Very great tutorial on yolov9. Brother, how to print the bbox and center of it? Thanks

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

      Tutorial on that coming soon

  • @BangtanArmy-mt7ph
    @BangtanArmy-mt7ph 2 หลายเดือนก่อน +1

    Import torch is not resolved

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

    Thank you for the good video. Very easy to follow and understand! If my laptop has a P1000 GPU of Nvidia, how to use it? Just by writing gpu instead of cpu?

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

      In that case you just write 0. But if the gpu is not configured, you will get error

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

      @@tech_watt I am not sure I understand - configure where? It exists there, just like the CPU.

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

      @YigalBZ no I mean you have to set up your GPU on your computer before it will be able to pick it.

  • @Rapper_Ash
    @Rapper_Ash 2 หลายเดือนก่อน +1

    bro it is showing that no torch module is showing what to do for that

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

      Before running the code make sure you’re in same directory you’ve clone the repository and also do install all the dependencies in the requirements file

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

    Do you know how to get it work with a video? I tried just making the source with a video but it never stops the script and the video is not playable

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

      When you give source to a video file it will detect objects in the video file and when it’s done running it will save it in a folder 📂 path called runs. The name of the path will be written on the terminal.

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

      @@tech_watt Thanks. I had tried that but the video was not working but i found that adding --view-img on the end of the command showed it in real time

  • @jaimeabug9090
    @jaimeabug9090 2 หลายเดือนก่อน +1

    it said Traceback (most recent call last):
    File "detect.py", line 7, in
    import torch
    ModuleNotFoundError: No module named 'torch'

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

      Make sure you install all the dependencies in the requirements.txt file

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

      @@tech_watt where should I see them all?

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

    hello!! thank you for the great video.
    I just wanted to ask whether this project works only for torch version 1.7.0 or will it work for any other latest version?
    I'm facing an error while running the project as I couldn't able to download torch.
    error:
    Traceback (most recent call last):
    File "C:\Users\varsh\OneDrive\Desktop\yolo v9 det\yolov9\detect.py", line 231, in
    main(opt)
    File "C:\Users\varsh\OneDrive\Desktop\yolo v9 det\yolov9\detect.py", line 226, in main
    run(**vars(opt))
    File "C:\Users\varsh\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
    File "C:\Users\varsh\OneDrive\Desktop\yolo v9 det\yolov9\detect.py", line 89, in run
    im = torch.from_numpy(im).to(model.device)
    NameError: name 'torch' is not defined
    please suggest me a solution for this. TIA

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

      You can pip install all the packages in the requirements. txt file to get all the packages installed

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

      @@tech_watt can you please tell me the command?
      I've already tried pip install -r requirements.txt

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

      @varshhadinesh7538 yes that’s the command but make sure you are in the directory before executing any command

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

      @varshhadinesh7538 just follow all the steps in the tutorial

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

      @@tech_watt Thank youu!! got the output :)

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

    No module named torch

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

      Kindly do pip install requirements.txt to install all the necessary packages from the clone repository

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

      @@tech_watt But it still doesn't work for some reason, hmmm

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

      Nvm it got fixed because i was using py instead of python in the command. Isn't it same?

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

      @kristijanlazarev that’s great 😀. They are not the same py is just the extension

    • @mecha.mio.00
      @mecha.mio.00 3 หลายเดือนก่อน +1

      @@tech_watt i have the same problem with the module "torch".
      in requirements txt, i just put avaible the lines 1 and 2 of pipi install requeriements.txt, but it still doesn t work.
      do you have an idea what is happend?
      PS C:\Users\MIO\Desktop\yolov9> python detect.py --weights gelan-c.pt --conf 0.5 --source 1 --device 0
      Traceback (most recent call last):
      File "C:\Users\MIO\Desktop\yolov9\detect.py", line 7, in
      import torch
      ModuleNotFoundError: No module named 'torch'
      PS C:\Users\MIO\Desktop\yolov9>