Detect face mask in an Image
Project description
SVM facemask classifier
Pretrained Model used: Keras-facenet model () This model is used to detect the faces in a image and create a embedding vector of the faces which would be passed to a SVM classifier. The embedding vector is of dimension 512.
Download the SVM pretrained model https://github.com/Baskar-t/face-mask-classifier/tree/main/models
Class mask_predictor
image - path of the image file to predict the mask
pretrained path of the SVM model
def pred_mask(image,svm_model_path) ...... return img, box_list, label_list, proba_list
img - image vector
box list - list of image box of faces
label_list - list of labels for the predicted face images (Mask , No Mask)
proba_list - list of probability of predicted labels
Usage:
mask_predictor.pred_mask(image path, path_svm_model)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for face_mask_classifier-1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a65b760590e2c6f4f6b6bfdd95e23875395ae717e88834c53cde7e55e2d36d8d |
|
MD5 | 95566f0081da312854b4b19600cef914 |
|
BLAKE2b-256 | 23e189ae7f095a152bddd7b6b963371ade791724ff2b6f91e5190948c65e00c5 |