ARTIFICIAL INTELLIGENCE
FACE DETECTION SYSTEM FOR ATTENDANCE
Aalekh Raghuvanshi-24BDS001
Bhavya Khare-24BDS012
Devam Sharma-24BDS017
Hemant Kumar-24BDS025
Saksham Kushwah-24BDS072
COURSE INSTRUCTOR –
DR. ANIMESH CHATURVEDI
The Attendance Problem: Why Change is Needed
Outdated Methods
Traditional attendance systems, such as punch cards and fingerprint scanners, are inherently slow, prone to errors, and susceptible to fraudulent activities like 'buddy punching'. These methods can lead to inaccuracies and security vulnerabilities.
Operational Inefficiencies
Manual attendance tracking consumes valuable time for administrative staff, diverting resources from more critical tasks.
Furthermore, physical contact systems pose hygiene concerns, especially heightened in a post-pandemic world.
Lack of Insight & Scalability
Current systems often fail to provide real-time attendance insights, hindering quick decision-making. As organizations grow, these methods struggle to scale effectively, leading to increased administrative burden and potential data inaccuracies.
Introducing AI Face Detection for Attendance
Our system is an AI-powered Face Recognition Attendance Platform designed to automate and modernize the attendance-taking process across classrooms, offices, and institutions.
It uses advanced facial recognition technology (InsightFace) to identify individuals in real time with high accuracy, completely eliminating manual roll calls and touch-based biometric systems.
This product captures live video from a camera, detects faces instantly, matches them with pre-trained embeddings, and automatically marks attendance within seconds(<100ms).
The system is designed to be fast, fully automated, contactless, and scalable, making it suitable for modern smart campuses and workplaces.
TECH STACK
Frontend (UI & Preview)
TECH STACK
Backend
TECH STACK
Model Training
InsightFace FaceAnalysis�Used to extract embeddings from training images for each student.
�Stored in .pkl file for fast matching during attendance.
OpenCV�Used to load training images, detect faces, crop them, and process them before embedding extraction.
TECH STACK
Data Storage
Local File Storage
trained_model/face_embeddings_insightface.pkl — embeddings + labels
attendance_logs/*.csv — daily attendance saved with timestamps
TECH STACK
Other Tools / Libraries
Python 3.10 — core language for backend + training pipeline
Threading — used to run face recognition loop in background
CORS Middleware — to allow React (localhost) to communicate with FastAPI
SYSTEM ARCHITECTURE
How our project works
1. Face images are collected for each student�Multiple images are captured to cover different angles and lighting conditions.
2. InsightFace extracts a unique embedding for each face�A 512-dimension vector is generated (like a digital signature of the face) and stored with the student’s name.
3. Backend opens the camera and processes live video�FastAPI starts a background thread that continuously reads frames from the webcam.
4. Faces in each frame are detected and converted into embeddings�InsightFace identifies faces in real-time and generates embeddings for each detected face.
How our project works
5. Embeddings are compared with the trained database�Using cosine similarity (dot product), the system finds the closest match from stored student embeddings.
6. If the match is above the confidence threshold, attendance is marked�The student’s name is added to the “present” list only once.
7. The backend updates recent detections and statistics�Every recognized face and its confidence score is stored temporarily for the UI.
8. Frontend shows live camera preview + real-time attendance status�React displays the live feed, present count, and detection logs by fetching updates every second.
9. Attendance is saved automatically or when the user clicks “Stop & Save”�A CSV file is generated with names, timestamp, and confidence level.
KEY CHALLENGES
Handling continuous video frames and running AI inference caused performance slowdowns, especially on CPU-only systems.
2. Webcam Compatibility Issues
Different operating systems (Windows, macOS) use different camera drivers, leading to failures in accessing the webcam consistently through API endpoints.
3. Accuracy in Real-World Conditions
Lighting changes, side angles, and partial occlusions affected face detection and recognition stability.
4. Frontend Rendering Lag
Displaying live camera feed in the frontend caused heavy lag, especially when streaming frames over HTTP.
5. Heavy Model Initialization
InsightFace (Buffalo_L) is a large model and requires time and system resources to initialize and run efficiently.
SOLUTIONS
1. Performance Optimization :-Processed every alternate frame for faster recognition.
Used NumPy vectorized similarity matching for rapid embedding comparison.
Reduced camera resolution for smoother processing.
2. Cross-Platform Webcam Handling :-Used OpenCV backend switching: CAP_DSHOW for Windows AVFoundation for macOS
Added fallback logic to retry camera initialization.
3. Improved Recognition Stability :-Used InsightFace with strict thresholds:
Similarity > 0.4
Confidence > 70%
Added multiple training images per user for better embedding coverage.
4. Backend-Only Video Handling:-Removed browser-based camera handling to reduce load.
Backend processes the feed; frontend receives only processed recognition data.
5. Model Caching & Efficient Startup:-Loaded InsightFace once during FastAPI startup.
Cached all embeddings and metadata for instant access during recognition.
BENEFITS
1. Fully Automated Attendance
Eliminates manual roll-calls and reduces human effort. Saves time for teachers and increases classroom productivity.
2. High Accuracy Recognition
InsightFace ensures reliable face matching even in varied lighting or angles, minimizing false attendance entries.
3. Real-Time Processing
Attendance is updated instantly as students appear, creating a smooth and seamless experience.
4. Secure & Tamper-Proof
Face recognition prevents proxy attendance or manipulation since every person is uniquely verified.
5. Scalable & Flexible
Works with multiple classes, batches, and larger student groups with minimal resource requirements.
IMPACT
1. Increased Efficiency
Time spent on attendance is drastically reduced, contributing to more effective use of classroom hours.
2. Better Record Accuracy
Automated logs reduce errors, maintain accurate timestamps, and improve administrative transparency.
3. Enhances Tech-Enabled Learning Environment
Brings intelligent automation into educational institutions, promoting digital transformation.
4. Reduces Administrative Burden
No need for manual entries or maintaining registers — all logs are automatically generated and stored.
5. Supports Data-Driven Decisions
Attendance analytics helps faculty track trends, identify irregularities, and improve student engagement.
Thank You
CONCLUSIONS