SmartAttendance is a minimal, in-browser face recognition attendance system built using face-api.js. It allows students to register their ID photos and mark attendance via webcam. The project is designed for Hacktoberfest contributions, and as a foundation for more advanced attendance solutions.
- Home Page (
index.html) – Overview & navigation. - Register Students (
register.html)- Upload a student ID photo to register a student.
- Enter name and ID number (optional for now).
- Detects face from the uploaded image using
face-api.js. - Prevents duplicate registrations based on face similarity.
- Take Attendance (
attendance.html)- Mark attendance in real-time using webcam.
- Recognizes registered faces and logs attendance.
- Shows a list of students marked present for the current day.
- Export attendance as CSV.
Note: Currently, student name and ID verification against the photo is not implemented. The ID field is optional in this MVP.
- Frontend: HTML, CSS, JavaScript
- Face Recognition: face-api.js
- Data Storage:
localStorage(browser-based) - Optional Future Backend: Contributors can implement MongoDB / Node.js for persistent, multi-user storage.
├── index.html # Home page
├── register.html # Register students
├── attendance.html # Take attendance
├── style.css # Shared styles
├── common.js # Shared utilities & model loader
├── register.js # Student registration logic
├── attendance.js # Attendance & webcam logic
├── models/ # face-api.js models
└── README.md
- Serve the project over HTTP(S) (Chrome blocks webcam & model requests on
file://). - Open
index.htmlin your browser. - Go to Register page to register students with their ID photo.
- Go to Attendance page to mark attendance using webcam.
- Export attendance as CSV if needed.
This project is perfect for Hacktoberfest!
Please follow standard contribution practices: fork → branch → PR → review.
- Attendance recognition sometimes shows "Unknown Face" due to lighting or camera issues.
- Student name and ID are not verified against the uploaded photo.
- Data is stored only in localStorage, so multi-browser / multi-user sync is not supported.
- Integrate backend (MongoDB/Express) for persistent multi-user attendance logs.
- Use OCR to verify ID numbers and names.
- Improve recognition thresholds and lighting robustness.
- Better UI/UX for registered students, attendance logs, and notifications.
- Mobile support and multi-device recognition.
If you are new to Open source, u may refer to This Guideline
- Fork this repository
- Clone it locally
- Create a new branch
- Make your changes (code, docs, or examples)
- Push your branch
- Open a Pull Request