The Smart Attendance System is a vision-based project that automates attendance tracking using computer vision and machine learning techniques. It leverages face recognition to register attendance in real-time, making the traditional manual attendance system more efficient and accurate. The application is built with Streamlit, providing an intuitive web interface for all attendance management operations.
- Real-time Face Recognition: Automatically identifies registered individuals using webcam input
- User Registration: Simple interface to register new faces with the system
- Automated Attendance: Marks attendance with timestamps when registered faces are detected
- Flexible Attendance Modes:
- Auto-stop after detecting all registered users
- Auto-stop after detecting a specific number of users
- Auto-stop after a time limit
- Audio Feedback: Voice confirmation when attendance is marked
- Attendance Records: View and download attendance reports by date
- User-friendly Interface: Clean Streamlit UI for easy navigation and use
- Python: Core programming language
- Streamlit: Web application framework for the user interface
- OpenCV: Computer vision for face detection and image processing
- scikit-learn: KNN classifier for face recognition
- Pandas: Data manipulation and CSV handling
- Threading: Concurrent processing for audio feedback
- win32com: Text-to-speech capabilities (Windows)
Smart-Attendance-System/
│
├── app.py # Main application entry point with Streamlit interface
├── Add_faces.py # Module for registering new faces
├── tempCodeRunnerFile.py # Module for attendance tracking functionality
├── utils.py # Utility functions for the system
├── requirements.txt # List of dependencies
├── Data/ # Directory for storing face data and models
│ ├── faces_data.pkl # Pickle file containing face embeddings
│ ├── names.pkl # Pickle file containing corresponding names
│ └── haarcascade_frontalface_default.xml # Face detection model
├── Attendance/ # Directory for storing attendance records
│ └── Attendance_DD-MM-YYYY.csv # Daily attendance records
└── README.md # Project documentation (this file)
Ensure you have the following installed:
- Python 3.7+
- pip (Python package manager)
- Webcam (built-in or external)
-
Clone the repository:
git clone https://github.com/Utkgitdev-07/Smart-Attendance-System.git
-
Navigate to the project directory:
cd Smart-Attendance-System -
Install the required dependencies:
pip install -r requirements.txt
Run the application using Streamlit:
streamlit run app.pyThe application has four main sections accessible from the sidebar:
- Home: Introduction to the system features
- Register Face: Add new faces to the system
- Take Attendance: Start attendance tracking session
- View Records: Check and download attendance records
- Navigate to the "Register Face" section
- Enter the person's name
- Click "Start Recording"
- The system will capture 5 images of the face
- Click "Stop Recording" when finished
- Navigate to the "Take Attendance" section
- Select an auto-stop mode:
- After detecting all registered users
- After detecting a specific number of users
- After a time limit
- Click "Start Attendance Taking"
- Registered faces will be recognized and attendance will be marked automatically
- Audio confirmation will announce each successful attendance entry
- The system will stop automatically based on your selected mode or you can stop manually
- Navigate to the "View Records" section
- Select a date from the dropdown menu
- View attendance statistics and detailed records
- Download the attendance as a CSV file
- Face Detection: Uses Haar Cascade classifier to detect faces in webcam feed
- Face Processing: Detected faces are cropped, resized to 50x50 pixels, and flattened
- Classification: KNN (K-Nearest Neighbors) algorithm identifies the person
- Attendance Marking: When a person is recognized, their name and timestamp are recorded
- Face Data: Stored as pickle files (faces_data.pkl, names.pkl)
- Attendance Records: Stored as CSV files with date-based naming
- Webcam Not Detected: Ensure your webcam is properly connected and not in use by another application
- Face Not Recognized: Try registering again with better lighting and multiple angles
- Missing Cascade File: The system should automatically download it, but you can manually place it in the Data directory
- Multiple face detection for group attendance
- Integration with databases for more robust data storage
- Mobile application support
- API for integration with other systems
- Automated reporting and analytics
Contributions are welcome! To contribute:
- Fork the repository
- Create a new branch (
git checkout -b feature-name) - Make your changes
- Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature-name) - Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.