Photovoltaic panel hot spot detection method based on dual-spectrum fusion

By combining infrared thermal imaging and visible light images in a dual-spectral fusion method, and utilizing convolutional neural networks and Transformer models, the problem of inaccurate hot spot detection on photovoltaic panels under strong light irradiation is solved, achieving high-precision and real-time hot spot detection, which is applicable to various photovoltaic systems.

CN118967996APending Publication Date: 2024-11-15HANGZHOU ELECTRIC POWER EQUIPMENT MANUFACTURING CO LTD XIAOSHAN XINMEI COMPLETE ELECTRICAL EQUIPMENT MANUFACTURING BRANCH +1
View PDF 0 Cites 7 Cited by

Patent Information

Application Number
CN202410965181.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

Existing methods for detecting hot spots on photovoltaic panels are inaccurate under strong light and have complex detection processes, making it impossible to achieve real-time monitoring and difficult to effectively integrate infrared thermal imaging and visible light image information.

Method used

A photovoltaic panel hot spot detection method based on dual-spectrum fusion is adopted, which combines infrared thermal imaging and visible light images. Feature fusion and encoding are performed through convolutional neural network and Transformer model. The model parameters are optimized by Dice Loss loss function and Adam optimizer to achieve accurate detection of hot spot location.

Benefits of technology

It improves the accuracy and robustness of hot spot detection, can accurately identify hot spots in complex environments, is applicable to various photovoltaic systems, and has versatility and real-time monitoring capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0004951550550000041
    Figure BDA0004951550550000041
  • Figure BDA0004951550550000042
    Figure BDA0004951550550000042
  • Figure BDA0004951550550000043
    Figure BDA0004951550550000043
Patent Text Reader

Abstract

The invention discloses a photovoltaic panel hot spot detection method based on dual-spectrum fusion, and the method comprises the steps: collecting paired infrared light images and visible light images of a photovoltaic panel, carrying out the preprocessing of the obtained paired images, inputting the preprocessed data into a constructed convolutional neural network, obtaining the features of the infrared light images and the features of the visible light images, and carrying out the detection of the hot spots of the photovoltaic panel. And then feature fusion, coding processing and decoding processing are carried out in sequence by using the constructed dual-spectrum fused photovoltaic panel hot spot detection model, and finally hot spot position information is obtained. The photovoltaic panel hot spot detection model based on double-spectrum fusion comprises a multi-spectrum fusion module, a Transform encoder and a Transform decoder which are connected in sequence. According to the method, the advantages of infrared thermal imaging and visible light images are combined, the hot spot detection precision can be greatly improved through fusion processing of the two different wave band images, and meanwhile the convenience of hot spot detection of the infrared photovoltaic panel is reserved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visual image data processing, and in particular to a photovoltaic panel hot spot detection method based on dual-spectrum fusion. Background Art

[0002] Photovoltaic panels, also known as solar panels, play a vital role in photovoltaic power generation systems. However, during long-term operation, photovoltaic panels may produce hot spot effects due to local shading, component aging, or manufacturing defects.

[0003] The hot spot effect not only reduces the power generation efficiency of photovoltaic panels, but may also cause safety problems, such as excessively high temperatures in the hot spot area, which may cause the photovoltaic panel materials to burn. Therefore, timely and accurate detection and location of hot spots on photovoltaic panels is of great significance for maintaining the normal operation and safety of photovoltaic power generation systems.

[0004] At present, there are two main methods for hot spot detection: one is the hot spot detection of photovoltaic panels based on infrared thermal imaging technology. This method uses infrared thermal imaging technology to obtain the temperature distribution image on the surface of the photovoltaic panel, identify the area with abnormal temperature, and thus detect the hot spot. This method has the advantages of non-contact, fast and intuitive, but the infrared thermal imager is easily disturbed by the ambient temperature and reflected light under strong light, which makes the detection result inaccurate and affects the detection accuracy. Another method is to measure the current, voltage and other parameters of the photovoltaic panel, analyze its working status, and detect the area where the hot spot appears. However, this method requires professional electrical testing equipment, the detection process is complicated, the workload is large, and the detection process may require downtime, which affects the benefits of photovoltaic power generation, and cannot achieve real-time monitoring and dynamic management.

