ClassAware is a multimodal system for monitoring real-time student engagement in virtual classrooms. It combines face verification and hand gesture recognition to identify user participation, logs engagement events, simulates teacher-student interactions, and uses machine learning to classify engagement levels.
- Real-time participation logging using DeepFace and MediaPipe.
- Simulated student logs based on probabilistic behavioral models.
- Engagement classification using Random Forest and XGBoost.
- Modular structure supporting scalable student log generation and model evaluation.
git clone https://github.com/your-username/classaware.git
cd ClassAwarepython -m venv venv
source venv/bin/activate # or venv\Scripts\activate on WindowsAll Python dependencies are listed below. You can install them using:
pip install numpy pandas scikit-learn xgboost opencv-python mediapipe deepface
numpy
pandas
scikit-learn
xgboost
opencv-python
mediapipe
deepface
- Python Version: 3.8+
- Required Tools:
- Python with pip
- OpenCV-compatible webcam
- Internet connection for DeepFace model downloads
├── ClassAware.py # Real-time webcam logging and gesture recognition
├── data_generation.py # Simulates teacher prompts and student behavior logs
├── ml_models.py # Loads logs, extracts features, trains ML models
├── Student Logs/ # Output folder for student CSV logs (created when you run data_generation.py)
├── teacher_log.csv # Simulated prompt times and question types (created when you run data_generation.py)
├── participation_log.csv # Real-time gesture/face detection log (via webcam)
├── final_labeled_results.csv# ML classifier predictions and outputs (created when you run ml_models.py)
teacher_log.csv: Contains 50 simulated prompts spaced 3–8 minutes apart.Student Logs/: Each CSV contains timestamps and detected events for one student.participation_log.csv: Log of gesture/face match events via webcam.- All data is generated locally via
data_generation.pyandClassAware.py.
python data_generation.pypython ml_models.pyPlace a reference face image as image.jpg in the root directory.
python ClassAware.pydata_generation.pysimulates 1000 students with probabilistic delays, missed events, and noise.- Behavior is controlled by probabilistic models depending on engagement level.
ml_models.pyextracts on-time, late, missed, and noise response counts per student.
You can customize simulation settings in data_generation.py:
NUM_STUDENTS– How many student log files to generate (default: 1000)NUM_TEACHER_EVENTS– Number of prompts per session (default: 50)LABEL_MAP– Maps string engagement labels to class integers- Response delays, noise count, and probabilities vary by engagement level
$ python data_generation.py
Generated teacher log: teacher_log.csv
[S1] => label=Medium, file=Student Logs/S1.csv
...
$ python ml_models.py
=== Random Forest Results ===
Accuracy: 0.8571
...
=== XGBoost Results ===
Accuracy: 0.8720$ python ClassAware.py
[Webcam feed opens with live updates on gesture and match status]final_labeled_results.csv: Predicted and actual engagement levels per student.- Classification reports for both Random Forest and XGBoost.
participation_log.csv: Timestamped logs for events like “Raised Hand detected” or “No match detected.”
- Measure engagement trends across simulated or live classrooms.
- Benchmark real-time video detection and response logging.
- Train classifiers using behavioral features extracted from response timing.
- All simulations and webcam detection are local-only and do not require cloud services.
- Face verification is based on the face_recognition library.
- Gesture detection is powered by MediaPipe's landmark-based inference.