Add R(2+1)D-18 exam behavior classifier + model card
Browse filesFiles changed (2)
- README.mdAdded+48
- best_model.ptAdded+3
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748---license: mitpipeline_tag: video-classificationtags: - video - action-recognition - r2plus1d - pytorchlibrary_name: pytorch---
# Exam Behavior Classifier — R(2+1)D-18
Classifies a short clip of a single student into one of five exam behaviors:**normal, copying, gesture, mobile, notes**.
- **Architecture:** torchvision `r2plus1d_18`, Kinetics-400 pretrained, 5-way head.- **Input:** 16 uniformly-sampled frames, center-cropped to 112×112, Kinetics normalization.- **Training data:** 251 clips from the Kaggle *ExamCheating_MultiV* dataset (V1 prefix-labeled + 30 hand-labeled V2 clips).- **Test (n=38, leakage-free group split):** accuracy **71.1%**, macro-F1 **0.680**. On the original clean distribution: 78.8%; on out-of-distribution phone footage: 20% — see the repo for the full distribution-gap analysis.
⚠️ **Research & education only — not a proctoring system.** Outputs are suggestions for ahuman to review, never evidence of cheating. Full limitations and ethics discussion in the[model card](https://github.com/MunkhbayarA/exam-cheating-detection/blob/main/model_card.md).
**Code, training pipeline, and demo app:**[github.com/MunkhbayarA/exam-cheating-detection](https://github.com/MunkhbayarA/exam-cheating-detection)
## Usage
```pythonimport torch, torch.nn as nnfrom torchvision.models.video import r2plus1d_18from huggingface_hub import hf_hub_download
CLASSES = ["normal", "copying", "gesture", "mobile", "notes"]
ckpt_path = hf_hub_download("mbradiant/exam-behavior-classifier", "best_model.pt")ckpt = torch.load(ckpt_path, map_location="cpu", weights_only=True)model = r2plus1d_18()model.fc = nn.Linear(model.fc.in_features, len(CLASSES))model.load_state_dict(ckpt["model"])model.eval()# input: float tensor (B, 3, 16, 112, 112), Kinetics-normalized```123version https://git-lfs.github.com/spec/v1oid sha256:6b27fe67b3394bb906ad8a32bb71eebf2741ab91b9445b610b25f90779cabac2size 125388894README.mdAdded+48
best_model.ptAdded+3