Face Mask Detection using Convolutional Neural Networks - Python | Keras | Tensorflow | OpenCV

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.ย. 2024
  • This tutorial explains a method of building a Face Mask Detector using Convolutional Neural Networks (CNN) Python, Keras, Tensorflow and OpenCV. With further improvements these types of models could be integrated with CCTV or other types cameras to detect and identify people without masks. With the prevailing worldwide situation due to COVID-19 pandemic, these types of systems would be very supportive for many kind of institutions around the world. Please let me know your ideas, suggestions and concerns in the comment section and feel free to improve this project yourself and come up with better results.
    Download the code (Github): github.com/aie...
    Download the code and Materials (Google Drive): drive.google.c...
    Speaker: Thakshila Dasun

ความคิดเห็น • 528

  • @savinabeysooriya7504
    @savinabeysooriya7504 4 ปีที่แล้ว +45

    Could you make a full tutorial with explaining everything from the scratch what are the requirements to do this properly.

    • @aiwiththakshila6656
      @aiwiththakshila6656  4 ปีที่แล้ว +16

      Sure I will soon.

    • @WinnersAttitude
      @WinnersAttitude 4 ปีที่แล้ว +5

      @@aiwiththakshila6656 sir when i am waiting for it

    • @mordehaym3239
      @mordehaym3239 4 ปีที่แล้ว +1

      @@aiwiththakshila6656 sir can you make full tutorial as mention above please!!

    • @michalbelgorodsky4188
      @michalbelgorodsky4188 3 ปีที่แล้ว +1

      @@aiwiththakshila6656 When will you do a tutorial ?

    • @sakib9527
      @sakib9527 3 ปีที่แล้ว +1

      @@aiwiththakshila6656 pls hurry up brother. I am waiting for this

  • @Ekam873
    @Ekam873 หลายเดือนก่อน

    best lecture for this project

  • @vaishnavkrishnan7996
    @vaishnavkrishnan7996 3 ปีที่แล้ว +7

    Hey guys whoever is facing the accuracy issue just change the pixels to 224 and then accuracy and val accuracy boosts up to 90 percent

    • @RT-kq9wr
      @RT-kq9wr 2 ปีที่แล้ว

      in which line exactly? please help

  • @yonaschekole832
    @yonaschekole832 2 ปีที่แล้ว

    very good lecture please make this video again lie by line code and briefly at the begging of the juypter installation up to last running of the code i think you have get a lot view and subscribers i miss you

  • @walidsefiani9903
    @walidsefiani9903 4 ปีที่แล้ว +7

    Hi, thanks you for the code, it works well, sure it is written no mask without mask, but the problem is that with mask it isn't written anything. what should I do.

    • @harishdasari4808
      @harishdasari4808 3 ปีที่แล้ว

      Can you plz send code harishdasari963@gmail.com

    • @yoraisme6481
      @yoraisme6481 3 ปีที่แล้ว +1

      yeah i had this problem too

    • @User-og1vb
      @User-og1vb 2 ปีที่แล้ว

      same issue

  • @abhishekbehera6950
    @abhishekbehera6950 3 ปีที่แล้ว +5

    Hi,
    I tried running your code. The model is only detecting NO MASK. When I wear a mask, it's not detecting. Can you please help with probable reasons?

    • @rupakkumardas2351
      @rupakkumardas2351 3 ปีที่แล้ว

      you can use this one, github.com/rupakdas18/Face-Mask-Detection-using-Traditional-CNN

    • @venkatreddy-nv2hc
      @venkatreddy-nv2hc 3 ปีที่แล้ว

      hi,
      i don't know how to run the code and not to connect my webcam.please help me

    • @rupakkumardas2351
      @rupakkumardas2351 3 ปีที่แล้ว

      @@venkatreddy-nv2hc What software are you using to run the code?

    • @venkatreddy-nv2hc
      @venkatreddy-nv2hc 3 ปีที่แล้ว

      @@rupakkumardas2351 jupyter sir

    • @rupakkumardas2351
      @rupakkumardas2351 3 ปีที่แล้ว

      @@venkatreddy-nv2hc Try to use spyder

  • @arungoli9060
    @arungoli9060 4 ปีที่แล้ว +2

    This model is detecting good when the face mask is not there but it is not detecting the face itself when the face is masked . I think haar cascade classifer is trained on faces without mask . So I think the masked face is not identifing . Correct me if iam wrong.
    Thanks for the video

    • @sukanyasaha5458
      @sukanyasaha5458 4 ปีที่แล้ว +1

      I am also getting exactly same issue. Please comment back if you can find the solution

    • @arungoli9060
      @arungoli9060 4 ปีที่แล้ว

      Actually i just modified the aim of the project to detect only faces without masks and that means it only detects the people who violets the safety norms and this model fits fine for detecting the people without masks

    • @pavankumark2450
      @pavankumark2450 4 ปีที่แล้ว

      any solution?

  • @myshigri12
    @myshigri12 ปีที่แล้ว

    Thank you for your best explanation,,it is very very useful for me and it's 100%working.

  • @sachindhital4284
    @sachindhital4284 4 ปีที่แล้ว +5

    I tried to implement the same but my accuracy is not increasing its around 0.5.. only
    why is it?
    how to solve this problem?

    • @aiwiththakshila6656
      @aiwiththakshila6656  4 ปีที่แล้ว

      Did u make any changes?

    • @SoumendraBagh
      @SoumendraBagh 4 ปีที่แล้ว

      @@aiwiththakshila6656 none. we are getting validation accuracy around 47%. Can you rerun and verify your model's performance?

    • @vaishnavkrishnan7996
      @vaishnavkrishnan7996 3 ปีที่แล้ว

      hey try increasing the ROI or the pixels 100 100 (Mostly wont work) u can push it to max 50 in validation
      I think none will work as the training samples are less so we need more training samples

  • @prashilbison7038
    @prashilbison7038 3 ปีที่แล้ว +1

    Anyone getting constant errors on OpenCV while running the face detection file?? Please help!!

  • @dhineshkumar4997
    @dhineshkumar4997 4 ปีที่แล้ว +1

    Good video sir need many more like this

    • @karanpatel3358
      @karanpatel3358 4 ปีที่แล้ว +1

      dhinesh kumar I made algorithm for same but I need feedback can you please watch and give it ?
      th-cam.com/video/JtexyRC6e1Y/w-d-xo.html

  • @harshitsingh4238
    @harshitsingh4238 4 ปีที่แล้ว +3

    Hello sir' great explanation but there is problem because, it cannot detect face after applying mask and I this problem is because I don't have object classifier.ipynb file
    Pls solve this problem

  • @ashutoshsalekar1810
    @ashutoshsalekar1810 3 ปีที่แล้ว +8

    1. The "haarcascade_frontalface" model is failing to detect faces with mask.
    2. Even for image without mask the model is detecting mask and shows "MASK"
    please help.

    • @birdeye700
      @birdeye700 3 ปีที่แล้ว

      I got the similar issue.
      I gave the author some credit to walkthrough the CNN process ( load training data, how to ingest the training data , and how to predict the result) , however, the program in python is not working as desired
      1) The training model is not stable and different result from re-run. It seems that model_016.model file provides the best accuracy. However, If you run the training script multiple times, you do not always get to 016, sometimes, I got model_009.model.
      2) It shows "mask" 99% times for a person without mask.
      3) The face detection is not working well for the model haarcascade_frontalface, sometimes, it marks a face for window curtain and ceiling fans.

  • @muhammadzubairbaloch3224
    @muhammadzubairbaloch3224 4 ปีที่แล้ว

    very good lecture. I am happy to find such kind of tutorials. please make more lectures. I am realy happy to find the link. very informative lecture. thanks sir. please upload more lectures.

  • @sach2274
    @sach2274 4 ปีที่แล้ว

    This video was random to me
    Now I'm subscribed thinking that i get practical knowledge on ML

  • @shashibhushan7161
    @shashibhushan7161 4 ปีที่แล้ว

    thanks sir...providing such clear content on face mask detection on webcam

  • @Deepmindsecret
    @Deepmindsecret 4 ปีที่แล้ว +9

    subcribed! im gonna be waiting for more tutorials related to deep learning with live object recognition

  • @subhambhattacharyya8802
    @subhambhattacharyya8802 2 ปีที่แล้ว

    Thank you very much for this easy tutorial.

  • @bhaumikchaudhari1495
    @bhaumikchaudhari1495 3 ปีที่แล้ว

    Thank you for your best explanation,,it is very very useful for me and it's 100%working.thank you once again ...🙏🏻🙏🏻

  • @argl1995
    @argl1995 4 ปีที่แล้ว +2

    the project is working fine but it does not respond to the masked face as it is only giving result for no face mask. What is the problem ??

  • @AxaiKago
    @AxaiKago 4 ปีที่แล้ว +3

    While training the model, it is only considering 31 images instead of 990. Can you suggest me something how can I proceed?
    While debugging the all data is loading perfectly and it is also getting divided correctly into train data and test data. Does anyone also faced the same issue?

    • @nithyashreev3404
      @nithyashreev3404 3 ปีที่แล้ว

      @Akshay Kagwade,I am also facing the same.In the video here,all 990 images are taken but when i tried it only 31 images were taken.
      @AI with Thakshila,can you please help me fix this?✌✌✌

    • @yashgugaliya9276
      @yashgugaliya9276 2 ปีที่แล้ว +1

      @@nithyashreev3404 I am having the same issue it is because haar cascade can only detect patterns of black and white and it seems the project works fine only if simple plain mask is worn.

    • @User-og1vb
      @User-og1vb 2 ปีที่แล้ว

      same issue here

  • @ilcapitano6822
    @ilcapitano6822 4 ปีที่แล้ว

    Bro u are a master your method to reach the target its a mix to easy effective end your explanation its very clear

  • @techtam3505
    @techtam3505 4 ปีที่แล้ว +1

    Instead of using a haarcascade use a model trained with many data using keras it can give more accuracy.

  • @mdhabeeburrahman8884
    @mdhabeeburrahman8884 3 ปีที่แล้ว

    Wonderful Tutorial bro, you earned my respect+++ , Your life long subscriber .

  • @chathuranga5891
    @chathuranga5891 4 ปีที่แล้ว +1

    Great work..! Thank you Sir..!

  • @sreeharinair6870
    @sreeharinair6870 4 ปีที่แล้ว +2

    Hi, I'm a newbie to machine learning, I would like to know if we try to implement this on a video captured from a CCTV camera, should the dataset be changed or does the CNN still give a accurate prediction ?

    • @KHM95
      @KHM95 3 ปีที่แล้ว +1

      Here's a paid course for this and it's worth paying.
      khadymschool.thinkific.com/courses/data-science-hands-on-covid-19-face-mask-detection-cnn-open-cv

  • @dipeshadhikari8536
    @dipeshadhikari8536 2 ปีที่แล้ว

    Best video about this

  • @kelixoderamirez
    @kelixoderamirez 11 วันที่ผ่านมา

    What is correlation between haar cascade and CNN?

  • @kunaldas5009
    @kunaldas5009 4 ปีที่แล้ว

    Best explanation sir

  • @ahmadkelixo7243
    @ahmadkelixo7243 3 ปีที่แล้ว

    perrmission to learn sir.thank you

  • @Bhaishorts_video
    @Bhaishorts_video 10 หลายเดือนก่อน

    I'm new in machine learning, can anybody explain me which cnn model used in this video ??

  • @adarshsrivastav9816
    @adarshsrivastav9816 3 ปีที่แล้ว +1

    I found this error while excuting the 3.0 fle
    ret,img=source.read()
    ----> 4 gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
    5 faces=face_clsfr.detectMultiScale(gray,1.3,5)
    6
    error: OpenCV(4.5.3) C:\Users
    unneradmin\AppData\Local\Temp\pip-req-build-q3d_8t8e\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

  • @abhilasht6471
    @abhilasht6471 4 ปีที่แล้ว +1

    Your doing a great job buddy 👍, thanks for sharing your knowledge. keep up the good work 👏👏

  • @zakariaharakat7759
    @zakariaharakat7759 4 ปีที่แล้ว +2

    Sir please how can be detect the face and maskes , i download the datasets and i run your program ,it not detect the the face and mask , please help me

    • @aiwiththakshila6656
      @aiwiththakshila6656  4 ปีที่แล้ว +1

      I have used cascade classifier to detect the face. When the mask is on, some of the features in the face are not visible, therefore sometimes the face is not detected when the mask is on. If you try with a better camera and better light conditions (day light), it may work well.

  • @ASNPersonal
    @ASNPersonal 4 ปีที่แล้ว +1

    Thanks for the video and well explained.
    Thing is i am seeing green rectangle with txt "MASK" whenever i face the camera and don't see any result from the model when i wore mask. seems like my model is only able to predict class "MASK" but unable to predict other class "with Mask"

    • @eric_ouma
      @eric_ouma 4 ปีที่แล้ว +1

      I am facing a similar problem. I think the issue is that haarcascade classifier is not very able to recognizes faces with a mask on. Maybe you should try another means of face detection.

    • @pavankumark2450
      @pavankumark2450 4 ปีที่แล้ว

      same with me

    • @sayantikachatterjee9782
      @sayantikachatterjee9782 2 ปีที่แล้ว

      @@pavankumark2450 yes same thing is happening with me.

  • @kavindabuddhi
    @kavindabuddhi 3 ปีที่แล้ว

    Great work. Aiya..

  • @rajatchakrawarti8675
    @rajatchakrawarti8675 4 ปีที่แล้ว +2

    what changes are needed to run it on google colab??

  • @yannickedouardmekongo6400
    @yannickedouardmekongo6400 3 ปีที่แล้ว +1

    Please sir, if I use three records in my dataset: "with mask", "incorrect worn mask" and "without mask". What changes should I make in this case? You have not shown us how to do this if we are using several folders.
    I made this change: model.add (Dense (3, activation = 'softmax')). The model training is going well but I get an error at the end that says: Shapes (None, 1) and (None, 3) are incompatible.
    And when I launch the program, it's only the face with NO MASK that are recognized.

  • @shashankdevara6355
    @shashankdevara6355 10 หลายเดือนก่อน

    error: OpenCV(4.6.0) C:\b\abs_f8n1j3l9l0\croot\opencv-suite_1691622637237\work\modules\highgui\src\window.cpp:1267: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage' , i am getting the error like this what should i do know

  • @SAINIVEDH
    @SAINIVEDH 3 ปีที่แล้ว

    @13:57 shouldn't it be gray[x:x+w,y:y+h] ?!!!

  • @suvanjanprasai544
    @suvanjanprasai544 3 ปีที่แล้ว +1

    sir, I do not have much space to download images. Can you please tell me how can I use image url

  • @m1zson
    @m1zson 4 ปีที่แล้ว +1

    Muy buen video pana, saludos de Colombia.

  • @viralfever9159
    @viralfever9159 4 ปีที่แล้ว

    Great video sir 😍😍😍😍

  • @user-cn1xg5cs3h
    @user-cn1xg5cs3h 2 ปีที่แล้ว

    I have a problem in 3.0 detecting masks in the last cell, which I can't fix, please help me.
    error: OpenCV(4.5.4-dev) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

  • @VirtualKnowledge
    @VirtualKnowledge หลายเดือนก่อน

    Can you guide me sir, if I want to write the same code in vizual studio then how can I do it?

  • @abdulqadeerrasooli3489
    @abdulqadeerrasooli3489 8 หลายเดือนก่อน

    Hello sir i getting this error how to solve it
    ImportError: cannot import name 'np_utils' from 'keras.utils' (C:\Anacond3\Lib\site-packages\keras\utils\__init__.py)

  • @c_171_abhikkumarpal7
    @c_171_abhikkumarpal7 ปีที่แล้ว

    source=cv2.VideoCapture(2) ---it would be source=cv2.VideoCapture(0) in case of window. Take care of this part

  • @darshanadilhan2486
    @darshanadilhan2486 4 ปีที่แล้ว

    Supperb work. Please create biginner level tutorials series.. Good luck 👍🏾

  • @ChathuraRanasingheOfficial
    @ChathuraRanasingheOfficial 4 ปีที่แล้ว

    Great work... will try to follow the implementation.. keep it up 👍

  • @Rojass760
    @Rojass760 2 ปีที่แล้ว

    I have a problem in the last part, im using colaboratory: penCV(4.6.0) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

  • @maksudulhaque3227
    @maksudulhaque3227 3 ปีที่แล้ว

    can anyone help me i am trying to run the last notebook and it does not open a window for my webcam what might be the issue everything else runs fine

  • @tunaozates
    @tunaozates 4 ปีที่แล้ว +1

    It does not detect correctly when I run. I have no mask and it says mask. Is it an expected inaccuracy or do you think some technical error occurred?

    • @alejandrozuniga1126
      @alejandrozuniga1126 3 ปีที่แล้ว

      You can change your dictionaries, probably your labels were assigned inverted.

    • @buzmez01
      @buzmez01 3 ปีที่แล้ว

      I changed the model and it worked

  • @xgamer2672
    @xgamer2672 ปีที่แล้ว

    How to do over fitting and under fitting in computer vision

  • @ashritaagarwal603
    @ashritaagarwal603 4 ปีที่แล้ว +1

    Cascade classifier is not detecting any face when mask is on. I have tried with daylight also. no region of interest is created.
    please help.

    • @jerryjohn1995
      @jerryjohn1995 4 ปีที่แล้ว

      Me too,even after the model download ed from Google drive

    • @moussakeitamoussakeita8519
      @moussakeitamoussakeita8519 4 ปีที่แล้ว

      you must have good camera quality.
      I tried with a good quality video and it works

  • @planetforengineers7176
    @planetforengineers7176 ปีที่แล้ว

    Thanks bhai

  • @jeevakumara5599
    @jeevakumara5599 ปีที่แล้ว

    bro iam facing
    ModuleNotFoundError: No module named 'google' this error when i try to compile keras.utils to import np_utils. kindly help me in this bro.

  • @VirtualKnowledge
    @VirtualKnowledge หลายเดือนก่อน

    Bro I tried a lot to fix the error but I couldn't solve the error
    so please help me to solve the error
    in training file it's showing that input_shape is an unexpected keyword argument

  • @fitriantianti1731
    @fitriantianti1731 4 ปีที่แล้ว

    Thanks so much. Its so help me

  • @csbdnazmul
    @csbdnazmul 4 ปีที่แล้ว

    good job sir

  • @larry6624
    @larry6624 4 ปีที่แล้ว +1

    The program doesn't show mask when you have mask on. I think there's a problem with the dataset or the loop.

    • @aukerulmoin4311
      @aukerulmoin4311 4 ปีที่แล้ว

      Same here! Did you solve it?

    • @SoumendraBagh
      @SoumendraBagh 4 ปีที่แล้ว +2

      @@aukerulmoin4311 for me the model is performing poorly. try building the model with a pretrained model like Mobilenet. The model itself isn't identifying the face with mask on.
      For me the validation accuracy is 47% instead of 97% accuracy shown here.

    • @aukerulmoin4311
      @aukerulmoin4311 4 ปีที่แล้ว

      @@SoumendraBagh I'm trying to import mobilenet, but getting some error. Can you give me source code please?

    • @SoumendraBagh
      @SoumendraBagh 4 ปีที่แล้ว

      @@aukerulmoin4311 haven't worked on it till now. Will get back to you once done.

    • @aukerulmoin4311
      @aukerulmoin4311 4 ปีที่แล้ว +1

      @@SoumendraBagh Okay. Thanks in advance

  • @ElevateTheFacts
    @ElevateTheFacts 4 ปีที่แล้ว

    Hey sir nice work but why we r using keras nd one more doubt its like u have saved the modules of video but if we want to test it live like when we execute and run the code at that time webcam open show so that there is no need to save the models .......nd yes then how what changes i have to do.Can we implement without neural network.

  • @worldwide8283
    @worldwide8283 4 ปีที่แล้ว

    Superb. pls do more video lessons related to programming side and ML. Thank you

  • @abhiyanshukumar9749
    @abhiyanshukumar9749 3 ปีที่แล้ว

    all the dataset contains only white colored mask i had used black mask but it did't showed the label mask with green color. It shows correct when i am without mask. But with mask it did't show anything.

  • @ashutoshbhushan2320
    @ashutoshbhushan2320 4 ปีที่แล้ว +1

    Only webcam required right??

  • @sobinbabu984
    @sobinbabu984 4 ปีที่แล้ว +1

    Could you please create video for training the model in cloud free GPUs including the deployment also?

  • @vinodkanzaria4379
    @vinodkanzaria4379 4 ปีที่แล้ว +1

    Thank you for the video, I reproduce the model and got 96% accuracy but thing is i am seeing red rectangle with txt "no mask" whenever i face the camera and don't see any result from the model when i wore mask. seems like my model is only able to predict class "No mask" but unable to predict other class "with Mask". By any chance do you know what would be the probable reason behind it? I am unable to load your trained model-017.model , is it because of keras version ? i have tried after installing 2.2.4 but still facing the same.
    Could you please help me to fix the error

    • @pavankumark2450
      @pavankumark2450 4 ปีที่แล้ว +2

      same with me :( did u find y is it happening ?

    • @mitejmadan8672
      @mitejmadan8672 2 ปีที่แล้ว

      @@pavankumark2450 same with me bro

  • @quinjanrobertocampo8600
    @quinjanrobertocampo8600 3 ปีที่แล้ว

    Is this better compared to transfer learning (like mobileNet) so there is no need to use a cascade classifier?

  • @crazykatgaming5855
    @crazykatgaming5855 4 ปีที่แล้ว +1

    Error when checking target: expected dense_2 to have shape (2,) but got array with shape (1,) sir im getting this error when i try to fit the model

    • @LMGaming0
      @LMGaming0 3 ปีที่แล้ว +1

      Use this after train_test_split() :
      from keras.utils import to_categorical
      train_target = to_categorical(train_target)

  • @cool_videos6016
    @cool_videos6016 4 ปีที่แล้ว +1

    i used your model but it is overfitting but after using data augmentation it is underfitting

    • @bhaumikchaudhari1495
      @bhaumikchaudhari1495 3 ปีที่แล้ว

      Hey ,how can you do data augmentation ,can you send your project code.. my mail :bhaumikchaudhari225@gmail.com. Please help me .

  • @athulkrishnamadhu1644
    @athulkrishnamadhu1644 3 ปีที่แล้ว +1

    I tried installing keras but it shows module not found, could you please explain

    • @atulupadhyay1542
      @atulupadhyay1542 3 ปีที่แล้ว +1

      try using tensorflow.keras instead of keras

  • @deekshakulshreshtha
    @deekshakulshreshtha 2 ปีที่แล้ว +1

    Live coding is more appropriate then to describe written code🙄

  • @HarryPotter-jd1dx
    @HarryPotter-jd1dx 2 ปีที่แล้ว

    May I know how to upload this dataset folder to google colab

  • @rachanaadmane6086
    @rachanaadmane6086 3 ปีที่แล้ว

    Sir , did face mask detector also detect the scarf or handkerchief use to cover our face ???

  • @ABDULAHAD-xr3sk
    @ABDULAHAD-xr3sk 4 ปีที่แล้ว +1

    Thanks for the video, it show around 95 percent accuracy but while testing the system doesnt detect my face with a mask. is it a problem with haarcascade?

    • @alejandrozuniga1126
      @alejandrozuniga1126 3 ปีที่แล้ว +1

      Same problem here, did you find out a solution?

  • @dharsanj.b4876
    @dharsanj.b4876 3 ปีที่แล้ว +1

    Its telling this
    NameError Traceback (most recent call last)
    in
    1 while(True):
    2
    ----> 3 ret,img=source.read()
    4 gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
    5 faces=face_clsfr.detectMultiScale(gray,1.3,5)
    NameError: name 'source' is not defined

  • @rishiprasana8285
    @rishiprasana8285 4 ปีที่แล้ว

    Hi sir,
    This was the best video that a beginner like me could feel comfortable with.
    After running your code with the dataset you provided, I got an accuracy of 96%, but it does not detect my face when the mask is on. Without mask, the code works perfect.
    Should I check something in particular? I haven't made any changes to your code.

    • @aiwiththakshila6656
      @aiwiththakshila6656  4 ปีที่แล้ว

      I think the issue is with your camera. Could you please try with a better light condition. Day light would be fine as well.

    • @rishiprasana8285
      @rishiprasana8285 4 ปีที่แล้ว

      @@aiwiththakshila6656 Hi, Thanks a lot. Yes it was a lighting issue. It works well in day light. Do check out: www.linkedin.com/posts/r-rishi-prasana-277a2b98_theabrperceptron-maskrecognition-opencv-activity-6669553645085978624-IX2t

    • @sukanyasaha5458
      @sukanyasaha5458 4 ปีที่แล้ว

      I am facing same issue even in lighting condition. Can you please guide?

    • @rishiprasana8285
      @rishiprasana8285 4 ปีที่แล้ว

      @@sukanyasaha5458 Hi, Please make sure the atmosphere is bright enough and don't be too close to the screen ...... I also had to make a little changes to the code to run it perfectly fine

    • @yashpatil4605
      @yashpatil4605 4 ปีที่แล้ว

      @@aiwiththakshila6656 I tried in daylight condition, I have apple mackbook...not working when mask is on

  • @vincentsmith1564
    @vincentsmith1564 4 ปีที่แล้ว

    Will this work if I don't use the ROI and just use the camera feed. I can move my face close to the camera. I've read that lighting conditions make the face cascade better but I'm not sure exactly how to do that.

  • @swapnamoybiswas929
    @swapnamoybiswas929 4 ปีที่แล้ว

    model.predict(reshaped_img) this line problem
    input 0 of layer dense 2 is incompatible with the layer

  • @arshikhan8598
    @arshikhan8598 2 ปีที่แล้ว

    Why coverting into gray scale image ?

  • @owaisulhaq7681
    @owaisulhaq7681 3 ปีที่แล้ว +1

    OSError: SavedModel file does not exist at: model-017.model/{saved_model.pbtxt|saved_model.pb}
    what is this error?? How to solve it??

  • @ravencode5505
    @ravencode5505 4 ปีที่แล้ว +1

    It is showing only NO mask when i'm not wearing mask but showing nothing when I wear the mask

    • @vatsalchandra781
      @vatsalchandra781 4 ปีที่แล้ว

      Were you able to solve this issue?
      I'm getting the same problem.

    • @ravencode5505
      @ravencode5505 4 ปีที่แล้ว

      @@vatsalchandra781 Not able to solve but I tried sitting with bdifferent backgrounds and it worked at some.

  • @soumyadrip
    @soumyadrip 4 ปีที่แล้ว +2

    Thank you for the tutorial ☺.i have a query that,
    Can anybody use that model for industrial application, or for industrial we need to use tensorflow objectdetection api s or some thing high level pretrained model for this.
    Because I have seen same kind if tutorials using that, but this approach is much more simpler and intuitive mostly for beginners.

    • @aiwiththakshila6656
      @aiwiththakshila6656  4 ปีที่แล้ว +2

      Hi Soumya, thank you very much. I am always trying to make tutorials, in such a way that anyone can understand even complex theories. I believe that, the pretrained standard CNN models like mobilenet, rcnn and etc would give better results. However when it comes to theory what matters more is the evaluation results of the model. If the we can develop our own model with a minimum loss/ validation loss and accuracy/ validation accuracy that would work, since all the NN models are application based.

    • @aruneshwarv1051
      @aruneshwarv1051 4 ปีที่แล้ว

      @@aiwiththakshila6656 hello, the datapath which we gave as dataset couldn't be open ?? Ive downloaded in drive, how to import from there?

    • @raghavendrag9706
      @raghavendrag9706 2 ปีที่แล้ว

      @@aiwiththakshila6656 Bro I'm getting an error at the last part of the code
      gray=BGR2GRAY

    • @056_smritigupta8
      @056_smritigupta8 2 ปีที่แล้ว

      How did you upload the dataset?

  • @shriharshsholapur7262
    @shriharshsholapur7262 3 ปีที่แล้ว

    Which cnn architecture has been used?

  • @056_smritigupta8
    @056_smritigupta8 2 ปีที่แล้ว

    Sir how to upload the dataset in Jupyter notebook
    ?

  • @PreetamKatti
    @PreetamKatti 4 ปีที่แล้ว

    after doing everything the camera is not opening ,the camera will be running but it wont open and show live as u shown above

  • @tnn_thanhnguyenngoc7326
    @tnn_thanhnguyenngoc7326 4 ปีที่แล้ว

    Could not load dynamic library 'cudart64_101.dll' on tensorflow CPU-only installation.
    please help me.

  • @vidhanagedhananjaya7571
    @vidhanagedhananjaya7571 4 ปีที่แล้ว

    great work bro

  • @aravindrajamani5699
    @aravindrajamani5699 2 ปีที่แล้ว

    Kindly explain, correctly and incorrectly wear mask detection. How I include that in face mask detection? Please explain that.

  • @sheetalnikam4768
    @sheetalnikam4768 4 ปีที่แล้ว

    InternalError: cudaGetDevice() failed. Status: cudaGetErrorString symbol not found.
    I have installed CUDA 10.0 . I have checked my environment variable path too. How do I solve this error?
    Thank you.

  • @sadialakho0307
    @sadialakho0307 4 ปีที่แล้ว

    i want to count the number of people with and without masks and show the result on dashboard using flask.. do you have any idea how it can be done?

  • @softpeople8744
    @softpeople8744 3 ปีที่แล้ว

    gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
    this line is not working.

  • @MyMindhacker
    @MyMindhacker 4 ปีที่แล้ว

    thanks bro!! you're awesome

  • @ChrisG56844
    @ChrisG56844 4 ปีที่แล้ว

    Hi! great video! Is it possible to add an other model, for example with glases? I mean, un the dataset folder add to the mask and no mask folder one with glases.

  • @tanmaysharma2742
    @tanmaysharma2742 4 ปีที่แล้ว +1

    sir i am getting this error in the last line of code in 3.0, specifically
    ----> 4 gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
    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'

    • @anirudhsanga3552
      @anirudhsanga3552 4 ปีที่แล้ว +1

      give access to your camera and microphone

    • @anirudhsanga3552
      @anirudhsanga3552 4 ปีที่แล้ว +2

      if this dose not work then change source=cv2.VideoCapture(0)

    • @jhanvikotak3938
      @jhanvikotak3938 4 ปีที่แล้ว

      Even I am getting the same error.
      And the solution provided here doesn't solve the error. Please provide another solution

    • @swapnamoybiswas929
      @swapnamoybiswas929 4 ปีที่แล้ว

      i am also getting the same error

    • @pritimishra6378
      @pritimishra6378 3 ปีที่แล้ว

      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' plz help im getting this error

  • @tharunkumarbandaru2635
    @tharunkumarbandaru2635 4 ปีที่แล้ว

    Why is that you have takes categorical cross entropy
    As there are only 2
    Why can't we take binary cross entropy can't we take in that manner!?

  • @sarthakvaswani5928
    @sarthakvaswani5928 2 ปีที่แล้ว

    The last line is not running in short the webcam is not opening and the last line is just processing only but not running

  • @abhinavmishra2632
    @abhinavmishra2632 2 ปีที่แล้ว

    What is the detection algorithm used in the training the model?

  • @mohdshakir2680
    @mohdshakir2680 4 ปีที่แล้ว +1

    It is not working when i wear the mask .. but i is working with out mask

  • @renjunbias1042
    @renjunbias1042 3 ปีที่แล้ว

    hi am an problem in keras "jupyter notebook's kernel keeps dying" can you help me?

  • @muskansoni906
    @muskansoni906 3 ปีที่แล้ว

    It is not able to detect with mask. Please tell me where it might be going wrong.