[0005] Infrared thermal imaging is used to obtain a wide range of photovoltaic panel hot spot detection results, and visible light images are used to reduce the misjudgment of hot spots caused by reflections. This method can well make up for the defects of photovoltaic panel hot spot detection based solely on infrared thermal imaging technology. However, how to effectively integrate the information of the two is an urgent problem to be solved. Summary of the invention

[0006] In order to effectively utilize infrared thermal imaging and visible light images, the information of the two can be effectively integrated. This invention proposes a photovoltaic panel hot spot detection method based on dual-spectrum fusion, which combines the advantages of infrared thermal imaging and visible light images. By fusing the two different band images, the hot spot detection accuracy can be greatly improved, while retaining the convenience of infrared photovoltaic panel hot spot detection.

[0007] A photovoltaic panel hot spot detection method based on dual-spectrum fusion includes: collecting paired infrared light images and visible light images of photovoltaic panels, preprocessing the obtained paired images, inputting the preprocessed data into a constructed convolutional neural network to obtain infrared light image features and visible light image features, and then using a constructed dual-spectrum fusion photovoltaic panel hot spot detection model to perform feature fusion, encoding processing and decoding processing in sequence to finally obtain hot spot position information; the dual-spectrum fusion photovoltaic panel hot spot detection model includes a multi-spectrum fusion module, a Transformer encoder and a Transformer decoder connected in sequence.

[0008] Furthermore, a photovoltaic panel hot spot detection method based on dual-spectrum fusion includes the following steps:

[0009] (1) Collecting pairs of infrared light images and visible light images of the photovoltaic panel to be inspected;

[0010] (2) Preprocess the infrared image and visible light image to transform the data into the form of model input.

[0011] (3) Use the optimized convolutional neural network to extract the features of infrared images and visible light images respectively.

[0012] (4) The features of the extracted infrared light image and visible light image are input into the optimized dual-spectrum fusion photovoltaic panel hot spot detection model to obtain the predicted position of the light spot.

[0013] A photovoltaic panel hot spot detection method based on dual-spectrum fusion includes the following steps:

[0014] (1) Collect pairs of infrared images and visible light images.

[0015] (2) Preprocess the infrared images and visible light images and transform the data into the form of model input.

[0016] (3) Use pre-trained convolutional neural networks to extract features of infrared images and visible light images respectively.

[0017] (4) A photovoltaic panel hot spot detection model for dual-spectrum fusion is proposed. This model fully integrates the dual-spectrum features to obtain better feature representation.

[0018] (5) The shallow features extracted by the pre-trained convolutional neural network are fused by the multi-spectral fusion module. After the feature fusion, the photovoltaic panel hot spot detection model with dual spectrum fusion is used to extract more advanced features to ensure that the hot spot features are more obvious and easier to identify in the fused feature space.

[0019] (6) Use the Dice Loss function to estimate the error between the actual position and the predicted position of the hot spot.

[0020] (7) The Adam optimizer is used to optimize the parameters. The optimized parameters can accurately detect photovoltaic hot spots.

[0021] (8) Use the trained hot spot detection model for detection.

[0022] In the model training (optimization) stage, the photovoltaic panel hot spot detection model of the convolutional neural network and dual-spectrum fusion also collects paired infrared light images and visible light images as training data sets, uses the corresponding actual light spot position information to estimate the model training error, and then optimizes the model parameters. Specifically, it includes the following steps:

[0023] (1) Collect multiple sets of paired infrared and visible light images of photovoltaic panels.

[0024] (2) Preprocess the collected infrared images and visible light images and transform the data into the form of model input.

[0025] (3) Use pre-trained convolutional neural networks to extract features of infrared images and visible light images respectively.

