A desktop attendance system built with Python, Tkinter, OpenCV Haar Cascade, and LBPH face recognition.
- Register students with numeric IDs and names.
- Capture face images from the webcam.
- Train an LBPH face recognition model.
- Track faces from the webcam and mark daily attendance.
- Save attendance logs as CSV files.
Don't want to install Python? Download the ready-to-run app:
➡️ https://github.com/Hinsane5/ComputerVisionAttendance/releases/latest
- Download the file for your computer:
- Windows →
AttendanceSystem-Windows.zip - Mac →
AttendanceSystem-macOS.zip
- Windows →
- Unzip it.
- Double-click
AttendanceSystemto launch.
The app is not code-signed, so your system shows a one-time warning the first time you open it. This is expected — here is how to get past it:
- Mac: right-click (or Control-click) the app → Open → click Open again.
- Windows: on the "Windows protected your PC" screen, click More info → Run anyway.
Mac says "AttendanceSystem is damaged and can't be opened"? That is macOS blocking the download, not a real problem. Open the Terminal app and run this once (drag the app onto the Terminal window to fill in the path):
xattr -dr com.apple.quarantine /path/to/AttendanceSystem.appThen double-click the app again.
The app asks for camera access on first use — click Allow. Your data (students, model, attendance logs) is saved in an
AttendanceSystemfolder in your home directory.
The sections below are only needed if you want to run or modify the code directly instead of using the downloadable app above.
- Python 3.11+
- Webcam access
- macOS, Windows, or Linux with a working OpenCV camera backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtOn Windows, activate the environment with:
.venv\Scripts\activatepython main.py- Enter a numeric student ID and name.
- Click
Take Imagesand wait until face samples are captured. - Click
Train Model. - Click
Track & Mark Attendanceto recognize a student and save attendance.
The app creates these runtime files locally:
TrainingImage/stores captured face images.TrainingImageLabel/Trainner.ymlstores the trained OpenCV model.StudentDetails/StudentDetails.csvstores registered student data.Attendance/Attendance_YYYY-MM-DD.csvstores attendance logs.
These files are ignored by Git because they can contain personal data and generated model output.
- Keep
haarcascade_frontalface_default.xmlin the project root. - If tracking fails with an invalid model error, click
Train Modelagain to rebuild the model.