Face Mask Detection using OpenCV, Keras/TF and Deep Learning | Detect Masks in Real-Time videos

  Рет қаралды 35,142

Satyajit Pattnaik

Satyajit Pattnaik

Күн бұрын

Пікірлер: 93
@XAustinSky
@XAustinSky 3 жыл бұрын
I'd like to thank you for making this video as it is a very helpful reference for my research!
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
Glad it was helpful!
@ahmetcankarakus6326
@ahmetcankarakus6326 3 жыл бұрын
How many times your model learned? I mean what is your epoch number on this project? Thank you
@ujalamaurya292
@ujalamaurya292 3 жыл бұрын
what accuracy you got for the model?
@annisajaniarh6989
@annisajaniarh6989 3 жыл бұрын
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 ?
@JainmiahSk
@JainmiahSk 3 жыл бұрын
Computer Vision is Very Interesting Topic.
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
Glad that you liked!!
@tranthiphuongthao8342
@tranthiphuongthao8342 2 жыл бұрын
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.
@niteshtudu6449
@niteshtudu6449 3 жыл бұрын
Sir ...what are the 4 coordinates while running the program?
@abinpmathew8126
@abinpmathew8126 2 жыл бұрын
Hi Sir. I have a doubt. Is Haar Cascade algorithm used in face recognition?
@amjayshri
@amjayshri Жыл бұрын
Nice work sir!
@indriawanda
@indriawanda 2 жыл бұрын
hi! is this using transfer learning?
@Bharghav861
@Bharghav861 3 жыл бұрын
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?
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
Yes, fork it.
@Bharghav861
@Bharghav861 3 жыл бұрын
@@SatyajitPattnaik because i was getting some errors from other sources and ML website codes,so u sure right i wont get any error?
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
@@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
@SatyajitPattnaik 3 жыл бұрын
just try the code and let me know if it fails.
@Bharghav861
@Bharghav861 3 жыл бұрын
@@SatyajitPattnaik bro im gettin an error like this "TypeError: Unexpected keyword argument passed to optimizer: name"
@AI__Alpesh_Gaykar
@AI__Alpesh_Gaykar 3 жыл бұрын
is detect some errors like Imutils module are not found what can i do here
@adindaramadani9239
@adindaramadani9239 2 жыл бұрын
hello sir, I have a question, it will be the same if the project we run in jupyter notebook?
@empowercode
@empowercode 3 жыл бұрын
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 KZbin 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!
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
Thanks a lot for your kind words 🙂🙂
@muhammedanask8556
@muhammedanask8556 3 жыл бұрын
Thanks bro❤❤ , its worked but the mask faces not detecting only detecting non mask faces, please reply
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
Haha, should be some minor issue, keep debugging 💪💪
@muhammedanask8556
@muhammedanask8556 3 жыл бұрын
@@SatyajitPattnaik bro, please suggest a method
@t561355
@t561355 2 жыл бұрын
Thank you! That's great and useful work! And very interesting video!
@SatyajitPattnaik
@SatyajitPattnaik 2 жыл бұрын
Thanks 👍
@041_saisaranta5
@041_saisaranta5 3 жыл бұрын
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
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
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.
@041_saisaranta5
@041_saisaranta5 3 жыл бұрын
@@SatyajitPattnaik thanks a lott sir
@041_saisaranta5
@041_saisaranta5 3 жыл бұрын
@@SatyajitPattnaik sir what algorithm we used here sir??
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
@@041_saisaranta5 have you gone through the video carefully? If yes, you should know what was used.
@041_saisaranta5
@041_saisaranta5 3 жыл бұрын
@@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
@shaddyrogue9430
@shaddyrogue9430 3 жыл бұрын
What was the accuracy of this code?
@shashinthadanuka5395
@shashinthadanuka5395 3 жыл бұрын
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
@t561355
@t561355 2 жыл бұрын
Could you tell me how to improve the accuracy of face detection when it is far from the camera?
@SatyajitPattnaik
@SatyajitPattnaik 2 жыл бұрын
you need to add such images in the training data in order to have better accuracy
@roshithraj1215
@roshithraj1215 3 жыл бұрын
Bro,which is dfd for this project
@maalimaali9902
@maalimaali9902 3 жыл бұрын
How can I extend this AI system by adding a notification mechanism to report any face mask violation to authority?
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
You need to do some brainstorming on that..
@kedaruttarwar9328
@kedaruttarwar9328 3 жыл бұрын
While i'm running the video stream model it giving cubals library error
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
Paste the error so that I can see.
@kedaruttarwar9328
@kedaruttarwar9328 3 жыл бұрын
@@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
@charanteja4613
@charanteja4613 2 жыл бұрын
Here it is detecting only one face right how can it detect multiple images
@rekxspein
@rekxspein 3 жыл бұрын
what If I want to take a frame of each person who doesn't wear mask??
@jaswantsuthar7793
@jaswantsuthar7793 2 жыл бұрын
how can we add beep sound there is no mask
@saisharaneruventi2180
@saisharaneruventi2180 3 жыл бұрын
Can I get paper or report for this
@dangly2192
@dangly2192 3 жыл бұрын
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.
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
Ofcourse.
@dangly2192
@dangly2192 3 жыл бұрын
@@SatyajitPattnaik Can you help me, Sir? I have some problem when I train this with three data. Thanks you very much.
@dangly2192
@dangly2192 3 жыл бұрын
@@SatyajitPattnaik This is my error Sir: ValueError: Found array with dim 3. Estimator expected
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
@@dangly2192 Upload your code on GitHub and share link, let me see
@dangly2192
@dangly2192 3 жыл бұрын
@@SatyajitPattnaik github.com/hd999/facemaskdetection Thanks you very much, Sir.
@Mehedi.25
@Mehedi.25 Жыл бұрын
via screen ta khub e choto,,,boro korar kono way ace?
@SatyajitPattnaik
@SatyajitPattnaik Жыл бұрын
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)
@kiranmanmode8056
@kiranmanmode8056 3 жыл бұрын
Which algorithm use???
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
Please watch the video, I have explained it.
@kiranmanmode8056
@kiranmanmode8056 3 жыл бұрын
@@SatyajitPattnaik face mask detection
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
@@kiranmanmode8056 Face mask detection is the use case, but we have used opencv, Keras and Tensorflow for this problem.
@kiranmanmode8056
@kiranmanmode8056 3 жыл бұрын
@@SatyajitPattnaik thank u...and which database use
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
@@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.
@akhileshrmadhyastha6400
@akhileshrmadhyastha6400 3 жыл бұрын
Can we have multiple faces with mask or without Mask does this project work for multiple people with masks?
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
It should work, you can try by yourself...else I will test it and let you know.
@akhileshrmadhyastha6400
@akhileshrmadhyastha6400 3 жыл бұрын
@@SatyajitPattnaik ok thanks
@roshanprajapati1579
@roshanprajapati1579 3 жыл бұрын
Deploy. Prototxt and Caffè model do not found what to do?
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
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
@roshanprajapati1579
@roshanprajapati1579 3 жыл бұрын
@@SatyajitPattnaik I literally tried everything from stackoverflow and KZbin bt still stuck on this
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
@@roshanprajapati1579 so post your question, and send me the link, without looking at the code, nobody can help.
@roshanprajapati1579
@roshanprajapati1579 3 жыл бұрын
@@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
@roshanprajapati1579
@roshanprajapati1579 3 жыл бұрын
@@SatyajitPattnaikanswers.opencv.org/question/204774/cant-open-deployprototxttxt-in-function-cvdnnreadprotofromtextfile/
@subrinas9136
@subrinas9136 3 жыл бұрын
Is it based on CNN??
@anikettandle
@anikettandle 2 жыл бұрын
can u SHARE PPT PLZ
@Kishore-zd9id
@Kishore-zd9id 7 ай бұрын
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
@deepashreenaik4630
@deepashreenaik4630 3 жыл бұрын
How to install the libraries??
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
pip install in your anaconda prompt, or IDE console (You can google, and will find everything easily)
@rcyakc
@rcyakc 3 жыл бұрын
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'
@kedaruttarwar9328
@kedaruttarwar9328 3 жыл бұрын
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
@SatyajitPattnaik
@SatyajitPattnaik 3 жыл бұрын
Looks like an out of memory issue, what's your CPU configuration?
@kedaruttarwar9328
@kedaruttarwar9328 3 жыл бұрын
@@SatyajitPattnaik The problem is solved, I had downloaded wrong cuDNN lib. Version.
Friends make memories together part 2  | Trà Đặng #short #bestfriend #bff #tiktok
00:18
CAN YOU DO THIS ?
00:23
STORROR
Рет қаралды 49 МЛН
«Осень». Самая большая загадка Windows XP
14:36
Девять десятых
Рет қаралды 1,1 МЛН
Power BI Dataflows Interview Questions - Answered!
23:15
Satyajit Pattnaik
Рет қаралды 3,9 М.
Human Activity Recognition using TensorFlow (CNN + LSTM) | 2 Methods
1:18:36
Friends make memories together part 2  | Trà Đặng #short #bestfriend #bff #tiktok
00:18