An intelligent attendance system using adaptive face recognition with real-time tracking and quality assessment. Built specifically for educational institutions using SAP ID-based student identification.
-
Real-time Face Detection & Recognition
- MTCNN for robust face detection
- Pre-trained FaceNet embeddings
- Face quality assessment
- Multi-face tracking
-
Student Management
- SAP ID-based registration
- Multi-angle face capture
- Automatic database updates
- Comprehensive student profiles
-
Attendance Features
- Real-time attendance marking
- Subject & lecture slot tracking
- Confidence scoring
- Historical attendance records
-
Clone the Repository
git clone https://github.com/yourusername/adaptive-face-attendance.git cd adaptive-face-attendance -
Set Up Environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
-
Configure MongoDB
# Start MongoDB service mongod -
Register Students
python scripts/capture_student_data.py
-
Take Attendance
python take_attendance.py
ipd_2/
├── models/
│ ├── face_detector.py # MTCNN face detection
│ ├── feature_extractor.py # FaceNet embeddings
│ └── adaptive_lstm.py # Sequence processing
├── database/
│ ├── db_manager.py # MongoDB interface
│ └── models.py # Database schemas
├── utils/
│ └── face_tracker.py # Face tracking
├── scripts/
│ └── capture_student_data.py
└── data/
└── metadata.json # Student information
- Update
data/metadata.jsonwith student details - Run capture script
- Follow prompts to capture face data
- Verify database entry
- Start the system
- Enter subject and lecture details
- Position camera to view students
- Monitor real-time recognition
- Press 'q' to end session
- Face Detection: MTCNN (Multi-task Cascaded Convolutional Networks)
- Feature Extraction: FaceNet embeddings (Inception ResNet V1)
- Face Tracking: Custom implementation with embedding matching
- Database: MongoDB for flexible document storage
- Quality Assessment: Clarity scoring using multiple metrics
- Python 3.8+
- PyTorch 1.8+
- MongoDB 4.4+
- OpenCV
- CUDA-capable GPU (optional)
See requirements.txt for complete list.
Contributions welcome!
This project is licensed under the MIT License - see the LICENSE file for details.
Harsh Kanani - harshkanani80@gmail.com
A facial recognition-based attendance tracking system with an interactive Streamlit interface.
- Live attendance tracking via webcam
- Process pre-recorded videos for attendance
- View and export attendance records
- Adaptive recognition using LSTM model with clarity scoring
-
Install dependencies:
pip install -r requirements.txt -
Run the Streamlit app:
streamlit run app.py
- Navigate to the "Live Attendance" page
- Enter subject name and lecture slot
- Click "Start Camera" to begin tracking
- Students will be recognized and marked present automatically
- Click "Stop" when the session ends
- Navigate to the "Process Video" page
- Upload a video file (.mp4, .avi, .mov)
- Enter subject and lecture slot details
- Click "Process Video"
- View the results once processing completes
- Navigate to the "View Records" page
- Set date range, subject, and optional SAP ID filters
- Click "Search Records" to view matching attendance data
- Download as CSV if needed
Adjust recognition thresholds and view system information.