The Student Attendance System is a Python-based application designed to simplify the process of student attendance using face recognition technology. This project combines the power of machine learning with an interactive PyQt GUI to offer a user-friendly and efficient solution for managing attendance records.
- Built using HOG (Histogram of Oriented Gradients) and ResNet models from the
face_recognitionlibrary. - Achieves an accuracy of 90% in predicting and recognizing student faces.
- Matches recognized faces against a database to mark attendance.
The GUI provides an intuitive interface with the following key panels:
- Secure login with username and password. (for 1st time usename: op password: op)
- Access to:
- Data Management Panel
- Student Management Panel
- Add new users (usename name and password)
- Add new student (name,batch,roll number,year,and 3 photos to save it in training folder)
- Update existing user and student information.
- Encode faces and store them in the database for recognition.
- Input fields for:
- Subject Name
- Date & Time
- Year and Batch
- Fetches the list of students (names, roll numbers, and batch) based on the selected criteria.
- Starts the Face Recognition System to:
- Recognize faces in real time.
- Mark recognized students as Present.
- Automatically mark unrecognized or absent students as Absent upon closing attendance.
- Save attendance records for future use.
- All images of students are stored in the
trainingfolder.- Each student's images are stored in a separate subfolder named after the student (e.g.,
training/John_Doe/).
- Each student's images are stored in a separate subfolder named after the student (e.g.,
- The
encode.pyscript:- Reads all images from the
trainingfolder. - Encodes each face using the
face_recognitionlibrary. - Saves the encodings along with their respective names into an
output.pklfile.
- Reads all images from the
- The encoded data in the
output.pklfile is used during face recognition to match and identify students.
- In the Student Management Panel:
- Select the subject, date, time, year, and batch.
- Fetch the student data for the selected batch.
- Press Start Attendance to open the face recognition system.
- The system:
- Recognizes faces in real time using the encodings from
output.pkl. - Marks recognized students as Present.
- Marks others as Absent when attendance is closed.
- Recognizes faces in real time using the encodings from
- Save the attendance data.
- Python 3.7 or above
- Required Python libraries:
- PyQt5
- OpenCV
- face_recognition
- NumPy
- Pandas
- Clone this repository:
git clone https://github.com/Priyansh7999/Student-Attendance-System.git
- Install the required libraries:
pip install pyqt5 opencv-python face-recognition numpy pandas
- Run the application::
python main.py
- Login to the system.
- Navigate to the appropriate panel:
- Data Management Panel to manage user/student data and encode faces.
- Student Management Panel to mark attendance. -Use the Face Recognition System to identify students and save attendance records.
- Enhance the face recognition model for higher accuracy.
- Integrate real-time database synchronization for cloud-based attendance management.
- Add analytics and reporting features for attendance trends.
Contributions are welcome! Please fork the repository and submit a pull request for review.
This project is licensed under the MIT License. See the LICENSE file for details.