This project applies a YOLOv8-based deep learning model to detect staff members video footage using bounding box logic. It was trained on custom-labeled data with staff and tag annotations, and deployed with post-processing utilities for accurate staff detection in surveillance videos.
https://colab.research.google.com/drive/1dIbm6Ld0lTjNXL67gQj5yiMSF4YMX_ye?usp=sharing
- β Trained YOLOv8 model for object detection
- β Bounding box comparison: staff vs staff_tag
- β Coordinate extraction from detection output
- β Easy deployment on local machine (GPU supported)
- β Google Colab notebook for reproducible training
βββ README.md <- The top-level README for developers using this project.
βββ docs <- Documentations
β βββ Staff_Detect_Report.docx <- Report of Model.
β
βββ my_model <- Directory of model, outputs
β βββ train <- Model training reports.
β βββ my_model.pt <- Best weights
β βββ yolo_detect.py <- Detection utils
β
βββ .gitignore
git clone https://github.com/EASONTAN03/FootfallCam_staff_detect
-
Unzip <my_model.zip>
-
Create python env:
conda create --name yolo-env1 python=3.12 -y conda activate yolo-env1
-
Install requirements:
pip install ultralytics
Install Nvidia GPU-enabled version of PyTorch by issuing the following command:
pip install --upgrade torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
-
Locate the file:
cd my_model
-
Modify detection utils file created by Evan Juras, EJ Technology Consultants. [yolo_detect.py]
- Add coordinates extraction function.
- Add bouding box comparison for staff detection: if box of staff_tag is inside box of staff then staff detected.
-
Detect objects for video:
python yolo_detect.py --model my_model.pt --source ../sample.mp4 --resolution 640x640 --coordinates True