Downloads · 30 days
0
prathamrajbhar/smart-attendance-background-validation
smart-attendance-background-validation is a machine learning model from prathamrajbhar. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for keras. The card lists the license as mit.
This repository contains the background validation model used in the Smart Attendance System. It is designed to verify the background context of an attendance submission to ensure the check-in occurs within a valid cl…
Downloads · 30 days
0
Access
Public
Updated May 25, 2026
Repo size
10.1 MB
Likes
0
Public
Click a slice to open those files.
.h510.1 MB · 100%
From the Hugging Face model README
This repository contains the background validation model used in the Smart Attendance System. It is designed to verify the background context of an attendance submission to ensure the check-in occurs within a valid classroom setting, preventing spoofing attempts where users check in from home, dorm rooms, or external environments.
(224, 224, 3)(224, 224).tensorflow.keras.applications.mobilenet.preprocess_input).To load and run inference in Python:
import cv2
import numpy as np
import tensorflow as tf
from tensorflow.keras.applications.mobilenet import preprocess_input
# Load the model
model = tf.keras.models.load_model("background_mobilenet_v1.h5")
# Preprocessing
def preprocess_background(img_crop: np.ndarray) -> np.ndarray:
img_resized = cv2.resize(img_crop, (224, 224))
img_batch = np.expand_dims(img_resized, axis=0)
return preprocess_input(img_batch.astype(np.float32))
# Run inference
input_tensor = preprocess_background(image)
prediction = model.predict(input_tensor)