🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

face-mask-classifier

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

face-mask-classifier

Detect face mask in an Image

1.4
PyPI
Maintainers
1

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)

Keywords

face-mask-classifier

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts