Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

face-mask-classifier-1.1.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

face_mask_classifier-1.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file face-mask-classifier-1.1.tar.gz.

File metadata

  • Download URL: face-mask-classifier-1.1.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5

File hashes

Hashes for face-mask-classifier-1.1.tar.gz
Algorithm Hash digest
SHA256 23342f824c659ef55bbc5e7bcc92a61f2667168ccfdcf69b1d74f87cf4c015b7
MD5 f9e5ba7fc2432de175f2189e2671db86
BLAKE2b-256 83e64b729e2e684fccf1caaed0caa20336ed3bbbd76a40d30b0c17a65ee40326

See more details on using hashes here.

File details

Details for the file face_mask_classifier-1.1-py3-none-any.whl.

File metadata

  • Download URL: face_mask_classifier-1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5

File hashes

Hashes for face_mask_classifier-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9c295f9ca3a0fb51c193b443d19862b022d33c3a769b7f18bd8688d216a1ce6
MD5 7a010061a57bf261d1536969ba7ed55e
BLAKE2b-256 acf97c2a49e4d225768388d856aba637a77210661edab0d942ecdae32774755f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page