An intelligent, real-time attendance tracking system using face recognition and liveness detection. Built with Python, OpenCV, Flask, and anti-spoofing techniques, this system automates attendance marking, visualizes data, and enhances accuracy and security by preventing spoofing attacks.
- 🎯 Real-Time Face Recognition – Automatically detects and identifies faces using
face_recognitionand OpenCV. - 🔐 Anti-Spoofing / Liveness Detection – Detects fake attempts using printed photos or mobile screens.
- 📝 Automated Attendance Logging – Captures attendance with timestamps and logs into CSV files.
- 📊 Dashboard Visualization – Visual representation of attendance statistics.
- 📸 Face Capture & Storage – Stores images of users upon verification for audit purposes.
- 🔔 Email Alerts for Absentees – Automatically sends alerts to absent students.
- 🌐 Web Integration – Flask-powered responsive frontend for real-time display.
| Category | Tools / Technologies |
|---|---|
| 💻 Programming | Python, JavaScript |
| 🧠 AI & CV | OpenCV, face_recognition, TensorFlow (Anti-Spoofing Models) |
| 🌐 Backend & Server | Flask |
| 🗃️ Data Processing | Pandas, NumPy |
| 📊 Visualization | Matplotlib / D3.js (optional) |
| 🧪 Testing/Debugging | Jupyter Notebook |
| 🧾 Storage | CSV for logs, image directory for captures |
| 📬 Email Services | SMTP (for alerts) |
| 🧑💻 Frontend | HTML5, CSS3, JavaScript |
| 🔧 Tools | Git, GitHub, VS Code |
AI-Smart-Attendance/
│
├── ai\_attendance/
│ ├── face\_data/
│ │ ├── known\_faces/ # Directory with labeled face data
│ │ └── captured\_faces/ # Captured face images of attendees
│ ├── static/
│ │ ├── css/ # Styling files
│ │ └── js/ # Scripts
│ ├── templates/
│ │ └── index.html # Web dashboard
│ ├── app.py # Main Flask app
│ ├── anti\_spoofing.py # Liveness detection logic
│ ├── attendance\_log.csv # Attendance records
│ └── utils.py # Supporting utility functions
│
├── requirements.txt # All dependencies
├── README.md # You are here
└── LICENSE # License file
- Face Detection: Uses OpenCV to detect faces from webcam/video stream.
- Face Recognition: Matches face encodings with known dataset using
face_recognition. - Liveness Detection: Runs anti-spoofing model to confirm real presence.
- Attendance Logging: Logs date, time, and student name into a
.csvfile. - Dashboard Display: Attendance data shown on a Flask-powered webpage.
- Email Alert System: Sends absentee notification via SMTP.
# Clone the repository
git clone https://github.com/your-username/AI-Smart-Attendance.git
cd AI-Smart-Attendance
# Create a virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt# Run the Flask app
python app.py
# Access the dashboard
Open your browser and go to http://127.0.0.1:5000/flask
opencv-python
face-recognition
numpy
pandas
tensorflow
prettytable
pyttsx3
Make sure to install all using:
pip install -r requirements.txt| Live Face Recognition | Dashboard Overview |
|---|---|
![]() |
![]() |
(Replace with actual images from your project)
- 🔒 Facial mask detection integration
- ☁️ Cloud deployment with Firebase or AWS
- 📱 Mobile version of the web interface
- 🧠 Enhanced deep learning-based spoof detection
- 🗂️ MongoDB/SQL database integration
Venkata Chandu 🎓 B.Tech CSE | Data Science & AI Enthusiast 🔗 Portfolio • GitHub • LinkedIn • 📧 chanduabbireddy247@gmail.com
This project is licensed under the MIT License.
If you like this project, consider ⭐ starring the repository. Feel free to open issues or contribute via pull requests!

