Photovoltaic panel fault detection method based on multi-scale scaling feature fusion network

By introducing a multi-scale scaling feature fusion network in photovoltaic panel fault detection, combining pruning efficient multi-scale attention mechanism and temperature scaling WIoU loss function, the problems of low detection efficiency and degradation of model performance in the existing technology are solved, and high accuracy and efficient photovoltaic panel fault detection are achieved.

CN119516274AActive Publication Date: 2025-02-25ANHUI UNIVERSITY OF TECHNOLOGY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411662184.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-02-25
Estimated Expiration
2044-11-20

AI Technical Summary

Technical Problem

The existing photovoltaic panel fault detection methods have problems such as low detection efficiency, high error detection rate, difficulty in dealing with target images of different sizes and proportions, and model performance degradation when data set categories are unbalanced and anchor frame quality is low.

Method used

A photovoltaic panel fault detection method based on multi-scale scaling feature fusion network is proposed. By introducing pruning efficient multi-scale attention mechanism (PEMA) module and temperature scaling WIoU loss function in the YOLOv8 network, the feature representation and loss calculation are optimized, and the model detection accuracy and generalization are enhanced.

Benefits of technology

It significantly improves the accuracy and detection speed of photovoltaic panel fault detection, enhances the performance of the model in small-target defect fault detection, and reduces the calculation complexity and number of parameters of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119516274A_ABST
    Figure CN119516274A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic panel fault detection method based on a multi-scale scaling feature fusion network, and belongs to the technical field of photovoltaic panel fault detection, and the method comprises the following steps: S1, network construction; s2, model training; and S3, fault detection. The invention provides a pruning efficient multi-scale attention mechanism to improve the feature representation capability, a ReLU activation function is adopted to optimize feature fusion, and network structure global pruning is performed to improve the model detection precision and the model generalization; a temperature scaling loss function is provided to relieve detection target category imbalance, and parameter calculation of the model is optimized to remarkably improve the quality of the anchor frame; a backbone network based on a C2f-PEMA network is designed, an improved PEMA module is combined with a C2f module, and a feature fusion module is added to enhance the feature expression ability so as to improve the model detection precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of photovoltaic panel fault detection, and in particular to a photovoltaic panel fault detection method based on a multi-scale scaling feature fusion network. Background Art

[0002] With the global population growth and economic development, the over-reliance on traditional fossil energy has led to increasingly serious environmental pollution and climate change problems. Therefore, the development of renewable energy has become an important direction for adjusting the global energy structure. Due to the cleanliness and low carbon characteristics of solar energy, it has become an important part of renewable energy. Photovoltaic panels (PV) are key equipment for converting solar energy into electrical energy and are widely used in the field of solar power generation. However, surface defects and failures of photovoltaic panels can lead to a decrease in photoelectric conversion efficiency, especially hot spot effects, which can cause safety accidents such as fires. Therefore, with the continuous expansion of photovoltaic power stations, avoiding PV failures is crucial to ensuring stable power generation, efficient operation and safe production of photovoltaic power generation systems.

[0003] In recent years, PV surface defect fault detection has been widely studied. The earliest PV defect fault detection method was manual visual inspection, which identified PV damage, shading, hot spots and other faults by manually observing the appearance of photovoltaic panels. However, this method has low detection efficiency and is prone to subjective judgment. In addition, due to the reliance on professional training personnel, workers will become fatigued due to long working hours, resulting in detection errors. Therefore, manual visual inspection is not suitable for large-scale PV defect fault detection and real-time monitoring needs. At present, PV defect fault detection methods can be divided into traditional target detection methods and defect fault detection methods based on deep learning. The traditional target detection method is to generate candidate regions on the target image through sliding window technology, extract features from them, and use classifiers such as support vector machines (SVM) to identify targets. The main detection methods include Viola-Jones detector, HOG detector and AdaBoost ensemble learning. However, the sliding window method will produce a large number of false detections on the background, and is not good at processing target images of different sizes and scales. Defect fault detection methods based on deep learning mainly include defect imaging and feature extraction. The methods are mainly divided into two categories: one-stage detection methods, such as YOLO, SSD, RetinaNet, etc.; two-stage detection methods, such as R-CNN, FastRCNN, Faster RCNN, etc. The one-stage detection method directly predicts the category and location of the target from the target image without generating candidate regions. The two-stage detection method generates a set of candidate regions, classifies them, and regresses bounding boxes. This method is usually better than the one-stage method in target positioning and classification accuracy, but the computational cost is higher, so it is slower than the one-stage detection method. With the technical development of the one-stage detection method, its accuracy has been significantly improved through update iterations, such as the YOLO series of methods. For large-scale distributed photovoltaic panel defect failures, it is necessary to improve the accuracy and speed of the detection method, so deep learning methods have important research value for photovoltaic panel defect failure detection.

