Thanks very much for this tutorial it save me from failing my continuous Assessment. The expalnations were so clear and the codes were correct. Writing from Cameroon
I am getting the error. Attribute Error: 'tuple' object has no attribute 'flatten'" even though i have added the code as suggested. How to solve this error, please?
The "Frame per second" (FPS) is somehow limited by the OpenCV function because it's not using any gpu. And the best way to speed up the whole process is using a gpu under darknet, however, it's a bit out of the scope of my channel because it's more related to implementation instead of coding and programming.
Thanks for your comment. Maybe you could try different number in the VideoCapture() function. Sometimes, it doesn't necessary to be 0, especially when you have a few webcam available.
Execllent video demonstration. Can you pls make one video for custom object detection ? Example: Car number plates detection. May be with or without tensorflow.
great... it's working for me. But I have a question @eMaster Class Academy .... How to calculate accuracy??? please tell me tomorrow is my presentation I have to show the accuracy too.
Coco dataset has 80 classes. So can it be altered? Like add one label externally? Will that work? I want to detect drone as well in the given input video to the algorithm. Can anyone suggest.. How would it be possible
Thank you so much for this video. I keep getting this error: layerOutputs = net.forward(output_layers_names) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cv2.error: Unknown C++ exception from OpenCV code Do you have any solution for this?
i'm already stuck in the beginning with the darknet installation process. i cloned the git repository, typed in the cd command and then when i typed make, it says unrecognized command. what do i do now?
Thank you for the video sir! If I want to run the video detection program in pyqt5 UI then How can I display the video in Pyqt5 label? And also how can I show a counter of a particular object in the UI?
hello, i got an error like "AttributeError: 'tuple' object has no attribute 'flatten'" when i do it on video feed, can anyone help me for the fix? thanks.
Havent finished watching the video I'm only 4 min in. But tuples are hard to reshape compared to lists and ndarrays. You might want to do tupleyouhave = np.asarray(tupleyouhave).flatten or .ravel. but if you need to preserve a series of shapes (a sequence of matrices for example) you could use either the xarray library and convert to a DataArray object or make a list object holding each matrix. Indexing on the list is much harder than the DataArray though. Tuples are immutable so they aren't meant to be changed or reshaped. List is mutable and thus can be altered, flattened etc. I know I'm late but for anybody possibly having the same issue I hope I helped :)
Thanks for watching. I think it’s because there is no detection. So you need to add an “if statement” to tackle this issue. Please find the answer in the comment section. Hope it helps.
Thank you so much for the excellent explanation. I just have one problem if I only want to detect a certain objet ( vehicles for example) how should I modify the code ?
Thank you for the video. But I need the help as inspite of following the full video still my code is not showing the output.It is not showing any error as well. But just showing the same image without detection. Please suggest me what should I do.
Hey there, I was able to detect the object from a video file and was also able to get the confidence level, but could not identify the object by name. Can you please help me with the same. Thanks!!!!
Hi, I am getting the error "for i in indexes.flatten(): AttributeError: 'tuple' object has no attribute 'flatten'" even though i have added the code as suggested. if len(indexes)>0: for i in indexes.flatten(): x, y, w, h = boxes[i] label = str(classes[class_ids[i]]) confidence = str(round(confidence[i],2)) colour = colors[i] cv2.rectangle(img,(x,y), (x+w, y+h), color, 2) cv2.putText(img, label + " " + confidence, (x, y+20), font, 2, (255,255,255), 2)
hi, first of all thank you so much for this video tutorial. I want to know, can this code apply to raspberry pi board and add measurement distancing system? Thank you.
Hello Sir I want to add one feature in this project In case screen will empty NO Object are in the screen. So it will display "NO OBJECT DETECTED" How we add this feature I try some if statement code but it was not succes Please help me to add this feature Please provide code
Hello Thanks for sharing to this video us ☺️ I want to ask someting before apply this.Can this application recognize stone rocks ? if its possible i want to apply ☺️
at 22:48 if you check you have used class_id instead of clss_ids but it did nt affect your response... may I know how you managed the same. Mine is showing " NameError: name 'class_id' is not defined "
Thanks for watching the video. That's a typo. And I manage to correct it at 26:35, please proceed to the time and check this out, ua-cam.com/video/1LCb1PVqzeY/v-deo.html,
Hi. I have some error when running the code. " DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use `array.size > 0` to check that an array is not empty. if confidence > 0.5: " . and not detect any object , just show the image only. Pls someone can help me....
I want to build a model that detects sheds from google maps I already built a yolo model wich detects sheds but problem I am facing is with capturing the screen and feeding it as input to my model any idea or suggestions???
hello if i want only to detect 3 of the objects that already pretrained i mean existing in the list but only those objects what you recommend that I do(not customized already pretrained but only I need those objects I don't need the others)
Thank you for this tutorial. I've learned a lot from this video. I want to implement deep SORT with it. If you've any tutorial or information regarding this, please let me know. I wish you good luck!
Thanks for watching. This is because the setup is only using CPU. Please check this video. ua-cam.com/video/zi-62z-3c4U/v-deo.html This video shows you how to implement yolo in tensorflow to speed up the FPS with GPU.
it did not work, but thanks for video. i tried to do it step by step, still not working, tried to download the source code from your github and i loaded a video of traffic. there is no boxes drawed. i dont know but there is something wrong could not configure it.
Thank you sir! I have a question: I wonder how it is possible if I want to detect objects in videos in a web browser or a mobile phone screen, without downloading the video? For example, if I want to detect objects in an Instagram video, without downloading it, how can I achieve it? Is it possible? BTW, are you from Hong Kong? lol
You can set your code like this cap = cv2.Videocapture(0) as a webcam and then show your image or video from your phone to webcam then it will work, ı've tried.
Thank you for your amazing video Actually, I am looking for a good object detection algorithm for my autonomoud driving project. Do you think that this YOLO algorithm will be suitable for self-driving cars project? Thank you very much
Hi, may I know how to use the external ps3 USB camera for detection instead of using the webcam from the laptop. cap = cv2.VideoCapture(0) this is for webcam however, I want to use the external USB camera, can I know what should I put inside the bracket. I have tried this, but couldn't work out as it said no attribute shape. AttributeError: 'NoneType' object has no attribute 'shape'
hi Iheb, thanks for watching the video. It probably would not improve the detection of custom object if you include "negative" photos. I would rather prefer to have more "positive" photos.
when i add net = cv2.dnn.readNet('yolov3.weights', 'yolov3.cfg') i got this error Traceback (most recent call last): File "", line 1, in AttributeError: module 'cv2' has no attribute 'dnn' i dont know what is wrong . plz help me someone
Can't parse 'scores'. Input argument doesn't provide sequence protocol can anyone help me with this? thanks alot code: indexes = cv2.dnn.NMSBoxes(boxes, confidences, 0.5, 0.4)
@@eMasterClassAcademy These are just the labels? I wanted to use the images and the labels for my own object detection task. I'm a beginner and I would really appreciate if you can show me how to download, run or open coco dataset using visual studio or any other IDE.
Bro, it's not working for both video and live camera bro. I'm using yolov3.tiny.weight... whenever I try it's says tuple has no attribute flatten()... But when I try this for image I saw the type as np.array... how come the type gets changed when we try in video... Please reply ASAP 🙏🙏😭😭😭😭
Didn't work with video until i added "if len(indexes)>0:" before "for i in indexes.flatten():".
Thanks a lot. This is a very good point to cater the null issue. I didn't realize it. Hope you don't mind if I pin your comment.
@@eMasterClassAcademy I don't mind, thanks for the video.
Thankx E K. Especially for Yoyov3-tiny
@@rightOrWrongMyContry did you got this Object detection by this video..
no rectangular boxes shown anytime video is used any help
Thanks very much for this tutorial it save me from failing my continuous Assessment. The expalnations were so clear and the codes were correct. Writing from Cameroon
Hi do you still have this source code ? I also need it there is something I want to check on it.
Great job brother.Thanks a lot
It helped me for making my first project ❤❤🎉
Thanks, glad it helps.
Thank you Master class academy for the video, it really helps my Final Project... will be waiting for another tutorial
opening background score was op...:)
It worked for me, Thanks for your content. Appreciate your efforts.
Thank you for this tutorial, this was exactly what I was looking for. Helped me a ton! :D
Thank you so much. Your explanation is very details. Help me a lot. Recommended Channel !!!
I am getting the error.
Attribute Error: 'tuple' object has no attribute 'flatten'" even though i have added the code as suggested. How to solve this error, please?
Very nice! Works really well, thank you.
Great video , many thanks !
Glad you liked it!
Thank you at all great work, Keep continuing, appreciate you.
Thanks a lot of this video because it help me a lot with the project in my college
in video how can we extract more frames? like smooth video
This is my first practical tutorial in computer vision and i enjoyed very much thank you
The "Frame per second" (FPS) is somehow limited by the OpenCV function because it's not using any gpu. And the best way to speed up the whole process is using a gpu under darknet, however, it's a bit out of the scope of my channel because it's more related to implementation instead of coding and programming.
Great video, great explaniation just perfect.
Glad it helped!
pls paste the code here
'cv2.dnn_Net' object has no attribute 'getUnconnectedOutLayersNames'
how to solve this?
thank you soo much sir very good explaination love to seee whole implementation very nicely explained
What an amazing video....very descriptive and useful
cant seem to make it work with the webcam though
Thanks for your comment. Maybe you could try different number in the VideoCapture() function. Sometimes, it doesn't necessary to be 0, especially when you have a few webcam available.
works perfectly thank you so much!!!
Great Work Sir
Execllent video demonstration. Can you pls make one video for custom object detection ? Example: Car number plates detection. May be with or without tensorflow.
Appreciate with your great comment. Please check this out.
ua-cam.com/video/DLngCtsG3bk/v-deo.html
great... it's working for me.
But I have a question @eMaster Class Academy .... How to calculate accuracy??? please tell me tomorrow is my presentation I have to show the accuracy too.
OMG THANK YOU SOO MUCHHHH!!!
Thank you very much Your video helped me very much in my work.
Hey bro can you please share this code with me ?
Thanks for another great video!
Glad you like them!
Coco dataset has 80 classes. So can it be altered? Like add one label externally? Will that work? I want to detect drone as well in the given input video to the algorithm. Can anyone suggest.. How would it be possible
Question: How would one go about evaluating detections using IoU?
I got a error 'for i in indexes.flatten():
AttributeError: ' tuple' object has no attribute ' flatten'
Can say why this error
Please add "if len(indexes)>0:" before "for i in indexes.flatten():"
This is to avoid flattening a null value, due to nothing being detected.
Thank you for creating this nice video!
My pleasure!
Excellent tutorial. Also easy to follow. Only one question. How to play the video without dropping frames in real time??
excusme sir do u solve it? i need it help
Beautiful lecture but i had problem but through stack , i found solution ( if len(indexes) > 0:)
thanks
Thank you Benya. You are absolutely correct. That would cater the problem that an image doesn’t have any detections.
@@eMasterClassAcademy Thanks 🙏
Thanks, it helped me a lot.
Thank you so much for this video. I keep getting this error: layerOutputs = net.forward(output_layers_names)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cv2.error: Unknown C++ exception from OpenCV code
Do you have any solution for this?
i'm already stuck in the beginning with the darknet installation process. i cloned the git repository, typed in the cd command and then when i typed make, it says unrecognized command. what do i do now?
Good explanation
Hello, I am working on colab and it restricts the use of cv2.imshow. How to see the output img_blob in colab.? Kindly help me with that.
Thank you for the video sir! If I want to run the video detection program in pyqt5 UI then How can I display the video in Pyqt5 label?
And also how can I show a counter of a particular object in the UI?
hlo bro,this code is not working on videos is not working
hello, i got an error like "AttributeError: 'tuple' object has no attribute 'flatten'" when i do it on video feed, can anyone help me for the fix? thanks.
Even I got that same error sir!
Havent finished watching the video I'm only 4 min in. But tuples are hard to reshape compared to lists and ndarrays. You might want to do tupleyouhave = np.asarray(tupleyouhave).flatten or .ravel. but if you need to preserve a series of shapes (a sequence of matrices for example) you could use either the xarray library and convert to a DataArray object or make a list object holding each matrix. Indexing on the list is much harder than the DataArray though. Tuples are immutable so they aren't meant to be changed or reshaped. List is mutable and thus can be altered, flattened etc.
I know I'm late but for anybody possibly having the same issue I hope I helped :)
@@easwarraja8671 and Christian
Great videos. I have question. label = str(classes[class_ids[i]])
IndexError: list index out of range. help please
Thanks for watching. I think it’s because there is no detection. So you need to add an “if statement” to tackle this issue.
Please find the answer in the comment section.
Hope it helps.
hello sir, please specify name of dataset you have used for those 80 classes
Thank you so much for the excellent explanation. I just have one problem if I only want to detect a certain objet ( vehicles for example) how should I modify the code ?
I have the same doubt.
Can't we do this for all the images in openimages dataset...then it will be more efficient to detect all the objects na?...please clarify
Please make a video on how to train yolov3 on custom dataset in windows
Thanks for your comment. Please find details here - ua-cam.com/video/DLngCtsG3bk/v-deo.html
if confidence > 0.5: TypeError: '>' not supported between instances of 'list' and 'float'
please give me solution
I tried all possible ways for Webcam but still getting error for the shape line .Wat should i do for the webcam?
Thank you for the video. But I need the help as inspite of following the full video still my code is not showing the output.It is not showing any error as well. But just showing the same image without detection. Please suggest me what should I do.
live video capture detection is not working, the web cam light gets on but nothing is being displayed
Hey there, I was able to detect the object from a video file and was also able to get the confidence level, but could not identify the object by name. Can you please help me with the same. Thanks!!!!
Hey please help i just followed you and detection is ok its detecting the objects in image but showing rectangles at wrong positions
I am getting error at video file at....
color = colors[i]
It shows IndexError:index 2949 is out of bounds for axis 0 with size 100
Help 🙏
Thanks for the nice video, learned a lot.....
THANKYOU SO MUCH
AttributeError: 'tuple' object has no attribute 'flatten'
in the line " for i in indexes.flatten(): "
How do i resolve this error?
yeah i got the same problem :/
any solution?
@@mrlevo27 add "if len(indexes)>0:" before "for i in indexes.flatten():".
Hi, I am getting the error "for i in indexes.flatten():
AttributeError: 'tuple' object has no attribute 'flatten'" even though i have added the code as suggested.
if len(indexes)>0:
for i in indexes.flatten():
x, y, w, h = boxes[i]
label = str(classes[class_ids[i]])
confidence = str(round(confidence[i],2))
colour = colors[i]
cv2.rectangle(img,(x,y), (x+w, y+h), color, 2)
cv2.putText(img, label + " " + confidence, (x, y+20), font, 2, (255,255,255), 2)
error ilength of index should not eqal to 0
hi there.. how we can test the performance like accuracy and execution time of this model
Why real time object detection vedio is not displayed full screen of laptop instead it displaying in small window in screen?
hi, first of all thank you so much for this video tutorial. I want to know, can this code apply to raspberry pi board and add measurement distancing system? Thank you.
cannot keep the "color = ......" line out of the while loop the variable does not exist
Can you please make video on real time plant disease and pest detection. This will be a very good project.
Hello Sir
I want to add one feature in this project
In case screen will empty NO Object are in the screen. So it will display "NO OBJECT DETECTED"
How we add this feature
I try some if statement code but it was not succes
Please help me to add this feature
Please provide code
Hello Thanks for sharing to this video us ☺️ I want to ask someting before apply this.Can this application recognize stone rocks ? if its possible i want to apply ☺️
at 22:48 if you check you have used class_id instead of clss_ids but it did nt affect your response... may I know how you managed the same. Mine is showing " NameError: name 'class_id' is not defined "
Thanks for watching the video. That's a typo.
And I manage to correct it at 26:35, please proceed to the time and check this out, ua-cam.com/video/1LCb1PVqzeY/v-deo.html,
Hi. I have some error when running the code. " DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use `array.size > 0` to check that an array is not empty.
if confidence > 0.5: " . and not detect any object , just show the image only. Pls someone can help me....
I want to build a model that detects sheds from google maps I already built a yolo model wich detects sheds but problem I am facing is with capturing the screen and feeding it as input to my model any idea or suggestions???
TypeError Traceback (most recent call last)
in
28 scores = detection[5:]
29 class_id = np.argmax(scores)
---> 30 confidences = scores(class_id)
31
32 if confidence > 0.5:
TypeError: 'numpy.ndarray' object is not callable
Why show this error?
I haave the same problem, does any one know how to fix this?
hello if i want only to detect 3 of the objects that already pretrained i mean existing in the list but only those objects what you recommend that I do(not customized already pretrained but only I need those objects I don't need the others)
how can i use this code file with android studio
can anyone help me it is unable to detect my path
Thank you
Thank you for this tutorial. I've learned a lot from this video. I want to implement deep SORT with it. If you've any tutorial or information regarding this, please let me know. I wish you good luck!
This is a great suggestion, that's much more practical.
just curious, is it very slow when using webcam??
Thanks for watching. This is because the setup is only using CPU.
Please check this video. ua-cam.com/video/zi-62z-3c4U/v-deo.html
This video shows you how to implement yolo in tensorflow to speed up the FPS with GPU.
@@eMasterClassAcademy this is great thanks. Tensorflow uses gpu right
it did not work, but thanks for video. i tried to do it step by step, still not working, tried to download the source code from your github and i loaded a video of traffic. there is no boxes drawed. i dont know but there is something wrong could not configure it.
my confidence scores are very very low --they don't even exceed 0.1 , I have tried with many images but still facing the same issue.
but when we try with hp default cam. Cam will be freeze and automatically quit after some time .please help me to overcome with this problem.
i've seen that the FPS for videocapture quite slow, so how can we optimize it?
Thank you sir!
I have a question: I wonder how it is possible if I want to detect objects in videos in a web browser or a mobile phone screen, without downloading the video?
For example, if I want to detect objects in an Instagram video, without downloading it, how can I achieve it? Is it possible?
BTW, are you from Hong Kong? lol
You can set your code like this cap = cv2.Videocapture(0) as a webcam and then show your image or video from your phone to webcam then it will work, ı've tried.
@@humoruniverse6399 great logic
Thank you for your amazing video
Actually, I am looking for a good object detection algorithm for my autonomoud driving project.
Do you think that this YOLO algorithm will be suitable for self-driving cars project?
Thank you very much
hey did you figure out which model was best for your project?
@@shivaninayak7136 Maybe CNN
how about you sir?
which algorithm is the best for you when it comes to automated cars or even robotic projects?
I have implemented same code but getting all output labels are 0 except first 5? why?
were you able to figure it out? Just followed the code today and thats what im getting as well
How can we integrate the result to frontend reactjs to display?
Can i modify Yolov3 codes to light LED after detection is done?
Is it possible to built an interface to display the content ?
hello im getting an error that numpy.int64' object has no attribute 'append' pls help
Hi, may I know how to use the external ps3 USB camera for detection instead of using the webcam from the laptop.
cap = cv2.VideoCapture(0) this is for webcam
however, I want to use the external USB camera, can I know what should I put inside the bracket.
I have tried this, but couldn't work out as it said no attribute shape.
AttributeError: 'NoneType' object has no attribute 'shape'
cv2.VideoCapture(2)
Hello i want ask a question, can i change the object and just want to detect fruit like an Apple,Orange etc?
I was thinking the custom object training and detection might help you. ua-cam.com/video/DLngCtsG3bk/v-deo.html
Hello, does including negative photos to my dataset improve the detection of custom object?
hi Iheb, thanks for watching the video. It probably would not improve the detection of custom object if you include "negative" photos. I would rather prefer to have more "positive" photos.
Nice tutorial!
Thanks!
when i add net = cv2.dnn.readNet('yolov3.weights', 'yolov3.cfg') i got this error
Traceback (most recent call last):
File "", line 1, in
AttributeError: module 'cv2' has no attribute 'dnn'
i dont know what is wrong . plz help me someone
Anyway to contact you regarding a facial recog system:?
i'll try this code tomorrow ! I hope it will work. Need Prayers.
How can I increase the fps . I added a video and run ,it runs very slow manner. How can I eliminate the slowness, Please help....
what platform do you use to run python?that appears like gui
Can't parse 'scores'. Input argument doesn't provide sequence protocol
can anyone help me with this? thanks alot
code:
indexes = cv2.dnn.NMSBoxes(boxes, confidences, 0.5, 0.4)
Help please! the training process stop here
"608 x 608
Create 6 permanent cpu-threads "
Great video. Can you also explain how to download the coco dataset for using in this?
github.com/pjreddie/darknet/blob/master/data/coco.names
Go to the above link, right click the raw and choose save link as
Hope it helps.
@@eMasterClassAcademy These are just the labels? I wanted to use the images and the labels for my own object detection task. I'm a beginner and I would really appreciate if you can show me how to download, run or open coco dataset using visual studio or any other IDE.
Sir can you provide the deployment video for yolo v3 in docker
I need to detect the vehicles type and number plate's number ? Can you help me please ??
I need to detect triple rider on a motorbike along with no helmet detection. Can you help?
Please check out my video in how to implement custom object detection. It definitely can solve your problem. ua-cam.com/video/DLngCtsG3bk/v-deo.html
I want to ask how can it be implemented in tensorflow?
Bro, it's not working for both video and live camera bro. I'm using yolov3.tiny.weight... whenever I try it's says tuple has no attribute flatten()... But when I try this for image I saw the type as np.array... how come the type gets changed when we try in video... Please reply ASAP 🙏🙏😭😭😭😭
Please add this "if len(indexes)>0:" before "for i in indexes.flatten():".
This is to handle the "no attribute flatten()".
Hope it helps.