A modern, web-based attendance management system that uses facial recognition technology to automatically mark attendance. Built with Flask, OpenCV, and face_recognition library.
- Real-time Face Recognition: Instant face detection and recognition using webcam
- Automatic Attendance Marking: Automatically records attendance when recognized faces are detected
- Web-based Interface: Modern, responsive web interface for easy management
- Database Storage: SQLite database for reliable attendance data storage
- Training Image Management: Upload and manage training images for face recognition
- Real-time Dashboard: View current attendance statistics and recent records
- Attendance Reports: Generate detailed reports with date range filtering
- Statistics Overview: Total records, today's attendance, and unique people count
- Historical Data: Access complete attendance history
- Training Image Upload: Add new people to the system with photo uploads
- Name Management: Associate names with training images
- Training Image Deletion: Remove people from the recognition system
- Backend: Flask (Python web framework)
- Face Recognition: face_recognition library (dlib-based)
- Computer Vision: OpenCV
- Database: SQLite
- Frontend: HTML5, CSS3, JavaScript
- Image Processing: PIL (Python Imaging Library)
- Data Analysis: Pandas
- Python 3.7 or higher
- Webcam for face capture
- Windows 10/11 (tested on Windows 10.0.26100)
- Clone the repository
git clone <https://github.com/rbpata/Face-Recognition-Attendance-System.git>
cd Attendance-System- Install Python dependencies
pip install -r requirements.txt- Install dlib (if needed)
pip install dlib-19.24.1-cp311-cp311-win_amd64.whl- Initialize the database
- The database will be automatically created when you run the application
- Start the Flask application
python app.py- Access the web interface
- Go to
http://localhost:5000
- Navigate through the interface:
- Home: Overview and quick access
- Dashboard: Attendance statistics
- Capture: Real-time recognition
- Upload: Add people with images
- Reports: View/export attendance logs
python main.pyAttendance-System/
├── app.py # Flask web app
├── main.py # CLI attendance mode
├── requirements.txt # Python packages
├── templates/ # HTML templates
├── static/ # CSS/JS assets
├── Training_images/ # Known faces
├── Unknown/ # Unknown captures
├── attendance.db # SQLite DB
└── Attendance.csv # Legacy CSV log
- Upload face images to
Training_images - Encodes facial features
- Captures live webcam feed
- Matches detected faces with training data
- Logs attendance automatically
- Upload → Capture → Dashboard → Reports
CREATE TABLE attendance (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
date DATE DEFAULT CURRENT_DATE
);- Responsive design with intuitive flow
- Real-time attendance overlay
- Bootstrap styling for consistency
-
Camera not working
- Check if another app is using it
- Verify browser permissions
-
No face detected
- Ensure clear, front-facing images
- Check lighting conditions
-
Installation errors
- Use Python 3.7+
- Use provided
dlibwheel for Windows
MIT License. Feel free to use and modify.