[0026] (4) Inputting the extracted features of the infrared image and the visible light image into the dual-spectrum fusion photovoltaic panel hot spot detection model to obtain the predicted position of the light spot;

[0027] (5) Use the loss function to estimate the error between the actual position and the predicted position of the hot spot.

[0028] (7) Use Adam optimizer to optimize parameters.

[0029] The optimized parameters are used as the parameters of the final convolutional neural network and dual-spectrum fusion photovoltaic panel hot spot detection model, which can accurately detect photovoltaic hot spots. Detection using the trained hot spot detection model

[0030] During the modeling and actual detection process, the shallow features extracted by the convolutional neural network are fused by using the multi-spectral fusion module in the dual-spectrum fusion photovoltaic panel hot spot detection model. After the feature fusion, the encoder and decoder in the dual-spectrum fusion photovoltaic panel hot spot detection model are used to extract higher-level features to ensure that the hot spot features are more obvious and easier to identify in the fused feature space. The dual-spectrum fusion photovoltaic panel hot spot detection model can fully fuse the dual-spectrum features to obtain better feature representation.

[0031] During model optimization or actual detection, the preprocessing mainly uses normalization. The normalization formula for RGB images (visible light images) is:

[0032] I v=(R / 255,G / 255,B / 255)

[0033] Among them I v is the transformed visible light image tensor, RGB is the three channels of the image.

[0034] For infrared images, they exist as grayscale images, and their normalization formula is:

[0035]

[0036] Gray is the gray value of the infrared image, I i is the transformed infrared image tensor.

[0037] Furthermore, the convolutional neural network uses two Resnet50 networks. When using the convolutional neural network to extract features from infrared images and visible light images respectively: for visible light images, during the model training phase or actual detection, the corresponding convolutional neural network uses fixed weights, which are pre-trained weights based on ImageNet; for infrared images, during the model training phase, the initial weight value uses the pre-trained weight based on ImageNet, and the final value is obtained by model training optimization; during actual detection, the optimized model parameters are used.

[0038] During model optimization or actual detection process, in the multispectral fusion module:

[0039] The obtained infrared image features and visible light image features are linearly mapped respectively, and the mapping results are then normalized by layers, and then the position coding information is added to obtain the corresponding intermediate values ​​of the infrared light feature tensor and the visible light feature tensor, and finally the feature tensor of infrared light and visible light fusion is obtained by using a feedforward neural network. The corresponding formula of the multi-spectral fusion module is:

[0040]

[0041] Among them, f g is the infrared light feature tensor feature g The intermediate representation, f v is the visible light feature tensor feature v The output is the output of the multi-spectral fusion module, that is, the feature tensor corresponding to the fusion of infrared light and visible light. g With f v They all use a similar processing mode, that is, linear mapping is first performed through linear and then through layer normalization, and then the corresponding position encoding value is added. LN stands for layer normalization, and PE stands for position encoding. The formula for layer normalization is as follows:

[0042]

[0043] Where μ is the mean and σ is the standard deviation. These two values ​​are obtained by counting x. x is the layer normalization input. w and b perform affine transformation on the normalized result. These two variables will be updated during back propagation, i.e., the model training phase.

[0044] The position encoding formula is as follows:

[0045]

[0046] The position encoding is a matrix, PE (pos,2i) Represents the value at position (pos,2i) of this matrix.

[0047] FFN refers to a feedforward neural network, which can be well represented after the input passes through the attention mechanism. The expressive power of this part of the representation can be well enhanced through the feedforward neural network and its activation function.

[0048] Furthermore, the Transformer encoder adopts a self-attention mechanism, taking the feature tensor of infrared light and visible light fusion as input, and outputting it as the input of the subsequent decoder. The formula of the Transformer encoder is:

[0049]

[0050] Where X is the input feature matrix. In the present invention, X is the fused feature, that is, the feature tensor of infrared light and visible light fusion, and its shape is (t, d). Here t is the number of feature blocks after the feature map is segmented, and d is the number of channels of the feature map. The definition of the Softmax function is given below:

