# Broiler Behavior Detection and Tracking Method Based on Lightweight Transformer
## 2 Materials and Methods
### Modified FDDC-DETR
#### 2.5.2 DDConv and MSDCC Module  
It is unrealistic to build a powerful model solely by increasing the width and depth of the network to address the issues of poor detection and generalization capabilities. Instead, we aim to adopt a lightweight design that reduces the computational burden while enhancing network performance. Depthwise separable convolution (DWConv) is a widely recognized lightweight optimization method for convolutional networks, primarily consisting of two processes, namely depthwise convolution and pointwise convolution (PWConv). Depthwise convolution operates by convolving each channel independently with a single convolution kernel. Compared to conventional convolution, this approach effectively minimizes redundant calculations and floating point operations (FLOPs). However, the exclusive reliance on channel-wise convolution hampers the information connectivity between channels, leading to suboptimal feature learning and reduced accuracy. Consequently, PWConv is typically employed to increase the number of channels and facilitate linear combinations among them, thereby enhancing the integration of information across channels and improving the model's expressive capacity. The memory access patterns of DWConv and conventional convolution are illustrated in Equations (5) and (6). It is observed that when using PWConv to expand the number of channels, the condition \(c^{\prime}>c\) arises, resulting in higher computational costs compared to standard convolution. This indicates that the inclusion of pointwise convolution in depthwise separable convolution  
Figure 7: Structure of the Pconv block. necessitates greater memory resources. To address the high computational load associated with pointwise convolution, we draw on the shuffle concept proposed in previous studies [32; 33] and design a dual-depth fused convolution block, which we refer to as DDConv. Its structure is shown in Figure 8. Equations (5) and (6) are as follows:  
\[h\times w\times 2c^{\prime}+k^{2}\times c^{\prime}\approx h\times\omega\times 2c^{\prime} \tag{5}\]  
\[h\times w\times 2c+k^{2}\times c\approx h\times\omega\times 2c \tag{6}\]  
where \(h\) and \(w\) denote the height and width of the feature map, respectively, \(c\) denotes the number of channels for ordinary convolution, and \(c^{\prime}\) denotes the number of channels for pointwise convolution. We apply a normal convolution to reduce the number of channels to one-quarter of the original. For the initial deep convolution, we utilize a \(5\times 5\) convolution kernel, followed by a mixed strategy shuffle that rearranges the channels within each group. This shuffling interleaves channels from different groups, enhancing the information flow between the deep convolution channels and the regular convolution channels, thereby improving the model's feature representation capability. Subsequently, we perform deep convolution on the interactive information a second time to extract more profound features, which are then concatenated with the interactive information to produce the final output. This process effectively integrates the feature information from the ordinary convolution into the two deep convolution channels, further reducing the computational load and strengthening the information connection between each channel. The DDConv method retains a small portion of the initial semantic information while acquiring more extensive and deeper semantic insights, ultimately enhancing the model's feature extraction capabilities and improving detection accuracy. Aggregation often results in significant occlusions within high-density chicken rearing environments. The feature fusion module (Fusion, as shown in Figure 9) of the original model possesses a singular structure, which leads to a deficiency in contextual semantic information, resulting in missed or false detections. To address this issue, a multi-scale feature fusion module, termed MSDCC, is proposed. Figure 9 illustrates both the MSDCC and the original Fusion structure.