Skip to content

parinaB/StudySphere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

StudySphere

A real-time classroom comprehension analysis platform built for educators. StudySphere uses computer vision and deep learning to analyze student facial expressions during live sessions — giving teachers instant, data-driven insights into how well their class is following along.


Screenshots


Login Screen

Class Setup

Dashboard

Session Report

Features

  • Real-Time Video Monitoring — Live webcam feed with per-face comprehension labels updated every frame
  • Snapshot Evaluation — Upload a classroom photo for instant comprehension analysis across all detected faces
  • Session Reports — Auto-generated reports with comprehension timeline logged every 30 seconds, concentration trend graph, and final verdict
  • Multi-Theme UI — Switch between Lilac, Yellow, and Blue themes

How It Works

  1. Faces are detected in each webcam frame using OpenCV Haar Cascades
  2. Each face crop is passed to a MobileNetV2 model fine-tuned on FER2013
  3. The model outputs a confidence score mapped to:
    • 🟢 Understood (≥ 0.65)
    • 🟡 Uncertain (0.40 – 0.65)
    • 🔴 Not Understood (< 0.40)
  4. Scores are aggregated using a weighted formula grounded in Cognitive Load Theory
  5. Every 30 seconds, a window report is logged and pushed to the frontend dashboard

Tech Stack

Layer Technologies
Frontend React, Vite, Recharts, Custom CSS
Backend Python, Flask, flask-cors
ML & Vision TensorFlow/Keras, OpenCV, MobileNetV2
Dataset FER2013 (binary: Understood / Not Understood)

Model

The trained model is not included in this repo due to file size. Download it here: studysphere_model.keras

After downloading, place it at:

backend/studysphere_model.keras

Model Performance

Metric Value
Test Accuracy 66.94%
Test Loss 0.6065
Validation Accuracy 66.21%

The model is a MobileNetV2 fine-tuned on a binary-restructured FER2013 dataset (Understood / Not Understood). Accuracy reflects the challenge of real-world classroom facial expression analysis under varying lighting, angles, and occlusions.


Getting Started

Prerequisites

  • Python 3.10 (conda cnn environment)
  • Node.js 18+
  • Webcam access

1. Clone the repo

git clone https://github.com/parinaB/StudySphere.git
cd studysphere

2. Start the backend

conda activate cnn
cd backend
python app.py

Backend runs at http://localhost:5050

3. Start the frontend

cd frontend
npm install
npm run dev

Frontend runs at http://localhost:5173


📡 API Endpoints

Method Endpoint Description
POST /evaluate Upload image, returns comprehension breakdown
GET /stream Live MJPEG webcam stream
GET /comprehension Latest real-time comprehension score
POST /start-video Start session processing thread
POST /stop-video Stop session cleanly
GET /session-report Full 30-sec timeline + final verdict

👩‍💻 Author

Built by Parina — ML student, edutech researcher.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors