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!

