This is a face recognition-based attendance system developed using Python, Tkinter, OpenCV, and MySQL. The system allows for the registration of students, taking their attendance, and storing the data in a MySQL database.
- Register new students with their ID and Name.
- Capture images using a webcam.
- Train the system with the captured images.
- Recognize and mark attendance of students.
- Store and manage attendance records in a MySQL database.
- Change the admin password.
- Tkinter
pip install tk-tools
- Python 3.10: Download Python 3.10
- PIL (Pillow):
pip install pillow
- OpenCV:
pip install opencv-python
- OpenCV Contrib (for face recognizer):
pip install opencv-contrib-python
- MySQL Connector:
pip install mysql-connector-python
-
Clone the repository:
git clone https://github.com/yourusername/facial-recognition-attendance-system.git cd facial-recognition-attendance-system
-
Install the required packages:
pip install pillow opencv-python opencv-contrib-python mysql-connector-python
-
Set up your MySQL database:
CREATE DATABASE attendance_db; CREATE USER 'attendance_user'@'localhost' IDENTIFIED BY 'attendance_password'; GRANT ALL PRIVILEGES ON attendance_db.* TO 'attendance_user'@'localhost';
-
Ensure you have the necessary haarcascade file in the project directory:
haarcascade_frontalface_default.xml
-
Run the main application:
python main.py
-
Install the required packages:
pip install pillow opencv-python opencv-contrib-python mysql-connector-python
-
Ensure you have the necessary haarcascade file in the project directory:
haarcascade_frontalface_default.xml
-
If you encounter any issues with camera permissions, try running:
python -m cv2
-
Run the main application:
python main.py
- Register New Student: Enter the student ID and name, then click "Take Images" to capture their photos using the webcam.
- Save Profile: Click "Save Profile" to train the system with the captured images.
- Take Attendance: Click "Take Attendance" to start the face recognition process and mark attendance.
- View Attendance: View attendance records in the table within the application.
- Change Password: Use the "Change Password" option in the Help menu to change the admin password.
- Contact: Use the "Contact Us" option in the Help menu for support.
- About: Use the "About" option in the menu to view information about the system.
Feel free to fork this repository and contribute via pull requests. Any improvements and bug fixes are welcome