# FaceDesk Vision FaceDesk Vision is a desktop application for real-time facial recognition using a webcam feed. It uses CustomTkinter for the GUI, OpenCV for camera capture and drawing, and face_recognition for deep-learning face embeddings. ## Prerequisites - Python 3.10 or 3.11 is recommended. - A working webcam. - dlib build support, because face_recognition depends on dlib. ### OS notes for dlib macOS: ```bash brew install cmake ``` Ubuntu or Debian: ```bash sudo apt update sudo apt install -y build-essential cmake python3-dev ``` Windows: Install Visual Studio Build Tools with the C++ workload, or use a Python distribution where dlib wheels are available for your version. ## Install ```bash python -m venv .venv source .venv/bin/activate pip install --upgrade pip pip install -r requirements.txt ``` On Windows PowerShell: ```powershell python -m venv .venv .\.venv\Scripts\Activate.ps1 pip install --upgrade pip pip install -r requirements.txt ``` ## Run ```bash python facedesk_app.py ``` To use a different camera index: ```bash python facedesk_app.py --camera 1 ``` ## Storage logic The app creates these local artifacts automatically: - `face_registry.sqlite`: SQLite database containing names, 128-dimensional face embeddings, timestamps, and optional reference image paths. - `registered_faces/`: reference images captured during enrollment. No cloud service is required. Registered faces persist after restarting the app. ## Enrollment workflow 1. Type a real person name in the enrollment field. 2. Use `Register from camera` to enroll the largest face in the current webcam frame. 3. Use `Register from image` to enroll from a local image file. 4. The app rejects enrollment if no face is found. It warns if multiple faces are found and uses the largest face. ## Recognition workflow - Camera capture runs continuously in a background thread. - Recognition runs on skipped frames so the UI remains responsive. - Known faces are drawn with green boxes and their registered names. - Unknown faces are drawn with red boxes. - You can tune recognition tolerance and frame skipping constants near the top of `facedesk_app.py`. ## Privacy This app stores biometric templates locally. In a production deployment, obtain consent, encrypt the database at rest where required, and publish a clear retention policy.