Object Detection OpenCV Python | Easy and Fast (2020)

Поделиться
HTML-код
  • Опубликовано: 29 авг 2020
  • In this tutorial, we are going to learn how to detect objects using OpenCV and python. The Object Detection OpenCV method we will use is a sweet balance between speed and accuracy. Unlike many other object detection methods, we will be able to run this in real-time with a good amount of accuracy.
    🚀🚀 My Urdu/Hindi AI RUclips Channel 🚀🚀
    / @murtazahassan01
    Download Code:
    www.computervision.zone/cours...
    Premium Courses:
    ✔️ Computer Vision Game Development Course:
    bit.ly/3ttLZ2s
    ✔️ Computer Vision with Arduino Course:
    bit.ly/3wzLB4m
    ✔️ Advanced Drone Programming Course:
    bit.ly/3qs3v5g
    ✔️ Learn to Build Computer Vision Mobile Apps:
    bit.ly/3uioY1J
    ✔️ Jetson Nano Premium Course:
    bit.ly/3L8uIlF
    ⚙️⚙️⚙️--My Gear - ⚙️⚙️⚙️
    👉 Complete Gear 💈: www.computervision.zone/tech-...
    👉 My PC Specs 🖥️: www.computervision.zone/tech-...
    👉 My Video Shooting Gear📽️ : www.computervision.zone/tech-...
    👉 My Laptops 💻: www.computervision.zone/tech-...
    👉 Educational Products🧑‍🎓: www.computervision.zone/tech-...
    👉 RUclips Starter Kit 🔴: www.computervision.zone/tech-...
    Follow Me:
    TikTok: bit.ly/3Vo76OQ
    Facebook Group: bit.ly/3irDcb7
    Discord: bit.ly/3JvyxAM
    Facebook Page: bit.ly/3IvpU7W
    Instagram : bit.ly/3NdGME3
    Website: bit.ly/3ICFTS0
    Github: bit.ly/3woU6PS
    #ComputerVision
    #OpenCV
    #CVZone

