Abstract
Detecting objects in remote sensing imagery presents unique challenges due to the arbitrary orientation and dense packing of targets like ships, aircraft, and vehicles. While Transformer-based architectures have revolutionized horizontal object detection by eliminating the need for hand-crafted post-processing, they often struggle with the geometric complexities of rotated bounding boxes. This paper introduces OrientedFormer, a novel end-to-end Transformer designed specifically for oriented object detection. By representing oriented boxes as Gaussian distributions and introducing rotation-aware attention mechanisms, OrientedFormer achieves state-of-the-art accuracy while converging three times faster than previous Transformer-based oriented detectors.
Introduction
In satellite and aerial imagery, objects rarely align with the image axes. Standard horizontal bounding boxes (HBB) are insufficient for these scenarios, as they encompass significant background noise and lead to excessive overlap in dense clusters. Oriented object detection (OBB) addresses this by using rotated boxes, typically defined by $(x, y, w, h, \theta)$.
Traditional OBB detectors rely on Convolutional Neural Networks (CNNs) and complex post-processing steps like Non-Maximum Suppression (NMS). Recent "set-prediction" Transformers, such as DETR, offer a cleaner alternative by treating detection as a direct set prediction problem. However, standard Transformers face three primary hurdles in the oriented domain: the lack of robust angle encoding, a "geometric blindness" regarding spatial relationships between rotated objects, and feature misalignment where cross-attention samples from fixed grids rather than the object's actual orientation.
Methodology
OrientedFormer addresses these limitations through three core architectural innovations designed to bridge the gap between general-purpose Transformers and the requirements of remote sensing.
Gaussian Positional Encoding (GPE)
To move beyond the limitations of raw coordinate sets, OrientedFormer represents each oriented box as a 2D Gaussian distribution. This mathematical shift allows the model to unify position, size, and angle into a single covariance matrix. By encoding rotation within a distribution, the model naturally resolves the "boundary problem"—the numerical discontinuity where angles like -90° and 90° are physically identical but numerically distant.
Wasserstein Self-Attention (WSA)
Understanding the spatial context between objects (e.g., ships docked in a row) is critical for accurate detection. OrientedFormer utilizes the Gaussian Wasserstein distance to calculate geometric similarity scores between object queries. These scores are injected into the self-attention mechanism, providing the model with explicit geometric context that standard self-attention lacks.
Oriented Cross-Attention (OCA)
Standard cross-attention mechanisms sample features in a fixed grid, which often results in the model "looking" at the background rather than the rotated object. OCA solves this by rotating the sampling points to match the predicted angle of the object query. This ensures that the model extracts features directly from the pixels belonging to the object, significantly improving feature alignment and localization accuracy.
Experimental Results
OrientedFormer was evaluated across six challenging benchmarks, including DIOR-R, DOTA (v1.0, v1.5, v2.0), HRSC2016, and the scene text dataset ICDAR2015.
Accuracy and Efficiency
On the DIOR-R dataset, OrientedFormer achieved 67.28% AP50, surpassing previous end-to-end models such as ARS-DETR. Perhaps more significantly, the model demonstrates remarkable training efficiency. By providing the attention mechanism with rotation-aware priors, OrientedFormer converges in just 12 epochs, compared to the 36 epochs typically required by state-of-the-art Transformer-based oriented detectors—a 3x speedup in training time.
Robustness and Generalization
The model's performance on DOTA-v1.5 highlighted its strength in detecting very small objects, a common pain point in aerial surveillance. Furthermore, its success on the ICDAR2015 scene text dataset (achieving an F-measure of 79.4%) demonstrates that the Gaussian-based approach is robust across different domains of oriented detection beyond remote sensing.
Discussion and Insights
The success of OrientedFormer stems from the "mathematical unlock" provided by Gaussian modeling. By treating bounding boxes as distributions, the model effectively disentangles content queries (classification) from positional queries (localization). This separation allows the architecture to learn specialized features for each task independently. The integration of rotation-aware sampling in the OCA module proves that alignment is the key to efficiency; when the model is guided to look at the correct pixels from the start of training, the learning process is drastically accelerated.
Limitations and Future Work
While OrientedFormer sets a new standard for end-to-end oriented detection, it is not without limitations. The model possesses a higher parameter count and higher FLOPs than some single-stage CNN-based detectors. Additionally, its inference speed—approximately 11 FPS on an NVIDIA 2080 Ti—may require further optimization for real-time deployment. Future research may explore the integration of rotation-equivariant Transformer layers to ensure that internal representations automatically adapt to input rotations, potentially further reducing the need for extensive data augmentation.
Conclusion
OrientedFormer demonstrates that Transformers can be highly effective for oriented object detection when equipped with the proper geometric priors. Through Gaussian Positional Encoding and rotation-aware attention mechanisms, the model achieves a superior balance of accuracy and training efficiency, providing a powerful new baseline for the remote sensing community.
Summary updated