[0004] The YOLO algorithm in deep learning algorithms is widely used in the field of image detection due to its fast speed and high accuracy. At the same time, a large number of researchers have developed improved strategies for the YOLO algorithm to enhance its advantages in the field of image detection. For example, some scholars have designed a new lightweight bottleneck and efficient multi-scale attention mechanism (EMA) fusion strategy to enhance the model robustness and reduce model parameters. However, its multi-scale feature attention map and dual-channel feature map do not achieve good feature extraction. Other scholars have designed the BiMAF module, which can effectively fuse features from both the overall and local levels. However, when the training data categories are unbalanced and the anchor box quality is low, the model performance will decline. Another scholar proposed an improved method that integrates GSConv, BiFPN and DW-Conv, which significantly improves accuracy and training speed. However, this method has difficulty in extracting edge features and small target features, which can easily cause some information loss during feature fusion. At present, YOLOv8 is a relatively advanced algorithm, which has three functions: classification, detection and segmentation. Under the condition of high classification accuracy, detection mAP and segmentation mAP have faster detection speed and can achieve real-time fault detection. However, YOLOv8 has difficulty in extracting features such as crack detection, especially for targets with poor features. At the same time, YOLOv8 does not enhance the ability to extract edge features and cannot effectively capture targets with features of different scales. There are challenges such as unbalanced dataset categories, size deviation, and low anchor box quality, which will inevitably affect the detection performance of the model, especially for small target defect fault detection.

[0005] To this end, a photovoltaic panel fault detection method based on multi-scale scaling feature fusion network is proposed. Summary of the invention

[0006] The technical problem to be solved by the present invention is: how to solve the above-mentioned problems existing in the existing detection methods, thereby improving the accuracy of photovoltaic panel fault detection, and providing a photovoltaic panel fault detection method based on a multi-scale scaling feature fusion network.

[0007] like Figure 1 As shown, the present invention solves the above technical problems through the following technical solutions, and the present invention comprises the following steps:

[0008] S1: Network Construction

[0009] The YOLOv8 network is selected as the basic model; the EMA module is optimized using the ReLU activation function and subjected to cross-space learning and global structural pruning to obtain the PEMA module; the PEMA module is added to the input part of the Bottleneck layer of the C2f module in the YOLOv8 backbone network, and the feature fusion module is added to the output part of the Bottleneck layer to obtain the C2f_PEMA backbone network; the backbone network in the YOLOv8 network is replaced with the C2f_PEMA backbone network to obtain the photovoltaic panel fault detection network;

[0010] S2: Model training

[0011] The TS-WIoU loss function is used to optimize the loss calculation of the photovoltaic panel fault detection network. The photovoltaic panel fault detection network is used to train the model with the processed photovoltaic panel images to obtain the photovoltaic panel fault detection model for fault detection.

[0012] S3: Fault Detection

[0013] The photovoltaic panel image to be detected is input into the photovoltaic panel fault detection model for defect method detection, and the photovoltaic panel fault detection defect type and defect boundary box coordinate information are output.

[0014] Furthermore, in the step S1, the EMA module extracts descriptors for attention weights from the grouped feature images through three independent channels, wherein two channels are 1X1 branches and the third channel is 3X3 branches;

[0015] In the 1x1 branch, a one-dimensional global average pooling operation is used to encode the channel information in two spatial dimensions, namely the horizontal and vertical dimensions. Then the two encoded features are fused and a 1X1 convolution operation is performed. The ReLU activation function is used to aggregate the attention maps of the two channels in each group through multiplication operations to obtain the first attention feature map.

[0016] In the 3x3 branch, a 3x3 convolution operation is performed on the grouped features to capture feature representations of different scales, and then the output results are average pooled to generate the second attention feature map.

