A real-time student attentiveness monitoring system using AI-powered computer vision.
-
Live Video Feed: View the classroom video stream with real-time AI-based attention annotation.
-
Attentiveness Analytics: See live statistics and historical trends of student attentiveness.
-
JWT Authentication: Secure user authentication and session management using JSON Web Tokens.
-
Modular Frontend & Backend:
- Frontend: React + Vite + Tailwind CSS
- Backend: Node.js (Express) for authentication (with JWT) and user management
- ML Backend: Python Flask with YOLOv5-based action detection
- Backend/ - Node.js (Express) server for authentication (JWT) and user management
- Frontend/ - React Vite + Tailwind CSS application for the web interface
- ML_Related/ - Flask server for video processing and AI detection (YOLOv5 model)
cd Backend
npm install
npm run devThe backend server will start on http://localhost:3001
cd ML_Related
pip install -r requirements.txt
python app.pyThe ML server will start on http://localhost:5000
cd Frontend
npm install
npm run devThe frontend will start on http://localhost:5173
POST /signup- User registrationPOST /login- User authentication (returns JWT)GET /me- Get current user info (requires JWT)GET /health- Health check
GET /video_feed- Live video streamGET /attentiveness- Real-time attentiveness data
If you encounter CORS errors, make sure both servers are running:
- Backend server on port 3001
- ML server on port 5000
- Ensure both servers are running simultaneously
- Check that the ports are not being used by other applications
- Verify the video file exists in
ML_Related/assets/Video.mov
The backend server can run without MongoDB for development. User data will be stored in memory and reset when the server restarts.
- The backend uses in-memory storage for development (no MongoDB required)
- The backend uses JWT for secure authentication and session management
- The ML backend uses a YOLOv5 model for action detection and processes video files for demonstration
- Both servers must be running for the full application to work
- Open the frontend in your browser.
- The live video feed and attentiveness analytics will update in real time.
- Use the dashboard to monitor class engagement and trends.
- Model: Replace
best.ptinML_Related/with your own YOLOv5 model for different action detection. - Frontend: Modify or extend React components in
Frontend/src/components/for custom UI/UX.
- Frontend: Ignores
node_modules, build outputs, local configs, and logs. - ML_Related: Ignores Python cache, virtual environments, model weights, outputs, logs, and IDE files.
- Recommendation:
- Do not commit large video/model files or sensitive data.
- Keep
.envand credentials out of version control.
ClassCam — Real-time classroom attentiveness analytics with AI and mordern web technologies