Step by step Face Mask Detector in Windows

Sdílet
Vložit
  • čas přidán 8. 01. 2021
  • Step by step Face Mask Detector in Windows
    If you find this content useful, please send me "Super Thanks"
    Requirement:
    - Windows 10
    - Webcam
    Please follow these steps:
    1. Download Python
    Download : www.python.org/downloads/wind...
    2. Install Python
    Tick add path
    Make new folder on D, example: Python38
    Point install on that folder
    3. Check python and upgrade pip
    $ python --version
    $ pip --version
    $ python -m pip install --upgrade pip
    4. Install numpy
    $ pip install numpy
    5. Install opencv
    $ pip install opencv-contrib-python-headless
    6. Check installed opencv
    $ python
    $ import cv2
    $ cv2.__version__
    7. Install tensorflow
    $ pip install --upgrade tensorflow
    check tensorflow
    $ python
    $ import tensorflow as tf
    8. Install imutils
    $ pip install imutils
    9. For face mask detection, we must update the libraries suitable for face mask detection
    $ pip install face-mask-detector
    10. Download python code from github
    github.com/chandrikadeb7/Face...
    11. Trial python code
    Open cmd, run as administrator
    Change directory to python code folder location using cd syntax
    $ python detect_mask_video.py
    If you get error while running face mask detection
    Edit python file
    if you get error like this: "cv2.error: OpenCV(4.5.2) C:\Users
    unneradmin\AppData\Local\Temp\pip-req-build-er8x_mh_\opencv\modules\highgui\src\window.cpp:679: 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'"
    Just reinstall opencv
    $ pip uninstall opencv-python
    then
    $ pip install opencv-python
  • Jak na to + styl

