# Adaptation of Object Detection Algorithms for Road Indicator Lights in Complex Scenes
## 2 Materials and Methods
### Attention Mechanisms Module
Compared to models such as CBAM, ECA avoids costly spatial dimensionality manipulation and dimensionality reduction processes, achieving an optimal balance of complexity and performance. ECA attention is the adaptive selection of weights for each channel, with the innovation of capturing local cross-information between channels through one-dimensional convolution without explicit dimensionality reduction. This approach allows the model to efficiently capture inter-channel dependencies while maintaining low computational complexity. The stochastic attention mechanism Shuffle Attention (SA) improves the efficiency of feature utilization and representation ability of neural networks by reorganizing information inside the feature channels. Different from traditional attention mechanisms such as Self-Attention, Shuffle Attention mainly realizes information exchange between different parts of the feature graph by rearranging operations, and fuses channel attention and spatial attention together to enhance the representation ability of features. This approach is computationally more efficient and is particularly suitable for use in Convolutional Neural Networks (CNNs), where it can be used as a lightweight module to enhance the performance of the network. The core idea of Shuffle Attention is to enhance feature representation by channel shuffling and recalibration in a local region, which usually includes the following steps:  
* Grouping and reorganization  
The input feature map is divided into groups according to channels, and the channels in each group are spatially shuffled, which can make the features of different channels interact with each other. * Local Information Aggregation  
For the feature maps in each group, local spatial information is aggregated by spatial convolution operation, which can enhance the expression ability of the features in the group. * Attention weight calculation  
The feature maps after each grouping are processed using global average pooling (GAP) to obtain global context information. A small fully connected layer (or convolutional layer) is applied to the global context information of each group, and the attention weight of each group is obtained by calculating the activation function (e.g., sigmoid). * Feature weight calibration  
The calculated attention weights are multiplied by the feature maps of the original groupings to achieve feature recalibration to emphasize the more important feature channels. * Feature map reorganization  
Recombine all the grouped processed feature maps into a whole feature map by fusing the features of different groups through a convolutional layer to keep the channel dimension of the original feature map unchanged. Through the above steps, Shuffle Attention can effectively enhance the representation of features and improve the model's ability to capture important information in an image while maintaining a low computational complexity. In addition, due to its simple structure, Shuffle Attention can be easily integrated into existing CNN architectures, providing an easy and effective means to enhance network performance. Global Attention Mechanism (GAM) is a kind of global attention mechanism that enhances global information interaction and avoids the omission of critical information. The sequential channel-space attention mechanism in CBAM is used and the sub-modules are redesigned. The channel attention sub-module organizes the features in three dimensions and reinforces the dependency between the channel and the space with a two-layer MLP, i.e., a multilayer perceptron. The spatial attention sub-module uses two convolutions for spatial information fusion, and in doing so can model the nonlinear relationship between pixel points in the cube and better focus the spatial information.