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!
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
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 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)
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.
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.
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
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?
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.
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.
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.
Thank you for your interest, there might be some problem with the link so I have uploaded the frozen_interference_graph.pb separately, please use the link to download it. Thank you. drive.google.com/file/d/19seKEz-HYBkY_4DZV9ieu4gxgOnPxqhs/view?usp=sharing github.com/opencv/opencv/wiki/TensorFlow-Object-Detection-API Original Link
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
Thank you for your interest, there might be some problem with the link so I have uploaded the frozen_interference_graph.pb separately, please use the link to download it. Thank you. drive.google.com/file/d/19seKEz-HYBkY_4DZV9ieu4gxgOnPxqhs/view?usp=sharing github.com/opencv/opencv/wiki/TensorFlow-Object-Detection-API Original Link
@@vrishimeshram6323 In the video part I’m getting an error in this line * ClassIndex, confidece, bbox=model.detect(frame,confThreshold=0.55) * And also the object detection is not accurate for eg. when I’m placing a mobile in front of webcam it is identifying it as a scissor
@@ziaualhassain bro try creating new jupyter notebook mine also get error at declaring model , it getting error that it is failed but when i try new will worked on
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
font_scale=3 2 font=cv2.FONT_HERSHEY_PLAIN ----> 3 for ClassInd, conf, boxes in zip(ClassIndex.flatten(), confidece.flatten(), bbox): 4 cv2.rectangle(img,boxes(255,0,0),2) 5 cv2.putText(img,ClassLabels[ClassInd-1],(boxes[0]+10,boxes[1]+40),font,fontScale=font_scale,color=(0,255,0),thickness=3) NameError: name 'confidece' is not defined sir,iam getting name error.can you please tell how to solve this error. thank you sir
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!!
how to solve an error like this? error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-i1s8y2i1\opencv\modules\imgproc\src esize.cpp:4051: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
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
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.
(-2:Unspecified error) Can't create layer "FeatureExtractor/MobilenetV3/Conv/BatchNorm/FusedBatchNormV3" of type "FusedBatchNormV3" in function 'cv::dnn::dnn4_v20190902::LayerData::getLayerInstance' can you suggest why this error is occuring in the line : ClassIndex, confidece, bbox = model.detect(img,confThreshold=0.5)
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
Greate video However i have a small issue the following error comes when i try to run the video demo please help error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
Sir, Do you help me. Actually I'm Forest Data-operator. Many capture images trapped camera for wild animals. Approx 15 lakhs. Folderwise automatically segregation and classify images. This method. Please tell me. How to work.
If you are still facing the issue.. May be its because of your installation method... If you install the pkg using "pip install opencv-python" try with "pip install opencv-contrib-python"
When I execute this line on jupyter notebook :- model = cv2.dnn_DetectionModel(frozen_model,config_file) I am getting the below error :- returned a result with an error set Please help me out!!
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?
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?
bro, your code not gives an accurate result. In fact, I have tried many different videos, but unfortunately it can't pic the accurate results. In many videos, it is bird as a cat, butterfly as a dog. Please solve this issue...
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!
@@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)
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
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 :)
No one on you tube do this project for biggener level
, but you did in perfect manner Sir
Thank you So much Sir.
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!
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
bro, can u give the graph of deep learning architecture? u did not provide that link
@@TOI700e13hii can you help me with the project
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!
Hey, im getting 'name cv2 is not defined' . How to correct the error
@@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)
@@kanawadeatharva7705 hey bro you got the code in this video?
@@mohammedazzan7529 yeah!!!
@@kanawadeatharva7705 SEND CODE FOR THIS SIR
YOU SAVED ME ALOT ON MY FINAL YEAR PROJECT
Hi ma'am.i also stuck in last stage. Attribute error :tuple not have attributes flatten. Plz help .its also my final year project
hello can you send me the code please?
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.
You explained it very well. You made my day . I am so happy that I had learnt something new.
TNice tutorials is exactly what I needed to understand the UI. Great tutorial!
The best explained video for object detection I've encountered so far!! Keep it up Bro
Really that details hits different
Thank you for the expertly presented tutorial and demonstration.
Thank you very much sir, this was just the perfect introduction t actually implementing computer vision!
Please, when i type cv2.cnn ( i follow your instruction : keep Tab but it has not showed the options as yours ?) Can you help me ?
my friend it was a very good video👌😀
Thank you so much sir from the bottom of my heart 💖.......it helped me a lot in my project
Have u get graph file.. If u have it plz provide the link
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.
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
Same doubt.. Graphs were not there??
the best video so far and help me a lot. thank you.
I don't find the frozen_inference_graph.pd here in the link after downloading,would you please share
Yah same here
Simple. And clear tuto thank you so much
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?
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.
Have just finished this. Thanks very much for making it. Have liked and subscribed!
Heyyy..i didn't find frozen_inference_graph.pd after downloading the config file...can you please help!
@@bhoomikamj7887 Heyyy.. I also didn't find frozen_inference_graph.pd after downloading the config file...can you please help
Amazing video. Great job
Nice video man ,I liked it
good explanation sir thank you soo much❤
Sir i cant find that particular stock footage that you used ,can you link it here.
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
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.
@@deeplearning_by_phdscholar6925 Same problem, When I extracted that file it has only .pbtxt file
Hey !
Even I am unable to download the frozen model.
How did you do it?
Pls guide me.
@@asfiyajabeen1965 I don;t know it too :(
hello sir. i have problem importing cv2. it shows TypeError: 'numpy._DTypeMeta' object is not subscriptable. how to fix this?
The Labels didnt show up for me. Part of tutorial is 16:08
i got this error : returned a result with an error set ...what should i do ?
same error
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.
How can I download the file at 11:18 ? I can't get the website and download the file. Thank you.
Thank you for your interest, there might be some problem with the link so I have uploaded the frozen_interference_graph.pb separately, please use the link to download it. Thank you. drive.google.com/file/d/19seKEz-HYBkY_4DZV9ieu4gxgOnPxqhs/view?usp=sharing
github.com/opencv/opencv/wiki/TensorFlow-Object-Detection-API
Original Link
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
Same, I am doing it in colab. Did you find the solution?
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?
Amazing tutorial.Thanks Mate
Hi I am not able to download the weights document
from GitHUB. Pls Help
Thank you for your interest, there might be some problem with the link so I have uploaded the frozen_interference_graph.pb separately, please use the link to download it. Thank you. drive.google.com/file/d/19seKEz-HYBkY_4DZV9ieu4gxgOnPxqhs/view?usp=sharing
github.com/opencv/opencv/wiki/TensorFlow-Object-Detection-API
Original Link
what data set did you used for this project
hey I'm facing an error in thershold in video how could i solve it can you tell me?
Great video
Thank you brother finding for three days how the objects detection works but none of them explain me as you 🫡
I'm trying but the model not able to detect the objects?? Did it worked fine for you?????
@@ziaualhassain ya it worked for me
@@ziaualhassain at where are you getting error
@@vrishimeshram6323 In the video part I’m getting an error in this line
* ClassIndex, confidece, bbox=model.detect(frame,confThreshold=0.55) *
And also the object detection is not accurate for eg. when I’m placing a mobile in front of webcam it is identifying it as a scissor
@@ziaualhassain bro try creating new jupyter notebook mine also get error at declaring model , it getting error that it is failed but when i try new will worked on
Thank you so much, explained everything very well........... i have worked on my own video and its working very nicely.
how do i calculate the accuracy of prediction of our object detection.
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
Can u share the link of the frozen model
@@pudinanno bro can u shar link of the frozen model
font_scale=3
2 font=cv2.FONT_HERSHEY_PLAIN
----> 3 for ClassInd, conf, boxes in zip(ClassIndex.flatten(), confidece.flatten(), bbox):
4 cv2.rectangle(img,boxes(255,0,0),2)
5 cv2.putText(img,ClassLabels[ClassInd-1],(boxes[0]+10,boxes[1]+40),font,fontScale=font_scale,color=(0,255,0),thickness=3)
NameError: name 'confidece' is not defined
sir,iam getting name error.can you please tell how to solve this error.
thank you sir
you typed confidece in the zip loop you were meant to type confidence
@@CodeHacker278ok.. thank you sir
@@sushmanaik2228 your welcome
Sir, webcam is not displaying the names please reply sir
sir for video & webcam the code isn't working....... can you help?
12:11 where link to download ssd sir
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!!
'cv2.dnn.Net' object has no attribute 'setInputSize'.
can you help me?
So informative, thanks a lot!
if i use SSD-mobilenetv2 the above program does not work. Tell me where to read the commands for SSD-mobilenetv2
cv2.imshow('Object Detection Tutorial',frame) I got an error here. Does the quote name should be unique?
you have to run the whole code with the config files
I like your video.......
how to solve an error like this?
error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-i1s8y2i1\opencv\modules\imgproc\src
esize.cpp:4051: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
Did you solve the problem? I have the same problem too.
Thank you so much for your effort. Really helpful 👍🏽🙏🏼🙌🏽
Nice work bro
hey im unable to find "frozen_inference_graph.pb"
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
When there is dog in image it showing horse (showing next name). What should I do please tell me
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.
(-2:Unspecified error) Can't create layer "FeatureExtractor/MobilenetV3/Conv/BatchNorm/FusedBatchNormV3" of type "FusedBatchNormV3" in function 'cv::dnn::dnn4_v20190902::LayerData::getLayerInstance'
can you suggest why this error is occuring in the line : ClassIndex, confidece, bbox = model.detect(img,confThreshold=0.5)
Same problem
What do
@@omkarkharkar5998 my issue got resolved by installing opencv contrib
Sorry guys for being late in replying as you got your answer and thank you so much for support and time
@@dhakarpd4066 how to install it sir
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
quick question, what if the frame and classes doesnt show in my video/webcam? is there anything that i can do to fix that?
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
Excellent...!
its not working rn ....the github link given mobilenet 2020 v3
How to convert this notebook to a tflite format for raspberry pi?
In above code cv2.putText....thickness is not show properly in above video plz give me an explanation regarding that....
From where can I download the frozen_interface graph?
can you please share the whole code which you just implemented on screen using JN? I will be glad.
How to download the weights, the link provided is going to the code
thanku for the wonderful explaination
sir where can i find frozen interference graph pb
why can't I download MobileNet-SSD v3 (see #16760) ?
Where is the frozen Interface grap file
Yeah even me didn't find it
Having problem with dnn_DetectionModel in CV2, No such attribute error
sir how to change the data set and label in the same program
Greate video However i have a small issue the following error comes when i try to run the video demo please help
error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
Are you got any solution?
@@codewithpiyas8160 nooo
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
Sir, Do you help me. Actually I'm Forest Data-operator. Many capture images trapped camera for wild animals. Approx 15 lakhs. Folderwise automatically segregation and classify images. This method. Please tell me. How to work.
Hi please advise what software packages kneed to me installed before beginning this tutorial?
I keep getting a cv2 error when executing any commands
you need to download python , pylab, and matplotlib
@@adityatiwari2325 downloaded it, not getting another error
It's really helpful
hi, I have problem in the last step
cap =cv2.VedioCapture("vedio.mp4")
it gives me error "module 'cv2' has no attribute 'VedioCapture'
How did you import cv2..
You may import it as cv...
@@tjkarthik2 No i import as cv2. thanks for reply
If you are still facing the issue..
May be its because of your installation method...
If you install the pkg using "pip install opencv-python" try with "pip install opencv-contrib-python"
@@tjkarthik2 thanks problem is solved
When I execute this line on jupyter notebook :- model = cv2.dnn_DetectionModel(frozen_model,config_file)
I am getting the below error :-
returned a result with an error set
Please help me out!!
Bro u slove this problem
thank you sir it very helpful for me
How can you intergrate it to have a databasse of people??
help full👍👍
hi sir, do you have any paper for this project?
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
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?
very informative video and i learnt very much from this , if you could post more tutorials about deep learning and explainations will be helpful.
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?
bro, your code not gives an accurate result. In fact, I have tried many different videos, but unfortunately it can't pic the accurate results. In many videos, it is bird as a cat, butterfly as a dog.
Please solve this issue...
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!
I got an error for webcam one, any ideas?
HI sir how we can get this code and data sets
Thanks bro it work 👍🏻, (auto subscribe)
my error returned a result with an error set
what a absolute legend!
@@refrefwgwgwegew cap.set(3, width) and cap.set(4, height) whereas width and height is your preferred resolution
@@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)
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
@@heribertojuarez6046 Yes.. I make the animation of moving objects... Thank you very much..
hhi. do you have a full tutorial of a helmet detection?
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 :)
me too same Pb
feed the model with more data
Good job