# Spatial Shape-Aware Network for Elongated Target Detection
## 1 Introduction
Furthermore, traditional methods often rely on fixed Intersection over Union (IoU) thresholds for anchor box selection, which fails to account for the unique characteristics of elongated objects. As a result, anchors that may contain important features are discarded simply due to minor changes in their angle or aspect ratio. This issue exacerbates the challenge of detecting objects with extreme elongation or multi-directional rotation, which is common in remote sensing imagery. Label assignment methods, using specific IoU-based adaptive assignment strategies, alleviate this issue, making detection more shape-adaptive. Meanwhile, label assignment methods have gained popularity as a research focus due to their ability to improve detection accuracy without significantly increasing complexity, and they can be easily integrated into other detectors. RS detection networks assign labels to positive and negative samples by setting anchor boxes or point sets on feature maps, based on the spatial relationship between ground truth boxes and predefined boxes. [PERSON] et al. [10] pointed out that different sample assignment strategies affect detection accuracy and proposed a dynamic anchor box assignment (DAL) method, which uses a positive-negative sample metric factor to evaluate the positioning ability of anchor boxes for a better sample assignment. ATSS [11] adaptively selects the most representative anchor boxes as positive samples based on statistical properties (e.g., center distance and IoU distribution) of each candidate box and the true boxes. ATSS reduces reliance on hyperparameters and enables the model to focus more accurately on effective training samples, thereby significantly improving accuracy and efficiency of detection. The OTA method [12] frames label assignment as an Optimal Transport (OT) problem, defining the unit transportation cost between anchors and ground truth boxes as a weighted combination of regression and classification losses. Through cost minimization, OTA achieves globally optimal label assignment in one-to-many matching scenarios. However, research regarding these typically addresses the stages of feature extraction and anchor box assignment independently, neglecting the impact of the actual content of the intersection between predefined anchor boxes and targets on the assignment strategy. This oversight is particularly evident in the following three aspects as shown in Figure 1.  
1. Feature Level--Within Anchor Boxes: When detecting complex shapes, especially elongated objects, convolution operations introduce significant background noise, resulting in insufficient and inaccurate feature extraction for the target. 2. Instance Level--Anchor Box Properties: Methods based on IoU thresholds to filter anchor boxes may ignore shape information. Minor changes in the anchor box's angle can cause significant fluctuations in IoU, leading to the exclusion of potentially high-quality anchor boxes. 3. Potential Level--Outside Anchor Boxes: Existing methods do not consider the potential differences between positive samples. Internal feature points of the target usually carry more semantic and classification information compared to boundary or external points, especially when the object is elongated, causing feature points to cluster near the long edges, thus exacerbating the issue. We propose a novel shape-aware elongated target detector to address these challenges. At the feature level, we introduce a Boundary-Guided Spatial Feature Perception Module (BGSF), which is part of the detection head rather than embedded within the backbone  
Figure 1: Illustration of key challenges and solutions for detecting elongated targets in remote sensing imagery. The left panel highlights the challenge of noise interference during feature sampling for elongated targets. The middle panel emphasizes the necessity of shape adaptive anchor box selection during training for slender object detection.