Face Mask Detection Tutorial | Transfer Learning | Python | Tensorflow | OpenCV | for beginners

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024

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

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

    Sir my camera led is blinking but face Cam is not turning on what should I do?

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

    Sir Can you provide link of code..it'll really help me to understand why my code is not running

  • @nikanikfetrat3855
    @nikanikfetrat3855 3 ปีที่แล้ว +2

    Great video and thanks for it. But can we add face recognition to it so it recognizes that who is behind the mask and gives your name as well? A little explanation would help a lot !!!

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

    Hello sir. I have tried to implement the same codes as you have mentioned the video but I am unable to access the Camera in the end... How did you open the web cam as a separate application all of a sudden? And I am getting values like 1.1771331e-08, and 2.791448e-10 for images with masks and 1 for the images without. Hoping to hear from you.

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

    My cam is getting switched on but the rectangle is not popping up on running the code , what should I do?

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

    Hi, I am stuck on trying to get the popup for the video camera

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

    brooooo, u saved me

  • @Noise-Floor
    @Noise-Floor 2 ปีที่แล้ว +1

    Sir if i want this project could you help me out?

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

    all thing is fine and working perfectly without any error and webcam shows light but not detect faces

  • @abdullah_flash3324
    @abdullah_flash3324 3 ปีที่แล้ว +10

    I see only 55 data trained why sir? Whenever I test with or without a Mask it shows positive values? Overall great tutorial! Thank you.

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

      Hey did you find solution to this? Did your project work?

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

      hey did u find the solution for this ??

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

      @@sanjanaramesh4124 hey did your model trained with whole data instead of 55!!

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

      @@anirudhkatkam9967 have you tried this

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

      @@anirudhkatkam9967 for me the web cam is not opening

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

    Marvelous

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

    Does it requires online connectivity?

  • @ikhwanamirhamzah1598
    @ikhwanamirhamzah1598 4 ปีที่แล้ว +6

    during the training process in settings for binary classification, my program were only able to train 55 datas only instead of 1755 like yours. why is that happening?

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

      diam la

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

      Yap i have this exact problem too

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

      I am also facing this same problem. Please help us out!!

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

      Did you find the solution to this? Did your project work?

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

      I have same problem too, does anyone knows the solution?

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

    Sir can u please help with ('int' object is not callable) at the second last part of your video.

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

    Hello sir , how to upload the dataset in Jupiter notebook

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

    hi, im getting this error error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'.
    this happen under the Directory section. it works fine with the first picture before it tho.
    is this something to do with the naming of the folders or the path?

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

    sir , can you please let me know which algorithm you used?

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

    Which Algorithm you have used?

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

    Best Tutorial ever I see nice

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

    Hi sir.
    We can use in Google colab sir this code

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

    sir how to add a new category like Mask is not properly wear.....
    so what is the final condition for that??????

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

    hi i already tried your code in jupyter nb and vscode. may i ask you something? at in the end when i run the test for webcam, why my webcam frame did not show up? can you tell me why? because i already try and tryyy and it still not working. hope you reply me:)

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

    Sir could Pls explain how to open that camera app??

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

    I am using Mac code is running perfectly but when opven cv code run to detect the image the triangle remains as constant position not move and neither shows result when mask wear, please let me know the possible issues. thanks

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

    Can you do email alert message system in this project pls explain it through a video pls

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

    good afternoon sir permission to ask how you determine the number 0 in the line of code if (Predictions>0):

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

    Very useful, would you mind providing us the code link? regards,

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

      Here's the course about Face Mask Detection, you need, it's paid but it's worth it.
      khadymschool.thinkific.com/courses/data-science-hands-on-covid-19-face-mask-detection-cnn-open-cv

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

      @@KHM95 Thank you.

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

    my webcam light turns on but the window doesn't show. Why??

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

    is it possible to create a user interface for this app?

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

    For this project I have uploaded the dataset folder which has subfolders as with mask and without mask
    Uploaded in drive
    But still it shows no file or directory exists

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

    getting 'str' object has no attribute 'decode'
    error while importing model.. any suggestions?

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

    May I keep this project in my CV for interview

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

    Transfer learning means training on predefined models , pls this may sound funny but do u still need(train_data and test_data to train on

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

      Thank you so much for your interest. Sorry for being late in replying.
      As explained in video, Transfer learning is to utilized pre-trained deep learning model. However, incase you want to utilize for different problem where number of classes become different and nature of problem is different, you need to re-train your network with very few epoch ,which is technically a fine tuning.
      For detail please review my video, I have explained everything.
      I am sorry, but I slightly disagree with your definition its not predefined, its "pre-trained".
      Thank you so much for your interest and supporting my channel. Please keep supporting like this,

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

      @@deeplearning_by_phdscholar6925 ok thanks

  • @rajalakshmi-iw2hj
    @rajalakshmi-iw2hj 3 ปีที่แล้ว +1

    How can I do it for 3 or more classes..Sir?

  • @RahulSharma-zy3lg
    @RahulSharma-zy3lg 3 ปีที่แล้ว

    Sir can I build Face mask detection website using python html css javascript...

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

    Can you please help me how to put it on a Dasboard? Pls ty

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

    Urgent.....
    Sir when i type print(len(training_data)). It shows 0. It means it read non of those dataset. Can you tell me how can i solve it

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

    Hi,

    I my son doing BCS final year assignment using the below mention gadget with Python programming.
    I need Your Help

    Camera link with Arduino to find its IP…., then IP connect with Wi-Fi to connect laptop.

    1) Arduino
    2) Camera:esp32
    3) Python Language for programming
    4) Laptop with graphic card Novadia Card GT Force 720m
    5) Windows 10 OS.

    The problem I am facing is the Python cannot access the Nivadia card and gave error of “Getting FPS = 0.11 which is slowest on windows 10”.

    Project Description:

    Face mask detection. (If arriving person at gate “wear mask” it will give command to open the gate and if not than it will not open the gate)

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

    Hello, First of all thanks, I want it to do the mask check only once, not dynamically in camera. How can I do it

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

      Thank you for your interest, sorry for being late in replying, so incase i get your question correctly, inside video, we have mentioned (while True:) infite loop to check continuous frames, you can customized your loop and check for few or one image at a time or can program to move by step by pressing some keys, I hope I have answered your question. Stay blessed.

  • @29fsushantkulkarni13
    @29fsushantkulkarni13 3 ปีที่แล้ว

    can tensorflow work on amd vega 8 gpu? tell me i want this as project

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

    How Can i test multiples image instead of only one image

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

      Thank you for your interest. At the end of this video, we have processed for live webcam having multiple images, such as video is a combination of images. However, in case you are asking about multiple faces in one image, or a video, the code is still valid as it finds all possible faces and process it in a loop. you don't need to change code, just change the input according to your requirement, our code is dynamic enough to handle such situation. Thank you for your support.

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

    How can I extend this AI system by adding a notification mechanism to report any face mask violation to authority?

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

    Hi sir good day

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

    can you provide a link to download the dataset ?

  • @동차-x8f
    @동차-x8f 3 ปีที่แล้ว +1

    NameError Traceback (most recent call last)
    in
    43 face_roi = roi_color[ey:ey+eh, ex:ex+ew]
    44
    ---> 45 final_image = cv2.resize(face_roi, (224, 224))
    46 final_image = np.expand_dims(final_image, axis = 0)
    47 final_image = final_image/255.0
    NameError: name 'face_roi' is not defined
    where did you declare the variable named 'face_roi'

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

    Sir can u provide the collab link

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

    please help me im getting an error
    error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-1drr4hl0\opencv\modules\highgui\src\window.cpp:651: 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'
    what should i do to solve this error please help me

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

    How to find confusion matrix?

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

    Hello sir
    I have one problem sir, in settings for binary classification I am getting loss=6.9086 accuracy=0.5007.
    these are different from you. please tell me the reason.

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

    How i can add access and temperature measure function in it??

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

    Good morning sir.
    I'm ASIF Ali from pakistan . Is there any possibility or opportunity for me to be there for m.phil on scholarship. I'm also interested in deep learning

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

    It was great. If I have five classes which part should I make changes

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

      the classes probably

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

    Thank you Sir for making the learning more interesting..
    can you please tell how can i insert camera setting in colab while implementing the code snippet in colab ?

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

      Thank you for your interest, and sorry for being late in replying.
      colab.research.google.com/github/TannerGilbert/Tutorials/blob/master/Tensorflow%20Object%20Detection/detect_object_in_webcam_video.ipynb#scrollTo=3a5wMHN8WKMh
      The link provided is a tutorial for object detection, in the last part, Web came is accessed using opencv.
      So using opencv you can change all the camera settings
      #capture from camera at location 0
      cap = cv2.VideoCapture(0)
      #set the width and height,
      cap.set(3,1280)
      cap.set(4,1024)
      cap.set(15, 0.1)
      you can change resolution, frame per second and many other settings , search opencv commands on google
      As you did not mentioned which camera settings are you talking about, but I hope this would help you .
      Sorry if I couldn't answer you according your expectations

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

    I am getting face not detected multiple times.I am not able to resolve it. what might be the problem

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

      please modify your code by adding enforce_detection =False
      result = DeepFace.analyze(frame, actions=['emotion'], enforce_detection=False)
      Or make sure your face is inside the video
      or
      any other exception method using webcame such as if face not detection donot call deepface.

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

    for create_training_Data()
    name 'Classes' is not defined
    but why

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

      sorry for being late in replying, please check the code again, before the loop, you have to mentioned all classes which is a list such as Classes = ['Open Face', Closed_face'], make sure to use same name as of folder name, but in your case it seems you forget to write this line Classes = ['Open Face', Closed_face'], before loop. Please add it according to your folder name, you will get the answer. Thanks, stay blessed

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

    Hi, mine don't wanna open the video capture how do i solve this? The code keep loading but nothing pops out

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

      I also getting same issue do u have solution for this

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

      me too and new_model is not defined is error coming

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

    After running create_training_Data() method, when I print len of it, it giving me 0 len, idk why, code is correct as well as directory is also correct. Please help

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

      thank you so much and sorry for being late, the only reason could be mismatch the names, like folder name and classes names must be same, please double check. we ensure you that if you carefully check the code again , you will resolve the issue, please check once more . Stay blessed, and keep supporting us like this.

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

      i am facing the same error:(

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

      @@atishay4859 Thank you for your interest, do you mind to put that piece of code here, like the part you are calling folder name and creating classes? I actually doubled check and everything is fine at my end as stated in video. Thanks

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

      @@deeplearning_by_phdscholar6925 thank you so much the problem has been resolved.
      can you provide the link to the code it would be a great help

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

    42:08..where did you get "model3.h5".i didn't see that model in my files .how to find the available models..pls answer..i didint understand the where did you get "my_model3.h5" (42:08),and how i find that folder..i am stuck

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

      he already saved it before

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

    Can you apply this for sign language detection?

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

      Thank you so much for your interest, in case you do have labelled images for sign language, ofcource you can easily do it by using transfer learning as followed in the video for Face Mask,. just copy all labelled image of different signs and name them according to labels ,and use same method,
      All you need is to search for dataset of sign language

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

      @@deeplearning_by_phdscholar6925 Thanks for your reply. How about using data set from kaggle data set?

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

    can we detect face while wearing mask

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

    Thaks sir

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

    @DeepLearning_by_PhDScholar Sir, we are not getting negative value for picture with mask. we are getting positive values in both the cases. Please assist.

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

      Hey! Did you ever find the solution to this?

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

    I overcome this error : Unable to allocate 2.19 GiB for an array with shape (1950, 224, 224, 3) and data type float64. This happened when I do normalize. May I know how to solve it?

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

      I had tried to delete some image and it solved, sorry for interrupt

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

    I successfully run the program using web camera. Unfortunately, it doesn't detect face with face mask.

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

      Any update here?

    • @Mehedi.25
      @Mehedi.25 ปีที่แล้ว

      please you can share me your code please...!!

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

    Can you please share the source code

  • @SAURAVKUMAR-bq9hl
    @SAURAVKUMAR-bq9hl 3 ปีที่แล้ว

    thankyou sir,,,, plz share ipynb file, if possible

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

    thank you, but how sigmoid loss function return negatives values?

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

      it supposed to return values between 0 and 1

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

    Sir, Please reply, I am eagerly waiting for your mail. Also I completed coding, I am getting same output as text but my camera is not getting invoked automatically. Is there is anything needs to be done for that? Please Please Please reply

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

      Here is the code I copied:
      import cv2 # pip install opencv-python
      # pip install opencv-contrib-python for full package
      # from deepface import DeepFace pip install deepface
      path = "haarcascade_frontalface_default.xml"
      font_scale = 1.5
      font = cv2.FONT_HERSHEY_PLAIN
      # set the rectangle background to white
      rectangle_bgr = (255, 255, 255)
      # make a black image
      img = np.zeros((500,500))
      # set some text
      text = "Some text in a box"
      # get the width and height of the text box
      (text_width, text_height) = cv2.getTextSize(text, font, fontScale=font_scale, thickness=1)[0]
      # set teh text start position
      text_offset_x = 10
      text_offset_y = img.shape[0] - 25
      # make the coords of the box with a small padding of two pixels
      box_coords = ((text_offset_x, text_offset_y), (text_offset_x + text_width + 2, text_offset_y - text_height -2))
      cv2.rectangle(img, box_coords[0], box_coords[1], rectangle_bgr, cv2.FILLED)
      cv2.putText(img, text, (text_offset_x, text_offset_y), font, fontScale=font_scale, color=(0,0,0), thickness=1)
      cap = cv2.VideoCapture(-1)
      # Check if the webcam is opend correctly
      if not cap.isOpened():
      cap = cv2.VideoCapture(0)
      if not cap.isOpened():
      raise IOError("Cannot open webcam")
      while True:
      ret, frame = cap.read()
      faceCascade = cv2.CascadeClassifier(cv2.data.haarcascades + "haarcascade_frontalface_default.xml")
      gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

      faces = faceCascade.detectMultiScale(gray, 1.1, 4)
      for x,y,w,h in faces:
      roi_gray = gray[y:y+h, x:x+w]
      roi_color = frame[y:y+h, x:x+w]
      cv2.rectangle(frame, (x,y), (x+w, y+h), (255, 0, 0), 2)
      facess = faceCascade.detectMultiScale(roi_gray)
      if len(facess) == 0:
      print("No Face Detected")
      else:
      for (ex,ey,ew,eh) in facess:
      face_roi = roi_color[ey: ey+eh, ex: ex+ew] # cropping the face

      final_image = cv2.resize(face_roi, (224,224))
      final_image = np.expand_dims(final_image, axis=0) # need fourth dimension
      final_image = final_image/255.0

      font = cv2.FONT_HERSHEY_SIMPLEX
      Predictions = new_model.predict(final_image)

      font_scale = 1.5
      font = cv2.FONT_HERSHEY_PLAIN

      if (Predictions>0):
      status = "No Mask"

      x1, y1, w1, h1 = 0, 0, 175, 75
      # Draw black background rectangle
      cv2.rectangle(frame, (x1, x1), (x1 + w1, y1 + h1), (0,0,0), -1)

      # Add text
      cv2.putText(frame, status, (x1 + int(w1/10), y1 + int(h1/2)), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0,0,255), 2)
      cv2.putText(frame, status, (100,150), font, 3, (0,0,255), 2, cv2.LINE_4)

      cv2.rectangle(frame, (x,y), (x+w,y+h), (0,0,255))
      else:
      status = "Face Mask"

      x1, y1, w1, h1 = 0, 0, 175, 75
      # Draw black background rectangle
      cv2.rectangle(frame, (x1, x1), (x1 + w1, y1 + h1), (0,0,0), -1)

      # Add text
      cv2.putText(frame, status, (x1 + int(w1/10), y1 + int(h1/2)), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0,0,255), 2)
      cv2.putText(frame, status, (100,150), font, 3, (0,255,0), 2, cv2.LINE_4)
      cv2.rectangle(frame, (x,y), (x+w,y+h), (0,255,0))

      # Draw rectangle around the faces
      # for (x,y,w,h) in faces:
      # cv2.rectangle(frame, (x,y), (x+w, y+h), (0,255,0),2)

      # Use puttext() method for inserting text on video

      cv2.imshow('Face Mask Detection Tutorial', frame)

      if cv2.waitKey(1) & 0xFF == ord('q'):
      break

      cap.release()
      cv2.destroyAllWindows()

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

      did u completed this project?

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

      @@atomtrevor9958 did you complete this project?

  • @saliniu4423
    @saliniu4423 3 ปีที่แล้ว +2

    Sir i didnt get any negative values plz help meeee

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

      same for me, all predictions give positive value!
      did you find a solution?

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

      @@moussakeitamoussakeita8519 Nooo

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

      Did anyone find the issue here?

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

    Hello sir,
    I got "Image data of dtype object cannot be converted to float" this error please help me.

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

      I got the same error. How did you solved that?

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

    Does this code work on rasberry pi

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

      Thank you so much and sorry for being late in replying, Ofcourse, you can use same code in Raspberry pi, as its just linux, however as its embedded system based on arm not amd64, so you must check IDE or run code directly using termimal, python code.py. Code is dynamic, only platform is different, so dont worry it will work. I hope I have answered your question, stay blessed

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

    where do i get code?

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

    why all values are posiive for prediction? I followed same method

  • @md.shafaatjamilrokon8587
    @md.shafaatjamilrokon8587 3 ปีที่แล้ว

    Assalamu Alaikum
    Could you please make a video on food ingredients recognition ?? Please

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

    plz need help in fight detection

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

    sir my training data is not working whenever i print length of training data it always shows 0

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

      Thank you for your interest, sorry for being late in replying, please follow the instructions in video, as command is .shape or .len, and it must be numpy array,
      like shape command does not work for "list" . you need to convert to numpy array first, please follow the instructions you must have missed something, thanks. Stay blessed.

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

      sir can u share your email id so that i can share you my screenshots of code

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

      @@keshavgoyal3106 zeedan.mickle.ferray@gmail.com

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

      sir i emailed you my queries please do check

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

    Hello, you have any idea how can i store label "status", timestamp hour and data when the model pick a image and location of a camera in a database?

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

      Thank you for your interest and sorry for being late in replying. your question is bit confusing for me, as per my understanding, if you are talking about the status of label in testing phase, so you can store all corresponding information i,e status (prediction of model), timestamp(use import time, time.time() etc) and by location of camera you mean index or view (multiview geometry) you need computer vision knowledge, , lastly , for database you can use mysql library for python and can store in database. your question was too broad, I hope I have answered it please forgive me if not, Stay blessed.

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

      @@deeplearning_by_phdscholar6925 hello, thanks for you answer.
      I mean that every time a face is detected, the result of whether or not it is wearing a mask is stored in a database.
      About the location of the camera I mean the longitude and latitude, suppose you want to put cameras in the city to apply a control, then I want you to save the location of each camera when the person without a mask is detected. My idea is for QlikSense or Power BI to connect to that database and keep track of it in a more user-friendly system for an end user.

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

      Thanks for replying, I appreciate your very nice and amazing idea you have. There are two locations, like (1)location of camera can be found by gps receiver or if its ip-camera it is too easy to find the location.
      Regarding the location of a person in image, it is also simple , all you need to make your images geo-referenced (lat/long of each pixel).
      Based on multi-view geometry (word-coordinates, geodetic-coordinates, camera matrix), if your camera Angle of view is known, focal length (intrinsic parameters) + extrinsic parameters you can find and using Geometric transformations, all images can be geo-referenced. In that case, every pixel's latitude and longitude will be known, and you can save it.
      In short, with few formulas and known parameters related to your camera, you can easily perform your task.
      It was a nice discussion on a fruitful topic.

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

      @@deeplearning_by_phdscholar6925
      I regret not being too clear with my query. I appreciate your time to respond.

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

    For me, i can only hear beep sound , i cannot see video

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

      BRO CAN YOU SEND ME THE CODE I'M GETTING SOME ERRORS

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

    I'm getting error in live cam

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

    Thank you sir so much it really helped me a lottt

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

      Thank you dear. In case you like it please share with others and subscribe to my channel, its our start as only one month , so we need more subscribers like you, we will be coming with more good videos. Stay blessed.

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

      @@deeplearning_by_phdscholar6925 sir tensorflow is not installing it shows could not find a version that satisfies the requirement tensorflow...what should I do??
      But when I type pip install tf it downloaded

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

      Did u finished this project?

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

      @@geethanjaligajulapalli3189 yeah finished

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

      @@nivethitha8317 Can u please share ppt and documentation of this project .please help me with this, we didn't have enough time,within one day,we need to submit.please please help me. please nivethitha

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

    create_training_Data()
    print(len(training_data) result=0 why i wrote like you sir ,the class and docm. name is same

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

      Thank you for your interest, it seems like your folder path or exact name of folder may not correct or same as class names.
      In video we have shown that even without calling the function, you can first check by loading first image and count the number of images exist inside the folder.
      Please check that part carefully, I am hopeful that you will definitely resolve this issue, , your len is zero because it cannot find any images inside the folder, please verify it as in video before making it as function such as load first image and check the number of total images inside folder, In our case, as folder was in "current directory", in your case, if its not like this check the path.
      I hope I have answered your question, please keep sharing my videos and keep supporting us like this.

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

    sir, can u please share the code

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

    Sir, i have got errors in my code
    Can you please share the source code

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

    How is possible to declare face_roi in 'for' loop as an local variable, then trying to acces it from the while loop, where it can t be accessed..That's incredibly stupid. On pycharm it doesn't work and it normally doesn't work because you're trying to acces a local variable from another group of instructions.

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

    Sir,I am getting an error like assertion failed !empty() in function 'cv::CascadeClassifier::detectMultiScale'
    and i gave the path too correctly
    How can i solve this error

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

      I'm getting the same error, have tou resolved yours?

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

      make sure you have the backslashes correct. If you are doing the \ make sure you have r infront of your path like so. r'C:\.......\'

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

      remove "cv2.data.haarcascade+" and only keep "faceCascade = cv2.CascadeClassifier('haarcascade_frontlface_default.xml')". Worked for me

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

    import tensorflow as tf is not working!

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

      Sorry for being late in replying, please check your installation, it seams like tensorflow in not being install, please follow the instruction in video for installation of tensorflow. make sure to use same environment for coding and installations, as in anaconda there are multiple environments ,you can check by command, >> conda env list, you will get list and activate the one in which you have installed, >> activate myenv , etc, I hope I have answered your question

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

    Not able to reshape

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

    When i download the dataset it says that the zip is corrupted how to solve this problem?

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

      this usually occurs download has not been successful. Retry download.

  • @shan-4240
    @shan-4240 4 ปีที่แล้ว

    i'm getting error name 'face_roi' is not defined. how to fix it?

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

    ValueError: logits and labels must have the same shape ((None, 1, 1, 1) vs (None, 1))
    I am getting this error while trying to fit the new model.. how to solve it sir?

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

      Thank you so much for your interest, I am coming across this kind of error for the first time,
      However, I can assure you if you go through the video carefully this error will not appear.
      It seems like you have mistakenly sized the logits(last FC layer ouput) wrong , please check , the FC layer size and the activation function. so you can skip a part of video and go directly till the point where last layer is defined.
      I hope this will solve your problem. Stay blessed and please keep supporting my channel like this.

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

      Your issue resolved? I think last layers not added same problem with me

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

    Sir, when I tried to install tensorflow by writing.... pip install tendorflow
    I found error during installation. Is there another way to install tensorflow? Please tell me //

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

    cap = cv2.VideoCapture(1)
    if not cap.isOpened():
    cap = cv2.VideoCapture(0)
    if not cap.isOpened():
    raise IOError("Cannot open webcam")
    i'm getting an error in raise IOERROR COMMAND CAN SOMEONE PLSE HELP ME .... PLSE

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

    can share a link of this code?

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

    Anyone have documentation and ppt of this project? please help me

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

    jai hind sir!
    sir,can you provide the code link ?

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

      Thank you for your interest, and sorry for being late in replying , actually , we did not uploaded code on purpose, so that beginners can generate their own code by completely watching the video. It would hardly take your 1 hour to generate your own code. Thank you for supporting me, Stay blessed. in case you still wants the code, send me your email on zeedan.mickle.ferray@gmail.com, I will send you the code. Thanks

  • @Harshit-pc5or
    @Harshit-pc5or 2 ปีที่แล้ว

    15:45

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

    Sir can I get a source code with GitHub

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

      Thank you for your interest. In case you follow the complete video, you will have the source code at the end, we did not share the source code for this video on purpose so that once can learn each line without directly executing the code. Thanks

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

    41:20
    new_model.fit(X,Y, epochs=1, validation_split=0.1)
    # I got this error below:
    ResourceExhaustedError Traceback (most recent call last)
    in
    ----> 1 new_model.fit(X,Y, epochs=1, validation_split=0.1)
    ...
    ...
    ResourceExhaustedError: OOM when allocating tensor with shape[32,128,28,28] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
    [[node functional_7/conv_dw_4/depthwise (defined at :1) ]]
    Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.
    [Op:__inference_train_function_23335]
    Function call stack:
    train_function

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

      Solution:
      # Limiting GPU memory growth
      gpus = tf.config.experimental.list_physical_devices('GPU')
      if gpus:
      # Restrict TensorFlow to only use the first GPU
      try:
      for gpu in gpus:
      tf.config.experimental.set_memory_growth(gpu, True)
      tf.config.experimental.set_visible_devices(gpus[0], 'GPU')
      logical_gpus = tf.config.experimental.list_logical_devices('GPU')
      print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPU")
      except RuntimeError as e:
      # Visible devices must be set before GPUs have been initialized
      print(e)

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

    list index out of range

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

    please is there anyone to urgenty help me here