This project uses machine learning to recognize faces and record attendance based on the identified faces. Follow the steps below to add new students, train the model, and run the attendance app.
- Open
students.csvand add the new student's details (name and roll number). - Ensure the name matches the format used for image naming in the next step.
- In the
trainingfolder, add at least 100 clear images of the person’s face. - Name the images in this format:
Name001.jpg,Name002.jpg, etc.- Example: For a student named Vishnu, images should be named
Vishnu001.jpg,Vishnu002.jpg, and so on.
- Example: For a student named Vishnu, images should be named
- Important: Ensure the name in the image filenames matches the name in
students.csv.
- Run
main.py. This will:- Create a trained model and save it as a
.pklfile. - Generate the database and required tables if they don't already exist.
- Create a trained model and save it as a
- Note: Training may take some time.
- After training is complete, a camera window will pop up for testing. Use this to verify the model's recognition performance.
- To track attendance, open and run
attendance_app.py.
- Incase if you want to delete attendance log there is a python file called
DatabaseManipulation.pywhich if you run will completely clear all the values in the tableattendancelog