Skip to content

YOLOv8-based object detection pipeline for identifying staff members (name tag) from video footage using bounding box comparison and tag-based validation. Trained in Google Colab, this project enables local deployment with coordinate extraction and detection logic.

Notifications You must be signed in to change notification settings

EASONTAN03/yolo_staff_detect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Staff Detection

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.

Model Training in Colab:

https://colab.research.google.com/drive/1dIbm6Ld0lTjNXL67gQj5yiMSF4YMX_ye?usp=sharing

πŸ”§ Features

  • βœ… 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

πŸ“ Project Structure

β”œβ”€β”€ 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

Deploying locally

Refference

    git clone https://github.com/EASONTAN03/FootfallCam_staff_detect
  1. Unzip <my_model.zip>

  2. Create python env:

     conda create --name yolo-env1 python=3.12 -y
    
     conda activate yolo-env1
    
  3. 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
    
  4. Locate the file: cd my_model

  5. 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.
  1. Detect objects for video:

     python yolo_detect.py --model my_model.pt --source ../sample.mp4 --resolution 640x640 --coordinates True
    

Demo of running the detection

Demo_staff_detect

About

YOLOv8-based object detection pipeline for identifying staff members (name tag) from video footage using bounding box comparison and tag-based validation. Trained in Google Colab, this project enables local deployment with coordinate extraction and detection logic.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages