The Cheating Surveillance System is designed to detect cheating during Online Interviews/Exams by monitoring head and pupil movements and identifying unauthorized mobile phone usage. This system integrates facial landmark detection with Shape Predictor 68 and object detection using YOLO, trained on a cellphone detection dataset from Roboflow.
- Head and Pupil Movement Detection: Uses dlib's Shape Predictor 68 to track facial landmarks and detect suspicious gaze patterns.
- Mobile Phone Detection: Utilizes a YOLOv12 model trained on the Roboflow Cellphone Detection Dataset to detect mobile phones in real-time.
- Real-Time Monitoring: Processes live video feeds for instant analysis and detection.
- Alert System: Detects and flags potential cheating behavior, such as excessive head or pupil movement in the left, right, up, or down direction for longer than the allowed time.
- Python
- OpenCV (for video processing)
- dlib (for facial landmark detection)
- YOLO (You Only Look Once) (for object detection)
- Roboflow Dataset (for training the mobile detection model)
cheating-surveillance/
│── models/ # Contains trained YOLO weights and shape predictor model
|__ best_yolov8.pt
|__ best_yolov12.pt
|__ shape_predictor_68_face_landmarks.dat
│── log # Screenshots
│── main.py # Entry point for real-time detection
│── requirements.txt # Required dependencies
│── README.md # Project documentation
│── head_pose.py # Head movement detection
│── eye_movement.py # Gaze Detection
│── mobile_detection.py # Mobile detection
│── Demo_vid/ # Folder containing demo videos
Ensure you have the following installed:
- Python 3.8+
- OpenCV
- dlib
- torch (for YOLO)
- roboflow (for dataset access)
- Clone the repository:
git clone https://github.com/Sania-hasann/Cheating-Surveillance-System.git cd Cheating-Surveillance-System - Install dependencies:
pip install -r requirements.txt
- Download the Shape Predictor 68 model:
wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2 bzip2 -d shape_predictor_68_face_landmarks.dat.bz2
- Set up the YOLO model:
- You have trained your YOLO model on the Roboflow Cellphone Dataset.
- Download the trained YOLO weights and place the weights file in the
models/directory.
To start real-time monitoring, run:
python main.py- Facial Landmark Detection: Detects and tracks head movements and pupil direction.
- YOLO-based Object Detection: Identifies mobile phones in the video feed.
- Cheating Behavior Analysis: Flags abnormal behavior such as frequent head turning or gaze shifts.
The mobile phone detection model is trained on the Roboflow Cellphone Detection Dataset. You can access it here: Roboflow Cellphone Dataset.
Feel free to submit issues and pull requests! If you have improvements or additional features, contribute by following these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch - Commit your changes:
git commit -m "Add new feature" - Push to the branch:
git push origin feature-branch - Open a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.