DEV Community

Aven
Aven

Posted on

Facenox: Offline-first Face Recognition for Real-Time Attendance Tracking. Got Stuck for Months. This Challenge Finally Made Me Ship.

GitHub “Finish-Up-A-Thon” Challenge Submission

This is a submission for the GitHub Finish-Up-A-Thon Challenge

Around June 2025, I built a face recognition attendance system in my terminal. It worked with just python command to draw janky bounding boxes. It was laggy and unusable.

I knew no one would ever run a Python script in the real world. So I rewrote it. Then rewrote it again. Then spent 8 months telling myself "one more refactor" before showing it to anyone. I experimented with everything: Haar Cascade, YOLOv8n, then SCRFD. YuNet and EdgeFace replaced the old stack... A custom ONNX anti-spoofing model replaced MediaPipe. Electron + React replaced the terminal. AES-256-GCM replaced pickle files. The architecture grew from 200 lines to 50,000+ lines of code over the span of a year!

Me telling myself "it's just one tiny architectural change" for the 14th consecutive month.

I know what you're thinking: "Classic case of severe over-engineering." And you're 100% right. I got so caught up in making the local AI architecture "flawless" that I completely froze.

I never shipped. Perfectionism had me stuck at 80% for months.
The GitHub Finish-Up-A-Thon deadline finally broke the loop. Today I'm pushing Facenox Desktop v1.0.0-beta.1. My first ever beta release after a year of building in silence.

What I Built

Offline-first face recognition for real-time attendance tracking. No cloud biometric matching. No vendor hardware. No internet required. No raw photos stored. Only encrypted face codes that cannot be reversed.

Most traditional systems:

  • Cloud-Dependent: Store your biometric data on someone else's servers.
  • Proprietary: Require expensive, vendor-locked hardware or scanners.
  • Fragile: Stop working entirely the moment the internet goes down.

Facenox flips the script. All AI inference and biometric matching stays 100% local. It's encrypted at rest with AES-256-GCM and runs flawlessly on any standard webcam (built-in, USB, or capture card).

Just Download. Install. Point a camera at people. That's it.

🏢 Note: Unlike typical consumer desktop utilities, Facenox is architected as a local-first B2B solution. It’s designed to run on-premise for businesses, environments, or organizations that need enterprise-grade biometric tracking without leaking data to third-party cloud vendors.

Facenox Desktop is fully open-source under the AGPL-3.0 license. You can download the installer, grab the latest release, or build it directly from source.

  • 🌐 Website: facenox.com
  • 🐙 GitHub Repository:

    GitHub logo facenox / facenox

    Offline-first face recognition for real-time attendance tracking.

    Facenox - Offline-first Face Recognition Software

    License Version Stars Sponsor

    Facenox is offline-first face recognition software for real-time attendance tracking.
    Built for privacy: Biometric templates are end-to-end encrypted (E2EE)

    Facenox Desktop UI - Active Scan


    Caution

    This is the official open source repository for Facenox. Treat other repositories, installers, and downloads as unverified unless they come from official sources.

    Note

    Privacy First: Facenox processes face detection, tracking, and template matching locally. Encrypted face templates can optionally sync between your devices, with decryption keys stored exclusively on your paired hardware.

    Why Facenox

    Most face recognition systems rely on cloud-based biometrics. Facenox doesn't. Biometric matching stays local on the desktop.































    Feature Facenox Cloud-Based Systems
    Data Residency Encrypted End-to-End with Optional Cross-Device Sync Remote Cloud
    Internet Dependency Optional Mandatory
    Latency Real-time Network Dependent
    Privacy Risk Minimized High

    Features

    • Local Biometrics: Face detection, ByteTrack subject tracking, and ONNX liveness verification.
    • Cross-Platform: Native support for Windows, macOS, and Linux.
    • Consent-Aware: Built-in support for biometric enrollment and deletion consent.
    • Subject Management: Full…

Demo

📸 View Desktop App Screenshots & Features

Main panel

Live View (Demo)

Overview

Reports Management & Export

Adding Member & Enrollment

General Settings

Security & Encryption

Local Database

The Comeback Story

The original prototype was 200 lines of Python that technically worked but fell apart the moment you tried to use it in a real room — bad lighting, side profiles, someone holding a photo of the person they're impersonating. It wasn't a product. It was a proof of concept I was too afraid to show to anyone.

Feature Prototype (2025) Facenox Desktop v1.0.0-beta
Interface CLI / Terminal (python main.py) Electron + React Desktop App
Face Detection Haar Cascade / YOLOv8n Yunet (Optimized for edge detection)
Recognition Model DeepFace EdgeFace (Optimized for local CPU/GPU)
Anti-Spoofing MediaPipe (Lacked depth check) Custom ONNX Model (Liveness detection)
Data Storage Python .pickle files (Unsecure) AES-256-GCM Encrypted Local DB
Codebase Size ~200 lines 50,000+ lines (1,700+ commits)

