Hey Satyajit, nice to meet you! I just found your channel and subscribed, love what you're doing! I like how clear and detailed your explanations are as well as the depth of knowledge you have surrounding the topic! Since I run a tech education channel as well, I love to see fellow Content Creators sharing, educating, and inspiring a large global audience. I wish you the best of luck on your CZcams Journey, can't wait to see you succeed! Your content really stands out and you've put so much thought into your videos! Cheers, happy holidays, and keep up the great work!
Hello everyone I am working on a project on this topic Not sure if the model you are making is the same as the model used in this video tutorial? I'm not sure if this videos is using MobileNet SSD V2 or MobileNetV2? Thank you.
Hi Satyajit Pattnaik, nice to see what u doing right now! i wanna ask you about the source at deteck_mask_video. what is prototxtPath = r"face_detector\deploy.prototxt" weightsPath = r"face_detector es10_300x300_ssd_iter_140000.caffemodel" where i get path prototxtPath and weightsPath ?
They would be asking your strategy for solving this problem, what all techniques are used, and they might deep dive into, object detection, CNN models, what are filters, how to define filters, input_size vs target_size, iterations vs epochs, back propagation etc etc.
@@SatyajitPattnaik sir u have mentioned face detection algorithm. May i know which type of face detection algorithm is been used here sir??btw thank you for your all the clarification sir huge thanks sir
At first thank you for making this project, brother now my question is,if i directly download the code from your github,and paste and run it in my Spyder console,will i get the output? I mean the video stream?
@@Bharghav861 I did video on this code, so the code will definitely work, in case it doesn't work, it must be because of some minor library version mismatch issue which can easily be fixed.
@@SatyajitPattnaik E tensorflow/stream_executor/cuda/cuda_blas.cc:226] failed to create cublas handle: CUBLAS_STATUS_NOT_INITIALIZED W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at conv_ops.cc:1287 : Not found: No algorithm worked! showing this type of error
error File "C:\python\COVID-19 Face Mask Detector\Face-Mask-Detection-master\detect_mask_video.py", line 89, in maskNet = load_model("mask_detector.model")
File "C:\Users\DELL\AppData\Roaming\Python\Python311\site-packages\keras\src\saving\saving_api.py", line 191, in load_model
You can define the height & width like this: # Set the width and height of the window width = 800 height = 600 dim = (width, height) and just after you are capturing, pass the dim in the cv2.resize function # Capture the frame from the webcam ret, frame = cap.read() # Resize the frame resized = cv2.resize(frame, dim, interpolation=cv2.INTER_AREA)
If you have any specific error, it could be because of package version mismatch, pls google your errors and you will find the issue, else post it on Stackoverflow and send me the link, I will help you solve the error
@@SatyajitPattnaik how do I send u I have my code on my system.. I want to send error photo to u and I have copied ur program from ur git hub its exactly same as of u
@@kiranmanmode8056 The data is stored on local machine, we haven't used any database, I would request you to go through the video first before asking the basic doubts.
Sir I need help with this issue. when i run the code for video stream. it just opens the webcam for a second and then it closes and this issue came. (base) D:\RC masters\face mask detection>python detection_video_mask.py 2021-05-23 16:13:09.681806: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found 2021-05-23 16:13:09.682004: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. 2021-05-23 16:13:12.658155: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set 2021-05-23 16:13:12.660041: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found 2021-05-23 16:13:12.660551: W tensorflow/stream_executor/cuda/cuda_driver.cc:326] failed call to cuInit: UNKNOWN ERROR (303) 2021-05-23 16:13:12.666547: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: DESKTOP-HTM5K3B 2021-05-23 16:13:12.666856: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: DESKTOP-HTM5K3B 2021-05-23 16:13:12.668073: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2021-05-23 16:13:12.668936: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set [INFO] starting video stream... [ERROR:0] global C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-6sxsq0tp\opencv\modules\dnn\src\dnn.cpp (3444) cv::dnn::dnn4_v20200609::Net::Impl::getLayerShapesRecursively OPENCV/DNN: [Convolution]:(conv1_1): getMemoryShapes() throws exception. inputs=1 outputs=0/1 blobs=0 [ERROR:0] global C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-6sxsq0tp\opencv\modules\dnn\src\dnn.cpp (3447) cv::dnn::dnn4_v20200609::Net::Impl::getLayerShapesRecursively input[0] = [ 1 3 224 224 ] [ERROR:0] global C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-6sxsq0tp\opencv\modules\dnn\src\dnn.cpp (3457) cv::dnn::dnn4_v20200609::Net::Impl::getLayerShapesRecursively Exception message: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-6sxsq0tp\opencv\modules\dnn\src\layers\convolution_layer.cpp:319: error: (-215:Assertion failed) blobs.size() != 0 in function 'cv::dnn::ConvolutionLayerImpl::getMemoryShapes' Traceback (most recent call last): File "detection_video_mask.py", line 105, in (locs, preds) = detect_and_predict_mask(frame, faceNet, maskNet) File "detection_video_mask.py", line 28, in detect_and_predict_mask detections = faceNet.forward() cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-6sxsq0tp\opencv\modules\dnn\src\layers\convolution_layer.cpp:319: error: (-215:Assertion failed) blobs.size() != 0 in function 'cv::dnn::ConvolutionLayerImpl::getMemoryShapes'
E tensorflow/stream_executor/cuda/cuda_blas.cc:226] failed to create cublas handle: CUBLAS_STATUS_NOT_INITIALIZED W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at conv_ops.cc:1287 : Not found: No algorithm worked! showing this type of error
I'd like to thank you for making this video as it is a very helpful reference for my research!
Glad it was helpful!
is detect some errors like Imutils module are not found what can i do here
Hey Satyajit, nice to meet you! I just found your channel and subscribed, love what you're doing!
I like how clear and detailed your explanations are as well as the depth of knowledge you have surrounding the topic! Since I run a tech education channel as well, I love to see fellow Content Creators sharing, educating, and inspiring a large global audience. I wish you the best of luck on your CZcams Journey, can't wait to see you succeed! Your content really stands out and you've put so much thought into your videos!
Cheers, happy holidays, and keep up the great work!
Thanks a lot for your kind words 🙂🙂
Nice work sir!
How many times your model learned?
I mean what is your epoch number on this project?
Thank you
Hello everyone
I am working on a project on this topic
Not sure if the model you are making is the same as the model used in this video tutorial?
I'm not sure if this videos is using MobileNet SSD V2 or MobileNetV2?
Thank you.
Bro i want to send data to arduino accoding to the result of this face mask detection. How can i edit this code. Plz help
Thank you! That's great and useful work! And very interesting video!
Thanks 👍
Computer Vision is Very Interesting Topic.
Glad that you liked!!
what accuracy you got for the model?
Hi Satyajit Pattnaik, nice to see what u doing right now!
i wanna ask you about the source at deteck_mask_video. what is prototxtPath = r"face_detector\deploy.prototxt"
weightsPath = r"face_detector
es10_300x300_ssd_iter_140000.caffemodel"
where i get path prototxtPath and weightsPath ?
Sir ...what are the 4 coordinates while running the program?
Sir can you pls say the questions that can be asked regarding this project for the interview?? i have got TCS interview tomorrow. pls help me
They would be asking your strategy for solving this problem, what all techniques are used, and they might deep dive into, object detection, CNN models, what are filters, how to define filters, input_size vs target_size, iterations vs epochs, back propagation etc etc.
@@SatyajitPattnaik thanks a lott sir
@@SatyajitPattnaik sir what algorithm we used here sir??
@@041_saisaranta5 have you gone through the video carefully?
If yes, you should know what was used.
@@SatyajitPattnaik sir u have mentioned face detection algorithm. May i know which type of face detection algorithm is been used here sir??btw thank you for your all the clarification sir huge thanks sir
Hi Sir. I have a doubt. Is Haar Cascade algorithm used in face recognition?
hello sir, I have a question, it will be the same if the project we run in jupyter notebook?
How can I extend this AI system by adding a notification mechanism to report any face mask violation to authority?
You need to do some brainstorming on that..
Thanks bro❤❤ , its worked but the mask faces not detecting only detecting non mask faces, please reply
Haha, should be some minor issue, keep debugging 💪💪
@@SatyajitPattnaik bro, please suggest a method
Here it is detecting only one face right how can it detect multiple images
what If I want to take a frame of each person who doesn't wear mask??
At first thank you for making this project, brother now my question is,if i directly download the code from your github,and paste and run it in my Spyder console,will i get the output? I mean the video stream?
Yes, fork it.
@@SatyajitPattnaik because i was getting some errors from other sources and ML website codes,so u sure right i wont get any error?
@@Bharghav861 I did video on this code, so the code will definitely work, in case it doesn't work, it must be because of some minor library version mismatch issue which can easily be fixed.
just try the code and let me know if it fails.
@@SatyajitPattnaik bro im gettin an error like this "TypeError: Unexpected keyword argument passed to optimizer: name"
While i'm running the video stream model it giving cubals library error
Paste the error so that I can see.
@@SatyajitPattnaik E tensorflow/stream_executor/cuda/cuda_blas.cc:226] failed to create cublas handle: CUBLAS_STATUS_NOT_INITIALIZED
W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at conv_ops.cc:1287 : Not found: No algorithm worked!
showing this type of error
hi! is this using transfer learning?
error
File "C:\python\COVID-19 Face Mask Detector\Face-Mask-Detection-master\detect_mask_video.py", line 89, in
maskNet = load_model("mask_detector.model")
File "C:\Users\DELL\AppData\Roaming\Python\Python311\site-packages\keras\src\saving\saving_api.py", line 191, in load_model
What was the accuracy of this code?
how can we add beep sound there is no mask
Could you tell me how to improve the accuracy of face detection when it is far from the camera?
you need to add such images in the training data in order to have better accuracy
Bro,which is dfd for this project
via screen ta khub e choto,,,boro korar kono way ace?
You can define the height & width like this:
# Set the width and height of the window
width = 800
height = 600
dim = (width, height)
and just after you are capturing, pass the dim in the cv2.resize function
# Capture the frame from the webcam
ret, frame = cap.read()
# Resize the frame
resized = cv2.resize(frame, dim, interpolation=cv2.INTER_AREA)
Hello Sir,
Can I train this with three data at the same time like with_mask, without_mask and incorrect_mask?
Please help me, thanks you very much.
Ofcourse.
@@SatyajitPattnaik Can you help me, Sir? I have some problem when I train this with three data. Thanks you very much.
@@SatyajitPattnaik This is my error Sir:
ValueError: Found array with dim 3. Estimator expected
@@dangly2192 Upload your code on GitHub and share link, let me see
@@SatyajitPattnaik
github.com/hd999/facemaskdetection
Thanks you very much, Sir.
Can I get paper or report for this
Can we have multiple faces with mask or without Mask does this project work for multiple people with masks?
It should work, you can try by yourself...else I will test it and let you know.
@@SatyajitPattnaik ok thanks
Deploy. Prototxt and Caffè model do not found what to do?
If you have any specific error, it could be because of package version mismatch, pls google your errors and you will find the issue, else post it on Stackoverflow and send me the link, I will help you solve the error
@@SatyajitPattnaik I literally tried everything from stackoverflow and CZcams bt still stuck on this
@@roshanprajapati1579 so post your question, and send me the link, without looking at the code, nobody can help.
@@SatyajitPattnaik how do I send u I have my code on my system.. I want to send error photo to u and I have copied ur program from ur git hub its exactly same as of u
@@SatyajitPattnaikanswers.opencv.org/question/204774/cant-open-deployprototxttxt-in-function-cvdnnreadprotofromtextfile/
Which algorithm use???
Please watch the video, I have explained it.
@@SatyajitPattnaik face mask detection
@@kiranmanmode8056 Face mask detection is the use case, but we have used opencv, Keras and Tensorflow for this problem.
@@SatyajitPattnaik thank u...and which database use
@@kiranmanmode8056 The data is stored on local machine, we haven't used any database, I would request you to go through the video first before asking the basic doubts.
Is it based on CNN??
can u SHARE PPT PLZ
How to install the libraries??
pip install in your anaconda prompt, or IDE console (You can google, and will find everything easily)
Sir I need help with this issue. when i run the code for video stream. it just opens the webcam for a second and then it closes and this issue came.
(base) D:\RC masters\face mask detection>python detection_video_mask.py
2021-05-23 16:13:09.681806: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2021-05-23 16:13:09.682004: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2021-05-23 16:13:12.658155: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-05-23 16:13:12.660041: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found
2021-05-23 16:13:12.660551: W tensorflow/stream_executor/cuda/cuda_driver.cc:326] failed call to cuInit: UNKNOWN ERROR (303)
2021-05-23 16:13:12.666547: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: DESKTOP-HTM5K3B
2021-05-23 16:13:12.666856: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: DESKTOP-HTM5K3B
2021-05-23 16:13:12.668073: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-05-23 16:13:12.668936: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
[INFO] starting video stream...
[ERROR:0] global C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-6sxsq0tp\opencv\modules\dnn\src\dnn.cpp (3444) cv::dnn::dnn4_v20200609::Net::Impl::getLayerShapesRecursively OPENCV/DNN: [Convolution]:(conv1_1): getMemoryShapes() throws exception. inputs=1 outputs=0/1 blobs=0
[ERROR:0] global C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-6sxsq0tp\opencv\modules\dnn\src\dnn.cpp (3447) cv::dnn::dnn4_v20200609::Net::Impl::getLayerShapesRecursively input[0] = [ 1 3 224 224 ]
[ERROR:0] global C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-6sxsq0tp\opencv\modules\dnn\src\dnn.cpp (3457) cv::dnn::dnn4_v20200609::Net::Impl::getLayerShapesRecursively Exception message: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-6sxsq0tp\opencv\modules\dnn\src\layers\convolution_layer.cpp:319: error: (-215:Assertion failed) blobs.size() != 0 in function 'cv::dnn::ConvolutionLayerImpl::getMemoryShapes'
Traceback (most recent call last):
File "detection_video_mask.py", line 105, in
(locs, preds) = detect_and_predict_mask(frame, faceNet, maskNet)
File "detection_video_mask.py", line 28, in detect_and_predict_mask
detections = faceNet.forward()
cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-6sxsq0tp\opencv\modules\dnn\src\layers\convolution_layer.cpp:319: error: (-215:Assertion failed) blobs.size() != 0 in function 'cv::dnn::ConvolutionLayerImpl::getMemoryShapes'
E tensorflow/stream_executor/cuda/cuda_blas.cc:226] failed to create cublas handle: CUBLAS_STATUS_NOT_INITIALIZED
W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at conv_ops.cc:1287 : Not found: No algorithm worked!
showing this type of error
Looks like an out of memory issue, what's your CPU configuration?
@@SatyajitPattnaik The problem is solved, I had downloaded wrong cuDNN lib. Version.