[0017] Furthermore, in the step S1, when performing cross-space learning, the two acquired attention feature maps are reconstructed by a two-dimensional global adaptive average pooling method, and then the reconstructed results are normalized by a softmax function to obtain standardized attention weights, and finally the normalized results are merged by element-by-element multiplication to generate a spatial attention map containing complete spatial position information;

[0018] The reconstruction formula is as follows:

[0019]

[0020] Among them, C represents the number of input channels, H and W represent the spatial dimensions of the input features, namely the height and width, ∑ represents the accumulator, and x c represents the input features of the i-th row and j-th column of the C-th channel, It represents the sum of all pixel positions (i, j). The first summation symbol ∑ is the sum of the height H, and the second summation symbol ∑ is the sum of the width W.

[0021] Furthermore, in the step S1, an unstructured global pruning algorithm is used to prune the channels and weight parameters of the EMA module that has been optimized and processed through cross-space learning to obtain a PEMA module.

[0022] Furthermore, in the step S1, the feature fusion module uses a convolutional layer and a nonlinear activation function to splice the output parts of the PEMA module and each Bottleneck layer to fuse the global information and the local information together.

[0023] Furthermore, in step S2, when the TS-WIoU loss function is used for training, the WIoU loss value is calculated based on the predicted box and the true box, and then the WIoU loss value is divided by the temperature parameter to adjust the size of the WIoU loss value. Finally, the gradient is recalculated according to the adjusted loss function, and then the back propagation process of the model is executed, and the model parameters are updated. The adjusted loss function is the TS-WIoU loss function.

[0024] Furthermore, in step S2, the calculation formula of the TS-WIoU loss function is as follows:

[0025]

[0026] Among them, p represents the predicted bounding box, i.e. the predicted box; g represents the true bounding box, i.e. the true box; IoU(p,g) is the intersection-over-union loss between the predicted box p and the true box g; CIoU(p,g) is the CIoU loss between the predicted box p and the true box g, which takes into account the overlapping area, center point distance and aspect ratio; α1 is the weight parameter of the IoU loss, β1 is the weight parameter of the CIoU loss; T is the temperature parameter used to adjust the influence of α1 and β1.

[0027] Furthermore, the calculation formula of WIoU loss value is as follows:

[0028]

[0029] in, * indicates that the size of the minimum bounding box is extracted separately for processing. Represents the square of the Euclidean distance between the center points of two bounding boxes, d 2 Represents the square of the distance between the predicted bounding box and the true bounding box. Areas A and B correspond to the true box and the predicted box, respectively. The IoU loss is used to measure the degree of overlap between the predicted box and the true box. β2 represents the outlier degree. α2 and δ are hyperparameters.

[0030] Compared with the prior art, the present invention has the following advantages:

[0031] 1. A Prune Efficient Multi-Scale Attention Mechanism (PEMA) is proposed to improve the feature representation capability, the ReLU activation function is used to optimize feature fusion, and the network structure is pruned globally to improve the model detection accuracy and model generalization.

[0032] 2. A temperature scaling (Temperature-Scaled-WIoU, TS-WIoU) loss function is proposed to alleviate the imbalance of detection target categories, and the parameter calculation of the model is optimized to significantly improve the quality of the anchor frame.

[0033] 3. Design a backbone network based on C2f-PEMA network. Combine the improved PEMA module with the C2f module, and add a feature fusion module to enhance the feature expression ability to improve the model detection accuracy.

[0034] 4. After in-depth theoretical analysis and comprehensive evaluation, the comparative results confirm that the proposed method has significant advantages in performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a schematic diagram of the process of the present invention;

[0036] Figure 2 It is an overall framework diagram of the multi-scale scaling feature fusion network in the first embodiment of the present invention;

[0037] Figure 3 It is a schematic diagram of the structure of the PEMA module in the first embodiment of the present invention;

[0038] Figure 4 It is a structural diagram of the C2f_PEMA backbone network in the first embodiment of the present invention. DETAILED DESCRIPTION

[0039] The following is a detailed description of an embodiment of the present invention. This embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation method and a specific operation process are given, but the protection scope of the present invention is not limited to the following embodiment.

[0040] Embodiment 1

