face-mask-detection | Simple project to detect if person | Machine Learning library
kandi X-RAY | face-mask-detection Summary
kandi X-RAY | face-mask-detection Summary
Simple project to detect if a person is wearing a mask
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Detects and returns the face of the given frame .
face-mask-detection Key Features
face-mask-detection Examples and Code Snippets
Community Discussions
Trending Discussions on face-mask-detection
QUESTION
I am building a model for face mask detection on Google collab. I'm unable to save the model to my drive. I ran the following code on Google Collab:
...ANSWER
Answered 2021-May-12 at 07:58Change your directory to Google drive and perform model.save()
Add %cd /content/drive/MyDrive/
to change your directory inside drive.
Another option is to give the full path while using model.save()
Like this model.save('content/drive/MyDrive/face_mask_detection_alert_system.h5')
Full code
QUESTION
I want to crop an image properly. Lets say my image is called frame
and x
, y
, w
and h
are xmin
, ymin
, xmax
and ymax
, respectively:
ANSWER
Answered 2020-Dec-09 at 12:39I think you got some misunderstanding about how indexing and slicing in numpy works:
For your first line y:y + h
basically means slice from index y to index y + h
. Same goes for the second dimension, there you take the array slice from x to x + w
.
So basically x
and y
correspond to your xmin
and ymin
and you slice to xmax
and ymax
which is the window minimums plus the corresponding height and width; that's why you have y + h
and x + w
in the second part of both dimensions.
As for frame[y:y, x:x]
- this makes no sense at least in python, so you might have mixed up something there. If you slice from the index to the same index, your resulting array will always be empty:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install face-mask-detection
You can use face-mask-detection like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page