A detector that ships axis-aligned boxes is not making a geometric argument — it is making a default. The default holds while your production objects sit upright and well-spaced, the way most training sets present them. It stops holding the moment your real geometry diverges: rotated parts on a conveyor, densely packed objects with overlapping footprints, or aerial and inspection views where targets sit at arbitrary angles. At that point the box geometry you inherited from an off-the-shelf model becomes the source of your false positives, not the detector’s accuracy. This is the choice between an axis-aligned bounding box (AABB) and an oriented (rotated) bounding box (OBB). It is a deployment-condition decision, not a stylistic preference, and treating it as a default is where pipelines quietly lose precision. What Is the Difference Between an Axis-Aligned and an Oriented Bounding Box? An axis-aligned bounding box is described by four numbers — typically a centre, a width, and a height — with edges that stay parallel to the image axes regardless of how the object is rotated. An oriented bounding box adds a fifth term: an angle. The box can rotate to follow the object, so its edges hug the target rather than the image grid. That extra angle term is the whole story. For an upright, axis-parallel object the two representations are nearly identical and AABB is the cheaper, simpler choice. For a long thin object lying at 45 degrees — a screw, a ship, a vehicle in an aerial frame — the axis-aligned box has to grow large enough to contain the rotated shape, and most of what it now contains is background or a neighbouring object. Why Do Axis-Aligned Boxes Fail on Rotated and Densely Packed Objects? The failure has a clean geometric cause: an axis-aligned box around a rotated object captures background and overlapping neighbours, inflating false positives and breaking downstream measurement. For an elongated object at an angle, the box-to-object area ratio rises sharply — a large fraction of the box is not the object at all. Two concrete consequences follow. First, downstream measurement degrades. If you are reading position, length, or count from the box, the captured background shifts those numbers. A defect-inspection step that measures part dimensions from an AABB on a rotated component reads the diagonal of the box, not the part. Second, dense scenes break non-max suppression (NMS). When neighbouring objects sit close together at angles, their inflated axis-aligned boxes overlap heavily even though the objects themselves do not. NMS sees high overlap, treats two real detections as duplicates, and merges or suppresses one of them — so you lose detections precisely where packing is tightest. Oriented bounding boxes reduce the box-to-object area ratio for rotated targets, which cuts captured background and the resulting false-positive and NMS merge errors in dense scenes. When Should You Use an Oriented Bounding Box Instead of an Axis-Aligned One? The divergence point is geometry, not preference. Use the table below as a decision rubric. Production condition Box geometry Why Objects upright, well-spaced, axis-parallel Axis-aligned (AABB) OBB adds cost for no localisation gain Object orientation carries information (angle is a measurement output) Oriented (OBB) The angle is part of the answer, not overhead Dense packing where AABB overlap is ambiguous Oriented (OBB) Tighter boxes keep NMS from merging real neighbours Aerial / satellite imagery (vehicles, ships, buildings at arbitrary angles) Oriented (OBB) Targets rarely align to the image grid Line-side inspection of rotated parts on a conveyor Oriented (OBB) Measurement and count depend on tight localisation Elongated objects (high aspect ratio) at varied angles Oriented (OBB) AABB area ratio degrades fastest here As a rule, choose OBB when object orientation carries information, or when packing density makes axis-aligned overlap ambiguous. Everywhere else, the simpler representation wins. We treat this as a feasibility-stage question rather than a tuning step — the box geometry is decided by the scene, and the scene is known before a model is chosen. For the broader question of whether your production geometry diverges from off-the-shelf training assumptions in the first place, the computer vision practice page sets out how we frame that assessment. What Extra Cost Does Oriented Detection Add? OBB is not free, and the cost is the second half of the decision. The added angle regression term raises three things you should quantify before committing: Annotation cost. Rotated boxes require an orientation label per object, not just a corner pair. Annotators work slower and angle-labelling carries its own ambiguity (which end is “up” for a symmetric part?), so labels are both more expensive and noisier. Training complexity. The model must regress the angle alongside position and size, and angle is periodic — the discontinuity near the wrap-around point (for example 0 and 180 degrees on a symmetric object) is a known source of unstable loss that needs a periodicity-aware formulation. Inference and tooling. Rotated NMS is more expensive than axis-aligned NMS, and downstream code that assumed four-number boxes needs to handle the angle. The measurable payoff to weigh against that cost is tighter localisation — higher IoU at the same recall — and fewer missed detections where neighbouring objects overlap under AABB. If your scene does not produce rotated or densely packed targets, none of that payoff materialises and the cost is pure overhead. Can Off-the-Shelf Detectors Output Oriented Boxes? Increasingly, yes — oriented detection has moved from custom-model territory into mainstream tooling. As of writing, Ultralytics ships OBB variants of YOLO trained on the DOTA aerial dataset, and MMRotate provides a dedicated library of rotated-detection models. You do not always need to build a detector from scratch. What you do need is oriented annotations for your own domain. A pretrained aerial OBB model rarely transfers cleanly to conveyor parts or microscopy, so the realistic path is fine-tuning an oriented architecture on rotated labels you produce — which routes you straight back to the annotation cost above. The model is available; the labelled data is the work. Choosing whether to fine-tune an available oriented model or commission a bespoke one is the broader build-versus-buy decision for computer vision. The same geometry discipline shows up downstream of detection. Where rotated, densely packed objects have to be followed frame to frame, the box representation feeds directly into association — a theme we pick up in how multiple object tracking works and where it breaks. Frequently Asked Questions When should you use an oriented bounding box instead of an axis-aligned one? Use an oriented (rotated) bounding box when object orientation carries information — the angle is itself an output you need — or when packing density makes axis-aligned overlap ambiguous. In every other case, where objects sit upright and well-spaced, the simpler axis-aligned box wins. What is the difference between an axis-aligned bounding box (AABB) and an oriented (rotated) bounding box (OBB)? An axis-aligned box keeps its edges parallel to the image axes (centre, width, height). An oriented box adds an angle term so the box rotates to hug the object. For upright objects the two are nearly identical; for rotated elongated objects the AABB grows to contain the rotated shape and captures large amounts of background. Why do axis-aligned boxes fail on rotated and densely packed objects? An axis-aligned box around a rotated object captures background and overlapping neighbours, inflating the box-to-object area ratio. This corrupts downstream measurement and, in dense scenes, makes non-max suppression merge or suppress real neighbouring detections because their inflated boxes overlap even when the objects do not. What extra cost does oriented detection add in annotation, training, and inference? OBB adds an angle regression term: orientation labels raise annotation cost and noise, angle periodicity complicates training and loss, and rotated non-max suppression costs more than axis-aligned NMS at inference. Quantify all three against the localisation gain before committing. Can off-the-shelf detectors output oriented boxes, or does this require a custom model? Off-the-shelf options exist — as of writing, Ultralytics YOLO ships OBB variants and MMRotate provides rotated-detection models — so a custom architecture is usually unnecessary. What you typically still need is oriented annotations for your own domain to fine-tune on, since pretrained aerial models rarely transfer cleanly.