[0051]

[0052] Where S is a vector containing C elements, s i is the i-th element of S. Through the Softmax function, each element in S can be converted into a probability distribution in the range [0,1] and 1. In the self-attention mechanism, the input X of the Softmax function is regarded as t vectors containing d elements, each vector is S, and each vector is used as an input.

[0053] Furthermore, the Transformer decoder adopts a cross-attention mechanism; in the decoder, the infrared image features are obtained by a convolutional neural network as the query vector of the decoder; the output of the Transformer encoder is used as the key vector and value vector of the decoder. Specifically, the decoder needs to accept the output obtained by the encoder and the original feature tensor at the same time, which is implemented based on the cross-attention mechanism, and its formula is:

[0054]

[0055] The KVQ in the attention mechanism refers to the query vector Q, the key vector K and the value vector V respectively. By calculating the similarity between the query and the key, the value is weighted and summed, thereby dynamically selecting and aggregating the input information. In the present invention, K and V are taken as the output of the encoder, and Q is taken as the infrared light feature tensor.

[0056] In general, the present invention fuses the shallow features extracted by the pre-trained convolutional neural network using a multi-spectral fusion module. The fused feature y1 is input into the Transformer encoder, and its output y2 is used as the Key-Value (key vector K and value vector V) of the decoder. At the same time, the infrared light feature tensor is used as the Query (query vector Q) of the decoder. The final output output is the detected hot spot location information. This process can be written as:

[0057]

[0058] Fusion refers to the multi-spectral fusion module proposed in the present invention, Encoder refers to the Transformer encoder mentioned above, whose input is the output y1 of the multi-spectral fusion module, and the fused features are input to the encoder to obtain the encoded output y2, which is used as the K, V of the subsequent Decoder, i.e., the Transformer decoder, and the infrared light feature map feaure g As the Q of the decoder, the output obtained is the photovoltaic hot spot position data.

[0059] Furthermore, the convolutional neural network and dual-spectrum fusion photovoltaic panel hot spot detection model uses the loss function of the Hungarian matching algorithm to estimate the error during model training; and uses the Adam optimizer to optimize the model parameters. The output obtained by the dual-spectrum fusion photovoltaic panel hot spot detection model is a (N, n+1) matrix, which can be understood as N vectors of length n+1, where N represents the number of predicted targets, which is adjusted as a hyperparameter. The n+1 values ​​of the vector are the n coordinate values ​​of a bounding box. and 1 probability value predicted to be a hot spot For example, for a light spot delineated by a rectangular box, n is 4. The number of targets detected by the model will be much larger than the number of hot spots in the real picture. We use the Hungarian matching algorithm to perform a one-to-one match between the prediction and the actual target. The algorithm is based on a cost matrix that pairs each prediction with the actual target to minimize the total cost. The cost function consists of the classification loss and the bounding box regression loss:

[0060]

[0061] in is the cross entropy loss, which measures the difference between the predicted category and the true category.

[0062] It can be written

[0063]

[0064] The value of p is 1 or 0, which is 1 when the detection target is a hot spot and 0 otherwise. is the probability value of the hot spot mentioned above. cls It is used as a hyperparameter to scale the weight of the cross entropy loss.

[0065] It is used to measure the difference in position and shape between the predicted bounding box and the true bounding box.

[0066]

[0067] Where b corresponds to the four coordinate values ​​detected, Corresponding to the correct four coordinate values. l1 Used to scale the weight of L1 loss.

[0068] With such a loss function, the model is able to optimize both classification and bounding box regression during training. The Hungarian matching algorithm ensures a one-to-one matching strategy, which helps with more stable training and more accurate predictions.

[0069] The present invention uses the Adam optimizer to optimize the model parameters. The working principle of the Adam optimizer is as follows: the updated model weight w t The calculation formula is:

[0070]

[0071] Among them, w t is the updated model weight, w t-1 is the model weight at the previous moment, α is the learning rate, ∈ is a fixed value to maintain numerical stability, is the gradient mean term, is the squared gradient term. and First, calculate the gradient change g t :

[0072]

[0073] L is the loss function mentioned above, It is a gradient operator, which means to calculate the partial derivative of the parameter θ, which refers to the model weight w t-1 The gradient vector it generates contains the partial derivatives of the objective function L with respect to each parameter.

[0074] Gradient mean term The calculation method is:

[0075]

[0076] Where β1 is the momentum coefficient, which is used to control the rate at which the gradient mean changes. The calculation method is:

[0077]

[0078] Where β2 is another momentum coefficient, which is used to control the rate at which the square of the gradient changes. By training with the Adam optimizer, the model will be able to achieve good photovoltaic hot spot detection capabilities.

[0079] During actual detection, the hot spot location information is obtained using the dual-spectrum fusion photovoltaic panel hot spot detection model; the hot spot location information includes the bounding box coordinate value information and the hot spot probability value information, and the hot spot probability threshold is used for judgment. The detection result greater than the set threshold is output as the final hot spot detection result.

[0080] Compared with the prior art, the present invention has the following beneficial effects:

[0081] The photovoltaic panel hot spot detection method based on dual-spectrum fusion of the present invention uses dual-light fusion images to detect the combustion state. The fused image not only has the detail information of the visible light image, but also contains the temperature information of the infrared image. It fully utilizes the complementary characteristics of the two images, can maintain high robustness in complex environments and under different combustion conditions, can more comprehensively and accurately reflect the boiler combustion state, and improves the detection accuracy. A non-contact machine vision detection method is adopted. Through different boiler flame data sets, a variety of fuel combustion modes can be processed, including layer combustion, chamber combustion and boiling combustion. It is suitable for various types of thermal power system boilers and has strong versatility. Using continuous multi-frame flame images as the input of the three-dimensional classification model, it can dynamically capture and analyze the changes in the combustion state, and provide more reliable combustion state monitoring and classification results.

[0082] Compared with the prior art, the advantages of the present invention are:

[0083] The present invention proposes a photovoltaic panel hot spot detection method based on dual-spectrum fusion. This method makes full use of the complementary characteristics of infrared thermal imaging and visible light images, and can reduce the problem of hot spot misjudgment caused by reflection. Compared with using only infrared thermal imaging, this method shows higher robustness in complex environments and different lighting conditions, and can more comprehensively and accurately reflect the hot spot status of photovoltaic panels. In addition, by using different photovoltaic panel hot spot data sets, this method can handle photovoltaic panels of various types and installation methods, is applicable to various types of photovoltaic systems, and has strong versatility. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] Figure 1 It is a schematic diagram of the steps of the hot spot detection method of photovoltaic panels using dual-spectrum fusion according to the present invention. DETAILED DESCRIPTION

[0085] In order to more conveniently describe the present invention, the technical solution of the present invention is described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0086] like Figure 1 As shown, a photovoltaic panel hot spot modeling or detection method based on dual-spectrum fusion includes the following steps: (4) proposing a photovoltaic panel hot spot detection model for dual-spectrum fusion, through which the dual-spectrum features are fully integrated to obtain better feature representation.

[0087] (1) Collecting a pair of infrared light images and visible light images. In one embodiment of the present invention, the resolution of the infrared light image is 1024×1024, and the resolution of the visible light image is 1024×1024.

[0088] (2) Regularization preprocessing is performed on the multispectral data. In this embodiment, normalization processing is adopted. The normalization formula for the RGB image (visible spectrum image) is:

[0089] I v = (R / 255,G / 255,B / 255) (1)

[0090] Among them I v is the transformed visible light image tensor, RGB is the three channels of the image.

[0091] Infrared (light) images exist as grayscale images, and their normalization formula is:

[0092]

[0093] Gray is the gray value of the infrared image, I i is the transformed infrared image tensor.

[0094] (3) Pre-trained convolutional neural network. The present invention uses a pre-trained convolutional neural network to extract features from infrared images and visible light images respectively. This operation converts the original image data into a better representation while achieving a large-scale downsampling, which greatly reduces the computational complexity of subsequent operations. Because visible light features are significantly different from infrared light features, we use two pre-trained convolutional neural networks here. For the visible light image tensor, its pre-trained convolutional neural network will fix the weights. This is because the pre-trained convolutional neural network is trained on visible light images. For visible light images, a better image representation can be obtained. By fixing the weights, the computational complexity of network training can be reduced, and at the same time, the good pre-trained weights can be prevented from being damaged. The visible light image obtains a visible light feature tensor through the network. For the pre-trained convolutional neural network of the infrared image, its weights participate in back propagation for parameter optimization. Because the convolutional neural network pre-trained on the visible light data set cannot obtain a good infrared image representation, the infrared light image obtains an infrared light feature tensor through the network.

[0095] Through step (2), the infrared light feature map and the visible light feature map corresponding to the infrared light image and the visible light image are obtained respectively. In one embodiment of the present invention, we use two Resnet50 networks, both of which use pre-trained weights based on ImageNet. Through these two networks, we obtain an infrared light feature tensor with a shape of (2048, 8, 8), and the shape of the visible light feature tensor is consistent with the infrared light feature vector (2048, 8, 8).

[0096] (4) Photovoltaic panel hot spot detection model based on dual spectrum fusion. The photovoltaic panel hot spot detection model based on dual spectrum fusion proposed in the present invention is a DETR-based model, which consists of three parts: dual spectrum fusion module, Transformer encoder and Transformer decoder, which are introduced separately below.

[0097] In order to effectively fuse the visible light feature tensor and infrared light feature tensor obtained in (3) to obtain better accuracy, we made some improvements to the original DETR structure. Specifically, we designed a multi-spectral fusion module, whose formula is:

[0098]

[0099] Among them, f g is the infrared light feature tensor feature g The intermediate representation, f v is the visible light feature tensor feature v The intermediate representation of f g With f vThey all use a similar processing mode, that is, linear mapping is first performed through linear, and then layer normalization is performed and the corresponding position encoding value is added. LN stands for layer normalization, and PE stands for position encoding. Output is the output of the multi-spectral fusion module, that is, the fused spectral features. The formula for layer normalization is as follows:

[0100]

[0101] Where μ is the mean and σ is the standard deviation, which are obtained by counting x. x is the normalized input of the layer, and w and b perform affine transformation on the normalized result. These two improvements will be updated during back propagation.

[0102] The position encoding formula is as follows:

[0103]

[0104] The position encoding is a matrix, PE (pos,2i) Represents the value at position (pos,2i) of this matrix.

[0105] FFN refers to a feedforward neural network, which can be well represented after the input passes through the attention mechanism. The expressive power of this part of the representation can be well enhanced through the feedforward neural network and its activation function.

[0106] The core of the encoder is the self-attention mechanism, whose formula is:

[0107]

[0108] Where X is the input feature matrix, that is, the output fusion feature matrix of the dual-spectrum fusion module, and its shape is (t, d). Here t is the number of feature blocks after the feature map is split, and d is the number of channels of the feature map. The definition of the Softmax function is given below:

[0109]

[0110] Where S is a vector containing C elements, s i is the i-th element of S. Through the Softmax function, each element in S can be converted into a probability distribution in the range [0,1] and 1. In the self-attention mechanism, the input X of the Softmax function is regarded as t vectors containing d elements, each of which is S in (4).

[0111] The decoder needs to accept the output of the encoder and the original feature tensor at the same time. This is achieved based on the cross-attention mechanism, and its formula is:

[0112]

