Step by step Face Mask Detector in Windows
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
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
I'm always support u bro
you are god for me sir , successfully completed project thanku sooooo.... much SIR
hey pls can u guide me too doing thus project??? Im not getting
Vera level sir 💥
Amazing man...worked...
working fine thanks!!
Hey are you using inbuilt laptop camera or external web cam?
YOU ROCK SIR, THANK YOU SO MUCH
this is just perfect
Its work, thank you
Nice brother
its working amazing
Sir while running Program in cmd I type E: and path i got error I. E. The system cannot find the path specified
when I tried to change directory to code folder using cd syntax it is showing "the system cannot find the path specified"
Hey!! amazing project, I wanted to deploy this project as an API. If you know how to do it please reply.
When i install all the libraries then warning is there "ignoring invalid distribution -pencv-python (c:/users/dell/appdata/roaming/python/python38/site -packages)
hi sir I am getting this error please resolve this error
None of the MLIR Optimization Passes are enabled (registered 2)
It works..!!!
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 🙏
Good day sir, I noticed at the ending of the setup it seemed like you skipped an important step. Thank you
Hey!! This is just perfect... I tried it and it works.... Thanku😊
can u help me with tensor flow while i am running cmd its throwing error
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
"
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
Can you please tell us about the algorithm that you used ?
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...
Have you followed step by step based on my video?
Or you can find the steps from video description
sir to install Cascadefiel of mask detection in pyCharm
Sir first should we hv to run training file and then other files
Sir while installing pip face mask detector I got an error saying that meta data generations failed
I got an error when I ' import tensorflow as tf' '
What command to be given to detect_image ???
sir, which algorithm is used here?
Is shows identiation error while we use except
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
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
plese tell me soloution
import tensorflow as tf
File "", line 1
import tensorflow as tf
IndentationError: unexpected indent
Not working sir,,I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:176] None of the MLIR Optimization Passes are enabled (registered 2)
Have you got answer?
Mery pass python 3.9 version h us me nh ho raha.... Kindly tell me kesy hoga
What if i press enter twice after import cv2? When I type cv2._version_, it says that cv2 is not defined
You can try reinstall opencv
$ pip uninstall opencv-python
then
$ pip install opencv-python
@@YaserAliHusen i've tried it but same problem still occur
hi sir,still getting error in line 140 in
cv2("Frame", frame)
Did you get the answer?
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.
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
@@YaserAliHusen Sir it suddenly stops downloading when using pip install face-mask-detector...wt may be the reason
@@LuckyLucky-ms5nz, try to skip this step
@@YaserAliHusen then how can i instal the face mask detector lib packages sir?? Will it if skip that installation step?
Sir is it possible getting in contact with you because I am having trouble with the process
Email me at yaseralie@gmail.com
kak mau tanya untuk buka directorynya gmna ya
saya masuk lokal disk d terus langsung buka video kok ditrectory tidak di temukan
Directory folder hasil download dari github.
Sudah download file zipnya?
Extract ke directory di mana saja
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'
same here....any solution did you get
Good Afternoon sir,
Sir I tried face mask project but I'm getting error
Hloo I got cv2 what it means??
Can u pls tell me how are you changing directory at 8:05 ?
Copy directory path in windows explorer
And in command prompt type cd (space) paste copied path
Hello Sir, I am getting error while installing face-mask-detector. Pease help
me too. do you solved that problem?
Sir it is not showing the output window when I run the final code.
me too
same here
Me too 🤕🤕🤕🤕🤕
Sir i have a issue during execution i got an error , can u plz help me
Send me an email
Everything is done..bt. final error is...enable MLIR optimization passes..can plz give me a soln
try this:
pip install face-mask-detector
Le code peut être utilisé dans un projet Arduino en utilisant Esp32_cAM
Could we able to run this on PyCharm...?
I dont know, i dont have experience
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
Please tell me how to run detect_image.py .. it shows me error
sir , code is running perfectly but the application is not stopping. I mean i'm getting the notification continously
Just press ctrl + c on your keyboard
None of the MLIR Optimization Passes are enabled (registered 2)
I am getting this after running the code
Hi Kamal, I am also getting the same Issue. Did u get any work around for it
@@prathameshpatil7894 same
same error how to solve this
Anyone got answer ? Please help
@@kriptoedits9978 Try this...
pip3 install -r requirements.txt
Actually it works from my laptop.
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
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
then type> pip install tensorflow
Which domain is this sir
Can you please help me to resolve my issue
Sir my video captures starts and stops immediately, please help me in this
yes sir mine too plz help. did u rectify it??
Error came like camera index out of range
Can we use it in Windows 7, sir?
I dont know, i tried on windows 10
Hello sir, how to add alert sound please
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
Sir I have some issue from play sound import alarm
ModuleNotFoundError:No module named 'playsound'
Install playsound library
Type on cmd:
pip install playsound
@@YaserAliHusen now to showing same sir
It is showing like
File"detect_mask_mask_video.py",line 9 ,in
ModuleNotFoundError:no module named 'playsound'
@@manupranu8122
Have you installed playsound library?
How about another py file,
Could Facemask detection run?
@@YaserAliHusen yes py file also having sir
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
Me also get this error
Then what have to now plss
import tensorflow as tf
File "", line 1
import tensorflow as tf
IndentationError: unexpected indent
I have tensorflow error
Hello am getting errors while installing face-mask-detection
Hey were you able to resolve this error?
Sir, how to add a alert in it
Pls reply as soon as possible
There is an error while running
Sir how to add social distance in python program ?
Did you view my another video about social distancing
@@YaserAliHusen no sir ,plz share link sir 🙏🏼
@@manogarik1006
This is link: czcams.com/video/aPxzbUrn3ec/video.html
@@YaserAliHusen thank you sir
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
Sir video program is not opening what to do
You can check the camera,
Or you find out in original github
@@YaserAliHusen thank you sir
Bro I need ppt and report ?? Can u pls help me to get
I dont know about ppt and report,
I think you just trial by yourself and you can make ppt/report based on your experiment.
@@YaserAliHusen can u do it for me .. because I can't 😭
@@saisharaneruventi2180 Hey bro have you did report and ppt?
@@kriptoedits9978 ppt I have done
@@saisharaneruventi2180 can you send me it's link?
It's taking too much time to load the last step of face-mask-detector
Did you get the output
@@josephkenaniah9594 Yes I got the output
open cv is not importing
help me guys
You can try reinstall opencv
First,uninstall opencv:
pip uninstall opencv-python
Install opencv:
pip install opencv-python
NoneType object has no attribute shape
Sir I am getting this error please help me out
@@smile-tk7yt have you got the answer me too facing the same problem I'm using a external web cam
@@kriptoedits9978 noo bro I haven't
@@smile-tk7yt ok
Were you able to resolve this error?
dalam menit ke 7:54