This project aims to build an AI system that predicts whether shoplifting has occurred in a surveillance video.
It combines deep learning video classification models with YOLOv8 person detection to create an end-to-end solution for automated shop theft monitoring.
-
Multiple Video Classifiers:
Includes different deep learning approaches. -
YOLOv8 Person Detection:
Detects people frame-by-frame in videos and highlights them with bounding boxes. -
Django Web Deployment:
Upload a video β system predicts whether it contains shoplifting β outputs a video with people detections.
The system includes multiple deep learning models for video classification:
- EfficientNetB0 + LSTM β Combines spatial and temporal features.
- Simple 3D CNN β Learns spatio-temporal patterns directly from video.
- Video Transformer (ResNet + Transformer) β Extracts frame features with ResNet and models sequences using a Transformer.
- VideoMAE (HuggingFace) β Pretrained transformer for video understanding.
- User uploads a video in the Django web app.
- User Choose a Model from
EfficientNetB0+ LSTM andCustom 3D CNN. - Frames are extracted and passed into the chosen video classifier.
- YOLOv8 detects people in frames and draws bounding boxes.
- Output:
- Prediction (Shoplifter / Non-Shoplifter with confidence).
- A Video showing detected people.
ComputerVision_Shop_Theft_Classification/
|ββ Deployment/ProjectUI/
β βββ pages/
| | βββ models/
β | βββ views.py
β | βββ urls.py
β | βββ tests.py
β | βββ apps.py
β | βββ models.py
β | βββ inference.py
β | βββ model_def.py
| | ProjectUI/
β | βββ static/
β | βββ __init.py__
β | βββ asgi.py
β | βββ settings.py
β | βββ urls.py
β | βββ wsgi.py
| |ββ templates/
| βββ requirements.txt # Dependencies
βββ notebooks/
βββ README.md # Project description
git clone https://github.com/bassantsherif123/ComputerVision_Shop_Theft_Classification.git
cd shop-theft-detection
python -m venv venv
source venv/bin/activate # (Linux/Mac)
venv/Scripts/activate # (Windows)
pip install -r requirements.txt
cd Deployment/ProjectUI
python manage.py collectstatic
python manage.py runserver
Open in browser: http://127.0.0.1:8000/
This project was done in collaboration with my colleague Duaa Swalmeh