Skip to content

sy-imran123/Smart_Class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SnapClass Logo

πŸ“Έ SnapClass: AI-Powered Attendance System

Making Attendance faster using AI

Python Streamlit Supabase Machine Learning

πŸ–₯️ View Live Demo β€’ πŸ› Report Bug β€’ ✨ Request Feature β€’ πŸ‘¨β€πŸ’» Developer LinkedIn


πŸš€ Project Overview

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].


✨ Core Features

πŸ‘¨β€πŸ« For Educators (Teacher Portal)

  • πŸ“Έ One-Click Face Attendance: Capture or upload images of the classroom. The AI uses dlib and 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 resemblyzer voice 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 bcrypt password hashing for teacher credentials[cite: 15, 20].

πŸŽ“ For Learners (Student Portal)

  • πŸ‘οΈ 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].

πŸ› οΈ Technology Stack & Architecture

πŸ–₯️ Frontend & Routing

  • Streamlit: Powers the reactive UI, session state management, and multi-page routing[cite: 1, 3].
  • Custom CSS: Injected custom styling via base_layout.py for a polished, app-like UI (hiding default Streamlit headers, custom Google Fonts, and themed buttons)[cite: 21].

🧠 Machine Learning Pipelines

  • 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 .wav files, applies decibel-based segmentation, and evaluates cosine similarity against stored voice embeddings[cite: 3, 17].

πŸ—„οΈ Backend & Database

  • Supabase: Acts as the primary PostgreSQL database handling relational mapping between students, teachers, subjects, and attendance logs[cite: 3, 14, 15].
  • Authentication: Integrates bcrypt to salt and hash teacher passwords prior to database insertion[cite: 3, 15].

🧰 Utilities

  • 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].

πŸ“‚ Repository Structure

πŸ“¦ 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]



About

πŸš€ SnapClass: An AI-powered attendance tracking system that automates classroom roll calls using facial and voice recognition. Built with Streamlit, Supabase, and Python.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages