This project facilitates live student attendance using face recognition technology.
- Real-time face recognition with visual student identification via drawn rectangles.
- Graphical User Interface (GUI).
- Automatic creation of daily Excel files for attendance records.
-
Clone the repository:
git clone https://github.com/tharushaudana/python-student-attendance-by-face-recognition.git cd python-student-attendance-by-face-recognition -
Create a virtual environment:
Windows:
python -m venv env .\env\Scripts\activate
Linux/macOS:
python3 -m venv env source env/bin/activate -
Install
dlibmanually (required forface_recognition):Visit: https://github.com/z-mahmud22/Dlib_Windows_Python3.x Download the
.whlfile compatible with your Python version.Example for Python 3.12.1:
python -m pip install dlib-19.24.99-cp312-cp312-win_amd64.whl
-
Install remaining dependencies:
pip install -r requirements.txt
-
Run the project:
python main.py
✅ The package versions in
requirements.txtare fully compatible with Python 3.12.1. ✅ This project has been tested and confirmed to run successfully using Python 3.12.1.
-
Clone the Repository
-
Configure Parameters in
config.pyModify the following parameters in
config.pyif needed:video_device_index = 0 images_path = 'assets/student_images/' student_data_path = 'assets/student_data.xlsx' attendsheets_dir_path = 'Attend Sheets/'
-
Create
student_data.xlsxCreate
student_data.xlsxinassets/student_data.xlsxwith student information. Refer to
for the required format. -
Store Student Images
Store student images in
assets/student_images/, ensuring filenames correspond to student IDs instudent_data.xlsx. See
for an example. -
Attendance Sheets
Attendance sheets are automatically generated daily in
Attend Sheets/. View
for an example and
for a sample attendance sheet. -
Sample Video
