A Real-Time Exam Cheating Detection System
Welcome to my project! I'm Mostafa (GitHub: Mostafa23), and I developed VisionGuard AI to solve the challenge of automated exam monitoring. This system uses computer vision to track students during exams, detect suspicious behavior, and immediately log alerts to the cloud.
The core detection runs on a custom YOLOv10 model, wrapped in a modern desktop interface built with CustomTkinter.
- Temporal Threshold Smoothing: A smart system that escalates warnings (Green ➔ Orange ➔ Red) to filter out false positives.
- Fast-Motion ByteTrack: Customized tracking to maintain student IDs even during rapid movements.
- Automated Evidence Collection: Saves screenshots of suspicious activities locally with timestamps.
- Firebase Integration: Automatically uploads evidence to Firebase Storage and logs metadata in Firestore.
- Playback Controls: Supports reviewing video footage at multiple speeds (0.25x, 0.5x, 1x, 2x).
- Hardware Acceleration: Seamlessly utilizes CUDA GPUs if available, falling back to CPU otherwise.
Here is a quick preview of the system in action:
AI-Cheating-Detection-System/
├── alerts/ # Local evidence storage (Screenshots & Logs)
├── assets/ # UI icons and video demo
├── core/
│ └── detector.py # YOLOv10 object detection and tracking logic
├── db/
│ └── firebase_manager.py # Firebase Storage & Firestore upload logic
├── models/
│ └── weights/
│ └── best.pt # Pre-trained YOLO weights
├── notebooks/
│ └── kaggle_binary_training.ipynb # Model training code
├── ui/
│ └── app.py # CustomTkinter Desktop GUI
├── dist/
│ └── VisionGuard/
│ └── VisionGuard.exe # Pre-built standalone application (No Python needed!)
├── main.py # Main entry point for the application
├── record_test.py # Script to generate demo videos
├── requirements.txt # Python dependencies
└── README.md
git clone https://github.com/Mostafa23/AI-Cheating-Detection-System.git
cd AI-Cheating-Detection-SystemMake sure you have Python 3.8+ installed, then run:
pip install -r requirements.txtIf you want the cloud upload feature to work, you need to link your own Firebase project:
- Go to your Firebase Console -> Project Settings -> Service Accounts.
- Click "Generate new private key".
- Place the downloaded
.jsonfile in the root folder of this project.
Option A: Standalone EXE (Easiest)
If you are on Windows, you don't even need Python! Just navigate to dist/VisionGuard/ and double-click VisionGuard.exe.
Option B: Run from Source If you prefer running the code directly:
python main.pyI trained the YOLO model on Kaggle using a Dual GPU (Tesla T4 x2) setup. It was trained specifically to classify behaviors into Normal vs. Cheating.
Developed by Mostafa Abdallah (2026).
