# Soybean Weed Detection Based on RT-DETR with Enhanced Multiscale Channel Features
## 2 Materials and Methods
### EMCF-RTDETR Model
#### 2.2.1 CGF-Block Module  
Although ResNet-18, as a classic lightweight convolutional neural network, performs well in feature extraction, its structural design also exposes some shortcomings. As shown in Figure 1, the two 3 \(\times\) 3 convolutional layers used in the residual block of ResNet-18 enhance the learning ability of the model but also lead to increased computational complexity and frequent memory accesses, which in turn affects the efficiency of the model in processing high-dimensional features. In addition, it is also necessary to accurately capture fine-grained features in the complex background of soybean weed detection. To address these challenges, this article obtains the CGF-Block module by fusing the FasterNet Block with the Convolutional GLU (CGLU) mechanism [40; 42]. This module makes full use of the computational efficiency of partial convolution in FasterNet Block and the feature selection capabilities of convolution-gated linear units. This allows the CGF-Block module not only to improve the richness of feature extraction, but also to effectively reduce redundant memory usage, making the model more efficient in detecting weeds in soybean fields. Compared with the traditional ResNet-18 convolution structure, CGF-Block has demonstrated excellent performance advantages in efficiently utilizing multi-channel information and significantly reducing parameters and computational costs. The CGF-Block module detailed structure is shown in Figure 3.  
One of the most critical components in the CGF-Block is PConv [40]. PConv is an efficient convolution method that applies convolution operations to select feature map channels while keeping the content of the remaining channels, thereby effectively reducing computational redundancy and enhancing computational efficiency. For consecutive or regular memory access, the first or last continuous channel is treated as a representative of the entire feature map computation. Selective convolution targeting specific channels demonstrates remarkable computational advantages under the assumption of identical input and output feature map channel counts. When input channel proportion is limited to 1/4, PConv's Floating-Point Operations (FLOPs) are reduced to 1/16 of traditional  
Figure 3: CGF-Block module structure. \(\odot\): Element-wise multiplication of matrices; \(\oplus\): Element-wise multiplication of matrices.  
convolution, with memory access requirements diminishing to just 1/4 of conventional approaches. The FLOP calculation process of PConv is shown in the following equation:  
\[F=h\times w\times k^{2}\times c_{p}^{2} \tag{1}\]  
The memory access volume calculation process of PConv is shown in the following equation:  
\[M=h\times w\times 2c_{p}+k^{2}\times c_{p}^{2} \tag{2}\]  
where \(h\) is the height of the channel, \(w\) is the width of the channel, \(c_{p}\) is the number of continuous network channels, and \(k\) is the convolution kernel scale.  
The original convolution operation in FasterNet is replaced by the CGLU mechanism [42], which cleverly combines the deep convolution operation with the gating mechanism. The main process is that CGLU provides a unique gating signal for each feature channel, which is based on the local features of the feature channel itself and its surroundings. This not only improves the model's perception of local and global features but also has less computational complexity and improves the robustness of the model.