# Multi-Resolution and Semantic-Aware Bidirectional Adapter for Multi-Scale Object Detection
## 3 The Proposed Method
### Bidirectional Fine-Grained Interaction  
While acquiring the appropriate input for the merging process, a more effective interaction of features among various levels becomes essential. In a typical feature pyramid, a top-down pathway connects features from high to low levels in a progressive manner. Low-level features are enriched with semantic information from higher levels, which proves advantageous for classification tasks. Nevertheless, detection tasks demand sufficient  
Figure 3: Illustration of semantic-aware refinement transformer encoder. information pertinent to both classification and regression tasks, which poses a challenge due to the differing information needs of these tasks. The regression task mandates precise object contours and detailed information from high-resolution levels. Additionally, the classification task necessitates ample semantic information from low-resolution levels. However, the FPN scheme is not fully harnessed, resulting in the underutilization of high-resolution information from lower levels. The integration of numerous object contours and detailed information does not occur as effectively as anticipated. Furthermore, the semantic information gradually diminishes along the top-down path. Building upon the aforementioned knowledge, we introduce bidirectional fine-grained interaction to address the challenge of underutilizing multi-scale features and to foster interplay across distinct levels. Initially, we recognize that a straightforward bottom-up path could potentially introduce additional noise in lower levels. Therefore, we devise a pixel-level filter (PLF), depicted in Figure 2b, which centers on salient locations and dynamically sieves out extraneous pixel-level information based on the current feature's characteristics. Moreover, high-level features often lack location-specific information. As a solution, we introduce a bottom-up scheme where low-level features employ the pixel-level filter to guide high-level features towards object-specific locations. The pixel-level filter comprises two primary components: the identification of salient locations and the removal of superfluous pixel-level information, as well as the provision of fine-grained location guidance. The initial component, referred to as the pixel-level filter, can be outlined as follows:  
\[W_{i}=Max[Tanh(\Phi(M_{i})+Tanh(\Phi(M_{i}))\times M_{i}),0], \tag{10}\]  
where \(Tanh(\cdot)\) is tanh activation that transforms the operation into an encoded feature vector, ranging from (\(-1\), \(1\)); \(\Phi(\cdot)\) refers to a \(1\times 1\) conv operation; and \(Max\) ensures non-negativity. \(W_{i}\) is the output of PLF that denotes the filter result of \(M_{i}\). The pixel-level filter effectively removes superfluous information by suppressing values below 0 and dynamically emphasizes the salient region. In the subsequent part, the adjacent layer \(M_{i+1}^{\prime}\) is guided by the filter results \(W_{i}\) from preceding layers, facilitating focus on the desired region:  
\[M_{i+1}=\mathcal{G}(\Phi(M_{i+1}^{\prime}),F_{mul}(M_{i+1}^{\prime},W_{i})) \tag{11}\]  
\(\Phi(\cdot)\) is a convolution operator applied to \(M_{i}\) with the intention of obtaining a focused region through a learning strategy. \(M_{i+1}\) signifies the output of interaction. It is obtained by matching the \(M_{i+1}^{\prime}\) with the prominent information derived from preceding layers. \(M_{2}\) remains unchanged, equivalent to \(M_{2}^{\prime}\). Upon acquiring features enriched with accurate object contour and detailed information, we incorporate the concept of channel-wise prompt to facilitate the propagation of semantic information. As shown in Figure 2c, channel-wise prompt is devoted to extracting the semantic prompt map of the feature at the channel level, adaptively. Then, we utilize the semantic prompt map of higher levels to instruct the adjacent layer, which can heighten the semantic perception ability of objects.