This guide explains how to integrate a pretrained YOLOv8 model with MATLAB's Ground Truth Labeler App to automatically generate human bounding box annotations and manually assign IDs using attributes.
- MATLAB R2023b or later
- Toolboxes:
- Computer Vision Toolbox
- Deep Learning Toolbox
- Deep Learning Toolbox Converter for ONNX Model Format
Download the YOLOv8 model integration from here:
- can use git clone https://github.com/LCAS/MATLAB_yolov8_human_labeling.git
- Or just download as a zip.
In MATLAB, following this video, import the YOLO method.
The same as the previous method.
- Add a new rectangle ROI label named "human".
- Click the checkbox next to the label "human" in the label list.
- Click Attribute → Add a new attribute called ID.
- Set the Type to "List" and provide values like
1, 2, 3, ...
.
- Go to Select Algorithm → click Import Algorithm → choose
yolov8_label.m
.
- Choose "YOLOv8 Human Labeler" from the automation list.
- Click Automate → then click Run. YOLOv8 will automatically draw bounding boxes for detected humans.
For each frame:
- Click on each bounding box.
- In the right panel, assign the correct ID (e.g.,
1
for person1,2
for person2, etc.).
- Once satisfied, click Accept to keep the generated labels.