Komentáře • 168

  • @metaneetacademy8581
    @metaneetacademy8581 Před 2 lety +1

    Bro niga vera level matha videos la allam yamathuranga puriyavae matuthu ungala la dha na ipo project pana poran tq sm bro again niga vera level bro

  • @metaneetacademy8581
    @metaneetacademy8581 Před 2 lety

    I'm always support u bro

  • @janardhans9604
    @janardhans9604 Před 3 lety +2

    you are god for me sir , successfully completed project thanku sooooo.... much SIR

    • @nikhitapawar7173
      @nikhitapawar7173 Před 5 měsíci

      hey pls can u guide me too doing thus project??? Im not getting

  • @jayashreeg6814
    @jayashreeg6814 Před 2 lety

    Vera level sir 💥

  • @velmuruganr9321
    @velmuruganr9321 Před 2 lety

    Amazing man...worked...

  • @nishantjain6721
    @nishantjain6721 Před 3 lety +3

    working fine thanks!!

    • @kriptoedits9978
      @kriptoedits9978 Před 3 lety

      Hey are you using inbuilt laptop camera or external web cam?

  • @maruhpereira384
    @maruhpereira384 Před 8 měsíci

    YOU ROCK SIR, THANK YOU SO MUCH

  • @Ramya_BAIS
    @Ramya_BAIS Před 3 lety

    this is just perfect

  • @sreekrishnagovind5995
    @sreekrishnagovind5995 Před 2 lety

    Its work, thank you

  • @RinkuKumar-xk1us
    @RinkuKumar-xk1us Před 3 lety

    Nice brother

  • @tchnicalmasterminds5662

    its working amazing

  • @vaishaliakhare3729
    @vaishaliakhare3729 Před 3 lety +2

    Sir while running Program in cmd I type E: and path i got error I. E. The system cannot find the path specified

  • @nagasrinivasa
    @nagasrinivasa Před 3 lety

    when I tried to change directory to code folder using cd syntax it is showing "the system cannot find the path specified"

  • @akash.a3823
    @akash.a3823 Před 3 lety +1

    Hey!! amazing project, I wanted to deploy this project as an API. If you know how to do it please reply.

  • @payalbindal808
    @payalbindal808 Před 3 lety

    When i install all the libraries then warning is there "ignoring invalid distribution -pencv-python (c:/users/dell/appdata/roaming/python/python38/site -packages)

  • @dineshsai3515
    @dineshsai3515 Před 3 lety +1

    hi sir I am getting this error please resolve this error
    None of the MLIR Optimization Passes are enabled (registered 2)

  • @abhishekmehta2119
    @abhishekmehta2119 Před 3 lety

    It works..!!!

  • @aakashprajapati4836
    @aakashprajapati4836 Před 2 lety +1

    Sir I my pc all python modules are successfully installed but at last when I run in command prompt camera takes permission for allow but it is not open
    What can I do sir to solve this issue help me sir 🙏

  • @haidarsidi2754
    @haidarsidi2754 Před 2 lety +1

    Good day sir, I noticed at the ending of the setup it seemed like you skipped an important step. Thank you

  • @eshikachaturvedi1751
    @eshikachaturvedi1751 Před 2 lety +2

    Hey!! This is just perfect... I tried it and it works.... Thanku😊

  • @hamzaiqbal8897
    @hamzaiqbal8897 Před 2 lety

    sir please help!!
    when i download this from github then it give Error "C:\Users\hamzi\Downloads\Compressed\Face-Mask-Detection-master_2.zip: The archive is corrupt
    "

  • @SteffiCassandra
    @SteffiCassandra Před rokem +1

    Hi sir
    Sir the last line detect_mask_video.py I'm getting like No such file or directory
    What should I do for this Sir

  • @ujjwalsrivastava203
    @ujjwalsrivastava203 Před 2 lety

    Can you please tell us about the algorithm that you used ?

  • @sumanthgowdak700
    @sumanthgowdak700 Před 3 lety +1

    Hi sir you doing great work and get output success fully and one more request is I am try to do project on masked face recognition using python machine learning but I don't no how to run source code please help me sir...

    • @YaserAliHusen
      @YaserAliHusen  Před 3 lety +1

      Have you followed step by step based on my video?
      Or you can find the steps from video description

  • @robomanthan6122
    @robomanthan6122 Před 3 lety

    sir to install Cascadefiel of mask detection in pyCharm

  • @ananyagm1317
    @ananyagm1317 Před 4 měsíci

    Sir first should we hv to run training file and then other files

  • @manivannanr2267
    @manivannanr2267 Před rokem

    Sir while installing pip face mask detector I got an error saying that meta data generations failed

  • @ComedywithRG
    @ComedywithRG Před 3 lety

    I got an error when I ' import tensorflow as tf' '

  • @siddhantchaudhary6474
    @siddhantchaudhary6474 Před 2 lety

    What command to be given to detect_image ???

  • @AngelPaul-hl3vk
    @AngelPaul-hl3vk Před rokem

    sir, which algorithm is used here?

  • @abhinavagarwal0505
    @abhinavagarwal0505 Před 3 lety

    Is shows identiation error while we use except

  • @muhammedcakar317
    @muhammedcakar317 Před 3 lety

    hi sir help me please;
    C:\Windows\System32>pip install opencv-contrib-pyhton-headless
    ERROR: Could not find a version that satisfies the requirement opencv-contrib-pyhton-headless (from versions: none)
    ERROR: No matching distribution found for opencv-contrib-pyhton-headless

    • @YaserAliHusen
      @YaserAliHusen  Před 3 lety

      You can try to skip that step..
      jump to this step:
      9. For face mask detection, we must update the libraries suitable for face mask detection
      $ pip install face-mask-detector
      10. Download python code from github
      github.com/chandrikadeb7/Face...
      11. Trial python code
      Open cmd, run as administrator
      Change directory to python code folder location using cd syntax
      $ python detect_mask_video.py

  • @gnanendrareddy9842
    @gnanendrareddy9842 Před 2 lety

    plese tell me soloution
    import tensorflow as tf
    File "", line 1
    import tensorflow as tf
    IndentationError: unexpected indent

  • @manishghosh7520
    @manishghosh7520 Před 3 lety

    Not working sir,,I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:176] None of the MLIR Optimization Passes are enabled (registered 2)

  • @allphotage
    @allphotage Před 2 lety

    Mery pass python 3.9 version h us me nh ho raha.... Kindly tell me kesy hoga

  • @Alkahfi-hn8ik
    @Alkahfi-hn8ik Před 3 lety

    What if i press enter twice after import cv2? When I type cv2._version_, it says that cv2 is not defined

    • @YaserAliHusen
      @YaserAliHusen  Před 3 lety

      You can try reinstall opencv
      $ pip uninstall opencv-python
      then
      $ pip install opencv-python

    • @Alkahfi-hn8ik
      @Alkahfi-hn8ik Před 3 lety

      @@YaserAliHusen i've tried it but same problem still occur

  • @reshmajames958
    @reshmajames958 Před 2 lety

    hi sir,still getting error in line 140 in
    cv2("Frame", frame)

  • @vijayalakshmik642
    @vijayalakshmik642 Před 3 lety

    Sir while running
    Pip install --upgrade tensorflow
    I got an error stating that it could not find a version that satisfies the requirement tensorflow
    Could you give me a solution for this.

    • @YaserAliHusen
      @YaserAliHusen  Před 3 lety +3

      Ignore that error and step,
      You can try this command on your terminal:
      pip install face-mask-detector
      it will install the necessary version of each library for face mask detection.
      hope it can help you

    • @LuckyLucky-ms5nz
      @LuckyLucky-ms5nz Před rokem

      @@YaserAliHusen Sir it suddenly stops downloading when using pip install face-mask-detector...wt may be the reason

    • @YaserAliHusen
      @YaserAliHusen  Před rokem

      @@LuckyLucky-ms5nz, try to skip this step

    • @LuckyLucky-ms5nz
      @LuckyLucky-ms5nz Před rokem

      @@YaserAliHusen then how can i instal the face mask detector lib packages sir?? Will it if skip that installation step?

  • @chavezreece8911
    @chavezreece8911 Před 3 lety +1

    Sir is it possible getting in contact with you because I am having trouble with the process

  • @andreirawan3148
    @andreirawan3148 Před 2 lety

    kak mau tanya untuk buka directorynya gmna ya
    saya masuk lokal disk d terus langsung buka video kok ditrectory tidak di temukan

    • @YaserAliHusen
      @YaserAliHusen  Před 2 lety

      Directory folder hasil download dari github.
      Sudah download file zipnya?
      Extract ke directory di mana saja

  • @tongphong5108
    @tongphong5108 Před 3 lety

    i have a erorr when use cmd : python detech mash vieo.pycv2.error: OpenCV(4.5.2) C:\Users
    unneradmin\AppData\Local\Temp\pip-req-build-oosb1i0y\opencv\modules\highgui\src\window.cpp:679: 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'

  • @someshm.awchat9861
    @someshm.awchat9861 Před 3 lety

    Good Afternoon sir,
    Sir I tried face mask project but I'm getting error

  • @shaikhedayathullah870
    @shaikhedayathullah870 Před 3 lety

    Hloo I got cv2 what it means??

  • @happy_soul1803
    @happy_soul1803 Před 2 lety

    Can u pls tell me how are you changing directory at 8:05 ?

    • @YaserAliHusen
      @YaserAliHusen  Před 2 lety

      Copy directory path in windows explorer
      And in command prompt type cd (space) paste copied path

  • @lubnan1023
    @lubnan1023 Před 3 lety +1

    Hello Sir, I am getting error while installing face-mask-detector. Pease help

  • @seejusingh7159
    @seejusingh7159 Před 3 lety +2

    Sir it is not showing the output window when I run the final code.

  • @navyadsp5251
    @navyadsp5251 Před 2 lety

    Sir i have a issue during execution i got an error , can u plz help me

  • @saikiranboga8978
    @saikiranboga8978 Před 3 lety

    Everything is done..bt. final error is...enable MLIR optimization passes..can plz give me a soln

  • @fayrouzzozo8297
    @fayrouzzozo8297 Před 2 lety

    Le code peut être utilisé dans un projet Arduino en utilisant Esp32_cAM

  • @veeragokul3748
    @veeragokul3748 Před 8 měsíci

    Could we able to run this on PyCharm...?

  • @shilpabh9702
    @shilpabh9702 Před 2 lety

    By this code only pic1 works for face mask detection other pictures gives error
    File "detect_mask_image.py", line 104, in
    mask_image()
    File "detect_mask_image.py", line 41, in mask_image
    orig = image.copy()
    AttributeError: 'NoneType' object has no attribute 'copy'
    can anyone plz help

  • @gnaneshwarimangilipelli7674

    sir , code is running perfectly but the application is not stopping. I mean i'm getting the notification continously

  • @kamalpandey5948
    @kamalpandey5948 Před 3 lety

    None of the MLIR Optimization Passes are enabled (registered 2)
    I am getting this after running the code

    • @prathameshpatil7894
      @prathameshpatil7894 Před 3 lety

      Hi Kamal, I am also getting the same Issue. Did u get any work around for it

    • @manishghosh7520
      @manishghosh7520 Před 3 lety

      @@prathameshpatil7894 same

    • @marvelshorts2293
      @marvelshorts2293 Před 3 lety

      same error how to solve this

    • @kriptoedits9978
      @kriptoedits9978 Před 3 lety

      Anyone got answer ? Please help

    • @laflame5454
      @laflame5454 Před 3 lety +1

      @@kriptoedits9978 Try this...
      pip3 install -r requirements.txt
      Actually it works from my laptop.

  • @nrhidayahroslan3034
    @nrhidayahroslan3034 Před 3 lety +1

    hi sir, I have some problems with TensorFlow. when I install pip install --upgrade tensorflow, the error appears :
    ERROR: Could not find a version that satisfies the requirement tensorflow
    ERROR: No matching distribution found for tensorflow

    • @YaserAliHusen
      @YaserAliHusen  Před 3 lety +2

      You can try this command on your terminal:
      pip install face-mask-detector
      it will install the necessary version of each library for face mask detection

    • @mashrafimim
      @mashrafimim Před 2 lety +1

      then type> pip install tensorflow

  • @janardhans9604
    @janardhans9604 Před 3 lety

    Which domain is this sir

  • @someshm.awchat9861
    @someshm.awchat9861 Před 3 lety

    Can you please help me to resolve my issue

  • @atharvachennur4105
    @atharvachennur4105 Před 3 lety

    Sir my video captures starts and stops immediately, please help me in this

  • @004_anushat4
    @004_anushat4 Před 5 měsíci

    Error came like camera index out of range

  • @haosechia1394
    @haosechia1394 Před 3 lety

    Can we use it in Windows 7, sir?

  • @khamlanathphasouk8860
    @khamlanathphasouk8860 Před 2 lety

    Hello sir, how to add alert sound please

    • @YaserAliHusen
      @YaserAliHusen  Před 2 lety

      For add alert, follow those steps:
      1. Install pysound
      pip install playsound
      2. Make an alert sound by text to speech
      goto : freetts.com/
      save mp3 file
      3. Download python detect_mask_video_sound.py
      Link: drive.google.com/file/d/1sj7pRdtIyL6FriY67mtuVMzfpH89owpi/view?usp=sharing
      4. Change mp3 file with your mp3 file.
      5. Run python file

  • @manupranu8122
    @manupranu8122 Před 3 lety

    Sir I have some issue from play sound import alarm
    ModuleNotFoundError:No module named 'playsound'

    • @YaserAliHusen
      @YaserAliHusen  Před 3 lety

      Install playsound library
      Type on cmd:
      pip install playsound

    • @manupranu8122
      @manupranu8122 Před 3 lety

      @@YaserAliHusen now to showing same sir

    • @manupranu8122
      @manupranu8122 Před 3 lety

      It is showing like
      File"detect_mask_mask_video.py",line 9 ,in
      ModuleNotFoundError:no module named 'playsound'

    • @YaserAliHusen
      @YaserAliHusen  Před 3 lety

      @@manupranu8122
      Have you installed playsound library?
      How about another py file,
      Could Facemask detection run?

    • @manupranu8122
      @manupranu8122 Před 3 lety

      @@YaserAliHusen yes py file also having sir

  • @haidarsidi2754
    @haidarsidi2754 Před 2 lety +2

    Good day sir, I had an issue when installing tensorflow, it's shows Error: Exeption: Traceback ( most recent call last) . I hope you respond to this message. Thank you sir

  • @sreekrishnagovind5995
    @sreekrishnagovind5995 Před 2 lety

    I have tensorflow error

  • @mohanraj-jf3cz
    @mohanraj-jf3cz Před 3 lety

    Hello am getting errors while installing face-mask-detection

    • @lubnan1023
      @lubnan1023 Před 3 lety

      Hey were you able to resolve this error?

  • @Primandproperevents
    @Primandproperevents Před 3 lety

    Sir, how to add a alert in it

  • @SunnyKumar-te3vh
    @SunnyKumar-te3vh Před 3 lety

    There is an error while running

  • @manogarik1006
    @manogarik1006 Před 2 lety

    Sir how to add social distance in python program ?

    • @YaserAliHusen
      @YaserAliHusen  Před 2 lety

      Did you view my another video about social distancing

    • @manogarik1006
      @manogarik1006 Před 2 lety

      @@YaserAliHusen no sir ,plz share link sir 🙏🏼

    • @YaserAliHusen
      @YaserAliHusen  Před 2 lety

      @@manogarik1006
      This is link: czcams.com/video/aPxzbUrn3ec/video.html

    • @manogarik1006
      @manogarik1006 Před 2 lety

      @@YaserAliHusen thank you sir

  • @TheChipmunk0
    @TheChipmunk0 Před 3 lety

    Pak yaser. Mohon maaf sebelumnya. Saya sudab ikuti tutorial ini dengan langkah yg sesuai, tp pas akhir membuka python detect_mask_video.py
    Posisi webcam ON nyala lampu, namun Frame cameranya tidak tampil , mohon solusinya pak terima kasih

  • @ananyagm1317
    @ananyagm1317 Před 4 měsíci

    Sir video program is not opening what to do

    • @YaserAliHusen
      @YaserAliHusen  Před 4 měsíci +1

      You can check the camera,
      Or you find out in original github

    • @ananyagm1317
      @ananyagm1317 Před 4 měsíci

      ​@@YaserAliHusen thank you sir

  • @saisharaneruventi2180
    @saisharaneruventi2180 Před 3 lety

    Bro I need ppt and report ?? Can u pls help me to get

    • @YaserAliHusen
      @YaserAliHusen  Před 3 lety

      I dont know about ppt and report,
      I think you just trial by yourself and you can make ppt/report based on your experiment.

    • @saisharaneruventi2180
      @saisharaneruventi2180 Před 3 lety

      @@YaserAliHusen can u do it for me .. because I can't 😭

    • @kriptoedits9978
      @kriptoedits9978 Před 3 lety

      @@saisharaneruventi2180 Hey bro have you did report and ppt?

    • @saisharaneruventi2180
      @saisharaneruventi2180 Před 3 lety

      @@kriptoedits9978 ppt I have done

    • @kriptoedits9978
      @kriptoedits9978 Před 3 lety

      @@saisharaneruventi2180 can you send me it's link?

  • @khudabakshyk_6834
    @khudabakshyk_6834 Před 3 lety

    It's taking too much time to load the last step of face-mask-detector

  • @chandanmarulaplar1896
    @chandanmarulaplar1896 Před 2 lety

    open cv is not importing

    • @chandanmarulaplar1896
      @chandanmarulaplar1896 Před 2 lety

      help me guys

    • @YaserAliHusen
      @YaserAliHusen  Před 2 lety

      You can try reinstall opencv
      First,uninstall opencv:
      pip uninstall opencv-python
      Install opencv:
      pip install opencv-python

  • @smile-tk7yt
    @smile-tk7yt Před 3 lety

    NoneType object has no attribute shape

    • @smile-tk7yt
      @smile-tk7yt Před 3 lety

      Sir I am getting this error please help me out

    • @kriptoedits9978
      @kriptoedits9978 Před 3 lety

      @@smile-tk7yt have you got the answer me too facing the same problem I'm using a external web cam

    • @smile-tk7yt
      @smile-tk7yt Před 3 lety +1

      @@kriptoedits9978 noo bro I haven't

    • @kriptoedits9978
      @kriptoedits9978 Před 3 lety

      @@smile-tk7yt ok

    • @lubnan1023
      @lubnan1023 Před 3 lety

      Were you able to resolve this error?

  • @andreirawan3148
    @andreirawan3148 Před 2 lety

    dalam menit ke 7:54