# BCS_YOLO: Research on Corn Leaf Disease and Pest Detection Based on YOLOv11n
## 2 Materials and Methods
### Proposed Model: BCS_YOLO
#### 2.2.3 LAE Module  
In corn disease and pest detection scenarios, small insects and mild lesion areas usually produce weak signals, and could be easily overwhelmed by background noise. This is especially true under field conditions with low light, partial occlusion, or non-ideal imaging angles. The newly designed LAE module, shown in Figure 5, seamlessly integrates local importance attention mechanisms with feature intensity enhancement techniques. This forms a functionally synergistic and processing-efficient feature optimization unit. The LAE module first captures local importance information and generates attention maps, and then immediately performs adaptive intensity enhancement. This cascaded structure creates a mutually promoting relationship between feature selection and feature enhancement, achieving adaptive adjustment of feature channels within local spatial areas. This approach allows the model to focus on the most discriminative regions in images for corn leaf disease and pest classification and localization. Figure 5: The newly designed LAE module, utilized by the proposed BCS_YOLO model. In the LAE workflow, the input feature map \(X\) first undergoes local importance calculation to generate attention weight map \(W\), as follows:  
\[W=\ F_{up}\Big{(}F_{body}\ (X)\Big{)} \tag{10}\]  
where \(F_{up}\) denotes a bilinear interpolation upsampling function and \(F_{body}\) denotes a series of dimensionality reduction, soft pooling, and convolution operations, specifically designed to capture local saliency of corn leaf disease and pest features. The soft pooling operation (\(SoftPool\)) in LAE is a differentiable pooling mechanism defined as follows:  
\[SoftPool\ (X)=\frac{AvgPool\ (X\cdot exp(X))}{AvgPool\ (exp(X))} \tag{11}\]  
This design allows the pooling process to perform adaptive weighting based on feature value importance, thus preserving more structural information. In addition, LAE also introduces a channel gating mechanism, which generates gating signal \(G\) from the first channel of the input. The first stage of LAE generates attention-enhanced feature representation through triple interaction of input features, attention weights, and channel gating, as follows:  
\[Y_{mid}=X\odot W\odot G \tag{12}\]  
After generating attention-enhanced feature representations in the first stage, LAE applies a Retinex theory-inspired nonlinear intensity modulation to these in the second stage, as to further enhance the structural and semantic expression capabilities, as follows:  
\[Y_{LAE}\ =\ Y_{mid}\ +\ F_{proj\_out}(Y_{1}\odot Y_{2}) \tag{13}\]  
where \(Y_{mid}\) denotes the intermediate feature representation obtained by element-by-element multiplication of the input feature, attention weight, and channel gating signal; \(F_{proj\_out}\) denotes a 1 \(\times\) 1 convolutional layer that compresses the processed features from the expanded dimension back to the original input dimension; and \(Y_{1}\) and \(Y_{2}\) are obtained through the following branch processing:  
\[Y_{1}\ =\ Z_{1}\ +\ tanh(DWConv_{3\times 3}(Z_{1})) \tag{14}\]  
\[Y_{2}=Z_{2}+tanh(DWConv_{3\times 3}(Z_{2})) \tag{15}\]  
\[[Z_{1},Z_{2}]=DWConv_{3\times 3}(Conv_{1\times 1}(Y_{mid})) \tag{16}\]  
where \(DWConv_{3\times 3}\) denotes a depthwise convolution that applies convolution independently to each input channel, \(Z_{1}\) denotes the feature of the first branch after the depthwise convolution 1 (DWConv1 in Figure 5), and \(Z_{2}\) denotes the feature of the second branch after the depthwise convolution 2 (DWConv2 in Figure 5). This operation significantly reduces the model's computational complexity and number of parameters. The LAE module forms a tightly coupled whole through local attention mechanisms and feature intensity enhancement. The local attention mechanism directs the model toward areas containing abundant feature information. It provides precise spatial guidance for subsequent feature intensity enhancement.