This project presents an advanced AI-driven solution for real-time multi-object tracking (MOT) focused on person detection and movement analysis in indoor environments. Leveraging the state-of-the-art YOLOv8 object detector combined with a customized Scene Features-based Simple Online Real-Time Tracker (SFSORT), the system accurately identifies and tracks individuals as they move through a monitored area.
A key feature of this solution is its ability to define virtual fences—customizable boundary lines within the video feed—and reliably detect and count instances where people cross these virtual boundaries. This capability enables enhanced monitoring, security, and analytics for indoor spaces such as offices, retail stores, or public venues.
Main Features:
- Person detection using YOLOv8.
- Tracking individuals frame-by-frame with SFSORT.
- Drawing interactive virtual boundary lines.
- Counts and visualizes fence crossings.
- Annotated output video with track IDs and intrusion alerts.
- Yellow fences, red flashing boxes on crossing, and live counts displayed.
- Clone the repository:
git clone https://github.com/your-username/your-repo-name.git && cd your-repo-name
- Install dependencies:
python3.13 -m venv .venv source .venv/bin/activate pip install -r requirements.txt
- Run
intrusion_tracking.ipynb. - Place input videos in the
data/folder. - Annotated outputs will be saved to
outputs/. - Virtual fences can be drawn and adjusted interactively in the notebook.
- Built with YOLOv8 for detection and SFSORT for tracking.
- Real CCTV footage provided by a partner company
- Licensed under MIT.
Have questions, suggestions, or want to collaborate?
- Submit issues or feature requests via GitHub Issues. .
- Reach out via our website for discussions, partnerships, or support.

