SnapRoll is a production-grade, AI-driven classroom management system that automates attendance logging using facial recognition and voice biometric verification. It replaces tedious manual roll calls with automated photo and audio scanning, logging timestamped records in real time.
π Live Demo Β· π Quickstart Β· ποΈ Database Setup Β· π Report Bug
- Key Features
- System Architecture
- Tech Stack
- Project Directory Structure
- Database Setup & Schema
- Quickstart & Installation
- Environment Configuration
- Production Deployment
- Troubleshooting & FAQ
- Future Roadmap
- Contributing
- License
- Parallel Scanning: Processes single or multiple classroom photos simultaneously.
- Biometric Embeddings: Extracts 128-dimensional facial embeddings using
dlibHOG face detection and 68-point shape landmark alignment. - SVM Classifier: Uses a Support Vector Machine (SVM) classifier trained dynamically on enrolled student profiles for instant multi-face verification.
- Audio Processing: Captures classroom speech clips directly via browser microphone input.
- Speaker Diarization & Embeddings: Uses
librosafor voice segment processing andResemblyzerfor generating 256-dimensional neural voice embeddings. - Cosine Distance Matching: Matches audio signatures against enrolled voice profiles using cosine similarity metrics with automated thresholding.
- Instant Join Links & QR Codes: Auto-generates shareable links and downloadable QR codes (powered by
segno) for seamless student self-enrollment. - Role Routing: Role-aware interface for Teachers (class management, AI scans, logs) and Students (Face ID login, subject dashboard, personal attendance history).
- Roster Inspection: Interactive summary table allowing teachers to click any session row to inspect complete student attendance rosters.
- CSV Export: One-click report download with formatted timestamps for administration compliance.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STREAMLIT FRONTEND LAYER β
β Role-Aware UI (Home Router β Teacher Dashboard / Student Portal) β
β Browser Camera Capture Β· Audio Recorder Β· Interactive Tables β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI PIPELINE LAYER β
β β
β π· Face Pipeline ποΈ Voice Pipeline β
β βββ dlib HOG Face Detector βββ librosa Audio Segmentation β
β βββ 68-Point Shape Predictor βββ Resemblyzer Voice Embedder β
β βββ 128-d Embedding Extraction βββ 256-d Vector Normalization β
β βββ scikit-learn SVM Classification βββ Cosine Similarity Matcher β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Supabase Client (REST / Realtime)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DATA LAYER (Supabase) β
β PostgreSQL Relational DB (RLS Configured) β
β teachers Β· students Β· subjects Β· subject_students Β· attendance_logs β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Domain | Technology | Description |
|---|---|---|
| Core Framework | Python 3.10+ | Primary language runtime |
| Web UI | Streamlit | Responsive single-page web framework |
| Face Biometrics | dlib, face_recognition_models |
HOG face detector & 128-d facial landmark extractors |
| Voice Biometrics | Resemblyzer, librosa, torch |
Voice encoder & audio segmentation engine |
| Machine Learning | scikit-learn, numpy, pandas |
SVM classification and tabular dataset manipulation |
| Authentication | bcrypt |
Hashed password verification for instructor accounts |
| Database | Supabase (PostgreSQL) | Cloud database layer with REST endpoint access |
| QR Code Engine | segno |
Vector QR code generator for subject join links |
snaproll-ai-powered-attendance-system/
βββ .streamlit/
β βββ secrets.toml # Streamlit credentials (SUPABASE_URL, SUPABASE_KEY)
βββ src/
β βββ components/ # UI Components & Modal Dialogs
β β βββ dialog_add_photos.py # Camera & image file uploader
β β βββ dialog_attendance_result.py# Attendance report preview modal
β β βββ dialog_auto_enroll.py # QR / link quick enrollment handler
β β βββ dialog_create_subject.py # Subject creation form
β β βββ dialog_enroll.py # Manual subject code enrollment modal
β β βββ dialog_share_subject.py # QR code generator & link launcher
β β βββ dialog_voice_attendance.py # Voice recording & recognition modal
β β βββ footer.py # Page footer layout
β β βββ header.py # Top banner header component
β β βββ subject_card.py # Subject statistics card widget
β βββ database/
β β βββ config.py # Supabase client instantiation
β β βββ db.py # Data access layer (CRUD queries & joins)
β βββ pipelines/
β β βββ face_pipeline.py # Face detection, 128-d embedding & SVM model
β β βββ voice_pipeline.py # Voice segmentation & Resemblyzer embedding match
β βββ screens/
β β βββ home_screen.py # Landing page / portal selection
β β βββ student_screen.py # Student dashboard & Face ID login flow
β β βββ teacher_screen.py # Teacher dashboard, attendance session & records
β βββ ui/
β βββ base_layout.py # CSS styling injection & typography config
βββ assets/
β βββ SnapRoll_Logo.ico # Application icon asset
βββ app.py # Main entry point & session state router
βββ requirements.txt # Dependency manifest
βββ README.md # Production documentation
- Python: Version 3.10 or higher
- Git: Installed on system path
- Compiler Tools: C++ build tools (for
dlibcompilation if binary wheel is not available)
git clone https://github.com/Vaibhav1o1/snaproll-ai-powered-attendance-system.git
cd snaproll-ai-powered-attendance-systemWindows (PowerShell):
python -m venv venv
.\venv\Scripts\Activate.ps1macOS / Linux:
python3 -m venv venv
source venv/bin/activatepip install --upgrade pip
pip install -r requirements.txtCreate a .streamlit/secrets.toml file inside the root folder:
# .streamlit/secrets.toml
SUPABASE_URL = "https://your-project-id.supabase.co"
SUPABASE_KEY = "your-supabase-anon-key"(Alternatively, you can create a .env file with SUPABASE_URL and SUPABASE_KEY variables).
streamlit run app.pyThe application will start locally at http://localhost:8501.
- Push your latest codebase to GitHub (ensure
.streamlit/secrets.tomlis listed in.gitignore). - Log into share.streamlit.io with GitHub.
- Select New App β Select your repository, set branch to
main, and set main file path toapp.py. - Open Advanced Settings β Secrets and paste your credentials:
SUPABASE_URL = "https://your-project-id.supabase.co" SUPABASE_KEY = "your-supabase-anon-key"
- Click Deploy!
- π± Native Mobile Interface: Responsive mobile-first view optimized for smartphone cameras.
- π Defaulter Analytics: Automated risk indicator reports for students falling below minimum attendance thresholds.
- π Webhooks & Email Alerts: Real-time notification dispatch via SendGrid/Twilio.
- π§ Multi-Angle Face Alignment: Integration of RetinaFace for improved recognition under low lighting.
Contributions are welcome! Follow these steps:
- Fork the repository.
- Create a feature branch:
git checkout -b feature/amazing-feature. - Commit your changes:
git commit -m 'Add amazing feature'. - Push to branch:
git push origin feature/amazing-feature. - Open a Pull Request.
Distributed under the MIT License. See LICENSE for more information.
** Built for Modern Educators**