[0113] KVQ in the attention mechanism refers to the query vector Q, the key vector K, and the value vector V, respectively. By calculating the similarity between the query and the key, the value is weighted and summed, thereby dynamically selecting and aggregating input information. In the present invention, K and V are taken as the output of the encoder, and Q is taken as the infrared light feature tensor. We describe the complete process in detail in (5) and the attached figure.

[0114] (5) The shallow features extracted by the pre-trained convolutional neural network are fused using the multi-spectral fusion module. The fused features are input into the Transformer encoder, and its output is used as the key-value of the decoder. g As the query of the decoder, the final output is the detected hot spot location information. This process can be written as:

[0115]

[0116] The above formula is the specific structure of the photovoltaic panel hot spot detection model of dual-spectrum fusion of the present invention, where Fusion refers to the multi-spectral fusion module proposed in the present invention, and Encoder refers to the Transformer encoder mentioned above. Its input is the output y1 of the multi-spectral fusion module. The fused feature is input into the encoder to obtain the encoded output y2, and the encoded output y2 is used as the K, V of the subsequent Decoder, i.e., the Transformer decoder, and the infrared light feature map feature g As the Q of the decoder, the output obtained is the output of the photovoltaic panel hot spot detection model of dual-spectrum fusion, that is, the photovoltaic hot spot position data.

[0117] (6) During the modeling process, the loss function is used to estimate the error. The output obtained by the photovoltaic panel hot spot detection model using dual spectrum fusion is a (N, 5) matrix, which can be understood as N vectors of length 5, where N represents the number of predicted targets, which is adjusted as a hyperparameter and is 64 in one embodiment of the present invention. The five values ​​of the vector are the four coordinate values ​​of a bounding box. and the probability value of being a hot spot The number of targets detected by the model will be much larger than the number of hot spots in the real picture. We use the Hungarian matching algorithm to perform a one-to-one match between the prediction and the actual target. The algorithm is based on a cost matrix that pairs each prediction with the actual target to minimize the total cost. The cost function consists of the classification loss and the bounding box regression loss:

[0118]

[0119] in is the cross entropy loss, which measures the difference between the predicted category and the true category. It can be written as

[0120]

[0121] The value of p is 1 or 0, which is 1 when the detection target is a hot spot and 0 otherwise. is the probability value of the hot spot mentioned above. cls It is used as a hyperparameter to scale the weight of the cross entropy loss.

[0122] It is used to measure the difference in position and shape between the predicted bounding box and the true bounding box.

[0123]

[0124] Where b corresponds to the four coordinate values ​​detected, Corresponding to the correct four coordinate values. l1 It is used as a hyperparameter to scale the weight of L1 loss.

[0125] With such a loss function, the model is able to optimize both classification and bounding box regression during training. The Hungarian matching algorithm ensures a one-to-one matching strategy, which helps with more stable training and more accurate predictions.

[0126] (7) During the modeling process, the present invention uses the Adam optimizer to optimize the model parameters. The working principle of the Adam optimizer is as follows: the updated model weight w t The calculation formula is:

[0127]

[0128] Among them, w t is the updated model weight, w t-1 is the model weight at the previous moment, α is the learning rate, ∈ is a fixed value to maintain numerical stability, is the gradient mean term, is the squared gradient term. and First, calculate the gradient change g t :

[0129]

[0130] L is the loss function mentioned above, It is a gradient operator, which means to calculate the partial derivative of the parameter θ, which refers to the model weight w t-1 The gradient vector it generates contains the partial derivatives of the objective function L with respect to each parameter.

[0131] Gradient mean term The calculation method is:

[0132]

[0133] Where β1 is the momentum coefficient, which is used to control the rate at which the gradient mean changes. The calculation method is:

[0134]

[0135] Where β2 is another momentum coefficient, which is used to control the rate at which the square of the gradient changes. By training with the Adam optimizer, the model will be able to achieve good photovoltaic hot spot detection capabilities.

[0136] In one embodiment of the present invention, α is 0.0003, and β2 and β2 are 0.99 respectively.

