Zum Inhalt springen
ModelAufgelistetExtern
Herunterladen

Face Mask Detection

An AI model that classifies whether a person is: ✅ Wearing a mask correctly ❌ Not wearing a mask ⚠️ Wearing a mask improperly

ArtModellVersionFace mask modelCBewertung

Modellquelle

Art
Modell
Dateigröße
27,4 MB
Version
vFace mask model
Aktualisiert
29. Okt. 2026
Quelle
Hugging Face

Quellenbeschreibung

Face Mask Detection — MobileNetV2

An AI model that classifies whether a person is:

  • ✅ Wearing a mask correctly
  • ❌ Not wearing a mask
  • ⚠️ Wearing a mask improperly

Model Details

  • Architecture: MobileNetV2 + custom classification head
  • Input: 224×224 RGB image (face crop)
  • Classes: with_mask, without_mask, mask_worn_incorrectly
  • Framework: TensorFlow/Keras

Usage

import tensorflow as tf
import numpy as np
from PIL import Image

model = tf.keras.models.load_model("face_mask_model.h5")
img   = Image.open("face.jpg").resize((224, 224))
arr   = np.expand_dims(np.array(img), 0) / 255.0
pred  = model.predict(arr)
print(["with_mask","without_mask","mask_worn_incorrectly"][pred.argmax()])

Live Demo

Try the interactive demo on Spaces.

Quellen

1 Quelle
Hugging FacePrimärVersion 3c7853bfeee44f356c48840e379c3b9c284d813d
huggingface.co/mpuneeth17/face-mask-detection/tree/3c7853bfeee44f356c48840e379c3b9c284d813d

Verifiziert 29. Okt.

Modellartefakte

1 Artefakt

face_mask_model.h5

h5 · 27,4 MB · SHA-256 5d4c294ee39d…9ca1 · Hugging Face

Download file

Quellenauszüge

2 Auszüge

--- language: en tags: - image-classification - face-mask-detection - mobilenetv2 - tensorflow - computer-vision - safety license: mit --- # Face Mask Detection — MobileNetV2 An AI model that classifies whether a person is: - ✅ **Wearing a mask correctly** - ❌ **Not wearing a mask** - ⚠️ **Wearing a mask improperly** ## Model Details - **Architecture**: MobileNetV2 + custom classification head - **Input**: 224×224 RGB image (face crop) - **Classes**: `with_mask`, `without_mask`, `mask_worn_incorrectly` - **Framework**: TensorFlow/Keras ## Usage ```python import tensorflow as tf import numpy as np from PIL import Image model = tf.keras.models.load_model("face_mask_model.h5") img = Image.open("face.jpg").resize((224, 224)) arr = np.expand_dims(np.array(img), 0) / 255.0 pred = model.predict(arr) print(["with_mask","without_mask","mask_worn_incorrectly"][pred.argmax()]) ``` ## Live Demo Try the interactive demo on [Spaces](None/face-mask-detection-demo).

Source context: 0 downloads · 0 likes · Pipeline image-classification · Repo mpuneeth17/face-mask-detection