This project builds a Cheating Detection System using the Online Exam Proctoring (OEP) dataset.
The model classifies each webcam frame into:
- Cheating
- Not Cheating
A 2D Convolutional Neural Network (CNN) is trained on extracted grayscale frames to detect suspicious behavior automatically during online examinations.
Dataset Used: Online Exam Proctoring (OEP) Dataset (from Kaggle)
Link: https://www.kaggle.com/datasets/raajanwankhade/oep-dataset
Each subject folder contains:
- Webcam video files (
*1.avi) - Ground truth file
gt.txtwith cheating time intervals
Expected structure:
OEP database/
├── subject1/
│ ├── subject1_1.avi
│ └── gt.txt
├── subject2/
│ ├── subject2_1.avi
│ └── gt.txt
└── …
Ensure the dataset folder name matches this in the code:
data_path = "OEP database"
project/
├── main.ipynb # Main code: Data preprocessing, training & evaluation
└── README.md # Documentation
✔ Extract frames from videos (1 FPS sampling)
✔ Convert to grayscale & resize to 48×48
✔ Frame-wise label creation using time intervals
✔ Subject-based train/test split
✔ CNN training for binary classification
✔ Model evaluation using standard metrics
- Input: 48 × 48 grayscale frame
- Layers:
- Conv2D → ReLU → MaxPool
- Conv2D → ReLU → MaxPool
- Fully Connected layers with dropout
- Softmax for 2-class output
Lightweight for quick experiments & educational use.
1️⃣ Place dataset next to notebook:
project/
├─ main.ipynb
└─ OEP database/
2️⃣ Open & Run All Cells in main.ipynb
3️⃣ Metrics and plots will be displayed at the end
Note: First run may take longer due to frame extraction
Install via notebook or manually:
pip install torch torchvision torchaudio
pip install opencv-python numpy pandas scipy
pip install scikit-learn matplotlib seaborn scikit-plot
GPU Recommended (CPU works but slower)
The following are displayed:
Accuracy
Precision
Recall
F1-Score
Confusion Matrix
ROC Curve
Performance depends on subject split & number of frames extracted.
Temporal models (LSTM / GRU / 3D CNN / Transformers)
Use additional camera views (wearable/desktop)
Stronger backbones (ResNet, EfficientNet)
Imbalance handling strategies (weighted loss / oversampling)
This project is made only for academic and research purposes and should not be used in real-world proctoring without proper validation.
Dataset: Online Exam Proctoring (OEP) Dataset
Developed by: Anas Multani
B.Tech – Computer Science & Engineering
Nirma University
Roll No: 23BCE188