Making Attendance faster using AI
π₯οΈ View Live Demo β’ π Report Bug β’ β¨ Request Feature β’ π¨βπ» Developer LinkedIn
SnapClass is a modern, end-to-end educational web application engineered to solve the bottleneck of manual classroom roll calls[cite: 1, 2]. By leveraging state-of-the-art machine learning, this platform provides multi-modal biometric authenticationβintegrating both Computer Vision (Facial Recognition) and Audio Processing (Voice Recognition)[cite: 9, 16, 17, 20].
Designed with scalability in mind, SnapClass connects a dynamic Python frontend to a robust PostgreSQL cloud database, demonstrating full-stack ML deployment capabilities[cite: 3, 14].
- πΈ One-Click Face Attendance: Capture or upload images of the classroom. The AI uses
dliband Support Vector Classification (SVC) to instantly detect faces, match them against the database, and log attendance[cite: 13, 16, 20]. - ποΈ Voice Roll Call Processing: Record a continuous audio snippet of students saying "I am present". The app automatically segments the audio and identifies students via
resemblyzervoice embeddings[cite: 9, 17, 20]. - π Analytics & Records: Access historical attendance records grouped by timestamp, displaying comprehensive class attendance ratios[cite: 20].
- π Smart Class Management: Create new subjects and generate shareable joining links or QR codes (via
segno) for frictionless student onboarding[cite: 6, 8, 20]. - π Secure Access: Enterprise-grade security with
bcryptpassword hashing for teacher credentials[cite: 15, 20].
- ποΈ Passwordless Biometric Login: Students access their personalized dashboards securely by simply scanning their face through the device camera[cite: 19].
- π² Frictionless Enrollment: Join a subject instantly via URL query parameters (
join-code), a shared subject code, or QR scanning[cite: 1, 5, 7, 8]. - π€ Multi-Modal Profile Setup: New students can register a dual-biometric profile by providing a baseline facial snapshot and an optional voice vector[cite: 19].
- π Performance Tracking: A sleek dashboard visualizes enrolled courses and calculates personal attendance rates (Total Classes vs. Classes Attended)[cite: 19].
- Streamlit: Powers the reactive UI, session state management, and multi-page routing[cite: 1, 3].
- Custom CSS: Injected custom styling via
base_layout.pyfor a polished, app-like UI (hiding default Streamlit headers, custom Google Fonts, and themed buttons)[cite: 21].
- Vision (
scikit-learn,dlib-bin,face_recognition_models): Extracts 128-dimensional face descriptors and predicts student identities utilizing an SVM classifier[cite: 3, 16]. - Audio (
librosa,resemblyzer): Processes classroom.wavfiles, applies decibel-based segmentation, and evaluates cosine similarity against stored voice embeddings[cite: 3, 17].
- Supabase: Acts as the primary PostgreSQL database handling relational mapping between students, teachers, subjects, and attendance logs[cite: 3, 14, 15].
- Authentication: Integrates
bcryptto salt and hash teacher passwords prior to database insertion[cite: 3, 15].
- Pandas & NumPy: Handles matrix operations for ML embeddings and data wrangling for attendance reporting.
- Pillow (PIL) & Segno: Manages image processing and renders scannable QR codes[cite: 3].
π¦ ai-attendance-project-app[cite: 2]
β£ π app.py # Main application entry point & router[cite: 1]
β£ π requirements.txt # Python dependencies[cite: 3]
β£ π src
β β£ π components # Reusable UI elements & interactive dialogs
β β β£ π dialog_attendance_results.py[cite: 4]
β β β£ π dialog_auto_enroll.py [cite: 5]
β β β£ π dialog_create_subject.py [cite: 6]
β β β£ π dialog_enroll.py [cite: 7]
β β β£ π dialog_share_subject.py [cite: 8]
β β β£ π dialog_voice_attendance.py [cite: 9]
β β β£ π dialog_add_photo.py [cite: 13]
β β β£ π header.py & footer.py [cite: 10, 11]
β β β π subject_card.py [cite: 12]
β β£ π database # Backend integration
β β β£ π config.py # Supabase client initialization
β β β π db.py # CRUD operations & bcrypt hashing
β β£ π pipelines # AI/ML logic
β β β£ π face_pipeline.py # dlib face embeddings & SVM classifier[cite: 16]
β β β π voice_pipeline.py # resemblyzer audio segmentation[cite: 17]
β β£ π screens # Core application views
β β β£ π home_screen.py # Portal selection[cite: 18]
β β β£ π student_screen.py # FaceID login & student dashboard[cite: 19]
β β β π teacher_screen.py # Attendance scanning & class management[cite: 20]
β β π ui
β β π base_layout.py # Custom CSS definitions & theming[cite: 21]