A real-time face recognition-based attendance system built using Streamlit for the user interface, OpenCV for face detection and recognition, and Haar Cascade classifiers for facial feature extraction. This system allows you to register students, train a face recognition model, and take or view attendance with ease.
- 🧑🎓 Register students with facial image capture
- 🧠 Train model using OpenCV and Haar Cascades
- 🤖 Automatic attendance using webcam and face recognition
- ✍️ Manual attendance entry
- 📅 View attendance records by subject and date + percentage
- 🗑️ Delete student data from the system
- 🔈 Text-to-speech for better accessibility
- Python 3.8+
- Streamlit – GUI and user interactions
- OpenCV – Image processing and recognition
- Haar Cascades – Face detection
- CSV – Storage of student details and attendance logs
📦face-recognition-attendance/
├── app.py # Main Streamlit app
├── takeImage.py # Capture and save student face
├── trainImage.py # Train recognition model
├── automaticAttendance.py # Detect and mark attendance
├── takemanually.py # Manual attendance input
├── view_attendance.py # Display attendance by subject/date
├── delete.py # Delete student and retrain
├── db.py # CSV-based student DB utilities
├── TrainingImage/ # Folder storing face images
├── TrainingImageLabel/ # Trained model file (e.g., .yml)
├── StudentDetails/ # CSV file for student info
├── Attendance/ # Attendance records
├── HaarCascade/haarcascade_frontalface_default.xml
- Install dependencies
pip install -r requirements.txt- Run the app
streamlit run app.py- Use Interface
- Register students
- Train model
- Take automatic or manual attendance
- View or delete records
- Webcam-enabled system
- Python 3.8 or higher
- Make sure the
haarcascade_frontalface_default.xmlfile is available in the correct path. - After deleting a student, the model is retrained automatically.
- CSV files are used for storage – you can upgrade to a database like PostgreSQL if needed.
If you found this project helpful or interesting, please consider giving it a ⭐️ on GitHub — it motivates and helps others discover it! ✌️
ENJOY! 🎉
