Object Detection in 10 minutes with YOLOv5 & Python!

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 พ.ค. 2024
  • In this video tutorial you will learn how to use YOLOv5 and python to quickly run object detection on a video stream or file all in 10 minutes. This is a great tutorial for anyone interested in using object detection out of the box with python or as an introduction for anyone interested in training their own object detection model in python.
    Timeline:
    00:00 Intro
    00:45 Install YOLOv5
    03:44 Detect Webcam
    07:07 Detect Video File
    Working with Video Data in Python: • Video Data Processing ...
    Follow me on twitch for live coding streams: / medallionstallion_
    My other videos:
    Speed Up Your Pandas Code: • Make Your Pandas Code ...
    Speed up Pandas Code: • Make Your Pandas Code ...
    Intro to Pandas video: • A Gentle Introduction ...
    Exploratory Data Analysis Video: • Exploratory Data Analy...
    Working with Audio data in Python: • Audio Data Processing ...
    Efficient Pandas Dataframes: • Speed Up Your Pandas D...
    * TH-cam: youtube.com/@robmulla?sub_con...
    * Discord: / discord
    * Twitch: / medallionstallion_
    * Twitter: / rob_mulla
    * Kaggle: www.kaggle.com/robikscube
    #yolov5 #python #machinelearning #objectdetection

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

  • @robmulla
    @robmulla  ปีที่แล้ว +13

    Want to train a custom object detector from scratch? Check out my video here: th-cam.com/video/RXbtSwZsoEU/w-d-xo.html

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

      Yes i do want to know thank u sir

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

      How can I use the GPU instead of cpu for running this

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

      Hello Mr. Rob , I have watched many videos of yours just to try to make this work, I already installed linux ubuntu, Anaconda, cloned yolov5 and installed the requirements successfully, then when coming to the command : lc -tr
      I dont get the same result as yours, I only get this result of three lines:
      Mono license compiler
      copyright (c) 2009 by remobjects software
      No target/complist passed
      Have been working for 10 hours and I am still stuck in the first 3 minutes, can you please help me

    • @VuAnh-ey3bi
      @VuAnh-ey3bi 5 หลายเดือนก่อน

      same, have you found the solution?
      @@Hashemaverick

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

      I remember asking chatgpt and he solved it easily
      @@VuAnh-ey3bi

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

    Hey Rob, thank you SO much for this tutorial!! I had been stuck with image detection for quite sometime as many tutorials which I followed skipped certain parts like setting up environments and stuff. But you, my man, you took us step by step through your tutorials! I truly appreciate it and keep up the good work!! Thank you once again!

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

    Things like this always convince me I’m on the right path. Thanks 🙏🏼

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

    Great video, Im currently learning python and cool videos like these motivate me to keep on learning

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

      I love feedback like this Chris- it motivates me! So thanks for sharing it. Congrats on starting learning python, you’re going to love it.

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

    I loved the way that you answered everyone in here. Great content.
    Great Channel
    I subscribed.

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

      Thanks for the sub! Spread the word :D

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

    Thank you so much for the step by step guide!

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

    Thanks a lot for the tutorial! I've been trying to figure out ML for some time now and this video helped a lot.

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

      Glad it helped!

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

    thank you for the video, it is very informative and helpful.

  • @mohammadraeez7741
    @mohammadraeez7741 10 หลายเดือนก่อน +5

    Hi Rob!! Great video. But I have few questions.
    1. How do we train yolov5 model on a custom dataset? For eg: I have a custom dataset of Amazon products, how can I train the model on this dataset?
    2. Also, how can I send the prediction results to the front end? I am a backend engineer and is developing a web app for object detection. I know we can send text data in json format, but how do we send the camera feed along with the prediction results to the front end to display?

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

    Awesome video as always!!!

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

      Thanks for watching! Tell your friends 😊

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

    Mr Rob have been training a Yolov4 Model and was wondering if i can use the Dataset i used to train my Yolov4 on Yolov5 or even Yolov7 or do i have to re-annotate all the images into a proper new format ?

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

    Hi Rob! Nice video. Is there a way to optimize GPU VRAM utilization rather than modifying the batch size? In my experience most of object detection projects usually require tons of VRAM, even an AWS p2.xlarge seem small for these kind of tasks

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

      Great question. Honestly I’m not the best person to answer this question. Like most things you can only optimize for speed up to the limitations of the hardware. Usually if I’m running out of gpu ram then batch size needs to be lowered. The issue with VRAM might be unavailable because the images need to be loaded into memory before predicting. What type of images are you running on? I’ve run on 720p with fairly large batch sizes and no issues.

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

    Hi Rob! Nice Video. Is there any way to detect the object which is not detectable by YOLOv5 like 'zebra crossing'?

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

    Hi Rob. Thank you very much for this tutorial. I'm curious to know why you choose YOLOv5 instead of a later version (isn't 7 now released?) and plan on following your example using the version you suggest.

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

      Great point! At the time I released this yolov5 was the most commonly used. Even though it’s named yolov7 the open source version is not made by the same people who created v5. I want to eventually make a video showing the v7 version.

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

      Thank you Rob@@robmulla for letting me know this. I look forward to learning the differences in working with v7 and whether it can deliver significantly better results. This assumes we can expect v7 to receive updates and maintenance. Otherwise using v5 may be the best option if it's the main version and better supported and much more commonly used. I think v7 should be renamed to YOLO-derivative-v7.

  • @himanshulohokane
    @himanshulohokane 18 วันที่ผ่านมา

    This is very impressive

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

    I love how the model detected the traffic light in the bonnet at 10:16. Possibly dangerous if it was detecting something upside down in a reflection. I actually didn't know about doing pip install -r requirements.txt. Always learn the most random tricks from other people.

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

      WARNING! ELON MUSK SHOULD NOT USE THIS MODEL TO MAKE SELF DRIVING CARS!!! :D Just kidding (but also not kidding). Remember the video at that timestamp what when we made the detection confidence threshold very low and the IoU threshold very high - so it will over predict a lot of false positives. Thanks for watching!

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

    great video! How can I do this with my own data set of images and labels? Or add on to the current dataset

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

    Great video Rob! How can I take all the object's name after processing and embed those in the video file as metadata? I have a bunch of videos and photos that I want to run this so that I can find them later by searching through tags

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

      That's a good question. You could certainly modify the code to aggregate the labels, or use the output of the txt file to post process. I'm not sure of the best way to add metadata to video though.

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

    The God is back! Thanks for sharing all this knowlege with us!

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

      Just a mere mortal here! Hope you find the video helpful.

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

    How do you get the camera to run so fast? My detection runs at around 3-4 frames per second? Is it a computer spec thing?

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

    Thanks!

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

    Thanks For Sharing! Great Education!

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

    hey Rob, can you help us out for the object detection task in c++ using yolov5, opencv and onnx?

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

    Thank you ❤️

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

      You’re welcome 😊

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

      @@robmulla A suggestion: You are very good at teaching. But this tutorial is little too fast. I had no idea when the terminal shows ' git not recognized as internal or external command. Then after long time I installed the git software. If you have mentioned the git installation that would have helped us alot. And at some point the video is going very fast. So please keep it in mind for future videos.
      But still u are a teacher for me, thankyou so much for the video....❤️❤️❤️

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

      @@dani9609 I really apprecaite the feedback! I didn't think about how that might be confusing but am happy you mentioned it. Maybe I should make a different video about git. I'll try to do better in the next one.

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

    Hi, really great video! So while trying to do it myself, I ran into a bunch of "module not found" problems even though I did run requirements.txt. I manually installed those, however seem to be stuck at "no module named yaml", any help would be much appreciated.

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

      Thanks for the feedback. You might need to `pip install yaml` if the module is not found it usually needs to be pip installed. Hope that helps.

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

    can u create soething like var like goal line technology or off side

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

    Hi Rob! Thanks for the brilliant explanation about YOLO.
    Rob, can you please tell me how I can write the total object detected in my webcam frame in real time for example in your scenario you are detected so I want to write on the left side that 1 object is detected.
    Is it possible?
    TIA.

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

      Yes, this is totally possible but would require working with the base code. If you look in the detect.py the detections are saved as "det" github.com/ultralytics/yolov5/blob/master/detect.py#L136
      The code currently shows the box with detections but you could modify it to display just a box with text for the objects detected. Hope that helps.

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

      @@robmulla Thanks Alot Rob,
      You're an amazing human.
      Its a request when ever you get enough time try to make a video on how to write something in live frame as I described you before because I've search alot this topic on internet but I didn't get any right answer or direction for this issue.
      I'm so thankful to you.

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

    Hi Rob! Thanks in detail explanation about yolo.

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

      Thanks for watching! I also have a video on custom object detection with yolov7! th-cam.com/video/RXbtSwZsoEU/w-d-xo.html

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

    Hi, I want the audible warning or warning system to work in any program interface when only people are detected from the detected objects. What method should I try for this?

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

      I'm not sure about the audible part, but you could easily make a python program that checks a video stream to see if people are detected. Playing the sound would depend on your operating system. Check out the top response to this SO post: stackoverflow.com/questions/16573051/sound-alarm-when-code-finishes

  • @Julien-hg8jh
    @Julien-hg8jh ปีที่แล้ว +1

    So cool ! Is it easy to custom with other dataset ? As it is already train, how many data we need in this new dataset ?

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

      Thanks! The default model is trained on the COCO dataset with some common labels. We can train a model that predicts custom objects. I will make a video soon that shows how that can be done.

    • @Julien-hg8jh
      @Julien-hg8jh ปีที่แล้ว +1

      @@robmulla perfect!

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

    Great video. I've trained a german traffic sign recognition benchmark dataset using yolov5. I have used batch size of 128 and 300 epochs. I've also tried with batch size 64 and 100 epochs. However, it is not able to detect at a distance. It can only detect when the traffic sign is very very close to the camera. Any idea of what I did wrong?

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

      That's great that you've trained your own model. I plan to make a video about the training process in the future. The problem you talk about is pretty common. What people sometimes do is train a two-stage detector. The first detector gets an idea for the scale of the objects and then the second predicts on the rescaled version. Also, when training you can augment your labeled images to be varying sizes so yolo doesn't overfit to the large signs. Of course if the sign is extremely small the model will always have a difficult time detecting. Hope that helps.

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

    Is it the same installation for windows

  • @martinulloa5221
    @martinulloa5221 10 หลายเดือนก่อน +1

    Awesome video! Do you know a way to save the detections? I need them to make a counter of how many people it detects real-time. Thanks!

    • @burgsamuel86
      @burgsamuel86 15 วันที่ผ่านมา

      4:41 in the arguments, see --save-txt. Saves the results '.txt'

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

    Hi! great video btw! Is there a way we can save the output to a text file?

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

      Thanks for the feedback. Yes it’s an option in the detect.py file to save the results to a text file. You just need to set the flag.

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

    Hello do you thing Yolo World better than Google cloud ones?

  • @vilhelmkrag5549
    @vilhelmkrag5549 29 วันที่ผ่านมา

    Hey! Im on WSL and it wont access my webcam. Is this because im in WSL? Do you know why? Or a workaround?

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

    how can i show five videos at a time on the same screen ?plz help sir

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

    What if we have a video and we want to get the count of objects within a certain region (the 'Area of Interest') only?

  • @Halal.LyfeStyle
    @Halal.LyfeStyle ปีที่แล้ว +1

    is it possible to detect unwanted weeds among crops and then remove it through a robot? Basically, what i am asking is it possible to combine iot and image processing

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

      Absolutely! People are doing it already. Although it would require learning a lot more than what I'm showing in this 10 minute video :D

  • @anushreeR-mq6xt
    @anushreeR-mq6xt 10 หลายเดือนก่อน

    which terminal i want to use in windows

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

    I want to send class over TCP IP using yolov5 but condition is when TCP IP is connected else skip sending and save class in text and continue monitoring for connection reconnecting. I am working on a detect.py file in the yolov5 repository .Advanced thanks.

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

    How can I calculate metrics of this model?
    like mAP, IoU and confusion matrix
    Thanks for the video.

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

      Great question. I didn’t go into detail about them but implementations of them can be found on GitHub or in the yolo source code.

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

    thank you

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

    Hi, thank you for this upload. I had a doubt about increasing the accuracy, how does one do so? because right now its detecting a squirrel as a giraffe 😭

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

      Thanks for watching. Great question. To make the model better at predicting specific objects it’s best to train or “fine tune” the model on a dataset of additional labeled images. I plan to make a video about this process. In your example you would need to train on a giraffe or squirrel specific dataset.

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

    Hi - is it possible to use YOLO to search for objects, then read text off those objects?
    i.e.:
    when viewing a card from a certain card game, I want to then extract the text off that card

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

      there are other libraries that specialize in text recognition such as tesseract, but I am sure you could use yolo as well.

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

    Is there a way to run this in a single python file ? @Rob Mulla

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

    Hi sir, i have a question please, how to make object detection that can explain the view . like i want my project to say "man sitting on a chair" or "man man holding a teddy pair" , until now what i did is making it say just the object in front of the camera , and i don't know how to make it explain the view. is that is something about training my own dataset on sentences ? can any one please help me on that ? i am using yolov3 and coco dataset and pyttsx3 for the voice feedback

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

      Wow, that sounds like a really cool project. Definately outside my knowledge with regards to object detection. Maybe look into something like this? www.analyticsvidhya.com/blog/2021/12/step-by-step-guide-to-build-image-caption-generator-using-deep-learning/

  • @novervain9858
    @novervain9858 10 วันที่ผ่านมา

    How do I save the new file

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

    Hello, whare can I find the python terminal? I just started learning python and I just downloaded it I don't know how to open the terminal where is it? Thank you

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

      Welcome to the wonderful world of python! I would reccomend starting with installing anaconda first from www.anaconda.com/
      After that is installed, if you are running on windows, you can load the terminal by searching for the "anaconda prompt". If you are running a mac you can search for "terminal".
      Hope that helps!

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

    bruh after install weights it detect perfect but its literaly slow can you help me?

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

    Hi, thnx for the effort! How can I change the size of the video and the speed!

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

      I don't believe yolo can change the size of the video- but it can be done with cv2 in python. Look up "opencv python resize video and modify speed" speed is determined by FPS. Hope that helps.

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

    Thats cool!! how can i use this to track my soccer video and collect data? cheers

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

      You could probably do that. You might want to check out my other video on training a custom object detector using yolo. Good luck!

  • @Mayank-lf2ym
    @Mayank-lf2ym ปีที่แล้ว +1

    Hi sir this video was very helpful but how can I get the detected object name in a variable for further function
    Can you plz tell me the code

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

      when running detect.py you can add the parameter "--save-txt" which will save the output into a text file. The first column in that file will be the class labels associated with the COCO dataset: tech.amikelive.com/node-718/what-object-categories-labels-are-in-coco-dataset/

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

      @@robmulla no I mean that I am using the object detection model on my laptop jupyter notebook(offline) and I want to access the class name so that I can further send the data to other areas
      For example if the object detected is
      Car then "Car" class name would be stored into a variable,(let's assume we have to store class name in variable x ) so what will be the code for that
      And Sir thanks for the reply

  • @user-ek2hp2uu3g
    @user-ek2hp2uu3g ปีที่แล้ว +2

    how to make the algorithm work in such a way that it will only detect and counts cups that you are holding and wont detect other objects like glasses face etc

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

      Hmm. You might need to train a custom detector. But something like that can be hard because it involves more that just detection and the model needs to know the surrounding contex in the image.

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

      @@robmulla Wow!!!!! I never thought that you would reply back. Thnx a lot for your helpful suggestion.

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

    hi , it was really great video thank you so much for your effort , so i done it but the video is so so slow while running and i don't know why this is happening

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

      Glad you liked the video. It may be slow if you don’t have a GPU. You can try running it in a Kaggle notebook - it might be faster.

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

    Heyy . Could you please help me out with this issue i am fixing with cv2. "WARNING Environment doesn't support cv2.imshow() or PIL image.show() "on anaconda.I can do whatever it takes to work this out. Please guide me through.The detection is taking place,but the video isn't showing up .

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

      Hey. Thanks for watching the video. I know someone else mentioned the same issue. I see there is an active discussion about it on the yolo github page, you might want tor read that here: github.com/ultralytics/yolov5/issues/9844

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

      @@robmulla THANKS A LOT!!!!!!. I got it fixed. Once again thanks for helping me out.

  • @user-zi6hc6ro8r
    @user-zi6hc6ro8r 6 หลายเดือนก่อน

    Does it work in windows

  • @miheerdarji9323
    @miheerdarji9323 17 วันที่ผ่านมา

    Module not found error 'ultrlytics'

  • @user-uz6bf7op4f
    @user-uz6bf7op4f ปีที่แล้ว +2

    I know only yolo is image detection ,from your video i got impressed i really want to do but i dont know what interface have u done this and the codes , can u please expalin this step by step 🥺

    • @user-uz6bf7op4f
      @user-uz6bf7op4f ปีที่แล้ว +1

      I m using windows and using python 3.10 is it ok can plse do from this

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

      I'm glad you are excited. I am using a linux machine and running everything in the command line. It should be similar with windows but I'm not as familiar with how to do it. Try using powershell and installing anaconda first. Good luck!

    • @user-uz6bf7op4f
      @user-uz6bf7op4f ปีที่แล้ว +1

      If i used this in cmd power shell will i get the output too??

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

      Edit: i have used but the lc -tr to read the files is not working

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

      @@user-uz6bf7op4f I think so

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

    Interesting, sir.
    I need to read more about it, but if you have time to share your knowledge with a fool then I'd liek to ask about:
    1) Can we specify "what" we want to detect in the image? Let's say I'd like to detect only people and cars, not cellphones, traffic lights, kites, planes, etc.
    2) Is it possible to receive bounding box coordinates to the .txt file like TOP_LEFT_X, TOP_LEFT_Y, WIDTH, HEIGHT for each detected object?
    I think it is, but would be cool to have confirmation before the research, thanks!

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

      Great questions @Vislone you are on the right track.
      1. The base model was trained on the default COCO labels. Just google "COCO label list". You can however, train a model on anything if you have enough labeled images. I plan to still make a video about that.
      2. Yes, the bounding boxes can be writted to a file OR you can go into the actualy detect.py and see how the code processes and store them in a different way.
      Good luck!

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

      @@robmulla Thank you Sir :)

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

    Great video. How about a video tutorial implementing YOLOv5 with a python script?

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

      Thanks for the feedback Richard. What do you mean by running from a script exactly. The code that I ran directly from the yolov5 repo is essentially a script. I was thinking that depending on how popular this video is I could make follow up videos showing how to train yolov5 on a custom dataset and applying it so that the prediction boxes are stored.

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

      @@robmulla When I said python script I meant implementing YOLO detection in custom script that did a triggered operation depending on the detection/labels.
      if label = 'car' save frame as image with label as filename, or trigger something else to occur like turn on outside lights.

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

      Thats a great idea. I'll have to think about how that would be implemented but is definately doable.

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

    the requirements aren't installing for some reason, mainly the scipy packages PLZ HELP

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

      Sorry to hear that. Maybe paste the error message here? Are you using anaconda? Another way to test it out without having to do the setup would be to use something like google colab or kaggle notebooks - that will have everything preinstalled (except yolo). Those won't work with a local webcam though. Usually when I get errors I copy and paste them into google and 99% of the time someone has posted about the same problem on stack overflow.

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

      @@robmulla okay, switching over to google colab. i don't need to use it on a webcam right now anyway. so all i do is clone the repo in the beginning, and then do i try to install the requirements.txt file? cuz it's not working in colab.

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

    ,def main(opt):
    Executes YOLOv5 model inference with given options, checking requirements before running the model."""
    check_requirements(ROOT / "requirements.txt", exclude=("tensorboard", "thop"))
    run(**vars(opt))
    if __name__ == "__main__":
    opt = parse_opt()
    main(opt)
    im getting error plse😢 help me

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

    hey sir i am doing a project related to object detection using YOLOv5. if you don't mind can you help me on how to integrate a voice output for this object detection. as soon as possible please...!!!!!!!!!!!!!

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

    Can you please make a video on weapon detection also...I am planning to do that and want some guidance

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

      Thanks for watching! That's a very specific request :D I can't garuntee I will do that but have you watched my other video about custom training. You might find it helpful: th-cam.com/video/RXbtSwZsoEU/w-d-xo.html

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

      Thank you for the reference…will look into it

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

      替换数据集即可。

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

    A nice video

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

      Thanks!

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

    Can we do Traffic sign detection with yolov5

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

      Absolutely! You just need a training dataset.

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

    Hi Rob! Nice video
    can i use this code for text detection !!!!!!

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

      Probably not great for text but I have a video for that! Check it out here: th-cam.com/video/oyqNdcbKhew/w-d-xo.html

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

    Proper.

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

      Thanks! I think?

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

    hi how can turn the camera to tello drone camera?

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

      Not sure what you mean. You would need the camera to be a source on your PC

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

    How to extract text from image using yolov5 and store that text somewhere

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

      I don’t think that YOLO would be the best thing to use for this unless you are looking for specific text like a STOP sign. You might want to look into OCR techniques.

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

    error module not found torchc

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

    What is the terminal that you use

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

      Mate terminal in ubuntu

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

    heyy. i founf your video very usefull. I would be gald if you could help me with the following error . I am facing it while running the same code. "Environment does not support cv2.imshow() or PIL Image.show()". I hope you could help me out As soon as possible.

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

      Thanks! Are you running on a system that doesn’t have a monitor directly connected like a remote server? You might need to disable the image output and instead store the results to a file using the appropriate flags. Hope that helps.

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

      @@robmulla it's all a laptop that i am using. The objects are being detected ,it's just that the video isn't playing.Anyways thanks for helping me out.🙂

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

    import torch
    ModuleNotFoundError: No module named 'torch'
    Some help here I tried everything, I installed manually the module, reboot computer but still this error appear

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

      It must not be installed correctly or you are trying to run from a different environment, because otherwise it should be found when importing. Try running your code in a kaggle notebook to double check maybe?

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

      I had this error, and I run it with python 3.10 instead of 3.11, you should try this

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

      @@theophanedebellabre2676 ok thanks I would for sure

  • @saieswarchowdhari6623
    @saieswarchowdhari6623 24 วันที่ผ่านมา

    explain how it is actually done(erripuka)

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

    sir , can you please do yolo object detection with distance and voice feedback

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

      Interesting idea. I’ll have to think about it.

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

    the one frame where it detects your finger as a hotdog 5:57

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

    How we make it work for our own custom object?

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

      Great question. I actually have a video that discusses this in detail. Check it out here: th-cam.com/video/RXbtSwZsoEU/w-d-xo.html

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

      @@robmulla this is perfect, i really needed this. Thanks a lot.

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

    Hey there, thank you for providing a step by step process of getting it done. I've managed to open it up using my webcam. However, I am unable to open up a mp4 or image. The error that I received is:
    raise ReaderError(self.name, position, ord(character),
    yaml.reader.ReaderError: unacceptable character #x0000: special characters are not allowed
    But then again, I have searched online and can't seem to resolve this issue. Would appreciate if you have any feedback on this. Cheers.

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

      Thanks for the feedback. I’ve never seen that one before. Could it be an issue with the file name? Try renaming it to something simple. Good luck

  • @avosoftwareinc.5079
    @avosoftwareinc.5079 ปีที่แล้ว +1

    What’s the name of the terminal your using ?

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

      This is mate terminal in ubuntu. I have a whole video on my setup you should checkout. th-cam.com/video/TdbeymTcYYE/w-d-xo.html

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

    Git not recognised? 😢

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

    how to count and store results in webcam

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

      When running detect.py use the --save-txt flag to save the results in a text file.

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

    Error in detect video file (yolov5 not supported format)

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

      Are you sure you are referencing the correct file/location?

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

      @@robmulla yep ,That what i Found , raise NotImplementedError(f'ERROR: {w} is not a supported format')
      NotImplementedError: ERROR: yolov5x is not a supported format

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

    Can you plz upload video useing pycharm🥺

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

      Hey Alamin. I don't use pycharm but the IDE you use shouldn't impact your ability to run this code. Good luck!

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

    Not able to follow on windows

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

    Test it with jetson nano

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

    Hi! Can we run this in Google Colab?

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

      detect: weights=yolov5s.pt, source=0, data=data/coco128.yaml, imgsz=[640, 640], conf_thres=0.25, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs/detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False, vid_stride=1
      YOLOv5 🚀 v6.2-228-g6ae3dff Python-3.7.15 torch-1.12.1+cu113 CUDA:0 (Tesla T4, 15110MiB)
      Fusing layers...
      YOLOv5s summary: 213 layers, 7225885 parameters, 0 gradients
      WARNING ⚠ Environment does not support cv2.imshow() or PIL Image.show()
      [ WARN:0@5.409] global /io/opencv/modules/videoio/src/cap_v4l.cpp (902) open VIDEOIO(V4L2:/dev/video0): can't open camera by index
      Traceback (most recent call last):
      File "detect.py", line 258, in
      main(opt)
      File "detect.py", line 253, in main
      run(**vars(opt))
      File "/usr/local/lib/python3.7/dist-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
      return func(*args, **kwargs)
      File "detect.py", line 103, in run
      dataset = LoadStreams(source, img_size=imgsz, stride=stride, auto=pt, vid_stride=vid_stride)
      File "/content/yolov5/utils/dataloaders.py", line 364, in __init__
      assert cap.isOpened(), f'{st}Failed to open {s}'
      AssertionError: 1/1: 0... Failed to open 0

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

      I ran it and came across this error. Your suggestions please?

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

      You should be able to run it in colab, but I believe you are detting an error because your webcam is not going to be connected to the instance. You will need to run it on a video file.

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

      @@robmulla thanks for the response. Yeah, it is accessing the webcam through colab. Is there any way to connect to the webcam?

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

      not*

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

    i cannot identify the source number of my camera

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

      don’t use your camera unless you have to , i get issues too, switched to just detect the objects on my screen instead , still using the camera just doesn’t detect through the camera lol detects off of my screen

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

    I saw these two videos th-cam.com/video/jdPDRxN2TsM/w-d-xo.html and th-cam.com/video/hm0SXmSlvCE/w-d-xo.html showing how computer vision was used to detect shoplifting. From the description of these videos, apparently, the following technologies were used.
    - Python
    - Frame Differences
    - SSIM (Structural Similarity Index)
    - PyTorch
    - OpenCV
    - Computer Vision
    - Deep Learning
    - Keras
    Do you do a video tutorial showing how to use computer vision to detect shoplifting?

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

      Oh cool! I'm not sure how those videos were created but this would be really hard to pull off without a lot of false positives. You would essentially just need to use YOLO trained on a custom dataset with shoplifting labeled. I'm assuming it's also identifying the people from the pretrained yolo weights... check out my other video on how to train a custom detector.

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

      @@robmulla Thanks much!

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

    could please send me this gethub link

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

    Webcam detection says Failed to open 5

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

      Make sure you are using the correct web cam number for your system. Might be 0 or 1 and you change that in the command you run.

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

    Bro pls doo fall detection plssssss plssssss bro using yolo

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

      Ohh. That’s an interesting idea. Thanks for watching.

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

    If you've never heard YOLO before, it stands for "you only live once".
    (Bob) Go big or go home.

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

      lol! You are correct! I love to YOLO and BOGO every day 😅 - this YOLO is different even though it has a similar name.

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

    Bro pls doo fall detection plssssss plssssss bro

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

      We shall see.

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

    finger as hotdog ahahha

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

    i think the video is a little outdated, you provide the video directly through the --source argument

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

      Oh really. I didn’t realize it changed. Check out my video with yolov7

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

    Can't run a video file

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

      It works for me. You might want to try yolov8 that was recently released.

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

      @@robmulla ok
      But how can I use my GPU for running this. My cpu is utilized for this and the GPU is completely free. How to do this ....please help

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

      Please reply

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

    Hi! I have a problem with a Yolo model that I trained.
    It is very and Incredibly slow when I use it on videos
    I used someone else’s tutorials, this one
    m.th-cam.com/video/_FNfRtXEbr4/w-d-xo.html
    I need to detect in realtime objects that appear in front of my raspberry pi car
    I want to process The video i get from The car via sockets and process it on The Machine I receive it. Can you help me understand what I did wrong? I Only trained The model with 100 images and one class. It recognises stop signs Only.

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

    700th like

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

      Thank you!

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

      @@robmulla I do get some errors running this any ideas why? I’m on max if that helps