attendance-api / core /config.py
vrfefavr's picture
Update core/config.py
4b6b6f6 verified
raw
history blame contribute delete
671 Bytes
import os
# AI Configuration - Smart Consensus Engine
DETECTOR = "mediapipe" # FASTEST for real-time webcams
MODELS = ["Facenet512"] # DEEPEST single model (512-dimensional vector)
THRESHOLDS = {
"Facenet512": 0.40 # Standard High Security
}
# The absolute gate: Confidence must be > 70%
REQUIRED_AVERAGE_CONFIDENCE = 70.0
# Advanced Quality Gate (Optimized for 480p)
MIN_FACE_AREA = 5000 # Adjusted for 640x480 frame size
# Application Configuration
COOL_DOWN_SEC = 5
LOG_FILE = "data/attendance_cloud.csv"
# Ensure directories exist
if not os.path.exists("data"):
os.makedirs("data")
if not os.path.exists("faces_db"):
os.makedirs("faces_db")