# OrientedDiffDet: Diffusion Model for Oriented Object Detection in Aerial Images
## 1 Introduction  
Object detection of remote-sensing images is a basic but challenging task in computer vision [1; 2; 3; 4]. Most existing object detectors rely on prior knowledge and candidate boxes to perform regression on detection boxes [5; 6; 7]. These candidate boxes help simplify the object detection task by providing initial bounding box proposals. In contrast, our proposed method for object detection in remote-sensing images utilizes a diffusion model generation task. This approach enables the direct detection of object boxes from a set of random boxes. Essentially, the task of detecting the position (center coordinates) and size (width and height) of the bounding box is treated as a generative task within the object detection framework.  
Remote-sensing images exhibit diverse scales, dense distribution, and arbitrary orientations, making it ineffective to represent objects solely with horizontal boxes [8; 9; 10]. In the field of remote-sensing image object detection, scholars have increasingly focused on algorithms based on oriented boxes. For elongated objects with significant lengths and widths in remote-sensing images (e.g., ports and ships) [10; 11; 12], the use of horizontal candidate regions introduces substantial background noise when the object's rotation angle is large. This interference can negatively impact object classification. Therefore, we propose converting horizontal boxes into oriented boxes before applying the diffusion model for object detection in remote-sensing images. The oriented box representation employed in this paper utilizes a lightweight full convolutional network. The center point's coordinates, position, and size of the edges of the horizontal box are used as parameters. To achieve this, the regression branch's number of output parameters is changed from four to six. This approach significantly reduces the risk of overfitting compared to using rotated Region Proposal Networks (RPN), which typically have more parameters. Both horizontal and oriented boxes pose challenges during pooling for mask loss calculation in instancesegmentation. To address this, we introduce the feature alignment algorithm that learns transformation parameters to convert from horizontal to oriented boxes. This module helps extract rotation-invariant features from oriented boxes, mitigating the rounding effect on the horizontal RoI (Region of Interest) caused by pooling.  
Motivated by a class of likelihood-based models to generate the image by gradually removing noise from an image via the learned denoising model, we propose a denoising diffusion process from noisy boxes to object boxes. To enhance detection accuracy, we propose the acceleration diffusion process by adjusting the number of denoising sampling steps. Acceleration diffusion significantly enhances the sampling speed of both discrete-time and continuous-time diffusion probabilistic models.  
Our first contribution lies in the introduction of the feature alignment algorithm. This algorithm effectively encodes the rotational invariance of the detector, resulting in high-quality aerial object detection. Another significant contribution of our work is the introduction of the DPM-Solver. This technique improves the performance and calibration of the diffusion model, enhancing the overall effectiveness of our approach. We conducted extensive experiments on well-known remotely sensed image datasets, including DOTA and HRSC2016. The results of these experiments confirm the effectiveness of our proposed approach. Detailed experimental findings, including accuracy metrics, performance comparisons, and calibration analyses, are presented in the paper.