[0137] (8) Detect photovoltaic hot spots. After the model is trained, the image can be input into the model for prediction.

[0138] To further improve the detection accuracy, we use a threshold processing method to determine the final output. In one embodiment of the present invention, the detection result with a predicted hot spot probability greater than 0.8 is used as the final hot spot output.

[0139] Finally, it should be noted that the above examples are only for illustrating the patent of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail based on the examples, it should be understood by those skilled in the art that any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A photovoltaic panel hot spot detection method based on dual spectrum fusion, characterized in that: include: Paired infrared images and visible light images of photovoltaic panels are collected, the obtained paired images are preprocessed, and the preprocessed data are input into the constructed convolutional neural network to obtain infrared image features and visible light image features. Then, the constructed dual-spectrum fusion photovoltaic panel hot spot detection model is used to perform feature fusion, encoding processing and decoding processing in sequence to finally obtain the hot spot location information; the dual-spectrum fusion photovoltaic panel hot spot detection model includes a multi-spectrum fusion module, a Transformer encoder and a Transformer decoder which are connected in sequence.

2. The photovoltaic panel hot spot detection method based on dual spectrum fusion according to claim 1 is characterized in that: In the multispectral fusion module: The obtained infrared image features and visible light image features are linearly mapped respectively, and the mapping results are normalized by layers. Then the position encoding information is added to obtain the intermediate values ​​of the corresponding infrared light feature tensor and visible light feature tensor respectively. Finally, a feedforward neural network is used to obtain the feature tensor of infrared and visible light fusion.

3. The photovoltaic panel hot spot detection method based on dual spectrum fusion according to claim 1, characterized in that: The Transformer encoder adopts a self-attention mechanism, takes the feature tensor of infrared light and visible light fusion as input, and outputs it as the input of the subsequent decoder.

4. The photovoltaic panel hot spot detection method based on dual spectrum fusion according to claim 1, characterized in that: The Transformer decoder adopts a cross-attention mechanism; in the decoder, a convolutional neural network is used to obtain infrared image features as a query vector of the decoder; and the output of the Transformer encoder is used as a key vector and a value vector of the decoder.

5. The photovoltaic panel hot spot detection method based on dual spectrum fusion according to claim 1, characterized in that: When using convolutional neural networks to extract features for infrared images and visible light images respectively: for visible light images, the corresponding convolutional neural network uses fixed weights, which are pre-trained weights based on ImageNet; for infrared images, the initial weight values ​​use pre-trained weights based on ImageNet, and the final values ​​are obtained by model training optimization.

6. The photovoltaic panel hot spot detection method based on dual spectrum fusion according to claim 1, characterized in that: The convolutional neural network is a Resnet50 network.

7. The photovoltaic panel hot spot detection method based on dual spectrum fusion according to claim 1, characterized in that: The photovoltaic panel hot spot detection model using convolutional neural network and dual-spectrum fusion uses the loss function of the Hungarian matching algorithm to estimate the error during model training; and uses the Adam optimizer to optimize the model parameters.

8. The photovoltaic panel hot spot detection method based on dual spectrum fusion according to claim 1, characterized in that: During detection, the hot spot location information is obtained using the dual-spectrum fusion photovoltaic panel hot spot detection model; the hot spot location information includes the bounding box coordinate value information and the hot spot probability value information, and the hot spot probability threshold is used for judgment. The detection result greater than the set threshold is output as the final hot spot detection result.

Citation Information

Cited By

  • Generative countermeasure simulation and early warning method for hot spots of photovoltaic backboard

    CN120411639A

  • Photovoltaic module cleaning method and device based on image processing and electronic equipment

    CN120454621A

  • Photovoltaic hot spot detection method and system based on visible light and thermal infrared image fusion

    CN120495302A

  • Photovoltaic hot spot detection method and system based on visible light and thermal infrared image fusion

    CN120495302B

  • Photovoltaic panel hot spot detection optimization method based on double-model dynamic architecture

    CN120876478A