I spent months buried in rabbit holes. Optimizing my AI implementation architecture. Replacing DeepFace with EdgeFace for better accuracy. Building a custom ONNX anti-spoofing model face-antispoof-onnx because MediaPipe couldn't handle real-world spoofing, phones, printed photos, screen reflections. That liveness problem alone took weeks of pre-processing datas, ONNX export debugging, and temporal fusion tuning to get right.

I actually shared a raw demo of this custom liveness detection mechanism on LinkedIn, and the post completely blew up!!!

Seeing hundreds of developers validate the architecture and obsess over the local edge performance was the exact spark I needed. It made me realize that people actually wanted this technology.

Improving Face Anti-Spoofing with Miniface | John Raiven Olazo posted on the topic | LinkedIn

I thought fixing this would be a quick weekend task. 𝗜 𝘄𝗮𝘀 𝘄𝗿𝗼𝗻𝗴. While building an AI-powered attendance system, I ran into a 𝗺𝗮𝘀𝘀𝗶𝘃𝗲 𝘀𝗲𝗰𝘂𝗿𝗶𝘁𝘆 𝗵𝗼𝗹𝗲: it was way too easy to trick the camera just by holding up a photo or a phone screen. I quickly realized that generic models like MobileNetV4 aren't built for security, they're built for recognition. To solve this, I had to dive deep into face anti-spoofing and eventually ditched the "all-rounders" for 𝗠𝗶𝗻𝗶𝗙𝗔𝗦. This is a specialized architecture that actually understands the difference between a human face and a piece of paper. The breakdown: Tiny but accurate: The model is only 𝟲𝟬𝟬𝗞𝗕. Despite the size, it hits ~𝟵𝟴% 𝗮𝗰𝗰𝘂𝗿𝗮𝗰𝘆 on the CelebA benchmark (70k+ samples). Texture-based logic: Instead of just looking at facial features, it uses 𝗙𝗼𝘂𝗿𝗶𝗲𝗿 𝗧𝗿𝗮𝗻𝘀𝗳𝗼𝗿𝗺 𝗹𝗼𝘀𝘀 to detect the microscopic texture patterns of real skin versus printed paper or digital pixels. Runs on a "literal potato": I used INT8 quantization so it can run anywhere. No GPU or expensive cloud server is needed. and as a proof, I tested it on a 2011 laptop. Even on a 𝟭𝟰-𝘆𝗲𝗮𝗿-𝗼𝗹𝗱 𝗖𝗣𝗨, it handles inference in 𝘂𝗻𝗱𝗲𝗿 𝟮𝟬𝗺𝘀 thanks to INT8 quantization. No expensive cloud server required. I’ve decoupled this from my main project, train it from scratch and 𝗼𝗽𝗲𝗻-𝘀𝗼𝘂𝗿𝗰𝗲𝗱 it as a standalone security layer. If you're building an app that uses a camera and needs lightweight liveness detection, feel free to use it. 𝗖𝗼𝗻𝘁𝗿𝗶𝗯𝘂𝘁𝗶𝗼𝗻𝘀 𝗮𝗿𝗲 𝘄𝗲𝗹𝗰𝗼𝗺𝗲! If you’re a CV researcher, or just someone who knows a better way to handle liveness detection, I’d love to see your input. 𝗿𝗲𝗽𝗼: https://lnkd.in/gPZSrMbT #MachineLearning #ComputerVision #OpenSource #Python #CyberSecurity #AI | 47 comments on LinkedIn

favicon linkedin.com

But the hardest part wasn't the ML. It was realizing that no matter how accurate the model was, people weren't going to run python inference.py in a terminal anyway. So I scrapped everything and started over with Electron + React. Then scrapped that architecture and rewrote it again. And again.

1700+ commits. 50,000+ lines. One year of building in silence.
The Finish-Up-A-Thon didn't make me build Facenox. It made me stop hiding it.

My Experience with GitHub Copilot

Copilot handled the grunt work.
Whenever I needed to write schemas for the sync contract between the desktop app and dashboard, Copilot would infer the types from my existing interfaces and generate the validation layer in seconds. Same with Pydantic models. I just described what I wanted, and it wrote the boilerplate.

The Tailwind classes? I'd type the layout intent, Copilot would autocomplete the utility chain. Framer Motion animations? It remembered the exact spring configs I always forget. Writing test files for the FastAPI endpoints and the WebSocket pipeline went from tedious to fast! Copilot saw the pattern after two examples and filled in the rest. It caught inconsistencies I would have missed.

Copilot kept me in flow state by destroying the boilerplate, while I focused entirely on the high-level architecture. The pipeline orchestration, system integrations, encryption layer, and WebSocket frame protocol—those required human architectural decisions. Copilot made sure I spent my engineering cycles there instead of reading Electron IPC docs or debugging Tailwind layouts for the 50th time.

Top comments (0)