Skip to content

An AI-powered Smart Attendance System uses face recognition and liveness detection to automate attendance, ensuring accuracy, security, and real-time tracking.

Notifications You must be signed in to change notification settings

venkat-0706/Smart-Attendance

Repository files navigation

πŸ“Έ AI-Powered Smart Attendance System

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.


🧠 Key Features

  • 🎯 Real-Time Face Recognition – Automatically detects and identifies faces using face_recognition and 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.

🧰 Tech Stack

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

πŸ“‚ Project Structure


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


πŸ–₯️ How It Works

  1. Face Detection: Uses OpenCV to detect faces from webcam/video stream.
  2. Face Recognition: Matches face encodings with known dataset using face_recognition.
  3. Liveness Detection: Runs anti-spoofing model to confirm real presence.
  4. Attendance Logging: Logs date, time, and student name into a .csv file.
  5. Dashboard Display: Attendance data shown on a Flask-powered webpage.
  6. Email Alert System: Sends absentee notification via SMTP.

πŸ“¦ Installation

# 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

▢️ Usage

# Run the Flask app
python app.py

# Access the dashboard
Open your browser and go to http://127.0.0.1:5000/

πŸ“Œ Dependencies

flask
opencv-python
face-recognition
numpy
pandas
tensorflow
prettytable
pyttsx3

Make sure to install all using:

pip install -r requirements.txt

πŸ“· Sample Screenshots

Live Face Recognition Dashboard Overview
Face Recognition Dashboard

(Replace with actual images from your project)


πŸ’‘ Future Enhancements

  • πŸ”’ 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

πŸ‘¨β€πŸ’» Author

Venkata Chandu πŸŽ“ B.Tech CSE | Data Science & AI Enthusiast πŸ”— Portfolio β€’ GitHub β€’ LinkedIn β€’ πŸ“§ chanduabbireddy247@gmail.com


πŸ“„ License

This project is licensed under the MIT License.


πŸ™Œ Support

If you like this project, consider ⭐ starring the repository. Feel free to open issues or contribute via pull requests!

About

An AI-powered Smart Attendance System uses face recognition and liveness detection to automate attendance, ensuring accuracy, security, and real-time tracking.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published