[0041] This embodiment provides a technical solution: a photovoltaic panel fault detection method based on a multi-scale scaling feature fusion network (MSFFN). The overall framework of MSFFN is as follows: Figure 2 As shown. Although YOLOv8 has shown good performance in the field of target detection, it still has defects in the task of photovoltaic panel surface defect fault detection. In order to enhance the compatibility of model transplantation equipment, the present invention performs global structural pruning on the EMA module. In order to enhance the multi-scale feature fusion characteristics of the model to enhance feature representation, the present invention optimizes the activation function of the EMA module and embeds it into the C2f module of the backbone network, and performs feature fusion on the output parts of the two modules to improve the model detection accuracy. In order to optimize the loss function calculation and deal with the category imbalance of the data set, the present invention adopts the WIoU loss function and adds a temperature scaling operation. Below, the detailed information of the main contents is introduced one by one.

[0042] 1. Prune Efficient Multi-Scale Attention Mechanism (PEMA)

[0043] The present invention proposes a Prune Efficient Multi-Scale Attention (PEMA) mechanism to improve the feature representation capability. The ReLU activation function is used in the EMA module to optimize feature fusion, and the network structure is pruned globally to improve the model detection accuracy and model generalization.

[0044] EMA module optimization

[0045] There are small targets of separate categories in the photovoltaic panel defect fault detection targets, and the small targets occupy fewer pixels and have unclear texture features, making detection difficult. In particular, the convolution operation of YOLOv8 extracts feature information and easily causes feature loss. Therefore, the present invention adopts an efficient multi-scale attention mechanism (EMA) module. The EMA module adopts the shared 1x1 convolution branch in the CA module and names it the 1x1 branch. In order to better enhance the aggregation of multi-scale spatial structure information, the EMA module adds a 3x3 convolution kernel in parallel next to the 1x1 branch and names it the 3x3 branch.

[0046] like Figure 3As shown, the parallel subnetwork: EMA module extracts descriptors for attention weights from the feature images of the group through three independent channels, of which two channels are 1X1 branches and the third channel is 3X3 branches. In the 1x1 branch, a one-dimensional global average pooling operation is used to encode the channel information in two spatial dimensions, namely the horizontal and vertical dimensions, respectively, and then the two encoded features are fused and a 1X1 convolution operation is performed. Since Sigmoid is suitable for processing binary classification problems, the photovoltaic panel fault detection of the present invention is not a binary classification problem and has multiple fault categories. Therefore, the present invention uses the ReLU activation function to obtain a dual-channel attention map. Through a simple multiplication operation, the attention maps of the two channels in each group are aggregated to obtain the first attention feature map to realize the different cross-channel feature interactions between the two parallel paths in the 1×1 branch. The 3x3 branch uses EMA to perform a 3x3 convolution operation on the group features to capture feature representations of different scales, and then average pools the output results to generate a second attention feature map.

[0047] The channel attention graph calculation formula is as follows:

[0048]

[0049] Among them, C represents the number of input channels, H and W represent the spatial dimensions of the input features, namely the height and width, ∑ represents the accumulator, and x c represents the input feature of the Cth channel, Represents the average pixel value calculated along the columns and rows in the height direction; 0≤i≤W and 0≤j≤W represent the range of the summation, that is, from 0 to width W.

[0050] Cross-spatial learning: The EMA module enhances the aggregation of features by aggregating information across spaces in different spatial dimensions. The module generates two attention feature maps encoding global spatial information in the 1x1 and 3x3 convolution branches. These feature maps are reconstructed using a two-dimensional global adaptive average pooling method, as shown in the following formula. The results are normalized using a softmax function to obtain standardized attention weights. Finally, the normalized results of the two branches are merged by element-wise multiplication to produce a spatial attention map containing complete spatial position information.

[0051]

[0052] In general, the improved EMA module uses global average pooling and dot product operations to efficiently integrate global and local information, enabling the network model to identify the overall structure and morphological characteristics of the photovoltaic panel fault area and capture the detailed features and texture information of the local area. In addition, the improved EMA module divides the input into multiple sub-features with excellent spatial semantic characteristics at the initial stage. The contextual information of the spatial environment of the target area is obtained through parallel 1x1 and 3x3 convolution operations within the module.

[0053] Prune

