DEV Community

Cover image for Smart Face Recognition Attendance System — No More Proxy Attendance
HARSHA GOPALKRISHNA PURANIK
HARSHA GOPALKRISHNA PURANIK

Posted on

Smart Face Recognition Attendance System — No More Proxy Attendance

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

What I Built

I built Attendance Pro — a Smart Face Recognition Attendance System for educational institutions that completely eliminates manual roll calls and proxy attendance.

The idea came from a real daily frustration. Every class wastes 5–10 minutes on roll calls. Students mark proxies for absent friends. Teachers have zero real-time visibility. No one gets alerted until attendance is already critically low.

So I built the fix — a cross-platform mobile app where a lecturer taps "Start Face Attendance", captures a photo, and the system automatically identifies the student using facial recognition and marks them present in under 2 seconds. No roll calls. No proxies. No manual errors.

Tech Stack:

  • 📱 React Native + TypeScript (Expo) — Cross-platform mobile frontend
  • ⚙️ Node.js + Express — RESTful backend API
  • 🐍 Python + face_recognition + OpenCV — Face detection & matching engine
  • 🗄️ MySQL 8.0 — Relational database with foreign key constraints
  • 📧 Nodemailer + Gmail SMTP — Automated shortage email alerts

Three fully built role-based interfaces:

  • 🎓 Student — View attendance %, get below-75% shortage warnings, submit leave requests
  • 👩‍🏫 Lecturer — Mark attendance via face recognition, approve/reject leaves, generate reports
  • 🛡️ Admin — Full system oversight, manage users, export PDF/CSV reports, send bulk email alerts

This started as a college MAD (Mobile Application Development) project at RV University, Bengaluru. It grew into something I genuinely wanted to finish properly — a system that solves a real problem every student and teacher faces every single day.

Demo

🔗 GitHub Repository: Smart Face Recognition Attendance System

📱 Built with Expo — tested on Android via Expo Go and EAS dev build
Lecturer dashboard with Start Face Attendance button

Real-time attendance list after face recognition runs

Student dashboard showing attendance percentage and subject breakdown

Shortage report showing students flagged below 75 percent

Monthly attendance report with PDF and CSV export

Admin class report with LOW indicators and email notify button

The Comeback Story

Before: The app existed — but without its most important feature.

I had login screens, dashboards, leave requests, shortage reports, and an admin panel. Everything was wired up and working. But attendance was still being marked manually. It was a face recognition attendance system with no face recognition. The core feature — the entire reason the project existed — was missing.

The repo sat untouched for weeks. Every time I opened it, I'd stare at the half-finished recognize.py file and close the laptop.


After: Attendance Pro is now fully complete and working end-to-end.

Finishing it meant building and integrating the full face recognition pipeline:

  1. Lecturer captures a photo via the device camera (expo-camera)
  2. Image is uploaded to the Node.js backend via multipart form
  3. Node.js calls recognize.py using child_process.spawn()
  4. Python loads the image, extracts facial encodings via face_recognition
  5. Compares against reference images in known_students/ with a strict tolerance of 0.5
  6. Returns matched student roll number as JSON back to Node.js
  7. Node.js inserts the attendance record into MySQL instantly
  8. The attendance list updates in real time on the lecturer's screen

The hardest part was making the Node.js ↔ Python bridge reliable. Handling edge cases — "no face detected", "face not in database", "already marked today" — required careful error handling on both sides. Tuning the tolerance value (0.5) to balance accuracy against false rejections took real-world testing with actual photos in different lighting conditions.

The moment it worked — when the app correctly identified a student from a live camera capture and marked them present automatically — the whole system finally felt like what it was always supposed to be.

30 test cases. All passed. Login, registration, face recognition, leave management, report generation, admin operations — all verified and working.

My Experience with GitHub Copilot

I used GitHub Copilot as a focused accelerator — not for the hard decisions, but for the parts where I knew exactly what I needed but didn't want to spend time typing it out.

The single most valuable moment was the recognize.py ↔ Node.js integration. I knew I needed to call Python from Node, but wasn't sure of the cleanest pattern. Copilot suggested child_process.spawn() immediately and then autocompleted the stdout buffering and JSON parsing logic. That one suggestion saved at least 30–40 minutes of documentation searching.

Other areas where it helped:

  • SQL queries for attendance percentage calculations (the CASE WHEN + NULLIF pattern)
  • Express route handler scaffolding for the leave request and login APIs
  • React Native useEffect + fetch patterns for the dashboard data loading
  • Nodemailer transporter configuration for the shortage email alerts

For everything that actually mattered — the tolerance tuning, the RBAC architecture, debugging the face encoding mismatch between registration and recognition — I worked through those manually. Copilot is best when you know what you want and just need it written fast. That's exactly how I used it: it handled the repetitive parts so I could stay focused on the parts that required actual thinking.

Top comments (0)