This is a Tkinter-based GUI application that uses OpenCV and LBPH Face Recognition to automate attendance tracking through facial recognition. The system captures face data of each student, trains a local model, and marks attendance upon successful face identification โ all stored in an Excel sheet.
I am presenting this project to my school for potential integration into some classrooms as a tech-driven solution to reduce manual attendance efforts.
โ ๏ธ Note: This is the most basic version of the project. The current facial recognition system is not 100% accurate and may sometimes give false positives/negatives. Iโm actively working on making it more reliable and efficient.
- Register new students using webcam
- Capture 30 grayscale face images per student for training
- Train a face recognition model using LBPH (Local Binary Pattern Histogram)
- Live attendance tracking through webcam
- Attendance is saved automatically in an Excel sheet, with date-wise tracking
- Clean, interactive Tkinter GUI
- Python 3.13.5
- Tkinter โ GUI
- OpenCV โ Image capture and recognition
- Pandas & OpenPyXL โ Excel handling
- NumPy โ Numerical processing
- Pillow โ Image display in Tkinter
-
Home Screen
- Navigate between โRegisterโ and โTake Attendanceโ screens.
-
Student Registration
- Enter Name and ID.
- Capture 30 face images via webcam (grayscale).
- Images are saved under
dataset/StudentName/. - Data is stored in
students.xlsx.
-
Model Training
- After capturing, the model trains using LBPH algorithm.
- A CSV file (
labels.csv) stores label-name-ID mappings. - The model is saved in
trainer.yml.
-
Attendance Marking
- System activates webcam, scans for known faces.
- If a face is recognized (with confidence < 70), attendance is marked for todayโs date in the Excel sheet.
- Install required libraries:
pip install opencv-python opencv-contrib-python pandas openpyxl pillow- Run the app:
python main.pyMake sure your webcam is connected and working.
Excel sheet created by program for attendance

This project was built as a practical implementation of AI in education. I plan to showcase it to my school with hopes of seeing it deployed in some classrooms as a trial initiative. With further refinement, it can reduce classroom administrative load and introduce students to real-world AI.
Parantap Mishra Class 12, PCM with CS Lotus Valley International School, Noida ๐จโ๐ป Passionate about AI, coding, and building real-world projects