Комментарии • 726

  • @pete1231
    @pete1231 3 года назад +48

    This was great, so easy and quick. I watched so many other tutorials and there are always a million dependencies and errors, this was awesome, thanks!

    • @_BENJOSEPH
      @_BENJOSEPH 2 года назад +2

      how to download COCO dataset?

    • @karatekidj1380
      @karatekidj1380 2 года назад

      Peter, could you possibly help me with fixing my error?

    • @parthverma7089
      @parthverma7089 Год назад

      i am having issues in getting the resource files such as ssd mobile net v3 and frozen inference....can u plz help me

    • @Ibloop
      @Ibloop Месяц назад

      @@parthverma7089 ​ If you still care go to the link in the description under download code, and then enroll for the course and then go to the lesson that says "Code Files" and then download the files at the top, it might not notify you that you downloaded the files but they will go onto your system

  • @bryanirvine3914
    @bryanirvine3914 3 года назад +67

    Wonderful tutorial. Thank you so much for sharing your knowledge for free, you make the world a better place.

  • @shepbryan4315
    @shepbryan4315 2 года назад +3

    This was super helpful! Your live coding is very impressive. Thanks!

  • @qweqwe-kd4yc
    @qweqwe-kd4yc 3 года назад +2

    Good Job Murtaza. Hello from Turkiye to Pakistan

  • @luisfernandomanzano9953
    @luisfernandomanzano9953 2 года назад +1

    This is just gold. Thank you so much Murtaza I'm a broke student but eager to dive into Computer Vision and thanks to your altruism in making this content I am can to learn something that otherwise I would not be able to. Thank you

    • @parthverma7089
      @parthverma7089 Год назад

      i am having issues in getting the resource files such as ssd mobile net v3 and frozen inference....can u plz help me

  • @hilmannaufal7128
    @hilmannaufal7128 3 года назад +14

    8:48 "Sometime time it good to be lazy" quote of the day😁

  • @atulchandradash8477
    @atulchandradash8477 3 года назад

    Awesome Sir ...... This the one of the best video i seen in youtube......you code are esay to understand.....thank so much sir... That One is really esay to use .....

  • @bhubeshsr6281
    @bhubeshsr6281 3 года назад

    need weekly thrice videos like these please I am sharing this with all my friends

  • @hackercop
    @hackercop 3 года назад

    Thanks so much for making this, I learn't a lot from you.

  • @hilary410
    @hilary410 Год назад +2

    Thanks for the video! Love it! Can you do a tutorial on adding custom classes to the coco dataset for Object Detection with OpenCV Python? :)

  • @hiteshsingh2222
    @hiteshsingh2222 3 года назад

    Incredible... Thanks for the effort and time

  • @albertjackinson
    @albertjackinson 3 года назад +2

    I will definitely put this to use in my own project sometime! Thank you for making this tutorial.

    • @shova524
      @shova524 2 года назад

      Can i get your project name?

  • @dennisasamoah2213
    @dennisasamoah2213 3 года назад

    great tutorial from a great teacher

  • @overflow5027
    @overflow5027 3 года назад

    Interesting cant wait!

  • @vyjayanthiseshadri4318
    @vyjayanthiseshadri4318 2 года назад +1

    thank you soo muchh!Very informative and detailed video

  • @mmf3775
    @mmf3775 3 года назад

    Great Tutorial Murtaza .from Iran to Pakistan

  • @edSabio572
    @edSabio572 3 года назад +1

    Dr. Murtaza, I need to know how to close up the 'complete' course in your website. At times, I play the video straight from youtube. when I log in in my account it is showing not complete. My question is, do I have to log in to continue the lesson? there is no option to 'continue' later...

  • @lorddevincecifra3200
    @lorddevincecifra3200 3 года назад +1

    How to connect the camera to the laptop? In order for it to access the program. And does this needs a microcontroller?

  • @alasthereshopeforyou.1719
    @alasthereshopeforyou.1719 Год назад

    Thank you very Much. This has been very very helpful!

  • @mhmaryam9359
    @mhmaryam9359 3 года назад

    Merciiiiii pour votre effort

  • @mcmouli2002
    @mcmouli2002 3 года назад

    Excellent explanation. You made me to fell in love with openCV.

    • @Idan_Nesimov
      @Idan_Nesimov 2 года назад

      what means box[2] and box[3] ?

  • @vinayakdhinde5606
    @vinayakdhinde5606 3 года назад +1

    which function I need to add if I want to count how many times I lost my object from screen

  • @alexandrpetrov1110
    @alexandrpetrov1110 3 года назад +2

    Thanks!

  • @Maihoe1
    @Maihoe1 3 года назад +1

    Can I do this using a hikvision IP camera rather than webcam? If so then can you do a quick tutorial on this? Thanks for your hard work. It is much appreciated

  • @ofekyofi
    @ofekyofi 3 года назад

    Great video!! everything worked perfectly

  • @allenqueen
    @allenqueen 2 года назад

    You sir, are a god amongst men.

  • @hackercop
    @hackercop 3 года назад

    You are a hero!

  • @2000varma
    @2000varma 3 года назад +8

    Excellet tutorial! Can you please explain why we have set the input parameters(Size, Scale, Mean, SwapRB) to the net object?

    • @parthverma7089
      @parthverma7089 Год назад

      i am having issues in getting the resource files such as ssd mobile net v3 and frozen inference....can u plz help me

  • @nobody-kn9kw
    @nobody-kn9kw 6 месяцев назад

    I gotta say, this video was just what I was searching for, great work man!!!

    • @yamzthe
      @yamzthe 5 месяцев назад

      I have error in classIds,confs,bbox=net.detect(img,confThresholf=thres)
      Assertion failed, !ssize.empty() in function
      What should I do?

  • @amirhosseinesteghamat7621
    @amirhosseinesteghamat7621 3 года назад +5

    Can you please give straight link to the dataset and the files you add to project at the start of video

  • @muhammadshifa4886
    @muhammadshifa4886 3 года назад

    That great. very nice. I have one question how we can compute its confusion matrix, precision, recall with intersection over union IoU in Python?

  • @patrickpuentelml4958
    @patrickpuentelml4958 3 года назад +1

    I love it this video. GREAT JOB :)
    Murtaza's you are an expert in this field I need your help How can I custom and training my own SSD MOBILENET ? I want to recognize my own object but with a CNN like this video i don't want to use the Haar Cascade method. Plese I'm working in my last project and for me is more cool using SSD MOBILENET with a predictions instead using HaarCascade. Please could you made a video training your own SSD MOBILE NET please, please, please

  • @yotte8846
    @yotte8846 Год назад

    Is coco dataset tuple and can i modify it as i need to person to be detected like person one and person two so is that possible ?

  • @Java-fj3mk
    @Java-fj3mk Год назад

    Thanks a lot for this great tutorial. I have watched couple of the videos here in RUclips, but no one make it straight forward like you. In line 22 why you didn't flatten the bbox when you use it with the zip function?

  • @zahra_koohestani
    @zahra_koohestani 3 года назад +1

    thank u sm!

  • @kanonghaemi2444
    @kanonghaemi2444 3 года назад

    you are BEST . tanx for sharing .

  • @Python-eu7ok
    @Python-eu7ok 2 года назад

    Thanks Really Helpful
    I love 🌹 your videos

  • @nadeemshaikh9257
    @nadeemshaikh9257 3 года назад +1

    Assalamualykm bro yr videos help me alot ♥

  • @salmankhan24
    @salmankhan24 3 года назад

    simply awesome

  • @rhalppalanca3273
    @rhalppalanca3273 3 года назад +1

    Hello, sir a nice tutorial. but can ask if object detection can light LED after the detection is done? I'm trying to apply it in RPI and in real-time

  • @FaisalR
    @FaisalR 3 года назад

    awesome thanks for the tutorial

  • @pseudohawk1656
    @pseudohawk1656 2 года назад

    How can i get the width or height of the rectangle in pixel? I want to use it to measure distance along with detetecting the object

  • @tinmar8164
    @tinmar8164 2 года назад

    is it possible to include more objects to be detected? like some custom trained objects

  • @Renatic123
    @Renatic123 3 года назад +2

    Where can we found the fronzen_interference_graph? Thank you

  • @aydnaltun2573
    @aydnaltun2573 3 года назад

    Sir , what if we wanna detect only a spesific object such as pedestrian or car
    what kind of methot should we use ?

  • @michaelderamus662
    @michaelderamus662 2 года назад +1

    Does this work anymore? I'm getting an error for the following.
    net = cv2.dnn.DetectionModel(weightsPath, configPath)
    AttributeError: module 'cv2.dnn' has no attribute 'DetectionModel'

  • @rajvindermann7655
    @rajvindermann7655 3 года назад

    Hi, is it possible to use opencv to do custom object detection? Thank you.

  • @amjadmoughal
    @amjadmoughal Год назад

    Good work keep it up bro.

  • @universalduggal1708
    @universalduggal1708 3 года назад +43

    I went on your website to see the weight files and couldn't find them. Where are they?

    • @ddtdilireba
      @ddtdilireba 3 года назад +1

      yes...I also couldn't find it

    • @mark_coker
      @mark_coker 3 года назад +1

      www.computervision.zone/topic/basic-code/

    • @am_editz9145
      @am_editz9145 Год назад +2

      Those are paid 😥

    • @llewsub
      @llewsub 23 дня назад

      @@am_editz9145 So this whole tutorial is a waste of time then lol wtf

  • @davidmayorga3997
    @davidmayorga3997 3 года назад

    I love your videos, maybe do you have a video of cross line detection?

  • @baitywahidiah2313
    @baitywahidiah2313 3 года назад

    Hi can i know, how to make object identification for trash bin, example, my camera detects platics,the shutter for plastics compartment will open. And vice versa

  • @jeremypei3610
    @jeremypei3610 2 года назад

    Thank you so much sir!!!!!!!

  • @sohailali5741
    @sohailali5741 3 года назад +47

    Excellent tutorial.! Can you please make a tutorial on how to train Object Detection models using our own dataset?

    • @shaik.gulshanmohiddin5966
      @shaik.gulshanmohiddin5966 3 года назад +11

      towardsdatascience.com/creating-your-own-object-detector-ad69dda69c85 u can check here!!

    • @گیمینگ
      @گیمینگ 3 года назад

      Chekc the ai guy gethub he is explaining everything good but not perfect,
      I need a video as you said to

    • @brokeunistudent2474
      @brokeunistudent2474 3 года назад +1

      @@shaik.gulshanmohiddin5966 hey shaik, im having some issues with the installation, could you help me solve it?
      cannot import name 'model_lib_v2' from 'object_detection"

  • @laurajanenunez1234
    @laurajanenunez1234 3 года назад

    is there any way to train new image, or for example i want to classify different types of cakes, please reply sir I really want this for my project

  • @thinhtruong5831
    @thinhtruong5831 3 года назад

    Thanks you very much for this video. I hope you will guide custom Data Mobile net ssd

  • @ishikabanga2552
    @ishikabanga2552 Год назад

    i have an issue , i want to run this code helmet detection . i have tried it , my image is of a person riding a bike with helmet but it is dtetction the person only written as person in the bbox . please help

  • @mr.anonymous8410
    @mr.anonymous8410 3 года назад

    Thanks a lot bro.

  •  2 года назад +1

    How to get the initial files you put in to project? Coco names and SSD files.

  • @cyberthunder1012
    @cyberthunder1012 3 года назад

    love your work from bangladesh

  • @StormRaider2010
    @StormRaider2010 2 года назад +8

    Thanks a lot for the tutorial, as usual well explained and straight to the point. Can you please point me to where I can download all the files you have imported at the start of the lesson. I can't find them. Thanks

  • @h-electronics602
    @h-electronics602 3 года назад

    what is the difference between your method and tensorflow?

  • @ilkeraykut7064
    @ilkeraykut7064 3 года назад

    I wanna detect some electronic materials like mosfet or transistor or resistor.What should I do for this?Thank you.

  • @Bianchi77
    @Bianchi77 2 года назад

    Nice, thanks :)

  • @gabrielaz.4792
    @gabrielaz.4792 Год назад

    Is it possible to extract the deteted box with an object as a separate image? I need it for my project and hoped it could work this way but I am lost....

  • @zerlinalilin
    @zerlinalilin 5 месяцев назад

    It's work! thanks a lot!!!

  • @patelgaurang8766
    @patelgaurang8766 2 года назад +2

    I'm getting error in net = cv2.dnn_DetectionModel....... what should i do?

  • @sakshisinghal8008
    @sakshisinghal8008 3 года назад +1

    where i can find these coco.names and other files on internet ?? there is no mobilenet ssd file in opencv doc.

    • @murtazasworkshop
      @murtazasworkshop  3 года назад +1

      Follow the link in the description and enroll in the course at the top of the page to get access.

  • @jaymenon3693
    @jaymenon3693 3 года назад

    Can I use my custom objects for detection like Nuts and Bolts? And can I use that model in R-Pi 4GB?

  • @edSabio572
    @edSabio572 3 года назад

    Thanks for your great work! Your videos never disappoint...

  • @anggingwahyuwibowo114
    @anggingwahyuwibowo114 3 года назад +2

    Request Tutorial:
    - Detect rotation angle from template.

  • @aykutsirma4260
    @aykutsirma4260 3 года назад +2

    I am getting this error:
    net = cv2.dnn_DetectionModel(weightsPath,configPath)
    AttributeError: module 'cv2.cv2' has no attribute 'dnn_DetectionModel'
    Do you know or anyone know how to solve this problem? thank you.

  • @Cosyboy012
    @Cosyboy012 День назад

    very helpful. Thank you so much

  • @venrajful
    @venrajful 3 года назад +1

    Excellent tutorial. I'm currently working on a project that requires an ai to be able to recognize 4 different objects and then determine their orientation orientation this helped a lot with recognition.

    • @murtazasworkshop
      @murtazasworkshop  3 года назад +2

      Glad it was helpful!

    • @venrajful
      @venrajful 3 года назад

      @@murtazasworkshop It indeed was. The big challenge is now how to determine how the object is oriented relative to the camera. Found a lot of papers online but no real explanation on how to do it.

    • @edimameyanga3884
      @edimameyanga3884 3 года назад +1

      @@murtazasworkshop Where can i download the coco dataset from? And the .pb file? please

    • @krizz5825
      @krizz5825 Год назад

      I am also working on a project, will this program work on Arduino?please reply

    • @yamzthe
      @yamzthe 5 месяцев назад

      I have error in classIds,confs,bbox=net.detect(img,confThresholf=thres)
      Assertion failed, !ssize.empty() in function
      What should I do?

  • @dinmalikogli5983
    @dinmalikogli5983 2 года назад

    jazakallahu khoyron bro

  • @anthonyfix007
    @anthonyfix007 3 года назад +1

    this script not using tensorflow ,is it?

  • @cealisher
    @cealisher 2 года назад

    It worked thanks alot

  • @gabetower6165
    @gabetower6165 3 года назад +1

    What is the easiest why to train a custom model that will work with this script.

  • @junkmauler
    @junkmauler 2 года назад +2

    Can you do a video on how to train new objects from a collection of images? Your content is great!

    • @parthverma7089
      @parthverma7089 Год назад

      i am having issues in getting the resource files such as ssd mobile net v3 and frozen inference....can u plz help me

  • @AHMADKELIX
    @AHMADKELIX 2 года назад

    permission to learn sir.thanks you

  • @humpreyzoeagustin7958
    @humpreyzoeagustin7958 3 года назад

    Hi I'm a computer engineering student from the Philippines, I am thankful for your videos this video helps me a lot and I am also currently enrolled at your website and I'm very thankful for this :)))))

    • @yamzthe
      @yamzthe 5 месяцев назад

      I have error in classIds,confs,bbox=net.detect(img,confThresholf=thres)
      Assertion failed, !ssize.empty() in function
      What should I do?

    • @user-yk8yb5xy8r
      @user-yk8yb5xy8r 5 месяцев назад

      Check the VideoCapture if it is "1" make it "0"

  • @mrclash1357
    @mrclash1357 2 года назад +1

    hi its good tutorual but can you tell me how I add anthor coco names like names that were not in coco name if I add that can be destroy the code?

  • @richardwei5139
    @richardwei5139 Год назад

    This is awesome, I have no experience coding and I made it work!!!! Seems as though it struggles with identifying some things. Is there a way that I can help train it to identify some things?

  • @eslammedhat7151
    @eslammedhat7151 3 года назад +1

    How can I Apply this object detection model on a reception robot and detect the floor to be able to walk and avoid objects ?? Any idea :) Thanks

  • @JH-on1rw
    @JH-on1rw 2 года назад

    Thanks for lecture, Did you run Pycharm to using code?

  • @user-uz5co3qf1k
    @user-uz5co3qf1k 2 года назад

    Thank u verry much i love you❤️❤️

  • @Ashukr711
    @Ashukr711 3 года назад

    hey i can not access the code from the link in your description. Can you please fix it.

  • @AI_CANISTER
    @AI_CANISTER 3 года назад

    i dont understand why videos like this still get people who dislike it......

  • @mohsinrasul7140
    @mohsinrasul7140 3 года назад +1

    where are you getting the coco.names file from? I cant locate your files directly from the link you have provided in the video desciption.

    • @murtazasworkshop
      @murtazasworkshop  3 года назад +1

      Follow the link in the description and enroll in the course at the top of the page to get access.

  • @dompower500
    @dompower500 3 года назад +8

    Since your videos are always easy to follow and efficient, we are eagerly waiting sir. Thsnk you for working hard to bring excellent tutorials. Can you pls cover a subject how to control relay or any device from pyCharm running on windows? (Bcs of GPIO, I will be able to do in Raspberry)

    • @murtazasworkshop
      @murtazasworkshop  3 года назад

      Hi . There is a similar tutorial i have done that communicates with arduino using serial communication and controls a servo . You can check that. ruclips.net/video/TymXJVk-I6Q/видео.html

    • @dompower500
      @dompower500 3 года назад

      @@murtazasworkshop Thank you very much sir.

    • @parthverma7089
      @parthverma7089 Год назад

      i am having issues in getting the resource files such as ssd mobile net v3 and frozen inference....can u plz help me

    • @mohammedazzan7529
      @mohammedazzan7529 Год назад

      @@parthverma7089 did you get the solution? i too am having problems

    • @yenupurigyaneswarasaikumar650
      @yenupurigyaneswarasaikumar650 11 месяцев назад

      classIds, confs, bbox = net.detect(img, confThreshold=thres) i am getting error over here
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^@@murtazasworkshop

  • @jocemarvosskovacs3384
    @jocemarvosskovacs3384 2 года назад

    Great! Congrats 🙌
    Is there some place where I can get another model to detect? I need detect pimples, acnes, and skin marks in faces.
    Thank you 😊🙏

  • @freemanwong106
    @freemanwong106 3 года назад

    thank you the video. I wonder where we train the model?

  • @sayanmondal161
    @sayanmondal161 Год назад +1

    SystemError: returned a result with an exception set
    Sir can you help me out with this? I've searched for this error in several places but can't seem to be of help...
    I'm using VS Code as a platform...
    Thank You

  • @angelortiz3564
    @angelortiz3564 3 года назад

    where can I find the .pb and the .pbtxt files you used?

  • @datexland
    @datexland 3 года назад +1

    As always You're Crack !! @Murtaza's .....

  • @josephkamwendo8455
    @josephkamwendo8455 3 года назад

    where is the link to download the mobilenet ssd can you help

  • @cybercity2374
    @cybercity2374 2 года назад

    For real man you inspired many of my main projects on AI. Thank you

  • @Manojkumar-vh4tc
    @Manojkumar-vh4tc 2 года назад

    I am about to implement Distance Measurement between the named objects, can I able to successfully implement ?

  • @javertnone6262
    @javertnone6262 3 года назад +2

    I'm having trouble finding the ssd file, can anyone help me, please.

  • @irvinsanchez3405
    @irvinsanchez3405 2 года назад +1

    What cam are you using?, Are you using a ESP32?

  • @gouruhemanth
    @gouruhemanth 2 года назад

    dir, please tell us ,the method used is machine learning or transfer learning?? please reply fast.