Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataLake Guard Logo

DataLake Guard v2.0

NHAI Hackathon 7.0 — Offline Biometric Attendance System

🎥 Demo Video: Watch the Demo on YouTube

Overview

A production-grade offline facial recognition and liveness detection system for NHAI field personnel authentication. Works 100% offline in zero-network zones and syncs to AWS when connectivity is restored.

App Interface Previews

Home Screen English      Liveness Verification      Home Screen Hindi

Key Features

  • Real face recognition using MobileFaceNet TFLite (INT8 quantized)
  • Platform-specific detection: MLKit (Android) + Apple Vision (iOS)
  • Active liveness detection — blink + head turn (anti-spoofing)
  • 100% offline operation — works in airplane mode
  • SQLite encrypted local storage with WAL mode
  • AWS REST sync + purge when network restored
  • Hindi + English bilingual UI
  • Government-grade NHAI design system
  • Personnel directory with search
  • Calendar attendance view

AI Model Architecture

Model Size Purpose Platform
MobileFaceNet (INT8) ~1.2 MB Face embedding Both
Google MLKit 0 MB (built-in) Detection + liveness Android
Apple Vision 0 MB (built-in) Detection + liveness iOS
Total bundle ~1.2 MB Under 20MB limit ✅

System Architecture & Pipeline

graph TD
    subgraph MC["Mobile Client (Offline Edge)"]
        A["Camera Frame"] --> B["Native Detection Bridge"]
        
        subgraph PD["Platform Detection"]
            B --> B1["Android: Google MLKit"]
            B --> B2["iOS: Apple Vision Framework"]
        end
        
        B1 --> C["Active Liveness Validation"]
        B2 --> C
        
        subgraph LC["Liveness Checks (Anti-Spoofing Challenge)"]
            C --> C1["Eye Aspect Ratio / EAR Blink Check"]
            C --> C2["Euler Yaw Angle Head Turn Check"]
        end
        
        C1 --> D["Embedding Extraction"]
        C2 --> D
        
        D --> D1["MobileFaceNet TFLite Inference"]
        D1 --> E["Matching Engine"]
        E --> E1["Cosine Similarity Score >= 0.72"]
        E1 --> F{"Auth Decision"}
        F -->|GRANTED| G["Write Log to SQLite WAL"]
        F -->|DENIED| H["Display Access Denied"]
    end

    subgraph SS["SQLite Storage (AES-256)"]
        G --> G1[("Encrypted Database")]
    end

    subgraph SQ["Synchronization Queue"]
        G1 --> I["NetInfo Network Listener"]
        I -->|Online Detected| J["Outbox Queue Processor"]
    end

    subgraph CB["Cloud Backend (AWS REST)"]
        J -->|Secure HTTPS Batch| K["AWS API Gateway"]
        K --> L["AWS Lambda"]
        L --> M[("Central Data Lake")]
        M -->|Sync Acknowledged 200 OK| N["Purge Local Face Embeddings"]
    end
Loading

Performance Benchmarks

  • Face detection: < 100ms
  • Liveness check: real-time (500ms snapshot loop)
  • Embedding extraction: < 200ms
  • Total auth pipeline: < 1 second ✅
  • Model bundle size: ~1.2 MB ✅
  • Minimum device: 3GB RAM, Android 8+ / iOS 13+

Anti-Spoofing

  • Blink detection via eye open probability (Android)
  • Head turn detection via Euler yaw angle (both platforms)
  • Photo spoof rejected (no natural eye movement)
  • Video spoof rejected (challenges are randomized)

Offline-First Architecture

  • All data stored in SQLite (WAL mode for performance)
  • Face embeddings stored as Base64 compressed strings
  • Attendance logged locally with sync_status flag
  • Background outbox queue uploads when WiFi restored
  • Raw embeddings purged after confirmed sync

Setup Instructions

Android

npm install npx react-native run-android

iOS

npm install cd ios && pod install && cd .. npx react-native run-ios

Model Download (if assets missing)

curl -L "https://github.com/MCarlomagno/FaceRecognitionAuth/raw/master/assets/mobilefacenet.tflite" -o assets/models/mobilefacenet.tflite

Project Structure

src/ ai/ - TFLite model wrappers db/ - SQLite repositories sync/ - AWS sync service screens/ - All UI screens navigation/ - React Navigation setup utils/ - Helpers and constants native/ - iOS native modules assets/models/ - TFLite model files

GitHub

https://github.com/Nightkilller/DataLakeGuardV2

Team

Solo participant — NHAI Hackathon 7.0 Submission: June 5, 2026

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages