Real-time YOLOv4 Object Detection on Webcam in Google Colab | Images and Video

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ธ.ค. 2020
  • Learn how to implement YOLOv4 Object Detection on your Webcam from within Google Colab! This tutorial uses scaled-YOLOv4, the most fast and accurate object detection system there currently is. Perform object detections in real-time on webcam images and video with high accuracy and speed. ALL WITH A FREE GPU!
    #yolov4 #objectdetection #cloud
    THE GOOGLE COLAB NOTEBOOK:
    colab.research.google.com/dri...
    In this video I cover:
    1. Setting up Colab Notebook and Enabling GPU.
    2. Cloning and Building Darknet for Running YOLOv4.
    3. Downloading Scaled-YOLOv4 pre-trained model file, the best object detector there is.
    4. Custom Functions to run YOLOv4 with Python in Google Colab.
    5. JavaScript code to access local machine's webcam for images and video.
    6. Running scaled-YOLOv4 object detections on webcam images and video in real-time.
    -----------------------------Resources-----------------------------
    Github Code Repository (yolov4-webcam notebook): github.com/theAIGuysCode/YOLO...
    Tutorial for YOLOv4 Pre-trained Model, Running on Video, Formatting Output and Detections etc.: • YOLOv4 in the CLOUD: I...
    Train Your Own YOLOv4 Custom Object Detector in the Cloud: • YOLOv4 in the CLOUD: B...
    Official Scaled-YOLOv4 Paper: arxiv.org/abs/2011.08036
    If you enjoyed the video, toss it a like! 👍
    To Subscribe: / @theaiguy
    Thanks so much for watching!
    - The AI Guy
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    Let me know if you have any suggestions for future videos??? As always, comment down below if you run into any issues! Hope you enjoy :)

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

      Yolov4 on Android

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

      Can you make/know a tutorial on how to make an ai that can decide if an image is good or not? For example, I have two folders good/bad in these folders are good and bad images.

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

      @@dieweltentdecker5878 what qualifies as a good or bad image? Like the quality of the image? If it’s blurry then its “bad”? Let me know!

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

      @@TheAIGuy I scraped a lot of Instagram images. Some of these I think are bad (These are in the bad folder). The other images I think are cool Instagram images (These are in the good folder). I have so many pictures on my phone. I want to automate the whole choosing process.

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

      @@dieweltentdecker5878 Mention the factors that makes an image bad or good

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

    I must appreciate, this channel is so underrated. This is real gem. I have tried following your tutorial that's really working

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

    It was great I watched thousands of videos but still were facing errors but here everything is simple and understandable. Thankyou for the video and good luck !

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

    please make a separate/ extended video for using custom obj detection on this same colab using webcam

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

    This is gonna be our new year gift

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

    Hey man appreciate your help and all the effort that you put in these videos, thank you 😍♥️

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

      Thanks for the kind words! Much appreciated!

  • @sanjanaprasad9093
    @sanjanaprasad9093 2 ปีที่แล้ว

    The one and only useful video in the entire internet !!! Thank you sooooo muchhh for the entire working code !!!!

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

    wonderfull ! it is long time i look for to know how to use webcam on collab !

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

    Thanks Guys , works brilliantly !! Easy to customize too , really helpful

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

    You are an awesome trainer. Your topics are also just what I need at the moment. Do you have any tutorial on Object Detection from Webcam using custom datasets?

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

    Right time at right place. You are my hero ❤️

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

      Appreciate it! Thanks for the kind words. Wishing you the best.

  • @arunaggiripandian154
    @arunaggiripandian154 3 ปีที่แล้ว

    Bruhhh !! U are rocking ⚡ Please continue the same and don't forget the COLAB dude ❕ ... Keep it coming ⚡

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

    This was of great utility! Thank you.

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

      Glad it was helpful! Thanks for the feedback, much appreciated!

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

    Keep this up man. Good Job!

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

      Thanks! Much appreciated and will definitely keep them coming :)

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

    Thank you for providing us this tutorial

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

    good job.please make a separate/ extended video for using custom obj detection on this same colab using webcam

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

    Thanks, we are waiting for that

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

    Don't know how, but you always save me at the right time ❤️...Please make a video on implementing yolov4 in android...Love you alot ❤️

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

      This is definitely a video I am working on. So stay tuned! Thanks for the suggestion and feedback. I appreciate it a lot!

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

      ​@@TheAIGuy Can you make a video about how to run yolo as a web application using colab? Thanks for the videos.

  • @MegaMauricio120
    @MegaMauricio120 2 ปีที่แล้ว

    This is exactly what I needed

  • @sirakisngamwongwan6259
    @sirakisngamwongwan6259 3 ปีที่แล้ว

    Nice. I like your clip very much, it’s made me love coding.

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

    Great video! Easy to understand and follow along the line video! For future video, would you be able to make a video about real-time people counting using this (webcam and collab if possible too)? That would be great and amazing!

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

    You’re a genius

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

    Amazing project indeed!!

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

    crazy video!

  • @dbanuel3
    @dbanuel3 3 ปีที่แล้ว

    great videos!

  • @ucanhvu274
    @ucanhvu274 3 ปีที่แล้ว

    Good job, thanks

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

    I wish you were my lecture you explained this concept flawlessly and I was following along with you ,eNkosi AI Guy (^◡^ )

  • @andree912
    @andree912 3 ปีที่แล้ว

    love this video

  • @user-pr3nl7lv3s
    @user-pr3nl7lv3s 3 ปีที่แล้ว

    nice job. i have hard time makeing it.Thak you for teaching me makeing this.

  • @zilongli9070
    @zilongli9070 3 ปีที่แล้ว

    It's my huge pity for me to find you so so late. l am learning Yolov3 right now. Sending my best wishes from China. Be safe, l have shared your video to my Deep Learning Friends.

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

    I thought it is impossible to do it in cloud! Thanks For the video!:)

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

      So did I for a while! Took some research and testing but finally got it to work. Thanks for the comment :)

    • @rohitjg
      @rohitjg 3 ปีที่แล้ว

      @@TheAIGuy :) thank you for replying

  • @congluong463
    @congluong463 3 ปีที่แล้ว

    thank you so much !

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

    its a great content bro

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

      Thanks! Much appreciated. Glad you enjoy :)

  • @user-ze6yf9hv9s
    @user-ze6yf9hv9s 7 หลายเดือนก่อน

    thankss bro,,

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

    @The AI Guy, thanks for your great video and support.
    I tried running this offline but couldn't run Webcam part due to dependencies on Google colab libraries which are not accessible offline. In this regard, kindly guide how can we use js_eval function and others offline on CPU. Or kindly provide other Webcam integration method.
    Thanks again.

  • @user-cc5ig3dg2r
    @user-cc5ig3dg2r 10 หลายเดือนก่อน

    thank you very much

  • @MrEri299
    @MrEri299 2 ปีที่แล้ว

    excellent tutorial ... from Semarang Indonesia

    • @Huds-ux1xb
      @Huds-ux1xb 7 หลายเดือนก่อน

      Bro ajarin

  • @OrionEx88
    @OrionEx88 2 ปีที่แล้ว

    Thank man, for this awesome video. It's really helpful for machine learning community. Anyway, I have tested with your code and it work perfectly, except the video streaming part. Mine was streaming with main camera instead of front-facing camera. Do you know which part I should change?

  • @dikapermanaputra9941
    @dikapermanaputra9941 3 ปีที่แล้ว

    thank you it's work

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

    Wow this is amazing i was just wishing how i can train my model on webcam and there you are giving me gift for the new year..

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

      haha perfect timing. Hope you enjoy.

    • @randomdyno
      @randomdyno 3 ปีที่แล้ว

      @@TheAIGuy yeah i enjoyed a lot❤ can you make a video on scaled yolov4 using colab and tfod effecientdet on local machine as well as collab.. 😊

  • @Mlleshiin
    @Mlleshiin 3 ปีที่แล้ว

    thanks for sharing these type of videos! they're so interesting, do you know how to change the input if we have more than one webcam?

  • @_XY_
    @_XY_ 2 ปีที่แล้ว

    Nice

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

    thank you

  • @vaniazalianty3625
    @vaniazalianty3625 2 ปีที่แล้ว

    Thank youuuu

  • @xueyang112
    @xueyang112 2 ปีที่แล้ว

    Thank you for your hard work. Can you give a tutorial about how to calculate mAP, precision and recall?

  • @OmkarJoshiV
    @OmkarJoshiV 3 ปีที่แล้ว

    very nice example mate. do you have javascript client which you have shown in the example ? working on multi camera setup web app which can send stream to backend app(TCP socket) which holds YOLO and can detect objects if that makes sense. The setup would be remote camera streamed by Yolo on server side and transformed frames will be received by web app(client side).

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

    super like

  • @FarukhKhalilov
    @FarukhKhalilov 2 ปีที่แล้ว

    Hi. Thanks for sharing tutorial. Currently working on project and your tutorial helped me a lot. I have a question regarding selecting the cameras that are plugged in computer. As a default it runs my very first camera. How we can choose another camera? Thank you.

  • @willcaster704
    @willcaster704 2 ปีที่แล้ว

    These videos are amazing, as is your YOLO software. I know these are kinda old and don't know if you still monitor the comments, but I wanted to ask if it's possible to train the models to tag webcam images with specific people--like me, my family members, my dogs, etc. Thanks!

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

    Hi there this tutorial is very helpful for me
    Can you plz tell me what changes we have to done for external camera instead of webcam.

  • @LL-hr3bm
    @LL-hr3bm 2 ปีที่แล้ว

    Very nice :) How can you save the detected labels (only of a picture, not the video) in a dataframe? Thanks in advance!

  • @ash3844
    @ash3844 3 ปีที่แล้ว

    HI, wonderful tutorials for beginners, but in this tutorial code can I increase few more testing objects, as it did not detect pen stand and batteries.

  • @rufamus7277
    @rufamus7277 3 ปีที่แล้ว

    Amazing content! Is it possible to use a live video feed from a Blackmagic UltraStudio Recorder instead of your webcam?

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

    This is quality content, keep up the good work :)
    also is it possible to show how much fps generated in real time object detection?

  • @thetienkaka
    @thetienkaka 3 ปีที่แล้ว

    Thank for your sharing. I have a question. how many fps(frame per second) did you get when run on Colab using GPU? thanks.

  • @deborahlebert6018
    @deborahlebert6018 3 ปีที่แล้ว

    thanks really helpfull, try to make it by myself now :/

  • @Sakthi_22_04
    @Sakthi_22_04 2 ปีที่แล้ว

    a great video!!! can you please done a video in real time emotion detection using google colab

  • @hadif6165
    @hadif6165 2 ปีที่แล้ว

    Hi AI Guy! Do you have ideas on how do I need to add or make a change if I wanted to make a decision based on the detection. For example I want to display "It's Horse" on the bottom of the live camera when it detects the horse or any other object.

  • @posetexe
    @posetexe 3 ปีที่แล้ว

    great tutorial and content but i have questions. they tell yolo can perform 45+fps in videos but why is it so slow, like 15 fps?

  • @braydonrainbow4909
    @braydonrainbow4909 2 ปีที่แล้ว

    Hey mate, I'm trying to use this method but use the mixed reality capture of a Microsoft HoloLens instead of the webcam. I'm having issues using the URL of a streaming video through Colab. Any advice?

  • @carloselilopeztellez7802
    @carloselilopeztellez7802 3 ปีที่แล้ว

    Hello! I'm using your yolov4 tf repo for video detection. Can you do batch detections? I'm running multiple cameras and want to process one frame per camera all at once. I've tried shapes (5,416,416,3) but got some errors. Thanks!!

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

    is there any way to give a minimum number of confidence on the bounding boxes? so its bbox appears when the 'confidence' value is above a certain number

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

    how do we train it for our own cutsom data

  • @dpredie
    @dpredie 3 ปีที่แล้ว

    is there a way to access video stream ( webcam, OBS) and apply a pre-trained model without using colab to output a close to realtime output

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

    Great video! Can we use this algorithm on a flying drone for object detection?

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

    first view bro

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

      haha appreciate it! That was fast.

    • @anikdatta8055
      @anikdatta8055 3 ปีที่แล้ว

      @@TheAIGuy I'm following you from long time and you are always awesome

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

    Hi AI guy, thanks for this video, it is very helpful. I am looking into ways to track the position of fish in an aquarium for a school project. I was wondering if there is a way to add objects to the AI?

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

    Can you please help in providing the code, that does object detection. The present code helps in capturing picture, but it isn't able to do object detection. Please look into it!

  • @Ksyusha5
    @Ksyusha5 2 ปีที่แล้ว

    Good afternoon. tell me, is it possible to make a cloudy blender render in eevee? And how in this case to connect the active monitor?

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

    Awesome bro ❤️

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

    Great tut! Thanks for sharing! Can I RTSP a security camera through this?? If so, how would I go about doing so? Thanks again.

    • @GagarineYuri
      @GagarineYuri 2 ปีที่แล้ว

      I am on this project. Don't hesitate if you want to colaborate. I achived to get the video stream from a security camera (Tap C310) on RTSP

  • @mariomasseiro9090
    @mariomasseiro9090 3 ปีที่แล้ว

    im running the code in google colab, but when i run the box for test the image with the guy and the horse i can't see any labels, also can take pictures and show my webcam, but dont show any label, u know what could be the problem?

  • @Deshwal.mahesh
    @Deshwal.mahesh 3 ปีที่แล้ว

    How can you train your own Scaled Yolov4 if we're not using the pre trained weights?

  • @osamaibrahim4360
    @osamaibrahim4360 3 ปีที่แล้ว

    Bro how can I triggered an alarm on detection of any object for example when the fire is detect it generate a notification

  • @ziruisu5990
    @ziruisu5990 3 ปีที่แล้ว

    really like your videos!
    How do you make google colab work like that ? it is really cool

  • @mayurbhat9479
    @mayurbhat9479 3 ปีที่แล้ว

    Great video, can you show how to convert the detected objects to speech(text to speech)

  • @MutenRoshiUI
    @MutenRoshiUI 3 ปีที่แล้ว

    I have been trying to use my custom object detector using the webcam in colab but i am not able to detect anything, whereas i am able to run the custom detections on images and videos as shown in the previous videos. Can anyone help?

  • @aditinarendran
    @aditinarendran 3 ปีที่แล้ว

    I was trying out this code but during the webcam video part my webcam capture/output is filled with too many bounding boxes that i can’t see the image itself. Can you pls help.

  • @josephorimolade5626
    @josephorimolade5626 3 ปีที่แล้ว

    Good presentation, simplified enough to follow. Can anyone kindly explain to me the required modifications for running the code on a standalone window machine with Jupyter note; that is, not using google colab. Thank you

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

      Hey did you ever figure this out? I am running into a similar issue

  • @user-nz3yd3eb3d
    @user-nz3yd3eb3d 3 ปีที่แล้ว

    hey man! I don't understand English, so I didn't understand what you said in the video. I tried to run your code. I understand correctly that he uses a web camera to recognize objects first in a photograph, and then in a video online? It's all?

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

    would it be possible to use the info given by the video in a program? For example, if a person is in frame it starts recording, if a person leaves it stops.

  • @EdwardLanceLorilla
    @EdwardLanceLorilla 3 ปีที่แล้ว

    how to customize or train a model implementing deepsort

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

    Could you explain a bit more on how to upload your own model like at 4:21?

  • @jihwanshin1233
    @jihwanshin1233 2 ปีที่แล้ว

    How can I customize the detection function so that I can count people on the webcam and detect people only?

  • @adarshsudarsan7503
    @adarshsudarsan7503 2 ปีที่แล้ว

    how to detect persons from real time video source( security cameras) and focus to persons for that need to adjust camera (pan and tilt) after that zoom to the person and capture the zoomed image and store image

  • @seshasais8096
    @seshasais8096 3 ปีที่แล้ว

    Thanks for the tutorial. How to save the video from the webcam?

  • @shivaprasad1277
    @shivaprasad1277 3 ปีที่แล้ว

    How to overlay the detected objects on to the video screen?

  • @rob26r
    @rob26r 3 ปีที่แล้ว

    I’m a coin collector that would like to have a process that would identify a specific year or image in the coin. How would I go about that?

  • @zaheerkhalid5551
    @zaheerkhalid5551 2 ปีที่แล้ว

    How to change the camera port for this code? I want to use the different attached camera with my PC. I just don't know how to swap between cameras in the code.

  • @SadatSafawi
    @SadatSafawi 3 ปีที่แล้ว

    its giving error at the end of 100th iteration ): and gives this error :
    Saving weights to mydrive/yolov3/backup/yolov3_custom_last.weights
    Couldn't open file: mydrive/yolov3/backup/yolov3_custom_last.weights

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

    How can i use it to train it for a custom object detector using webcam, i already have have done custom obejct detection using image by watching your video, i have weights and config file , but still not clear how to turn this into a custom object detector using webcam. If you could tell exacly what to change in this, it would be really helpful

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

    how to save video file like you save the captured photo? thanks

  • @dwiyantosuabstian170
    @dwiyantosuabstian170 2 ปีที่แล้ว

    please tell me how to make a custom dataset using a webcam using colab

  • @xyzpatel8596
    @xyzpatel8596 17 วันที่ผ่านมา +1

    @AIGuy please give solution for the problem in the object detection, it doesn't give error but also doesn't recognise the objects.
    Please help!!

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

    name 'Javascript' is not defined error shows up whenever I try to take a webcam screenshot

  • @openmindjustdoit1306
    @openmindjustdoit1306 2 ปีที่แล้ว

    i have 400 employees they have many divaces like printer and computer and table manyhtinks they have so can i use this way to counters and save it in datset excel sheet or some thinks like that

  • @amitpaul4848
    @amitpaul4848 2 ปีที่แล้ว

    I created a project on object detection by yolov5 and without darknet.....but I can't add my local device webcam on it via google colab.....help me to connect my webcam in this colab

  • @benjielloyddelgado3349
    @benjielloyddelgado3349 2 ปีที่แล้ว

    Is the process the same when using "YOLOv5"? Something needs to enhance/modify?

  • @Deshwal.mahesh
    @Deshwal.mahesh 3 ปีที่แล้ว

    Is this Scaled Yolov4 or just V4? It uses Darknet and AlexyAb's repo.
    Just curious.

  • @vikramreddy5631
    @vikramreddy5631 3 ปีที่แล้ว

    How to get number of frames in the webcam it is taking in yolo v4