[0054] The baseline model YOLOv8 is limited by computing resources and inference time, so the present invention performs global pruning operations on the EMA module. Pruning is divided into two categories: structured pruning and unstructured pruning. Compared with structured pruning, which removes weights according to a specific pattern or method, unstructured pruning does not rely on a specific pattern or method to remove weights, but randomly deletes weights in the weight matrix of the neural network. Unstructured global pruning selectively removes weights based on the L1 norm of the weights, rather than removing weights from a specific row, column or block, which can more flexibly reduce feature loss and improve model robustness and generalization. Therefore, the present invention uses an unstructured global pruning algorithm to prune the channels and weight parameters of the optimized EMA module above to obtain a PEMA module (see Figure 3 ), while ensuring accuracy, the computational complexity and model size are reduced, thereby obtaining a detection model with high robustness and strong generalization.

[0055] 2. TS-WIoU loss function

[0056] YOLOv8 adopts a dynamic label matching strategy to assign object labels to anchors associated with predicted boxes. These anchors are based on the ground-truth feature maps calculated by the loss function. In the loss calculation, it changes from an anchor-based method to an anchor-free method, and integrates the Complete Intersection over Union (CIoU) loss function to handle bounding box regression to enhance the consistency of the model in classification and positioning tasks. The original regression loss function CIoU of the YOLOv8 algorithm does not take into account the mismatch between the projection frame and the actual frame.

[0057] Equipment fault defect detection in the field of photovoltaic panels is a detection task that includes multiple types of faults, and its challenges in identification and positioning exceed those of a single category of detection. Therefore, it is necessary to improve the performance of the network in positioning to better cope with complex scenarios. WIoU (Weighted Intersection over Union) adopts a dynamically changing focusing mechanism to dynamically evaluate the quality of the anchor box, and creates an attention mechanism loss function that focuses on the bounding box through gradient gain adjustment. This loss function enhances the generalization and robustness of the model in target detection tasks by taking outliers into consideration. In addition, WIoU aims to reduce the negative impact of low-quality samples on the training process by implementing an efficient gradient gain allocation strategy. This enables WIoU to focus on optimizing medium-quality anchor boxes, thereby significantly improving the overall performance of target detection. Therefore, the present invention adopts WIoU as the loss function of the model, and adds temperature scaling to improve the model detection accuracy. The calculation formula of the WIoU loss function is as follows:

[0058]

[0059] in,

[0060] In object detection, * indicates that the size of the smallest bounding box is extracted and processed separately. Represents the square of the Euclidean distance between the center points of two bounding boxes. 2 Represents the square of the distance between the predicted bounding box and the true bounding box. Regions A and B correspond to the actual true bounding box and the bounding box predicted by the model, respectively. IoU (Intersection over Union) measures the degree of overlap between the predicted box and the true box, thereby evaluating the accuracy of the detection. The hyperparameters α2 and δ are empirically taken as 1.9 and 3, respectively. β2 represents the outlier degree, which is used to describe the abnormality of the quality of the anchor box. Anchor boxes with lower outliers mean higher quality, so smaller gradient gains are assigned. On the contrary, anchor boxes with higher outliers, that is, lower quality anchor boxes, will receive smaller gradient gains to avoid them having too large a negative impact on model training.

[0061] Temperature Scaling: Temperature-Scaled WIoU (TS-WIoU) Loss Module

[0062] Temperature scaling is a technique used in deep learning to calibrate the probability of model output, and is widely used in classification tasks in particular. By dividing the model output by the temperature parameter, it can adjust the shape of the probability distribution and make the model's predictions for certain categories more accurate. This technology enhances the model's ability to recognize features of different categories by adjusting the cross entropy loss function. Especially when faced with challenges of imbalanced categories or uneven sample distribution, temperature scaling helps optimize model performance, reduce bias towards the majority class, and thus enhance the accuracy and robustness of the model. The present invention combines temperature scaling technology with the WIoU loss function to form the TS-WIoU (Temperature-Scaled WIoU) loss function, which combines the weighted intersection-over-union advantage of WIoU and the flexible adjustment function of temperature scaling. By adjusting and improving the parameter calculation process of the model to improve the calculation performance of the loss function, the prediction accuracy of the bounding box in the target detection task is further improved. First, the WIoU loss value is calculated based on the predicted box and the true box, and then the WIoU loss value is divided by the temperature parameter to flexibly adjust the size of the WIoU loss value. Finally, the gradient is recalculated based on the adjusted loss function, and then the back propagation process of the model is executed and the model parameters are updated. The calculation formula of the TS-WIoU loss function is as follows:

[0063]

[0064] Among them, p represents the predicted bounding box, i.e. the predicted box; g represents the true bounding box, i.e. the true box; IoU(p,g) is the intersection over union ratio between the predicted box p and the true box g; CIoU(p,g) is the Complete Intersection over Union between the predicted box p and the true box g, which takes into account the overlapping area, center point distance and aspect ratio. α1 is the weight parameter of IoU loss, β1 is the weight parameter of CIoU loss; T is the temperature parameter used to adjust the influence of α1 and β1.

[0065] 3. C2f_PEMA backbone network

[0066] Photovoltaic panel fault detection plays an important role in the development of new energy. However, the scale of fault types is unevenly distributed, and small target defect faults are difficult to detect, which makes it difficult to develop photovoltaic panel fault detection systems in terms of accuracy. These systems do not meet the detection requirements, and the model size is large, making it difficult to deploy on mobile devices. In order to solve these problems, the backbone layer C2f module of YOLOv8 is modified and optimized, and the PEMA attention mechanism module is added before the Bottleneck layer, and the feature fusion module is added after the output part.

[0067] like Figure 4As shown, the C2f_PEMA module of the present invention is improved on the original C2f module, and an optimized EMA module (PEMA attention mechanism module) is added before the Bottleneck part to enhance the dynamics of the model feature representation. The PEMA attention mechanism module realizes the efficient integration of global and local feature information through advanced global average pooling and dot product operations. This module can not only capture the macroscopic structure and morphological characteristics of the surface defect fault detection area of ​​the photovoltaic panel, but also extract the detailed features and texture information of the local area, which greatly improves the accuracy and reliability of the model in the photovoltaic panel fault detection task. Through the activation function optimization improvement and carefully designed pruning strategy of the PEMA attention mechanism module, the performance of the model is further improved, so that it can achieve the improvement of calculation speed while achieving the improvement of accuracy. These improvements not only enhance the robustness and generalization of the model, but also improve its deployability in practical applications.

[0068] The feature fusion module in the C2f_PEMA backbone network combines the global information and local information in the model by splicing the output parts of the PEMA module and each Bottleneck layer. The PEMA module enhances the temporal continuity of feature representation and the ability to capture dynamic changes by applying the exponential moving average method. The Bottleneck layer effectively extracts key information from the features through deep convolution processing and dimensionality transformation, and also reduces the number of model parameters in the process. After merging these outputs in the channel dimension, the feature fusion module further promotes the interaction and fusion between features using convolutional layers and nonlinear activation functions, so that different features can complement each other and improve the feature expression ability of the overall model. The structure diagram of the C2f_PEMA backbone network is shown in the figure. Figure 4 shown.

[0069] Embodiment 2

[0070] In this embodiment, the PV-ELAD dataset jointly released by Hebei University of Technology and Beijing University of Aeronautics and Astronautics is used as the basic dataset. The PV-ELAD dataset has 6 types of defect faults, including crack, fingerprint, black core, short circuit, thick line, and horizontal displacement, with a total of 4415 images.

[0071] In order to verify the accuracy and generalization of the photovoltaic panel fault detection model (MSFFN model) proposed in the present invention in image detection, especially its superiority in small target detection, the open source photovoltaic panel defect fault (PV-DF) dataset and the open source small target photovoltaic panel (PV-OD) dataset were used for experiments. The PV-DF dataset contains 4415 images, and there are 3 types of defects, including scratches, broken grids, and dirt. The PV-OD dataset contains 4007 images, and the image detection type is small target photovoltaic panel images.

[0072] The present invention uses standard image detection evaluation indicators, including mAP (Mean Average Precision), recall rate (Recall), and precision (Precision), as shown below:

[0073]

[0074] Among them, TP (True Positive) refers to the number of target detection boxes correctly identified by the model; FP (False Positive) refers to the number of non-target detection boxes that the model mistakenly determines to be targets; FN (False Negative) refers to the number of actual targets that the model fails to detect. mAP (mean average precision) is obtained by calculating the average precision of all categories and taking their average value. It measures the average performance of the overall performance of each category model in the data set. Precision P (Precision) refers to the proportion of truly positive samples among all samples judged as positive by the model, which reflects the false detection rate of the model. Recall R (Recall) refers to the proportion of samples correctly identified by the model among all samples that are actually positive, which measures the missed detection rate of the model. All detection refers to all positive samples detected by the model, and all ground truth refers to all positive samples that actually exist.

[0075] In order to evaluate the superiority of the proposed method in the task of photovoltaic panel surface defect fault detection, the experiment in this embodiment compares the performance of MSFFN with the current mainstream advanced image detection models SSD, Efficientdet-d0, Retinenet, Faster-RCNN, YOLOv5, YOLOv8, YOLOv9 (2024), and YOLOv10 (2024). The comparison results are shown in Table 1:

[0076] Table 1 Comparison results

[0077] algorithm mAP / % SSD 79.45 Efficient 63.59 Retinenet 90.87 Faster-RCNN 90.73 YOLOv5 88.7 YOLOv8 90 YOLOv9 0.912 YOLOv10 0.904 MSFFN (model of the present invention) 0.921

[0078] As can be seen from Table 1, the model proposed in the present invention (MSFFN model) has the highest detection accuracy compared to the comparison model, among which the mAP of the MSFFN model reaches 92.1%, which is 2.1% higher than the baseline model YOLOv8, and 0.9% and 1.7% higher than the recently proposed YOLOv9 and YOLOv10, respectively, which proves that the model has the best detection performance for defect fault targets. Although YOLOv9 introduces the GELAN module to improve the parameter utilization rate, it is converted into performance advantages in the photovoltaic panel defect detection task. Moreover, the model of YOLOv9 is larger than YOLOv8, which leads to a decrease in the detection of some data sets. Therefore, its prediction accuracy is not as good as the MSFFN model proposed in the present invention. YOLOv10 integrates large kernel convolution and partial self-attention (PSA) modules to improve the model's ability to capture global information. However, in the photovoltaic panel defect detection task of different sizes and shapes, the improvement of global information on detection accuracy is not obvious, so its prediction accuracy is not as good as the proposed MSFFN model. The proposed MSFFN model adopts a multi-scale feature fusion method, adds a feature fusion module to the backbone network, enhances feature representation, improves the quality of anchor boxes, and handles problems such as category imbalance to improve detection accuracy. Therefore, the proposed MSFFN model can also show significant advantages compared with the latest YOLOv9 and YOLOv10 models. The MSFFN model proposed by the present invention exceeds the advanced image detection algorithm in detection accuracy.

[0079] In summary, the photovoltaic panel fault detection method based on the multi-scale scaling feature fusion network in the above embodiment performs structured global pruning on the EMA module, optimizes the activation function, and enhances the model detection performance; adopts WIoU loss and introduces temperature scaling to optimize the loss calculation; embeds the PEMA module into the C2f module of the backbone network, and then performs feature fusion on the outputs of the PEMA module and the Bottleneck layer of the C2f module to enhance the feature representation, so as to solve the problem that the original model is difficult to extract edge features or small target features; the proposed model is verified by multiple experimental data sets, which shows that its model performance is superior, and the contribution of the research of the present invention is of great significance to promoting the sustainable development of renewable energy.

[0080] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A photovoltaic panel fault detection method based on a multi-scale scaling feature fusion network, characterized in that: The following steps are involved: S1: Network Construction The YOLOv8 network is selected as the basic model; the EMA module is optimized using the ReLU activation function and subjected to cross-space learning and global structural pruning to obtain the PEMA module; the PEMA module is added to the input part of the Bottleneck layer of the C2f module in the YOLOv8 backbone network, and the feature fusion module is added to the output part of the Bottleneck layer to obtain the C2f_PEMA backbone network; the backbone network in the YOLOv8 network is replaced with the C2f_PEMA backbone network to obtain the photovoltaic panel fault detection network; S2: Model training The TS-WIoU loss function is used to optimize the loss calculation of the photovoltaic panel fault detection network. The photovoltaic panel fault detection network is used to train the model with the processed photovoltaic panel images to obtain the photovoltaic panel fault detection model for fault detection. S3: Fault Detection The photovoltaic panel image to be detected is input into the photovoltaic panel fault detection model for defect method detection, and the photovoltaic panel fault detection defect type and defect boundary box coordinate information are output.

2. A photovoltaic panel fault detection method based on a multi-scale scaling feature fusion network according to claim 1, characterized in that: In the step S1, the EMA module extracts descriptors for attention weights from the grouped feature images through three independent channels, wherein two channels are 1X1 branches and the third channel is a 3X3 branch; In the 1x1 branch, a one-dimensional global average pooling operation is used to encode the channel information in two spatial dimensions, namely the horizontal and vertical dimensions. Then the two encoded features are fused and a 1X1 convolution operation is performed. The ReLU activation function is used to aggregate the attention maps of the two channels in each group through multiplication operations to obtain the first attention feature map. In the 3x3 branch, a 3x3 convolution operation is performed on the grouped features to capture feature representations of different scales, and then the output results are average pooled to generate the second attention feature map.

3. A photovoltaic panel fault detection method based on a multi-scale scaling feature fusion network according to claim 2, characterized in that: In the step S1, when performing cross-space learning, the two acquired attention feature maps are reconstructed by a two-dimensional global adaptive average pooling method, and then the reconstructed results are normalized by a softmax function to obtain standardized attention weights, and finally the normalized results are merged by element-by-element multiplication to generate a spatial attention map containing complete spatial position information; The reconstruction formula is as follows: Among them, C represents the number of input channels, H and W represent the spatial dimensions of the input features, namely the height and width, ∑ represents the accumulator, and x c represents the input features of the i-th row and j-th column of the C-th channel, It represents the sum of all pixel positions (i, j). The first summation symbol ∑ is the sum of the height H, and the second summation symbol ∑ is the sum of the width W.

4. A photovoltaic panel fault detection method based on a multi-scale scaling feature fusion network according to claim 3, characterized in that: In the step S1, an unstructured global pruning algorithm is used to prune the channels and weight parameters of the EMA module that has been optimized and processed through cross-space learning to obtain a PEMA module.

5. A photovoltaic panel fault detection method based on a multi-scale scaling feature fusion network according to claim 4, characterized in that: In the step S1, the feature fusion module uses the convolution layer and the nonlinear activation function to splice the output parts of the PEMA module and each Bottleneck layer to fuse the global information and the local information together.

6. A photovoltaic panel fault detection method based on a multi-scale scaling feature fusion network according to claim 1 or 5, characterized in that: In step S2, when the TS-WIoU loss function is used for training, the WIoU loss value is calculated according to the predicted box and the true box, and then the WIoU loss value is divided by the temperature parameter to adjust the size of the WIoU loss value. Finally, the gradient is recalculated according to the adjusted loss function, and then the back propagation process of the model is executed, and the model parameters are updated. The adjusted loss function is the TS-WIoU loss function.

7. A photovoltaic panel fault detection method based on a multi-scale scaling feature fusion network according to claim 6, characterized in that: In step S2, the calculation formula of the TS-WIoU loss function is as follows: Among them, p represents the predicted bounding box, i.e. the predicted box; g represents the true bounding box, i.e. the true box; IoU(p,g) is the intersection-over-union loss between the predicted box p and the true box g; CIoU(p,g) is the CIoU loss between the predicted box p and the true box g, which takes into account the overlapping area, center point distance and aspect ratio; α1 is the weight parameter of the IoU loss, β1 is the weight parameter of the CIoU loss; T is the temperature parameter used to adjust the influence of α1 and β1.

8. The photovoltaic panel fault detection method based on multi-scale scaling feature fusion network according to claim 7 is characterized in that: The calculation formula of WIoU loss value is as follows: in, * indicates that the size of the minimum bounding box is extracted separately for processing. Represents the square of the Euclidean distance between the center points of two bounding boxes, d 2 Represents the square of the distance between the predicted bounding box and the true bounding box. Areas A and B correspond to the true box and the predicted box, respectively. The IoU loss is used to measure the degree of overlap between the predicted box and the true box. β2 represents the outlier degree. α2 and δ are hyperparameters.

Citation Information

Patent Citations

  • Method and system for accurately predicting feeding quantity of rice and wheat combine harvester in real time

    CN118072168A

  • Hidden forbidden article detection method based on lightweight millimeter wave radar

    CN118823311A

  • Photovoltaic panel surface defect detection method based on pruning multi-scale feature fusion network

    CN120278992A

  • Occupancy grids for neural radiance fields

    US20240355038A1