# Lem-Detector: An Efficient Detector for Photovoltaic Panel Defect Detection
## 2 Related Work
### Detection Methods Incorporating Attention Mechanisms  
Attention mechanisms are widely employed in computer vision as a means of adaptively learning weight coefficients that emphasize regions of interest while suppressing irrelevant background information. This selective focus enhances model performance and efficiency. In computer vision, common attention mechanisms include Channel Attention [29], Spatial Attention [30], and Self-Attention [31]. These mechanisms selectively focus on specific areas across different dimensions, effectively highlighting target regions and improving the model's ability to extract relevant features. Attention mechanisms operate by adjusting weights across different dimensions to highlight relevant information. Channel Attention mechanisms focus on feature dimensions, emphasizing channels that contribute most to object classification by adjusting their weights. Spatial Attention mechanisms focus on spatial dimensions, learning weights for each position to highlight areas crucial for object classification. Self-Attention mechanisms, designed for sequential data, consider the relationships between elements and adjust their weights to emphasize those of significant importance. While these mechanisms differ in their implementation, their common goal is to enhance model performance. [PERSON] et al. [32] proposed a novel attention mechanism called Coordinate Attention (CA). CA integrates both channel information and directional positional information, establishing global connections to facilitate improved defect detection. [PERSON] et al. [33], recognizing limitations in CA, identified the detrimental effects of dimensionality reductionon channel attention and the complexity of the attention generation process. To address these challenges, they proposed a combination of one-dimensional convolution and Group Normalization feature enhancement techniques, demonstrating enhanced performance and generalization capabilities. Photovoltaic panel images often contain a large number of grains, a consequence of manufacturing processes and raw materials. These grains are randomly distributed and exhibit variations in scale and shape, presenting significant challenges for defect detection. [PERSON] et al. [34] introduced a Region Proposal Attention Network to address this issue, employing a novel approach that combines channel and spatial attention. This network refines the feature maps extracted by Convolutional Neural Networks (CNNs), enhancing features within defect areas while suppressing background noise. This strategy significantly improves classification and detection performance, demonstrating the effectiveness of attention-based feature processing. However, the close resemblance between some grains and defects can lead to misclassification and a high false detection rate. Additionally, information related to small-scale defects may be lost during feature extraction, impacting detection effectiveness. Precise feature extraction amidst complex background interference remains a crucial challenge. [PERSON] et al. [35] addressed this challenge by proposing receptive field attention. This approach not only focuses on spatial features within the receptive field but also provides effective attention weights for convolutional kernels, effectively addressing the issue of parameter sharing in standard convolutions. By selectively enhancing key features during the feature extraction phase, rather than optimizing features after extraction, this method improves model performance and accuracy. In summary, the primary challenges faced in photovoltaic panel defect detection include the following: (1) limited and imbalanced defect samples in the dataset, (2) strong background interference, making it easy to overlook small-scale features during feature extraction, leading to false positives and missed detections, and (3) poor defect recognition capabilities with insufficient localization accuracy.