A desktop-based Smart Attendance System that automates employee attendance using face recognition.
Built with Python, PyQt6, OpenCV, dlib/face_recognition, PostgreSQL, and MongoDB.
This project demonstrates skills in GUI development, computer vision, databases, and threading.
- Employee registration with photo & face encoding (stored in PostgreSQL).
- Real-time attendance marking using webcam + face recognition.
- Dual-database approach:
- PostgreSQL → structured employee metadata & encodings.
- MongoDB → attendance logs with timestamps.
- Duplicate prevention → ensures one log per employee per day.
- Green bounding box around detected faces for visual feedback.
- Non-blocking camera using PyQt QThread worker (avoids GUI freeze).
- Python 3.10+
- PyQt6 (GUI)
- OpenCV (camera handling)
- face_recognition/dlib (face encodings & matching)
- PostgreSQL (employee data)
- MongoDB (attendance logs)
smart_attendance/
│ config.example.py
│ main.py
│
├───database
│ mongo_db.py
│ postgres_db.py
│
├───gui
│ attendance_window.py
│ logs_window.py
│ main_window.py
│ register_window.py
│
├───services
│ attendance_worker.py
│ face_recognizer.py
│ photo_storage.py
│
└───utils
utils.pygit clone https://github.com/TejasNN/smart-attendance-system.git
cd smart-attendance-systempython -m venv venv
source venv/bin/activate # On Linux/Mac
venv\Scripts\activate # On Windowspip install -r requirements.txtPostgreSQL: Create DB & run create_tables() in postgres_db.py.
MongoDB: Ensure service is running (mongod).
python main.py
- 📊 Export logs as Excel/PDF reports
- 🔑 Add login roles (Admin/User)
- 🛡️ Strengthen validation & security
- 📈 Build interactive dashboards for admins
-
Learned PyQt threading to prevent GUI freezing.
-
Designed a dual-database architecture.
-
Improved face recognition accuracy with encoding optimizations.
-
Implemented validation checks to avoid duplicate logs.
Developed by @TejasNN (Tejas Nagvekar)
🚀 Passionate about building scalable desktop and web applications with Python.