Skip to content

About

This is a Smart Classroom Attention Analyzer — a multi-label student behaviour detection system using EfficientNet-B0 with Transfer Learning. It detects 12 behaviour classes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Smart Classroom Attention Analyzer

An AI-powered web application that detects 12 student behaviour labels from classroom images using a pre-trained EfficientNet-B0 model.

🎯 Detected Behaviours

Emoji Class Description
📱 Using_phone Student visibly using a mobile phone
🔄 bend Bending posture
📚 book Holding/looking at a book
🙇 bow_head Head bowed down
🙋 hand-raising Raising hand to participate
📞 phone Phone (detected object)
🆙 raise_head Head raised upward
📖 reading Reading posture
😴 sleep Sleeping in class
↩️ turn_head Turning head sideways
🧍 upright Upright, attentive posture
✍️ writing Writing activity

🚀 Quick Start

Prerequisites

  • Python 3.9 or later
  • best_model.pth placed in the project root

1. Set up the virtual environment (Windows)

setup_env.bat

2. Activate the environment

venv\Scripts\activate

3. Run the web app

python app.py

4. Open your browser

Navigate to http://localhost:5000

🏗️ Project Structure

D_project/
├── app.py                  ← Flask web application
├── best_model.pth          ← Pre-trained model weights
├── requirements.txt        ← Python dependencies
├── setup_env.bat           ← Windows setup script
├── src/
│   ├── __init__.py
│   ├── model.py            ← EfficientNet-B0 architecture
│   └── predict.py          ← Inference pipeline
├── templates/
│   ├── index.html          ← Upload + results page
│   └── about.html          ← About page
└── static/
    ├── style.css           ← Dark glassmorphism UI
    └── script.js           ← Drag-and-drop + AJAX logic

🧠 Model Details

Property Value
Architecture EfficientNet-B0
Type Multi-label Classification
Classes 12
Input Size 224 × 224 px
Detection Threshold 0.50 (Sigmoid)
Training Platform Google Colab (Tesla T4 GPU)

📦 Tech Stack

  • Backend: Python 3 · Flask
  • Model: PyTorch · torchvision
  • Frontend: Vanilla HTML/CSS/JS (dark glassmorphism design)

⚠️ Notes

  • The best_model.pth file is included in this repo (≈17 MB, within GitHub's 100 MB limit).
  • The dataset zip file (Student Behaviour Detection.v6i.multiclass.zip, 269 MB) is not included — it is listed in .gitignore.
  • Multiple behaviours can be detected simultaneously in a single image (multi-label task).

📄 License

MIT License — free for educational and research use.

About

This is a Smart Classroom Attention Analyzer — a multi-label student behaviour detection system using EfficientNet-B0 with Transfer Learning. It detects 12 behaviour classes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages