LIVE WEBINAR - Monitor Models in Production with Label Studio
Contact Sales
Back to Blog
Guide

Object Detection With Ultralytics YOLOv8

This is part of our series highlighting Label Studio’s integration with Ultralytics YOLO.

One of the most popular tasks for YOLO models is bounding box detection, also known as "object detection." Label Studio supports this with the RectangleLabels control tag. YOLO OBB (oriented bounding boxes) are also supported. To get a quick overview of how this integration works in Label Studio, check out this quick video:

To get started with this YOLO task, first you’ll need to install the ML Backend and connect your YOLO model. Here’s a quick start guide to help you if you need it.

Once your model is installed, you’ll want to create a new Project in Label Studio with the following labeling config:

<View>
  <Image name="image" value="$image"/>
  <RectangleLabels name="label" toName="image" model_score_threshold="0.25" opacity="0.1">
    <Label value="Person" background="red"/>
    <Label value="Car" background="blue"/>
  </RectangleLabels>
</View>

You can use the following parameters in the labeling config to customize your labeling experience:

ParameterTypeDefaultDescription
model_score_thresholdfloat0.5Sets the minimum confidence threshold for detections. Objects detected with confidence below this threshold will be disregarded. Adjusting this value can help reduce false positives.
model_pathstringNonePath to the custom YOLO model. See more in the section Your own custom YOLO models.
model_obbboolFalseEnables Oriented Bounding Boxes (OBB) mode. Typically it uses *-obb.pt yolo models.

For example:

<RectangleLabels name="label" toName="image" model_score_threshold="0.25" model_path="my_model.pt">

And that’s it! You should now be able to open unlabeled images in the Data Manager and your YOLO model will automatically label the image for you to accept, reject, or modify, depending on your use case. Stay tuned as we continue to go through the other tasks enabled by YOLOv8 in Label Studio.

Related Content