Smart Attendance.
Engineered by AI, Tracked in Real-Time.

Automate employee check-ins, break tracking, and shift analytics with multi-camera spatial tracking and lightning-fast FAISS vector search.

Telemetry Mini-Dashboard

A direct representation of our dynamic admin dashboard monitoring live cameras, headcount states, and check-in triggers.

System Active
| Cameras: 2 Active | FAISS Index: 512-dim
Cam 01
30.0 FPS
REC [00:14:02]
Cam 02
29.8 FPS
REC [00:14:02]
System Logger Output
Live

AI Core Features & Speed

Powered by asynchronous multithreading, advanced vector matching, and custom tracking logic to provide instantaneous checks.

Thread-Safe Camera Capture

Asynchronous multi-threading ensures zero latency. Automatic hardware/network reconnection algorithms keep the gate and office cameras active 24/7.

L2-Normalized FAISS Search

Deep-feature embeddings matched in milliseconds using Facebook AI Similarity Search (FAISS). Precise cosine matching filters out false positives instantly.

Spatial Centroid Tracking

Distance-gated tracking tracks multiple moving targets between frames, eliminating identity flickering and keeping tracking IDs locked in crowded zones.

Bipartite Conflict Resolution

Strict one-to-one identity mapping. Demotes inferior face matches automatically so one person cannot occupy two places at once.

Smart Break State Machine

Automatically detects when an employee leaves their post, counting break timings after 30 seconds of screen absence and resuming work states automatically on return.

Auto Check-Out Guardian

Prevent stale sessions. The system automatically triggers check-out at the last-seen stamp after 3 hours of continuous invisibility.

Interactive Call-Flow Pipeline

Hover or tap on each node to witness how a single raw camera frame transforms into an immutable attendance record in milliseconds.

01
Frame Acquisition
02
Embedding Extraction
03
Anti-Spoofing
04
Cosine Search
05
Identity Locking
06
Log Persistence
Step 1: Frame Acquisition

Multi-Threaded Real-Time Video Capture

Cameras stream raw frames. Independent non-blocking daemon threads resize incoming arrays asynchronously. This ensures zero main-loop freezing, even if camera connections flicker.

  • OpenCV camera capture on separate worker thread
  • Non-blocking thread-safe frame sharing buffer
  • Dynamic hardware/network auto-recovery logic
camera_manager.py
def read_frames_async(self):
    while self.active:
        ret, frame = self.cap.read()
        if not ret:
            self.reconnect_stream()
            continue
        self.frame_queue.put(frame)
Step 2: Embedding Extraction

512-Dimensional Face Vector Generation

The InsightFace model localizes facial landmark features inside bounding boxes. It translates facial geometry into highly descriptive 512-dimensional floating-point vectors.

  • High-precision facial bounding box localization
  • 512-dimension spatial normalized embeddings
  • GPU accelerated tensor processing engine
engine.py
def extract_embeddings(self, face_img):
    faces = self.model.get(face_img)
    if not faces:
        return None
    # L2 Normalization applied instantly
    embedding = faces[0].normed_embedding
    return embedding
Step 3: Anti-Spoofing

Liveness Detection & Spoof Rejection

Before matching, the system runs a binary liveness classifier on the face crop to reject photo, video, and 3D mask attacks. Only confirmed live faces proceed to the vector search stage.

  • Silent face liveness scoring via depth texture analysis
  • Rejects photo, video replay & 3D mask attacks
  • Configurable confidence threshold per deployment
anti_spoofing.py
def predict(self, face_crop):
    tensor = self.preprocess(face_crop)
    score = self.model(tensor)[0]
    label = "Real" if score > self.threshold \
            else "Spoof"
    # Reject spoof before FAISS query
    if label == "Spoof":
        return "ACCESS_DENIED"
    return label, score
Step 4: Cosine Search

Facebook AI Similarity Search (FAISS)

The system queries the generated face vector against the registered employees database using the FAISS indexing system, searching through thousands of profiles in microseconds.

  • Microsecond similarity lookup (IndexFlatIP Index)
  • Cosine distance scoring for strict compliance
  • Threshold demotion filtering for unknown guests
recognition.py
def query_vector(self, face_vector):
    distances, indices = self.faiss_index.search(
        np.array([face_vector]), k=1
    )
    score = distances[0][0]
    if score > self.threshold:
        return self.id_map[indices[0][0]], score
    return "Unknown", score
Step 5: Tracking & Identity Locking

Temporal State & Bipartite Gating

Identities are tracked frame-to-frame. Centroid calculations and bipartite conflict resolution lock IDs to moving boxes, eliminating flicker and ghosting.

  • Centroid-based spatial tracking lock-on
  • Dynamic verification: 4 confirm frames / 3 doubt frames
  • 1-to-1 bipartite map matching prevents duplicates
tracker.py
def update_tracker(self, detected_centroids):
    cost_matrix = self.compute_cost(detected_centroids)
    row_ind, col_ind = linear_sum_assignment(cost_matrix)
    for r, c in zip(row_ind, col_ind):
        self.tracks[r].centroid = detected_centroids[c]
        self.tracks[r].confirmations += 1
Step 6: Log Persistence

Immutable Check-In Registry

Verified check-ins are safe-written to a local thread-locked JSON database file and simultaneously mirrored/synced onto an admin Google sheet or SQL database.

  • Thread-safe JSON operations using file locks
  • Real-time check-in trigger hooks for HR tools
  • CSV mirror logging for immediate analytics export
attendance_v2.json
{
  "staff_id": "028",
  "name": "Ayush Singh",
  "timestamp": "2026-05-18T10:14:02",
  "camera": "Gate Cam",
  "status": "Checked-In"
}

HR Operations Analytics Panel

Observe check-in velocity, active shift metrics, and breaks patterns compiled directly from system storage files.

Hourly Peak Active Headcount

Simulated live data from headcount_log.csv

Live Checked-In Staff
20 12 6 0 09:00 11:00 13:00 15:00 17:00 19:00

General Operations Metrics

Metric Description Recorded Value Status Deviation
Avg. Employee Shift Duration 8 hrs 14 mins +2.4% (Optimal)
Average Cumulative Break Time 48 mins / day Steady
First-Hour On-Time Percentage 96.4 % +1.1% (High)
Database FAISS Match Queries 142,391 Active Real-Time
Total Registered Staff Indices 142 Employees Synchronized

Face Enrollment Simulator

Simulate enrollment.py. Register a new user, scan their photo, and witness the FAISS vector index database update in real-time!

1 Input Details
2 Facial Scan
3 FAISS Success

Register New Profile

Provide profile details to compile a new 512-dimension face embedding.

Run Spatial Scan

Simulate the facial capture algorithm localizing landmarks.

Lighting: Balanced & Verified
Resolution: 1080p Stream Ready
Click "Start Scan Engine" below...

Enrollment Successful

Employee profile vectorized and indexed successfully into local DB and active mirror spreadsheet.

FAISS Index update log...
Fill out registration details on the left to initiate the camera sandbox.
LOCKED ON TARGET CONF: 0.0%
512-Dim Database Hyperplane