good job man. keep up the good work because im sure it'll pay off in the long run. its rare to find talanted teachers and you are definitely one. simply well done
@@akankshachoudante2489 if you are on python3 then you might also want to try pip3 install opencv-python. Or the recommended way is to create a virtual env and do everything inside it
Hello, I have a question to ask, I did the exact same thing as you in the video but the program didn't work and it announced an error while running the color saying "error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor' " how do I fix it ? and thanks in advance for your help.
So I have been getting this error OpenCV(4.1.2) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor' any idea?
Traceback (most recent call last): File "C:/face recognition/detectfacevideo.py", line 19, in faces = face_cascade.detectMultiScale(gray, 1.1, 4) cv2.error: OpenCV(4.5.2) C:\Users unneradmin\AppData\Local\Temp\pip-req-build-vi271kac\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale' iam having this error how can i solve it..
Facing problems-----------> line 13, in faces = faceCascade.detectMultiScale(gray, 2, 4) cv2.error: OpenCV(4.5.1) /tmp/pip-req-build-jr1ur_cf/opencv/modules/objdetect/src/cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function '
@@mohammedfahadfaisal4418 i got it actually do again from beginning in calmly , i did mistakes line ,if you copy the code and source code and check it by side to side you will solutions
Gracias por tu video. Octubre de 2024 y funciona perfecto. (Si necesitan activar la camara web externa solo deben modificar esto "cap = cv2.VideoCapture(1)")
Sentdex has made an amazing video on making your own classifier using haar cascasde - ua-cam.com/video/jG3bu0tjFbk/v-deo.html Another option for object detection would be to build a deep learning model using keras. You can also use something called "transfer learning", to retrain existing classification models to classify the objects you want to
Hi I'm getting this error: C:\Users\pc\AppData\Local\Programs\Python\Python38-32\python.exe: can't open file 'test2.py': [Errno 2] No such file or directory I'm try to solve but I can't solve it, can you help me ? @Adarsh Menon
you may not reply for the error i think , you only reply for the person who appreciate you you may try to clear the errrors of your subscribers also it may gives you a real happiness and thats the true appretiation
hey help plz getting errors like Module 'cv2' has no 'CascadeClassifier' member..,Module 'cv2' has no 'VideoCapture' member,..Module 'cv2' has no 'cvtColor' member...,Module 'cv2' has no 'COLOR_BGR2GRAY' member...,Module 'cv2' has no 'rectangle' member....,Module 'cv2' has no 'waitKey' member
In the video at 1:30, line number 5 simply change the path of your file. For example if your file is C:/pictures/test.jpg, you can change that line to cv2.imread('C:/pictures/test.jpg')
hey...i need your help please reply.. can you tell me how can i detect the face of dog and cat and their emotions ...in python..please let me know if you know anything about it ..please help!
I'm getting this error please help face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') AttributeError: module 'cv2' has no attribute 'CascadeClassifier'
Maybe your haar cascade file did not load properly. Check if you donwloaded it in the same directory as your code. Maybe this will help - answers.opencv.org/question/52340/opencv-error-assertion-failed-empty-in-detectmultiscale/
@@AdarshMenon Thank you for replying brother! Actually the problem was w/ the version of OpenCV. It wasn't compatible with the python version installed on my PC
You need to use a command prompt on windows (or terminal) to run this. You need to install python first of all to do that, and the library open-cv for this to work. Please search for 'how to install python on windows/whatever OS you have'
inside the while loop you could add a delay of say 100ms. Then you can keep a counter to count the number of times it ran (or maybe use a for loop). So now when this counter reaches 100 then you know that 10 seconds have passed
it is the same code you use with pictures, just put it inside the loop of the video. Videos are made up of frames which are images, all functions applied to images can be applied to videos as well
Hello sir I am getting this error: error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor' Please tell me how to resolve it
sir thank your for this video. i tried this. but i have a error.how can i fix it? Traceback (most recent call last): File "C:\Users\amali\Desktop\Face_Detection\test1.py", line 13, in faces = face_casCade.detectMultiScale(gray, 1.3, 5) NameError: name 'face_casCade' is not defined
looks like the variable is not defined, python is case sensitive. I think it should be face_cascade if you have used my code. Or else make sure the cascade file is in the same folder where the code is
Hi... im working with upperbody detection, this is not working with the detection of upper-body. can u plz help me out to get a frame over the upperbody recognition
OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor' how can i resolve this error
Maybe your haar cascade file did not load properly. Check if you donwloaded it in the same directory as your code. Maybe this will help - answers.opencv.org/question/52340/opencv-error-assertion-failed-empty-in-detectmultiscale/
you can definitely do it with 2 or even 3 i guess, but 10 might be a bit too much on your computer, unless you have a really powerful machine. In the line cv2.VideCapture(cam_no) - for each camera you need to write this like, where cam_no = 0, 1, 2.. no, of cameras. ref - stackoverflow.com/questions/29664399/capturing-video-from-two-cameras-in-opencv-at-once
Maybe your haar cascade file did not load properly. Check if you donwloaded it in the same directory as your code. Maybe this will help - answers.opencv.org/question/52340/opencv-error-assertion-failed-empty-in-detectmultiscale/
Hi brother ... You really explained awesome ... Thanks for sharing your knowledge brother How could I modify the code for the recognition of twins ??? ....
Maybe your haar cascade file did not load properly. Check if you donwloaded it in the same directory as your code. And no, the code automatically opens the webcam Maybe this will help - answers.opencv.org/question/52340/opencv-error-assertion-failed-empty-in-detectmultiscale/
while others are struggling to explain opencv. you did it in a simple way. In just 2 min
GREAT vlog
this is not 2 min...
actually he skip it for a seconds without skipping the countdown in the screen
This is not a vlog. If you don’t know, don’t use it
i really have to say ...nice work man ...u deserve to be recognised not just be these cascades but also by real people all around this ML community...
Thank you so much 😀
@@AdarshMenon which terminal have u used
You gotta be kidding me..
The error I've been trying to fix got fixed in 2 seconds just cuz of you 🔥
Thanks buddy!
This helped me a lot done with my project just in 15 mins😊 ,.... U r fabulous bro...
u earned my like with 2 min stopper clock
Great Video, everyone else makes hour-long videos and explains basically the same stuff, here I learned all what is important in 6min. Good job!
@Maryam Ashraf i can
@@mufeezazam4763 i want it.. Please if u can
good job man. keep up the good work because im sure it'll pay off in the long run. its rare to find talanted teachers and you are definitely one. simply well done
Thank you!!! I tried to do this for more than a month...
You explained very well!
Bro explained very well. Just carry on !!!!
Watched every commercial videos but got the thing in DESI ONE
Best one I have come across on UA-cam. Works without any error SO INSTANTLY.
Keep more coming!
Thanks, will do!
Finally, a good video. Thank you!
Glad you liked it!
I have some error with this --> 'cv2.CascadeClassifier' object has no attribute 'detectMultiScal'. Could you tell how to fix it ????
by far the best explanation
Please help me sir..it is showing error no Module named cv2
make sure you have installed opencv - run pip install opencv-python
@@AdarshMenon sir I have followed all the steps.already installed openCV n I have saved raw file as well .but this error is coming
@@akankshachoudante2489 if you are on python3 then you might also want to try pip3 install opencv-python. Or the recommended way is to create a virtual env and do everything inside it
@@AdarshMenon ok thank you Sir I will try ...
u are a king man thanks from turkey
This is great video, I knew the basics off all the commands, your video helped me put all my knowledge to a functional detector. Thank you
Plz tell me which terminal is used in this video?
@@alizekhan2745 It's Linux terminal :-)
Can u pls upload about human activity recognition
Wow simply amazing, hats off to you😍
This was really insightful keep on going
Hello, I have a question to ask, I did the exact same thing as you in the video but the program didn't work and it announced an error while running the color saying "error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor' " how do I fix it ? and thanks in advance for your help.
try again but make sure you webcam wasnt use that time
Same error can anyone help me with this one!
thank you , this was my first face detection project , awesome explanation
So I have been getting this error OpenCV(4.1.2) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor' any idea?
Good work Adarsh..Saved a lot of time!!
Glad to hear that !
hi Ardas, thanks for your Lesson. god bless you ..Rusbi from Indonesia
Traceback (most recent call last):
File "C:/face recognition/detectfacevideo.py", line 19, in
faces = face_cascade.detectMultiScale(gray, 1.1, 4)
cv2.error: OpenCV(4.5.2) C:\Users
unneradmin\AppData\Local\Temp\pip-req-build-vi271kac\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale' iam having this error how can i solve it..
try again but make sure you webcam wasnt use that time
work for me
This was hella easy to follow, thank you!
amazing buddy its really help me my mca projects thanks a lot buddy.
Facing problems----------->
line 13, in
faces = faceCascade.detectMultiScale(gray, 2, 4)
cv2.error: OpenCV(4.5.1) /tmp/pip-req-build-jr1ur_cf/opencv/modules/objdetect/src/cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function '
same here also
@@kriptonkripsi9002 did you found any solution for it?
@@mohammedfahadfaisal4418 i got it actually do again from beginning in calmly , i did mistakes line ,if you copy the code and source code and check it by side to side you will solutions
@@kriptonkripsi9002 okay .
Gracias por tu video. Octubre de 2024 y funciona perfecto. (Si necesitan activar la camara web externa solo deben modificar esto "cap = cv2.VideoCapture(1)")
Helped A lot. Thanks for a detailed tutorial!
If we want to recognize faces with names then what we can do ?
Means it can able to detect face. Then what ?
This is only to detect faces. To recognize them - ua-cam.com/video/987QtKPZ-P0/v-deo.html
@@AdarshMenon I watched that video but I am saying that if a moving person comes infront of camera. Then how we can do that in real time??
the face recognition library can help you do that - github.com/ageitgey/face_recognition
Hey, I have one question to ask. How can I make my own classifier instead of using pre-built haar cascade files?
Sentdex has made an amazing video on making your own classifier using haar cascasde - ua-cam.com/video/jG3bu0tjFbk/v-deo.html
Another option for object detection would be to build a deep learning model using keras. You can also use something called "transfer learning", to retrain existing classification models to classify the objects you want to
Everything is Awesome.... Tnq bro
Hi
I'm getting this error:
C:\Users\pc\AppData\Local\Programs\Python\Python38-32\python.exe: can't open file 'test2.py': [Errno 2] No such file or directory
I'm try to solve but I can't solve it, can you help me ? @Adarsh Menon
you need to be inside the directory where you saved your file 'test2.py'. Use chdir command in windows terminal to change directory
@@AdarshMenon Thanks but ı already solved, thx for help
you may not reply for the error i think , you only reply for the person who appreciate you
you may try to clear the errrors of your subscribers also it may gives you a real happiness and thats the true appretiation
thank you so much. it totally worked. Keep up the good work.
thanks man, beneficial video for beginners
Very well explained. ..found it easiest tutorial
Glad you liked it!
thanks my man you save my life
Happy to help!
Very useful Adarsh. Thank you.
Glad it was helpful!
Hi Adarsh,
You made Face Recognition look so simple . Felt like I can learn FR hands down. . I have subscribed to your channel.
Thanks form KM
Thanks, it works so easy in just 5 minutes,
Glad it helped
It works properly. Thank you.
Glad to hear that!
hey help plz getting errors like
Module 'cv2' has no 'CascadeClassifier' member..,Module 'cv2' has no 'VideoCapture' member,..Module 'cv2' has no 'cvtColor' member...,Module 'cv2' has no 'COLOR_BGR2GRAY' member...,Module 'cv2' has no 'rectangle' member....,Module 'cv2' has no 'waitKey' member
Please install cv2 first
Pip install opencv-python
Thanks bro, just thanks, now i really get this
What if we need to detect a photo which is in a particular drive
In the video at 1:30, line number 5 simply change the path of your file. For example if your file is C:/pictures/test.jpg, you can change that line to cv2.imread('C:/pictures/test.jpg')
@@AdarshMenon thank you for replying
@@AdarshMenon I have a doubt could you pls help me out...how can I reach you!!pls a small help
adarsh1021@gmail.com
@@AdarshMenon I mailed!!pls checkout
Can u please make video like detecting the presence of human and with respect to open or close the relay
installing error 1 while doing pip install opencv-python
please guide for opencv installation
please post your exact error
Hi I did: pip3 install opencv-python but I get an error with pycharm regarding open cv2 : ModuleNotFoundError: No module named 'cv2' How to fix it?
Maybe you are on another version of python ? if you are using pip3, then make sure you call the script with python3
Oh man you just save my day. Thank u
Glad to hear it!
yep mee too
Good job. Your code is still working.
Thank you very much for this , helped a lot !!!
That's Very Nice 👍👍.............
You have any report of this project which gives details information about this project.
Thankyou so much vdo helped a lot🙌❤️
hey...i need your help please reply..
can you tell me how can i detect the face of dog and cat and their emotions ...in python..please let me know if you know anything about it ..please help!
thank you very much. very educational and helpful tutorial.
You deserve more Likes!
Good bro Also made video on face MASK detection.
Thanks
how can we display the name along with the rectangle box around the face
there is a method cv2.putText to write text on the image - you can also check my face recognition video, where I did that
Awesome video! Keep going 👍
Thanks man!
I'm getting this error please help
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
AttributeError: module 'cv2' has no attribute 'CascadeClassifier'
Maybe your haar cascade file did not load properly. Check if you donwloaded it in the same directory as your code.
Maybe this will help - answers.opencv.org/question/52340/opencv-error-assertion-failed-empty-in-detectmultiscale/
@@AdarshMenon Thank you for replying brother! Actually the problem was w/ the version of OpenCV. It wasn't compatible with the python version installed on my PC
can i ask how do i run it? i've done the code but how do i get the camera to pop up with that code?
You need to use a command prompt on windows (or terminal) to run this. You need to install python first of all to do that, and the library open-cv for this to work. Please search for 'how to install python on windows/whatever OS you have'
@@AdarshMenon hello, im doing your code for almost 5 hours can u help me? it says "python: can't open file (filename)" No such file or directory.
@@AdarshMenon i already have the python
same problem. i already installed python and opencv
Can we add some time limit for the camera so that the camera turns off automatically and we don't have to press the ESC button ???
inside the while loop you could add a delay of say 100ms. Then you can keep a counter to count the number of times it ran (or maybe use a for loop). So now when this counter reaches 100 then you know that 10 seconds have passed
How to show people names with rectangle? I know to do with pictures, but donno with videos
it is the same code you use with pictures, just put it inside the loop of the video. Videos are made up of frames which are images, all functions applied to images can be applied to videos as well
@@AdarshMenon Don't know how to do that. Can you write simple example here in comment?
www.geeksforgeeks.org/python-opencv-write-text-on-video/#:~:text=cv2.,also%20it's%20color%20and%20thickness.
@@AdarshMenon There is no code I need, so you don't know how to do ir or?
Hello sir I am getting this error:
error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
Please tell me how to resolve it
Same error sir can you help me if you know how to resolve it
Please help me same error
sir thank your for this video. i tried this. but i have a error.how can i fix it?
Traceback (most recent call last):
File "C:\Users\amali\Desktop\Face_Detection\test1.py", line 13, in
faces = face_casCade.detectMultiScale(gray, 1.3, 5)
NameError: name 'face_casCade' is not defined
looks like the variable is not defined, python is case sensitive. I think it should be face_cascade if you have used my code. Or else make sure the cascade file is in the same folder where the code is
its small to get started on and its good
Thank u so much..😍
U saved me today😅
How to detect two or more faces coming towards camera. Thankyou for your video
Nice video, because :
-Indian tutorial
-Cursed audio
-Machine backsound
Hi... im working with upperbody detection, this is not working with the detection of upper-body. can u plz help me out to get a frame over the upperbody recognition
OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
how can i resolve this error
Maybe your haar cascade file did not load properly. Check if you donwloaded it in the same directory as your code.
Maybe this will help - answers.opencv.org/question/52340/opencv-error-assertion-failed-empty-in-detectmultiscale/
Thank You So Much !!
Very Brilliant !!
Cool tutorial bro
thank u very much bro its really nice working
Welcome 👍
Sir I Make Same Project
But it can't run
what is the problem ?
Raspi 4 camera use to face detection so slow & little bit dark. How to improve camera quality?
In web cam capture it is not showing rectangle on more than 1 face what should i do
This will help you stackoverflow.com/questions/33546356/how-to-detect-multiple-faces-in-opencv
Can I use this as a final year project?? Will you provide any help??
Liked and subscribed.
One question.
I want to this with 10 diff ip cams not just one laptop camera. Pls tell how to do
you can definitely do it with 2 or even 3 i guess, but 10 might be a bit too much on your computer, unless you have a really powerful machine. In the line cv2.VideCapture(cam_no) - for each camera you need to write this like, where cam_no = 0, 1, 2.. no, of cameras. ref - stackoverflow.com/questions/29664399/capturing-video-from-two-cameras-in-opencv-at-once
Really loved you way of explaining stuff, could you tell where can I find internship to actually apply what I've learnt :)
Sir please help me 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
Hi Adarsh...good video...my all commands executed well but am unable to see the image with square boxes...please tell me where to find it.
cv2.rectangle is used to draw the boxes. Make sure that you are displaying the same variable that you are passing to cv2.rectangle to draw the boxes
hello, there is a problem in line 19
Great job man.
i wrote the exact code but i there is not rectangle formation for the detection of faces
Hello. For detecting faces from images and detecting images from webcam do we need to build two different models
i keep getting an error:
Traceback (most recent call last):
File "d:/camera test/detect_body_video.py", line 19, in
faces = face_cascade.detectMultiScale(gray, 1.1, 4)
cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-zsozjuva\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale'
whats going on???
Maybe your haar cascade file did not load properly. Check if you donwloaded it in the same directory as your code.
Maybe this will help - answers.opencv.org/question/52340/opencv-error-assertion-failed-empty-in-detectmultiscale/
Good one..
In what software do you code this
can you explain the last commad you put in the terminal?
pleeeeees
Thanks for making this video not complex
how did u use face recognization module without having it to train ??? arent we suppose to upload example of face and no face pic and make him learn?
can u explain this part
cv2.waitKey(30) & 0xff
Hi! Can I use this program with Raspberry Pi ? Thanks
How can the image be enlarged so both neck and head could be visible?
Hi brother ... You really explained awesome ... Thanks for sharing your knowledge brother How could I modify the code for the recognition of twins ??? ....
Awesome bro 💥💥💥
I got assertion failed error!!!we have to run the code and then open webcam?
Maybe your haar cascade file did not load properly. Check if you donwloaded it in the same directory as your code. And no, the code automatically opens the webcam
Maybe this will help - answers.opencv.org/question/52340/opencv-error-assertion-failed-empty-in-detectmultiscale/