Object Detection using OpenCV | Python | Tutorial for beginners 2020

Sdílet
Vložit
  • čas přidán 14. 10. 2020
  • This video contains a stepwise implementation of python code for object detection based on the OpenCV library.
    The following are the list of contents you will find inside the video.
    1) basic understanding of object detection and image classification
    2) installation of necessary libraries
    2) line by line implementation for object detection using OpenCV
    a) Single Image
    b) Video.mp4
    c) Live Webcam
    List of labels to download
    github.com/pjreddie/darknet/b...
    Configuration file
    gist.github.com/dkurt/54a8e8b...

Komentáře • 411

  • @NoorainRazaEC
    @NoorainRazaEC Před rokem +1

    No one on you tube do this project for biggener level
    , but you did in perfect manner Sir
    Thank you So much Sir.

  • @chilukproducoes
    @chilukproducoes Před rokem

    TNice tutorials is exactly what I needed to understand the UI. Great tutorial!

  • @weixinteh7075
    @weixinteh7075 Před 3 lety +40

    This is the most selfless video for object detection have every seen! the steps by steps provided clearly and most important WORKING! it is really helpful for a beginner like me. Thanks author!! You save my life!

    • @TOI700e13
      @TOI700e13 Před 2 lety +2

      Hi it's only detecting person even if it is a car in VideoCapture .it's all good in img detection but the only problem is video object detection. could you please share your code if you've done it

    • @BruceWayne-xq7bb
      @BruceWayne-xq7bb Před 2 lety

      bro, can u give the graph of deep learning architecture? u did not provide that link

  • @madarbakushussain758
    @madarbakushussain758 Před 2 lety

    The best explained video for object detection I've encountered so far!! Keep it up Bro

  • @nasim3269
    @nasim3269 Před 3 lety +1

    Thank you very much sir, this was just the perfect introduction t actually implementing computer vision!

  • @sudeep003gowda
    @sudeep003gowda Před 2 lety +2

    You explained it very well. You made my day . I am so happy that I had learnt something new.

  • @colsoyeti1
    @colsoyeti1 Před 3 lety

    Thank you for the expertly presented tutorial and demonstration.

  • @Raini41
    @Raini41 Před 3 lety

    the best video so far and help me a lot. thank you.

  • @hackercop
    @hackercop Před 3 lety

    Have just finished this. Thanks very much for making it. Have liked and subscribed!

    • @bhoomikamj7887
      @bhoomikamj7887 Před měsícem

      Heyyy..i didn't find frozen_inference_graph.pd after downloading the config file...can you please help!

  • @Radi0he4d1
    @Radi0he4d1 Před rokem

    I need to put together a script that copies images containing only certain objects. I tried looking for tutorials, but all of them are hellbent on teaching people how to train AI to tell apart dogs and fish. All I needed was to be spoonfed on how to use a pre-made model.
    Thank you so much.

  • @pranavgupta9015
    @pranavgupta9015 Před 3 lety +5

    Hi, sir I really appreciate your detailed explanation and it's very easy to understand, there is a mismatch in labels and the pre-trained model. It took me some time but while classifying the images the model predicts the label 'fire hydrant' at position 11 and 'stop sign' at position 13, whereas in the labels list the 'stop sign' comes just after the 'fire hydrant'.
    How can we solve this problem?

  • @karthikeyaanar
    @karthikeyaanar Před 3 lety

    Thank you so much for your effort. Really helpful 👍🏽🙏🏼🙌🏽

  • @sangeetagarg239
    @sangeetagarg239 Před 3 lety +4

    great job, Could you please teach me how a new dataset is labelled and implementation of all the approaches of object detection. As I am new to this area. I liked the way you described.

  • @SteelersFans99
    @SteelersFans99 Před 3 lety +15

    Fixed the problem with the bounding boxes:
    Replace “img” with “frame” in:
    cv2.rectangle(img,boxes,(255, 0, 0), 2)
    cv2.putText(img,classLabels[ClassInd-1] ......., thickness=1)
    Now it should work and display bounding boxes in the video!
    Great video! Very helpful!

    • @BruceWayne-xq7bb
      @BruceWayne-xq7bb Před 2 lety

      Hey, im getting 'name cv2 is not defined' . How to correct the error

    • @kanawadeatharva7705
      @kanawadeatharva7705 Před 2 lety

      @@BruceWayne-xq7bb if you are getting error like module not found try to check if opencv is installed or not then just try this in cmd (pip install opencv-python)

    • @mohammedazzan7529
      @mohammedazzan7529 Před rokem

      @@kanawadeatharva7705 hey bro you got the code in this video?

    • @kanawadeatharva7705
      @kanawadeatharva7705 Před rokem

      @@mohammedazzan7529 yeah!!!

    • @deepibalachandran9956
      @deepibalachandran9956 Před 28 dny

      @@kanawadeatharva7705 SEND CODE FOR THIS SIR

  • @mohamedgamer6877
    @mohamedgamer6877 Před rokem

    So informative, thanks a lot!

  • @connectrRomania
    @connectrRomania Před rokem

    Simple. And clear tuto thank you so much

  • @teetanrobotics5363
    @teetanrobotics5363 Před 3 lety

    Amazing tutorial.Thanks Mate

  • @albertbenedict
    @albertbenedict Před 3 lety

    quick question, what if the frame and classes doesnt show in my video/webcam? is there anything that i can do to fix that?

  • @DassaBanger
    @DassaBanger Před 2 lety

    Amazing video. Great job

  • @gowthamvignesh5802
    @gowthamvignesh5802 Před rokem

    Nice video man ,I liked it

  • @md.sahilansari5596
    @md.sahilansari5596 Před 10 měsíci

    Really that details hits different

  • @prarthana_bhuyan
    @prarthana_bhuyan Před 3 lety

    Thanks for teaching such complicated concept in simple words. Kindly guide me if we can integrate hardware like LED etc to such projects after detecting a specific object in real time.

  • @user-lj6kw7my6v
    @user-lj6kw7my6v Před rokem

    Thank you so much sir from the bottom of my heart 💖.......it helped me a lot in my project

  • @gursehajsinghmehta7099
    @gursehajsinghmehta7099 Před 2 lety +1

    Sir i cant find that particular stock footage that you used ,can you link it here.

  • @mojojojo9121
    @mojojojo9121 Před 2 lety

    thank you so much! this was a really great learning experience!!

  • @mamoonst7195
    @mamoonst7195 Před 3 lety

    SIr I am working on a project which is to detect cotton using OPENCV Res Pi, Sir as the cotton data set is not available, is it possible to use a google image of any cotton to detect our cotton ball using HSV? Please reply.

  • @alifurkanfindik2966
    @alifurkanfindik2966 Před rokem

    my friend it was a very good video👌😀

  • @umairmughal0001
    @umairmughal0001 Před 3 lety

    Can you please teach how to features analysis using deep learning techniques? Your videos are very helpful to us. Thank you :)

  • @vijaydattu709
    @vijaydattu709 Před 3 lety

    Thank you so much.well explained.

    • @refrefwgwgwegew
      @refrefwgwgwegew Před 2 lety

      hi willing to help me with my code? I seem to get a different resolution of my video than the original...

  • @lyndawakoli1596
    @lyndawakoli1596 Před 2 lety

    YOU SAVED ME ALOT ON MY FINAL YEAR PROJECT

    • @vigneshs1620
      @vigneshs1620 Před 2 lety

      Hi ma'am.i also stuck in last stage. Attribute error :tuple not have attributes flatten. Plz help .its also my final year project

    • @mohammedazzan7529
      @mohammedazzan7529 Před rokem

      hello can you send me the code please?

  • @hieutle
    @hieutle Před 2 lety

    what a absolute legend!

    • @hieutle
      @hieutle Před 2 lety +1

      @@refrefwgwgwegew cap.set(3, width) and cap.set(4, height) whereas width and height is your preferred resolution

    • @hieutle
      @hieutle Před 2 lety

      @@refrefwgwgwegew No. cap.set(3, width) where width is a number and cap.set(4, height) where height is a number. Try cap.set(3, 512) and cap.set(4, 384)

  • @user-ek9ho1ny8d
    @user-ek9ho1ny8d Před 2 lety

    That's a nice video, but how can I do the same using cv2 but for custom dataset? Change the num of classes and make the model detect the ones I've set?

  • @pIbrarBabar
    @pIbrarBabar Před rokem

    Excellent...!

  • @lavanya2kowmar
    @lavanya2kowmar Před 3 lety

    Thank you so much for this tutorial, it helped me a lot, I have a doubt, how do we know the values to set up the configuration

  • @EstebantabaresML
    @EstebantabaresML Před 3 lety +1

    Great video

  • @RAZONEbe_sep_aiii_0819
    @RAZONEbe_sep_aiii_0819 Před 3 lety +1

    can you please share the whole code which you just implemented on screen using JN? I will be glad.

  • @rabirabail752
    @rabirabail752 Před 3 lety

    It's really helpful

  • @emmajanemackinnonlee
    @emmajanemackinnonlee Před rokem

    given it's now 2022, would you suggest a different model that we should use? is this one outdated? or still the same one is good?

  • @codetackle9662
    @codetackle9662 Před 3 lety

    thank you sir it very helpful for me

  • @prashantrai5102
    @prashantrai5102 Před 2 lety

    thanku for the wonderful explaination

  • @Alpha-hj2ss
    @Alpha-hj2ss Před 3 lety +1

    cv2.imshow('Object Detection Tutorial',frame) I got an error here. Does the quote name should be unique?

    • @ChirathLK
      @ChirathLK Před 3 lety

      you have to run the whole code with the config files

  • @jatin9711
    @jatin9711 Před rokem

    Sir can you please tell us if we want to increase that Labels dataset i.e want to include more things than how we will do that

  • @Axio95
    @Axio95 Před 3 lety

    very informative video and i learnt very much from this , if you could post more tutorials about deep learning and explainations will be helpful.

    • @Axio95
      @Axio95 Před 3 lety

      hi could you tell like what changes i need to make if i want to add new class files such as chair , pen , phones etc . for the real time web cam detection?

  • @renzomontesa2088
    @renzomontesa2088 Před 3 lety

    Nice work bro

  • @riyushachannel4761
    @riyushachannel4761 Před 2 lety

    Thanks bro it work 👍🏻, (auto subscribe)

  • @mohanbansal959
    @mohanbansal959 Před 3 lety +6

    Nice video, Everything is very clear. Only one doubt, how can we export the frozen inference graph? It would be better if you share the link for the frozen inference graph file. Thanks

  • @user-wq1pv4wz9e
    @user-wq1pv4wz9e Před rokem +1

    For importing a video, I keep getting an error seen below.
    error: OpenCV(4.7.0) /Users/xperience/GHA-OCV-Python/_work/opencv-python/opencv-python/opencv/modules/imgproc/src/resize.cpp:4062: error: (-215:Assertion failed) !ssize.empty() in function 'resize'
    I am not really sure how to fix it and I was hoping somebody might have some insight for me.

  • @ViralVideos.93
    @ViralVideos.93 Před 2 lety

    Sir in this project how we can add abnormalities part like if two persons are fighting or person is holding nife ,or we can say road accident then how we can show that

  • @Happy_Kannadiga
    @Happy_Kannadiga Před 3 lety +1

    sir where can i find frozen interference graph pb

  • @ShoaibKhan-ec6fh
    @ShoaibKhan-ec6fh Před 3 lety

    help full👍👍

  • @AbhishekSawant-yw7mu
    @AbhishekSawant-yw7mu Před 3 lety

    Thanks a lot man !!!

  • @crazyworldddar9092
    @crazyworldddar9092 Před 3 lety

    Gud job

  • @zenerd6944
    @zenerd6944 Před rokem

    hello sir mind if i ask on how can i have audio speech whenever an object is detected how may i implement it…

  • @kavinyudhitia
    @kavinyudhitia Před rokem

    nice, thanks!

  • @adityatiwari2325
    @adityatiwari2325 Před 3 lety

    the final video with all the boxes and names does not open up
    that is after typing the last code and pressing shift enter nothing happens.
    please help!!

  • @pudinanno
    @pudinanno Před 3 lety

    Thank you so much, explained everything very well........... i have worked on my own video and its working very nicely.

    • @pudinanno
      @pudinanno Před 3 lety

      how do i calculate the accuracy of prediction of our object detection.

    • @pudinanno
      @pudinanno Před 3 lety

      i have also calculated the confidence............by which it shows like for "person "-70%....if i want to do more analysis then what can i do and how to do that

    • @titashchowdhury441
      @titashchowdhury441 Před 2 lety

      Can u share the link of the frozen model

    • @BruceWayne-xq7bb
      @BruceWayne-xq7bb Před 2 lety

      @@pudinanno bro can u shar link of the frozen model

  • @macharlajagapatibabu2654

    good explanation sir thank you soo much❤

  • @jamilahmarramduarte1575

    sir can u help i have a reserch 1 then object detection is my study. but i dont have idea to do a object detection

  • @refrefwgwgwegew
    @refrefwgwgwegew Před 2 lety

    Hi sir, 1) my real time video doesn't capture the whole video. Any ideas on how to get the whole video with detection instead of a screen where the video is only partially visible. 2) the video window doesnt disappear when I stop the jupyter program. I hope you can give us an update. Amazing video!

  • @dhirajb9005
    @dhirajb9005 Před 2 lety

    I like your video.......

  • @hemanthar8363
    @hemanthar8363 Před 3 lety

    Can you help me with the voicefeedback for the output .

  • @danaali1710
    @danaali1710 Před 2 lety

    Hi, If I want to detect some other object outdide this 80 classes how can I do that please answer me

  • @adityapatil1839
    @adityapatil1839 Před rokem

    bhai thanks yaar !!!

  • @PankajsinghNegi-rs1wz

    thank u sir for this tutorial

  • @eduardoatilano9450
    @eduardoatilano9450 Před 3 lety

    Hello, anyone can help me to fix this error (it shows only when i changue the image)...
    'tuple' object has no attribute 'flatten'

  • @Fatimafatima-jd5ms
    @Fatimafatima-jd5ms Před 3 lety

    Good job

  • @vigneshkumars8517
    @vigneshkumars8517 Před rokem

    Thank you sir!!!

  • @ozkanuysal1263
    @ozkanuysal1263 Před 3 lety +1

    perfect.

  • @rahulsatav2247
    @rahulsatav2247 Před 3 lety

    Thanku sir.. ✌️❤🤗😇

  • @zunich9177
    @zunich9177 Před 3 lety

    KEEP IT UP

  • @shreyazalavadiya524
    @shreyazalavadiya524 Před 3 lety +1

    Please ..
    Can anyone provide documentation for this project like diagrams, project estimate and quality assurance

  • @BruceWayne-xq7bb
    @BruceWayne-xq7bb Před 2 lety

    can u give the graph of deep learning architecture? u did not provide that link

  • @RoksanaParvin-iu1uu
    @RoksanaParvin-iu1uu Před rokem

    From where can I download the frozen_interface graph?

  • @mdosama1231
    @mdosama1231 Před rokem +2

    I don't find the frozen_inference_graph.pd here in the link after downloading,would you please share

  • @muthukrishnan144
    @muthukrishnan144 Před 2 lety

    i am not able to find the file frozen inference graph. what should i do?

  • @jadavpur4
    @jadavpur4 Před 3 lety +1

    Hi...
    Thank you for the tutorial.. It's impressive. I have one question.
    Can we make the animation of moving objects a function of time? the program will run and continuous animation will run???
    Thank you

    • @jadavpur4
      @jadavpur4 Před 2 lety +1

      @@heribertojuarez6046 Yes.. I make the animation of moving objects... Thank you very much..

  • @shreyakumar8675
    @shreyakumar8675 Před 3 měsíci

    How to convert this notebook to a tflite format for raspberry pi?

  • @HKIIIVal
    @HKIIIVal Před 2 lety

    This is a great video i love it,
    but i have a question,
    can you teach me how to count how many person or car in the video? like i need a counters for data also

  • @TsOd09
    @TsOd09 Před 3 lety

    Hi please advise what software packages kneed to me installed before beginning this tutorial?
    I keep getting a cv2 error when executing any commands

    • @adityatiwari2325
      @adityatiwari2325 Před 3 lety +1

      you need to download python , pylab, and matplotlib

    • @TsOd09
      @TsOd09 Před 3 lety

      @@adityatiwari2325 downloaded it, not getting another error

  • @roitai-dev
    @roitai-dev Před 2 lety

    Thank you Teacher

  • @jaimeelipascua8528
    @jaimeelipascua8528 Před 2 lety

    hhi. do you have a full tutorial of a helmet detection?

  • @a065vrajnirajbhairajpurasv9

    Hello sir, thank you so much for this informative video, I was running the same code on my laptop, with all dependencies installed, in the last code segment I’m getting the error
    cv2.imshow(“Object Detection Tutorial”,frame)
    Invalid syntax
    I have rechecked the code multiple times and have also run the above code . Could you please help me with the solution

    • @anjalimehra4238
      @anjalimehra4238 Před 9 měsíci

      Same, I am doing it in colab. Did you find the solution?

  • @kupolusus
    @kupolusus Před 2 lety

    so helpful video

  • @astronaut4229
    @astronaut4229 Před 3 lety +4

    Thank you for the video! It was really helpful, but can you send us a link to the code? I'm looking forward to more of your videos!

  • @augustineadutwen4713
    @augustineadutwen4713 Před rokem

    please can anyone send me a link to the video used for the object detection?

  • @deepanshudutta4443
    @deepanshudutta4443 Před 3 lety

    sir how can i use this model in android app,make same thing for android application

  • @sethatevybong6750
    @sethatevybong6750 Před 3 lety +3

    can you recheck the link of the configuration file? I'm unable to download the frozen model. When I download it only gives the .pbtxt file

    • @deeplearning_by_phdscholar6925
      @deeplearning_by_phdscholar6925  Před 3 lety +1

      Thank you so much for your interest, and sorry for being late in replying.
      I double-check the link. and of course it is a .pbtxt file, Trust me, go for it, it will work as in the video.
      github.com/opencv/opencv/wiki/TensorFlow-Object-Detection-API
      above is the link
      In the middle, you will find a table, please select this model as shown in the video
      MobileNet-SSD v3 (see #16760) 2020_01_14 weights config
      weights => pretrained model
      config=> config file
      I hope I have answered your question, feel free to ask anything in case you find any kind of difficulties. Stay blessed.

    • @nitishhdas
      @nitishhdas Před 3 lety

      @@deeplearning_by_phdscholar6925 Same problem, When I extracted that file it has only .pbtxt file

    • @asfiyajabeen1965
      @asfiyajabeen1965 Před 3 lety +1

      Hey !
      Even I am unable to download the frozen model.
      How did you do it?
      Pls guide me.

    • @helloworld6234
      @helloworld6234 Před 2 lety

      @@asfiyajabeen1965 I don;t know it too :(

  • @wonderman2864
    @wonderman2864 Před 3 lety +3

    Hello Sir, first of all you did a very nice job with easy explanation! Now I found some errors while detecting objects in real-time mode. For instance, phone is detected as a sink, scissors and the chair as a toilet or some kind of staffs. So how can I improve the accuracy of object detection in real time mode? In my case, it is perfectly detecting the person only.
    Thank you in advance :)

  • @cookwithstyle6286
    @cookwithstyle6286 Před 3 lety

    Helpful

  • @Cool-rb8nu
    @Cool-rb8nu Před 3 lety

    So good

  • @hackercop
    @hackercop Před 3 lety

    Is it possible to run this on a GPU to speed things up. Thanks. I hope you get your PhD.

  • @islamicshorts50611
    @islamicshorts50611 Před 3 lety

    awesome

  • @unknown-bm9pf
    @unknown-bm9pf Před 2 lety

    Thank you ☺️

  • @droneguy69
    @droneguy69 Před 3 lety

    Where can I get the datasets

  • @opffgaming9426
    @opffgaming9426 Před rokem

    hey I'm facing an error in thershold in video how could i solve it can you tell me?

  • @bigbull536
    @bigbull536 Před 2 lety

    Sir, webcam is not displaying the names please reply sir

  • @dr.rajeshsarkate6127
    @dr.rajeshsarkate6127 Před rokem

    Having problem with dnn_DetectionModel in CV2, No such attribute error

  • @mairarafiquerafiquemr9163

    Nyc geeat

  • @chiragkolambe3520
    @chiragkolambe3520 Před rokem

    sir how to change the data set and label in the same program

  • @muhdajim
    @muhdajim Před 8 měsíci

    hello sir. i have problem importing cv2. it shows TypeError: 'numpy._DTypeMeta' object is not subscriptable. how to fix this?