Project ID: SIH25012
Project Title: Automated Attendance System for Rural Schools
Team: CodeSmiths
Institution: University of Scinece and Technology, Meghalaya
- Overview
- Problem Statement
- Solution
- Features
- Technical Architecture
- Installation
- Usage
- Performance Optimization
- Future Enhancements
- Contributing
- License
The Automated Attendance System for Rural Schools is an innovative solution designed to address the challenges of manual attendance tracking in remote educational institutions. Using advanced computer vision and facial recognition technology, this system provides a reliable, efficient, and cost-effective method for automating student attendance.
Rural schools face significant challenges with traditional attendance systems:
- Manual Processes: Time-consuming paper-based attendance tracking
- Human Error: Proxy attendance and manual recording errors
- Resource Constraints: Limited technological infrastructure
- Data Management: Difficulty in maintaining and analyzing attendance records
- Administrative Burden: Teachers spending valuable time on attendance instead of teaching
Our system leverages facial recognition technology to provide:
- Real-time Face Detection: Instant recognition of students using webcam
- Automated Record Keeping: Digital attendance logs with timestamps
- Duplicate Prevention: Smart logic to prevent multiple entries per day
- Performance Optimization: Multi-processing architecture for smooth operation
- Scalable Design: Easy to deploy across multiple rural schools
- ๐ฅ Real-time Webcam Attendance: Live face recognition using standard webcam
- ๐ฅ Multi-face Detection: Simultaneous recognition of multiple students
- ๐ CSV Export: Daily attendance reports in standard format
- ๐ซ Duplicate Prevention: Prevents multiple entries for same student per day
- ๐ฑ Simple UI: Easy-to-use admin panel interface
- โก Multiprocessing: Separate processes for capture and recognition
- ๐ฏ Frame Optimization: Intelligent frame skipping and scaling
- ๐ FPS Monitoring: Real-time performance tracking
- ๐พ Memory Efficient: Optimized queue management
- ๐จโ๐ Student Registration: Easy face encoding and registration
- ๐ Daily Reports: Automatic generation of attendance records
- ๐ Search Capability: Quick student lookup and verification
- ๐ฑ Batch Processing: Support for processing multiple images
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Main Process โโโโโโ Frame Capture โโโโโโ Camera Feed โ
โ (UI & Control)โ โ (OpenCV) โ โ โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ
โ โผ
โ โโโโโโโโโโโโโโโโโโโโ
โ โ Multiprocessing โ
โ โ Queue โ
โ โโโโโโโโโโโโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโ
โ Attendance โ โ Face Recognition โ
โ Logging โโโโโโ Worker Process โ
โ (CSV Output) โ โ (face_recognition)โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโ
- Programming Language: Python 3.13.5
- Computer Vision: OpenCV 4.12.0.88
- Face Recognition: face_recognition library (dlib-based)
- Data Processing: NumPy, Pandas
- File Handling: CSV, Pickle
- Concurrency: Multiprocessing
- Logging: Python logging module
# Python 3.13 or higher
python --version
# pip package manager
pip --version- Clone the Repository
git clone https://github.com/monsurcodes/SIH25012.git
cd SIH25012/prototype- Create Virtual Environment
python -m venv .venv
# Windows
.venv\Scripts\activate
# Linux/Mac
source .venv/bin/activate- Install Dependencies
pip install opencv-python
pip install face-recognition
pip install numpy
pip install dlib # Required for face_recognition- Prepare Data Directories
mkdir -p data/known_faces
mkdir -p output
mkdir -p logs- Add Student Photos
- Place student photos in
data/known_faces/directory - Use format:
ROLLNO_Name.jpg(e.g.,2025-BCSE-0015_Monsur.jpg)
python main.py**** Admin Panel ****
1. Run attendance system
2. Register faces
3. Quit
- Select option 2 to encode student faces
- System will process all images in
data/known_faces/ - Encodings saved to
data/encodings.pickle
- Select option 1 to start webcam attendance
- Position students in front of camera
- System automatically detects and logs attendance
- Press 'q' to quit
Purpose: Application entry point and admin interface
- Provides interactive menu system
- Orchestrates face registration and attendance processes
- Handles user input and navigation
Purpose: Core facial recognition and attendance logic
AttendanceRecognizerclass: Main recognition engineprocess_webcam_multiprocess(): Optimized real-time attendancemark_attendance(): Attendance logging with duplicate preventionface_recognition_worker(): Multiprocessing worker function
Purpose: Face encoding and student registration
encode_known_faces(): Processes student photos- Extracts facial features and creates encodings
- Supports batch processing of multiple images
- Handles roll number extraction from filenames
Purpose: Centralized logging configuration
get_logger(): Creates configured logger instances- Dual output: console and file logging
- Structured log format with timestamps
- Error tracking and debugging support
- Separate Processes: Camera capture and face recognition run independently
- Queue Management: Efficient inter-process communication
- Frame Skipping: Processes every Nth frame to reduce load
- Dynamic Scaling: Resizes frames for faster processing
# Configurable performance settings
process_every_n_frames = 3 # Process every 3rd frame
scale_factor = 0.5 # 50% size reduction
queue_maxsize = 1 # Minimal queue for real-time processing- Standard Mode: ~5-8 FPS on average hardware
- Optimized Mode: ~15-25 FPS with multiprocessing
- Memory Usage: <200MB typical operation
- CPU Usage: Distributed across multiple cores
- Web Interface: Browser-based admin panel
- Database Integration: MySQL/PostgreSQL support
- Mobile App: Android/iOS companion apps
- Cloud Deployment: AWS/Azure cloud hosting
- Emotion Detection: Student engagement analysis
- Anti-spoofing: Protection against photo attacks
- Batch Import: Excel/CSV student data import
- Analytics Dashboard: Attendance trends and insights
- Offline Mode: Function without internet connectivity
- Low-bandwidth Sync: Efficient data synchronization
- Multi-language Support: Local language interfaces
- SMS Integration: Attendance notifications to parents
- Time Savings: Reduces attendance time by 80%
- Accuracy: Eliminates proxy attendance and human errors
- Cost Effective: Uses standard hardware (webcam + laptop)
- Easy Deployment: Minimal technical expertise required
- Focus on Teaching: More time for educational activities
- Digital Records: Automated attendance tracking
- Performance Insights: Student attendance patterns
- Administrative Efficiency: Streamlined processes
- Contactless System: Hygienic and convenient
- Quick Process: Instant recognition and logging
- Fair System: Eliminates favoritism or errors
- Privacy Friendly: Local processing, no cloud storage
We welcome contributions to improve the system:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Smart India Hackathon 2025 for providing the platform
- OpenCV Community for computer vision tools
- dlib Library for facial recognition capabilities
- Rural Education Initiative for problem identification
Team Lead: Monsur
Email: monsurcodes@outlook.com
Project Repository: https://github.com/monsurcodes/SIH25012
Made with โค๏ธ for Rural Education in India
This project is part of Smart India Hackathon 2025 - Building solutions for tomorrow's India