This project is a video analytics platform designed for surveillance applications, starting with basic object tracking and evolving into specific retail use cases like cashier monitoring.
A complete pipeline ported from Google Colab to local Windows execution.
- Function: Processes CCTV footage to track objects (People, Cars) using YOLOv8.
- Features:
- Trims video to a specified duration (e.g., 30s) using OpenCV.
- Detects and tracks objects.
- Filters recurring objects based on persistence.
- unique "Events" logged to CSV.
- Generates an annotated output video.
- Output: Results are saved to
output/logs/session_YYYYMMDD_HHMMSS/.
- Python 3.8+
- Recommended: GPU with CUDA (though CPU is supported).
-
Clone the repository.
-
Install dependencies:
pip install ultralytics opencv-python tqdm torch torchvision
(Note:
torchinstallation may vary based on your CUDA version).
-
Navigate to the source directory:
cd pycode/src -
Run the main script:
python main.py
-
Check
output/logs/for the results.
We are currently planning a specialized module for Retail POS Surveillance.
Objective: Detect anomalies where a POS "Cash Sale" event occurs without the cashier physically interacting with the cash drawer.
Architecture:
- Vision Engine: Monitors a Region of Interest (ROI) for "Drawer Open" or "Hand in Drawer" events.
- POS Listener: Receives transaction logs from the POS system.
- Logic Core: Correlates Vision events with POS timestamps to flag suspicious behavior.
video-analytics/
βββ output/ # Generated logs, videos, and CSVs
βββ pycode/
β βββ src/
β β βββ main.py # Main detailed tracking script
β βββ utils/
βββ resources/
β βββ videos/ # Input raw footage
βββ README.md
Useful resources for understanding ByteTrack and Object Tracking implementations: