Meet YOLO26: next-gen vision AI.
Ultralytics
Guides

What is oriented bounding box (OBB) detection?

Explore how oriented bounding box (OBB) detection enhances object detection by precisely identifying rotated objects in images across real-world applications.

NUNuvola Ladi
5 min read
Oriented bounding box (OBB) detection of rotated objects

Recognizing objects, regardless of how they’re arranged or which way they’re facing, comes naturally to us as humans. Whether it’s cars at an intersection or boats in a harbor, we can easily tell what they are and which direction they’re pointing. However, for artificial intelligence (AI) systems, it’s not that simple.

For instance, computer vision, a branch of AI focused on understanding images and videos, enables tasks like object detection, which helps machines identify and locate objects within a scene. Traditional object detection relies on axis-aligned bounding boxes to draw boxes around objects. These boxes have straight sides and fixed right angles. This approach works well when objects are upright and not too close together.

But when objects are tilted, rotated, or close together, traditional object detection often struggles to capture them accurately. To handle these more complex situations, techniques like oriented bounding box (OBB) detection have been introduced. Unlike standard bounding boxes, OBBs can rotate to match the angle and shape of the object, allowing for a tighter and more accurate fit.

Computer vision models like Ultralytics YOLO11, which support OBB detection, enable a range of real-time applications, especially in scenarios where object orientation matters, such as aerial surveillance. Beyond that, OBB detection is also used in healthcare, agriculture, and document analysis.

In this article, we’ll explore what OBB detection is, how it works, and where it’s being applied in real-world scenarios. Let’s get started!

Using YOLO11 for OBB detection of boats

Fig 1. An example demo of using YOLO11 for OBB detection of boats.

Link to this sectionWhat is an oriented bounding box?#

An oriented bounding box is a type of rectangular box used in computer vision to represent detected objects in an image. While standard bounding boxes are aligned with the image’s horizontal and vertical axes, OBBs can rotate to match the object’s actual angle.

This ability to rotate brings several advantages to the table. OBBs can align more closely with an object's orientation, allowing the box to fit tightly around the object's shape and direction. As a result, the detection becomes more accurate and precise.

OBBs are especially useful when objects aren’t perfectly upright, such as a car turning on a curved road in aerial footage, a tilted book on a desk, or a rotated tumor in a medical scan. By matching an object’s angle more accurately, OBBs improve detection performance, reduce background interference, and are particularly great for applications where an object’s orientation matters as much as its position.

Comparing object detection and OBB detection

Fig 2. Comparing object detection and OBB detection.

Link to this sectionOBB detection vs. object detection#

OBB detection and traditional object detection might look similar at first, but they’re used in different ways and for different situations. Let’s take a closer look at how they compare with an example.

Computer vision models, like YOLO11, can be trained to detect and classify objects in various real-world applications, such as industrial inspection. Consider a factory assembly line where different machine parts move along a conveyor belt. Some parts might be neatly placed, but others may be rotated slightly, tilted, or overlap due to vibration or speed.

Traditional object detection uses upright, rectangular boxes that align with the image’s horizontal and vertical edges. So, when a part is rotated, the box may not fit properly - it could leave out part of the object or include too much of the background. This can make the detections less accurate and harder for the system to identify the part confidently.

Now, let’s say you’re using OBB detection instead. In this case, the model can draw a box that rotates to match the exact angle of each part. A tilted gear or angled component will be tightly enclosed by a box that fits its shape and direction. This means better precision, fewer errors, and more reliable results, especially with respect to use cases like automated quality control or robotic sorting.

Now that we have a better understanding of what OBB detection is, let’s take a look at some of the most widely used Vision AI models that support it.

Several advanced computer vision models have been developed specifically for detecting rotated or tilted objects. Among them, the Ultralytics YOLO models are particularly well-known for their reliable and efficient OBB detection capabilities.

Earlier versions like Ultralytics YOLOv5 were designed for standard object detection. Later iterations, such as Ultralytics YOLOv8 and the more recent YOLO11, introduced native support for OBB detection. YOLO11, in particular, offers state-of-the-art accuracy without compromising speed, making it an impactful option for real-time applications.

Pretrained YOLO11 OBB models, such as YOLO11n-obb, are trained on datasets like DOTAv1, which consists of aerial images annotated with a range of object classes like planes, ships, and tennis courts that appear at various angles and orientations.

Also, these models are available in five different sizes, from nano (n-obb) to extra-large (x-obb), to match different performance needs. This versatility allows them to be applied across various industries - from monitoring urban infrastructure and inspecting machinery to reading skewed text in scanned documents.

Link to this sectionCustom training YOLO11 for oriented bounding box detection#

In many real-world situations, the objects you need to detect may be entirely different from those in standard training datasets. For example, objects like tools on a production line, product packages, or components on a circuit board might be rotated, irregularly placed, or shaped differently.

To accurately detect these custom objects, especially when orientation matters, it’s important to train models like YOLO11 using your own images and labels. This process is known as custom training.

Here’s a closer look at the step-by-step process for training YOLO11 for OBB detection:

  • Image collection: Gather images that showcase your target objects from different angles, positions, and real-world environments.
  • Object annotation: Label each object using rotated bounding boxes (OBBs) to capture both their location and orientation using annotation tools with OBB support.
  • Dataset preparation: Organize your images and labels into the YOLO directory structure, and create a YAML configuration file with your class names and dataset paths.
  • Model training: Choose a version of the YOLO11 model that fits your needs, and run the training process so the model can learn from your labeled images.
  • Evaluation and deployment: Test your trained model on new images, assess its accuracy, and deploy it in practical applications like manufacturing, aerial surveillance, or document analysis.

Link to this sectionApplications enabled by OBB detection#

Objects that are off-center or tilted are quite common in real-life scenarios. Let’s walk through a few examples where OBB detection makes a real difference by accurately detecting these objects.

Link to this sectionX-ray image analysis using OBB detection#

OBB detection can take medical image analysis a step further by improving precision. Medical images often include anatomical structures such as tumors, organs, or bones. These structures often appear in irregular shapes and varied orientations. Since OBBs can rotate to match an object’s angle, they provide more accurate localization and measurement, which is critical for diagnosis and treatment planning.

This approach is especially effective when it comes to analyzing X-ray images of bone fractures, where the position and alignment of bones are key factors. For example, OBB detection has been used to analyze pediatric elbow X-rays. By adjusting to the orientation of the bones, it helped improve detection accuracy.

X-rays with object detection and oriented bounding box detection

Fig 3. X-rays (a, d) with object detection (b, e) and oriented bounding box detection (c, f).

Link to this sectionAerial surveillance powered by OBB detection#

Aerial surveillance is an essential tool in sectors like public safety, environmental monitoring, and city planning. Images captured by drones or satellites can help identify objects such as ships, vehicles, and buildings. However, in these images, objects often appear small and at unusual angles, making them more difficult to detect accurately.

OBB detection solves this by tilting the bounding boxes to match each object’s angle. This leads to more accurate measurements of an object’s size and orientation, supporting better decision-making in areas such as urban planning, defense, disaster response, and environmental monitoring.

An interesting example of OBB detection is ship tracking in maritime surveillance. Satellite images often capture ships at varying angles and sizes due to weather, lighting, or motion. OBBs can adapt to these changes, improving detection, especially for smaller or partially obscured vessels.

Using OBB detection for maritime surveillance

Fig 4. A look at using OBB detection for maritime surveillance.

Link to this sectionUsing OBB detection in agriculture#

Sorting crops after harvest is a crucial step to ensure quality before they’re packaged and sent to market. While many systems work well for round fruits like apples and oranges, long and narrow crops, like carrots or Zizania shoots, can be much harder to handle. Their shapes vary, and they often end up at different angles, making them tricky to detect and sort accurately.

To tackle this, researchers have developed a system that uses oriented bounding box (OBB) detection to identify and grade these crops more accurately. The system can detect multiple crops in one image, even if they’re tilted or overlapping, and assess their quality and position in real-time.

Link to this sectionPros and cons of OBB detection#

Here are some of the benefits of using OBB detection:

  • Improved input to downstream tasks: Computer vision tasks like instance segmentation and object tracking can perform better when given more accurate object detections.
  • Enhanced spatial reasoning: By capturing the orientation angle, OBBs make it possible to understand an object's alignment and direction.
  • Reduced overlap in crowded scenes: OBBs reduce ambiguity by fitting objects more tightly, even in busy or cluttered scenes.

Despite helping improve detection accuracy in complex scenes, OBB detection comes with a few limitations to consider:

  • Greater sensitivity to noise: Small errors in angle prediction can have a bigger impact on detection accuracy, especially for tightly packed or elongated objects.
  • Specialized tools required: Since not all labeling and training platforms natively support OBBs, working with them may require additional tools or setup.
  • Limited dataset availability: Compared to standard object detection, there are currently fewer publicly available datasets with OBB annotations, which can make it slightly more challenging to get started or compare results.

Link to this sectionKey takeaways#

Oriented bounding box detection makes it easier for computer vision solutions to recognize objects that aren’t perfectly straight or aligned. By capturing both the position and orientation of objects, OBB detection boosts accuracy across real-world use cases such as scanning medical images, monitoring farmland, or analyzing satellite photos.

With models like YOLO11 making OBB detection more accessible, it’s becoming a practical choice for many industries. Whether you're dealing with tilted, overlapping, or oddly shaped objects, OBB detection adds an extra layer of precision that standard methods often miss.

Curious about AI? Explore our GitHub repository, connect with our community, and check out our licensing options to jumpstart your computer vision project. Learn more about innovations like AI in retail and computer vision in the logistics industry on our solutions pages.

Explore solutions

Real-time AI that works with your team

AI in Robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Real-time AI that works with your team

AI in Logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Real-time AI that works with your team

AI in Retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Real-time AI that works with your team

AI in Healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Real-time AI that works with your team

AI in Manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Real-time AI that works with your operation

AI in Automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Real-time AI tailored to your operation

AI in Agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more
Real-time AI that works with your team

AI in Robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Real-time AI that works with your team

AI in Logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Real-time AI that works with your team

AI in Retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Real-time AI that works with your team

AI in Healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Real-time AI that works with your team

AI in Manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Real-time AI that works with your operation

AI in Automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Real-time AI tailored to your operation

AI in Agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more
Real-time AI that works with your team

AI in Robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Real-time AI that works with your team

AI in Logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Real-time AI that works with your team

AI in Retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Real-time AI that works with your team

AI in Healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Real-time AI that works with your team

AI in Manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Real-time AI that works with your operation

AI in Automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Real-time AI tailored to your operation

AI in Agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more

Let's build the future of AI together!

Begin your journey with the future of machine learning