CCTV-Based Employee Attendance System
A real-time, multi-camera attendance system using RTSP CCTV streams and AI-powered face recognition, achieving 95%+ identification accuracy across 1,000+ enrolled employees and 6–10 simultaneous cameras, with a full-stack Next.js HR dashboard.
The problem
Manual attendance tracking in large enterprises is slow, error-prone, and easily gamed. Badge swipes don't verify identity. This system replaces manual tracking with AI-powered face recognition over existing CCTV infrastructure, no additional hardware, no human intervention required for routine attendance logging.
What I built
Multi-camera RTSP stream processing. The system ingests live video from 6–10 simultaneous RTSP CCTV cameras, processing frames in real time. OpenCV handles stream capture and frame extraction, with adaptive frame sampling to balance CPU/GPU load against detection latency.
Face recognition pipeline. I used InsightFace Buffalo to generate 512-dimensional face embeddings for each detected face in every processed frame. InsightFace provides both face detection (locating faces in frames) and embedding extraction in a single model family, with strong accuracy on varied poses and lighting conditions.
Scalable identity matching with FAISS. Employee embeddings are indexed in a FAISS index using cosine similarity search. When a face embedding is generated from a live frame, FAISS returns the nearest enrolled employee within a similarity threshold. This approach scales to 1,000+ employees while maintaining low-latency lookups per frame. The system achieves 95%+ identification accuracy under normal operating conditions.
Attendance engine. The attendance logic handles check-in/check-out tracking, duplicate prevention (the same employee won't generate multiple entries from the same camera in a short window), shift handling, and overtime calculations. All attendance events are stored in PostgreSQL with full audit trails.
Next.js HR dashboard. A full-stack Next.js HR management dashboard provides employee lifecycle management (onboarding, photo enrolment, deactivation), live camera monitoring feeds, attendance analytics, shift management, and report generation with CSV export. Role-based access control separates HR managers from regular employees.
Tech stack
Related services
Building a Computer Vision system?
Whether it's real-time face recognition, object detection, or a CCTV-based analytics solution, I can architect and ship it end-to-end.