Hot spot defect detection method and device of photovoltaic module, storage medium, electronic device and computer program product

By adopting the target convolutional neural network model in the detection of hot spot defects of photovoltaic modules, using the attention weights at the channel level and scale level to process the feature map, the problem of low detection accuracy in the existing technology is solved, and higher detection is achieved Accuracy and robustness.

CN119048444APending Publication Date: 2024-11-29HUANENG JILIN POWER GENERATION JIUTAI ELECTRIC FACTORY +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411087005.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The existing thermal spot defect detection methods for photovoltaic modules have low detection accuracy, especially in complex natural environments, it is difficult to effectively distinguish defect characteristics from background noise, and the feature representation ability of traditional CNN models is insufficient.

Method used

Using the target convolutional neural network model, feature processing is performed to improve detection accuracy by determining the attention weight of the feature map at the channel level and scale level. The specific methods include pooling processing and splicing feature representation at the channel level and scale level. , and use activation functions and fully connected layers to calculate attention weights, perform channel-by-size-fits-by-size feature transformation.

Benefits of technology

The detection accuracy of thermal spot defect detection of photovoltaic modules is improved, the ability to capture and distinguish multi-scale features is enhanced, and the accuracy and robustness of detection is significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048444A_ABST
    Figure CN119048444A_ABST
Patent Text Reader

Abstract

The invention discloses a hot spot defect detection method and device for a photovoltaic module, a storage medium, an electronic device and a computer program product, and relates to the field of photovoltaic module detection.The hot spot defect detection method for the photovoltaic module comprises the steps that the attention weight of a specified feature map at a channel level is determined, and a first attention weight is obtained, the specified feature map is a feature map obtained by processing an image of the photovoltaic module; determining the attention weight of the specified feature map at the scale level to obtain a second attention weight; performing feature processing on the specified feature map according to the first attention weight and the second attention weight to obtain a target feature map; and carrying out hot spot defect detection on the photovoltaic module based on the target feature map. By adopting the technical scheme, the problem that the detection accuracy of hot spot defect detection of the photovoltaic module by a traditional method is relatively low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of photovoltaic module detection, and more specifically, to a method and device for detecting hot spot defects of photovoltaic modules, a storage medium, an electronic device, and a computer program product. Background Art

[0002] Photovoltaic stations have been widely used around the world as a way to produce clean energy. However, photovoltaic stations will have various defects during long-term operation. Hot spot defects caused by local high temperatures due to failure or damage of some components are one of the most common and influential defects. Hot spot defects will not only reduce the power generation efficiency of photovoltaic cells, but also shorten their service life and may even cause safety accidents. Therefore, timely and accurate detection and positioning of hot spot defects are crucial to ensure the normal operation and safety of photovoltaic stations.

[0003] In the related technologies, the hot spot defect detection method for photovoltaic stations mainly relies on manual inspection and thermal imaging technology. However, manual inspection is not only inefficient, but also mainly relies on the experience of the inspectors, which is prone to missed detection and misjudgment. Although thermal imaging technology can provide a certain degree of automated detection means, the accuracy and robustness of the detection results still need to be improved when faced with complex backgrounds and multiple interference factors.

[0004] In recent years, with the development of deep learning technology, especially the widespread application of convolutional neural networks (CNN) in the field of image processing, automatic defect detection methods based on CNN have gradually become a research hotspot. However, existing CNN-based methods still face many problems in the detection of hot spot defects in photovoltaic stations. For example, the natural environment of photovoltaic stations is relatively complex and contains many interference factors. In addition, hot spot defects in photovoltaic stations may show features of different scales, from tiny local hot spots to larger regional defects. Traditional single-scale feature extraction methods are difficult to fully capture these multi-scale features, resulting in insufficient detection accuracy and robustness. Finally, the feature representation capability is limited: the existing CNN model has limitations in feature representation, especially when dealing with targets with high complexity and variability such as hot spot defects in photovoltaic stations, the feature representation capability is insufficient, and it is difficult to effectively distinguish defect features from background noise.

[0005] In view of the problem in related technologies that traditional methods have low detection accuracy for hot spot defect detection of photovoltaic modules, no effective solution has been proposed so far.

[0006] Therefore, it is necessary to improve the related technology to overcome the above-mentioned defects in the related technology. Summary of the invention

[0007] The embodiments of the present invention provide a method and device, a storage medium, an electronic device, and a computer program product for detecting hot spot defects of photovoltaic modules. The problem that the traditional method for detecting hot spot defects of photovoltaic modules has low detection accuracy is solved.

[0008] According to one aspect of an embodiment of the present invention, a method for hot spot defect detection of photovoltaic components is provided, which is applied to a target convolutional neural network model, wherein the target convolutional neural network model is used to perform hot spot defect detection on photovoltaic components, including: determining an attention weight of a specified feature map at a channel level to obtain a first attention weight, wherein the specified feature map is a feature map obtained after processing an image of the photovoltaic component; and determining an attention weight of the specified feature map at a scale level to obtain a second attention weight; performing feature processing on the specified feature map according to the first attention weight and the second attention weight to obtain a target feature map; and performing hot spot defect detection on the photovoltaic components based on the target feature map.

[0009] In an exemplary embodiment, the designated feature map is pooled at N different scales to obtain N feature representations; the N feature representations are concatenated to obtain a target feature representation; and the first attention weight is determined using the following formula: m = σ(f C (δ(f 21C / r (S)))); where m is the first attention weight, S is the target feature representation, and f C and f 21C / r is the fully connected layer, f C The output dimension of f is C, 21C / r The output dimension of is 21C / r, C is the number of channels of the specified feature map, r is the reduction ratio, σ is the activation function, and δ is the function of refining features.

[0010] In an exemplary embodiment, determining the attention weight of the specified feature map at the scale level to obtain the second attention weight includes: performing pooling processing on the specified feature map at N different scales to obtain N feature representations; splicing the N feature representations to obtain a target feature representation; and determining the second attention weight using the following formula: e=σ(f1(δ(f 21C / r (S)))); where e is the second attention weight, S is the target feature representation, f1 and f 21C / r is a fully connected layer, the output dimension of f1 is 1, and f 21C / r The output dimension of is 21C / r, C is the number of channels of the specified feature map, r is the reduction ratio, σ is the activation function, and δ is the function of refining features.

[0011] In an exemplary embodiment, feature processing is performed on the designated feature map according to the first attention weight and the second attention weight to obtain a target feature map, including: using the first attention weight to perform channel level conversion on the designated feature map to obtain a reference feature map; using the second attention weight to perform scale level conversion on the reference feature map to obtain the target feature map.

[0012] In an exemplary embodiment, performing channel level conversion on the designated feature map using the first attention weight to obtain a reference feature map includes: determining the reference feature map using the following formula: Wherein, U is the reference feature map, m is the first attention weight, I is the specified feature map, is channel-by-channel multiplication.

[0013] In an exemplary embodiment, using the second attention weight to perform scale-level conversion on the reference feature map to obtain the target feature map includes: determining the target feature map using the following formula: Wherein, U is the reference feature map, e is the second attention weight, O is the target feature map, is channel-by-channel multiplication.

[0014] According to another aspect of an embodiment of the present invention, a hot spot defect detection device for a photovoltaic component is also provided, including: a first determination module, used to determine the attention weight of a specified feature map at a channel level through a target convolutional neural network model, and obtain a first attention weight, wherein the specified feature map is a feature map obtained after processing the image of the photovoltaic component; a second determination module, used to determine the attention weight of the specified feature map at a scale level through the target convolutional neural network model, and obtain a second attention weight; a processing module, used to perform feature processing on the specified feature map according to the first attention weight and the second attention weight through the target convolutional neural network model, and obtain a target feature map; a detection module, used to perform hot spot defect detection on the photovoltaic component based on the target feature map through the target convolutional neural network model.

[0015] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned hot spot defect detection method for photovoltaic components when running.

[0016] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the hot spot defect detection method for photovoltaic components through the computer program.

[0017] According to another aspect of the embodiments of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the above-mentioned method for detecting hot spot defects of photovoltaic modules is implemented.

[0018] Through the present invention, the attention weights of the feature map at the channel level and the scale level are determined to obtain the first attention weight and the second attention weight, and then the feature map is feature processed according to the first attention weight and the second attention weight to further obtain the target feature map, and the hot spot defect detection is performed on the corresponding photovoltaic module according to the target feature map. Since the feature map is processed at the channel level and the scale level respectively, the detection accuracy of the hot spot defect detection of the photovoltaic module is improved, and the problem of low detection accuracy of the hot spot defect detection of the photovoltaic module by the traditional method is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0021] Figure 1 It is a hardware structure block diagram of a mobile terminal of a method for detecting hot spot defects of photovoltaic modules according to an embodiment of the present invention;

[0022] Figure 2 is a flow chart of a method for detecting hot spot defects of photovoltaic modules according to an embodiment of the present invention;

[0023] Figure 3 is a schematic diagram of an optional implementation of a scale-aware attention mechanism according to an embodiment of the present invention;

[0024] Figure 4 It is a structural block diagram of hot spot defect detection of photovoltaic modules according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for detecting hot spot defects of a photovoltaic module according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor (Central Processing Unit, MCU) or a programmable logic device (Field Programmable Gate Array, FPGA)) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0028] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the hot spot defect detection method of the photovoltaic module in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0029] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0030] In order to solve the above problems, a method for detecting hot spot defects of photovoltaic modules is provided in this embodiment, which is applied to a target convolutional neural network model. The target convolutional neural network model is used to detect hot spot defects of photovoltaic modules. Figure 2 is a flow chart of a method for detecting hot spot defects of a photovoltaic module according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps S202-S208:

[0031] Step S202: determining an attention weight of a specified feature map at a channel level to obtain a first attention weight, wherein the specified feature map is a feature map obtained by processing the image of the photovoltaic module;

[0032] Optionally, the convolutional neural network extracts features by applying multiple convolution kernels on the image of the photovoltaic module. These convolution kernels perform convolution operations on the image of the photovoltaic module in a sliding window manner to generate a feature map, which reflects feature information at different locations.

[0033] It should be noted that the channel level refers to the processing and analysis of feature maps at different levels in the convolutional neural network model. In the convolutional neural network model, channels at different levels can extract features at different levels, thereby better identifying different features in the image.

[0034] It should be noted that the attention weight is a parameter used to guide the convolutional neural network model to focus on and learn important features during deep learning of the convolutional neural network model.

[0035] In hot spot defect detection, by determining the attention weight of a specific feature map at the channel level, the model can pay more attention to and learn features related to hot spot defects, thereby improving detection accuracy and effectiveness.

[0036] In an exemplary embodiment, the above step S202 can be implemented by the following steps S11-S13:

[0037] Step S11: performing pooling processing on the specified feature map at N different scales to obtain N feature representations;

[0038] Optionally, when N is equal to 3, N different scales include: 4×4, 2×2 and 1×1; that is, the specified feature map is subjected to global adaptive pooling processing to obtain three feature representations, among which 4×4 average pooling can capture more structural information and feature representations of small defects; 2×2 average pooling can balance structural information and structural regularization; 1×1 average pooling can maintain the advantage of strong structural regularization of global average pooling.

[0039] Step S12: concatenating the N feature representations to obtain a target feature representation;

[0040] Optionally, the target feature representation S can be obtained by the following formula: S = Cat(R(P(I, 4)), R(P(I, 2)), R(P(I, 1))); where P(I, 4), P(I, 2), P(I, 1) represent adaptive average pooling operations, R(P(I, 4)), R(P(I, 2)), R(P(I, 1)) represent adjusting the tensor to a vector, Cat represents concatenating the feature representations, and I represents the specified feature map.

[0041] Step S13: Determine the first attention weight using the following formula: m = σ(f C (δ(f 21C / r (S)))); where m is the first attention weight, S is the target feature representation, and f C and f 21C / r is the fully connected layer, f C The output dimension of f is C, 21C / rThe output dimension of is 21C / r, C is the number of channels of the specified feature map, r is the reduction ratio, σ is the activation function, and δ is the function of refining features.

[0042] It should be noted that f C (δ(f 21C / r (S))) aims to model the relationship between different channels in the convolutional neural network model. The fully connected layer refers to a type of layer in the convolutional neural network model, in which each node is connected to all nodes in the previous layer; the output dimension of the fully connected layer refers to the length or dimension of the vector output by the layer; the reduction ratio refers to the ratio of reducing the output dimension in the fully connected layer, that is, the output dimension is 1 / r times the original number of channels (C). This reduction can help reduce the complexity and computational complexity of the convolutional neural network model while retaining important feature information; the function of refining features refers to the function used to refine or refine features, the purpose of which is to enhance the abstract expression ability of features and improve the performance and generalization ability of the model. Among them, the function of refining features includes but is not limited to: convolution, pooling and attention mechanism.

[0043] It should be noted that the activation function refers to a nonlinear function in the convolutional neural network model, which is used to introduce nonlinear transformations and increase the expressive power of the network. The activation function includes but is not limited to: Rectified Linear Unit (ReLU), Sigmoid, and Tanh.

[0044] Step S204: determining the attention weight of the specified feature map at the scale level to obtain a second attention weight;

[0045] It should be noted that in hot spot defect detection, by determining the attention weight of a specific feature map at the scale level, the model can pay more attention to and learn features related to hot spot defects, thereby improving detection accuracy and effectiveness.

[0046] It should be noted that, when executing the embodiment of the present application, there is no specific order in which the above steps S202 and S204 are executed.

[0047] In an exemplary embodiment, the above step S204 can be implemented by the following steps S21-S23:

[0048] Step S21: performing pooling processing on the specified feature map at N different scales to obtain N feature representations;

[0049] Step S22: concatenating the N feature representations to obtain a target feature representation;

[0050] Step S23: Determine the second attention weight using the following formula: e = σ(f1(δ(f 21C / r (S)))); where e is the second attention weight, S is the target feature representation, f1 and f 21C / r is a fully connected layer, the output dimension of f1 is 1, and f 21C / r The output dimension of is 21C / r, where C is the number of channels of the specified feature map, r is the reduction ratio, is the activation function, and δ is the function of refining features.

[0051] Step S206: performing feature processing on the designated feature map according to the first attention weight and the second attention weight to obtain a target feature map;

[0052] In an exemplary embodiment, the above step S206 can be implemented by the following steps S31-S32:

[0053] Step S31: performing channel-level conversion on the designated feature map using the first attention weight to obtain a reference feature map;

[0054] In an exemplary embodiment, the above step S31 can be implemented by the following steps: using the following formula to determine the reference feature map: Wherein, U is the reference feature map, m is the first attention weight, I is the specified feature map, is channel-by-channel multiplication.

[0055] Alternatively, channel-by-channel multiplication is often used in various neural network layers, such as element-by-element multiplication layers in convolutional neural networks.

[0056] It should be noted that channel-by-channel multiplication refers to the operation of element-by-element multiplication of two tensors (or matrices) of the same dimension. In deep learning of convolutional neural network models, channel-by-channel multiplication is often used to implement element-level operations, such as element-by-element multiplication of two tensors of the same shape. The result is a tensor of the same shape as the input tensor, where each element is the product of the corresponding elements of the two tensors at the corresponding position.

[0057] Step S32: Use the second attention weight to perform scale-level conversion on the reference feature map to obtain the target feature map.

[0058] In an exemplary embodiment, the above step S32 can be implemented by the following steps: using the following formula to determine the target feature map: Wherein, U is the reference feature map, e is the second attention weight, O is the target feature map, is channel-by-channel multiplication.

[0059] Step S208: performing hot spot defect detection on the pair of photovoltaic modules based on the target feature map.

[0060] It should be noted that the execution body of the above steps is the target convolutional neural network model.

[0061] In the above steps, the attention weights of the feature map at the channel level and the scale level are determined to obtain the first attention weight and the second attention weight, and then the feature map is processed according to the first attention weight and the second attention weight to further obtain the target feature map, and the hot spot defect detection is performed on the corresponding photovoltaic module according to the target feature map. Since the feature map is processed at the channel level and the scale level respectively, the detection accuracy of the hot spot defect detection of the photovoltaic module is improved, and the problem of low detection accuracy of the hot spot defect detection of the photovoltaic module by the traditional method is solved.

[0062] Obviously, the above-described embodiments are only embodiments of a part of the present invention, rather than all embodiments. In order to better understand the above method, the above process is described below in conjunction with embodiments, but it is not intended to limit the technical solutions of the embodiments of the present invention, specifically:

[0063] The present invention proposes a hot spot defect detection for photovoltaic modules based on a target convolutional neural network model with a scale-aware attention mechanism (SAM for short). That is, a SAM mechanism is added to the traditional convolutional neural network model to obtain a target convolutional neural network model. The SAM mechanism captures multi-scale feature representations through global adaptive pooling and adaptively adjusts at the channel and scale levels. Specifically, at the channel level, SAM models global contextual relationships, learns the weight relationship matrix between all channels, re-weights global information, highlights defect features, and captures long-range contextual dependencies; at the scale level, SAM learns adaptive adjustment factors, dynamically adjusts the scale relationships of different detection heads, and improves the utilization of features of different scales, thereby improving the accuracy and robustness of detection.

[0064] Reference diagram of the SAM mechanism implementation Figure 3 , the specific steps are as follows:

[0065] 1. Spatial Pyramid Pooling F spp (Spatial Pyramid Pooling, referred to as SPP):

[0066] First, the input feature map (i.e., the specified feature map) is globally adaptively pooled to generate feature representations of different scales. This step adaptively pools the input feature map to three scales: 4×4, 2×2, and 1×1.

[0067] The feature maps are then pooled at different scales and concatenated to obtain the feature representation S.

[0068] The formula is as follows: S = F spp (I)=Cat(R(P(I,4)), R(P(I,2)), R(P(I,1))).

[0069] It should be noted that through the spatial pyramid pooling method, pooling operations of different scales are performed on the input feature map to generate multi-scale feature representation, which can effectively capture contextual information of different scales and improve the expressiveness of features.

[0070] 2. Channel level conversion F C (Channel-level Transformation):

[0071] F C It aims to model the relationship between channels of convolutional neural network models, thereby suppressing complex backgrounds and highlighting objects. spp The one-dimensional attention map S extracted from the above is the concatenation of the outputs of the three pooling layers (i.e., the concatenation of the N feature representations mentioned above). mlp It is used to encode S to learn channel dependencies. The formula for the output channel-level attention weight m (i.e., the first attention weight mentioned above) is as follows:

[0072] m=F mlp (S) = σ(f C (δ(f 21C / r (S))));

[0073] Next, the reference feature map is obtained according to the first attention weight using the following formula:

[0074]

[0075] It should be noted that at the channel level, multi-scale features are adaptively adjusted to learn the dependencies between channels and enhance the accuracy and discrimination of feature representation. Channel-level conversion is performed through a multi-layer perceptron to calculate the attention weights at the channel level and adjust the channel weights of the feature map.

[0076] 3. Scale level conversion F R (Scale-level Transformation):

[0077] F RIt is to learn an adaptive adjustment factor e, dynamically adjust the scale relationship of different detection heads through natural language processing (Natural Language Processing, referred to as NLP), and improve the utilization rate of features of different scales. The formula is as follows:

[0078]

[0079] It should be noted that at the scale level, by generating adaptive adjustment factors, the scale relationship of different detection heads is dynamically adjusted to optimize the utilization efficiency of multi-scale features. The scale level conversion is achieved through the fully connected layer, which calculates the attention weights at the scale level and adjusts the scale relationship of the feature map.

[0080] It should be noted that through the above innovative design, the SAM-based photovoltaic field station hot spot defect detection method has a strong feature differentiation ability and multi-scale feature utilization efficiency under complex backgrounds, which significantly improves the accuracy and robustness of detection. The detection method using the SAM mechanism provides an efficient and reliable solution for the intelligent inspection of photovoltaic fields.

[0081] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention.

[0082] In this embodiment, a hot spot defect detection device for a photovoltaic module is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0083] Figure 4 is a structural block diagram of a hot spot defect detection device for a photovoltaic module according to an embodiment of the present invention, the device comprising:

[0084] A first determination module 402 is used to determine the attention weight of a specified feature map at a channel level through a target convolutional neural network model to obtain a first attention weight, wherein the specified feature map is a feature map obtained by processing the image of the photovoltaic module;

[0085] A second determination module 404 is used to determine the attention weight of the specified feature map at the scale level through the target convolutional neural network model to obtain a second attention weight;

[0086] A processing module 406 is used to perform feature processing on the designated feature map according to the first attention weight and the second attention weight through the target convolutional neural network model to obtain a target feature map;

[0087] The detection module 408 is used to perform hot spot defect detection on the photovoltaic components based on the target feature map through the target convolutional neural network model.

[0088] The above device determines the attention weights of the feature map at the channel level and the scale level, respectively, obtains the first attention weight and the second attention weight, then performs feature processing on the feature map according to the first attention weight and the second attention weight, further obtains the target feature map, and performs hot spot defect detection on the corresponding photovoltaic module according to the target feature map. Since the feature map is processed at the channel level and the scale level respectively, the detection accuracy of the hot spot defect detection of the photovoltaic module is improved, and the problem of low detection accuracy of the hot spot defect detection of the photovoltaic module by the traditional method is solved.

[0089] In an exemplary embodiment, the first determination module 402 is further used to perform pooling processing on the specified feature map at N different scales to obtain N feature representations; concatenate the N feature representations to obtain a target feature representation; and determine the first attention weight using the following formula: m = σ(f C (δ(f 21C / r (S)))); where m is the first attention weight, S is the target feature representation, and f C and f 21C / r is the fully connected layer, f C The output dimension of f is C, 21C / r The output dimension of is 21C / r, C is the number of channels of the specified feature map, r is the reduction ratio, σ is the activation function, and δ is the function of refining features.

[0090] In an exemplary embodiment, the second determination module 404 is further used to perform pooling processing on the specified feature map at N different scales to obtain N feature representations; concatenate the N feature representations to obtain a target feature representation; and determine the second attention weight using the following formula: e=σ(f1(δ(f 21C / r (S)))); where e is the second attention weight, S is the target feature representation, f1 and f 21C / ris a fully connected layer, the output dimension of is 1, the output dimension of is 21C / r, C is the number of channels of the specified feature map, r is the reduction ratio, is the activation function, and δ is the function of refining features.

[0091] In an exemplary embodiment, the processing module 406 is also used to use the first attention weight to perform channel level conversion on the specified feature map to obtain a reference feature map; and use the second attention weight to perform scale level conversion on the reference feature map to obtain the target feature map.

[0092] In an exemplary embodiment, the processing module 406 is further configured to determine the reference feature map using the following formula: Wherein, U is the reference feature map, m is the first attention weight, I is the specified feature map, is channel-by-channel multiplication.

[0093] In an exemplary embodiment, the processing module 406 is further configured to determine the target feature map using the following formula: Wherein, U is the reference feature map, e is the second attention weight, O is the target feature map, is channel-by-channel multiplication.

[0094] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0095] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0096] S1, determining an attention weight of a specified feature map at a channel level to obtain a first attention weight, wherein the specified feature map is a feature map obtained by processing an image of the photovoltaic module;

[0097] S2, determining the attention weight of the specified feature map at the scale level to obtain a second attention weight;

[0098] S3, performing feature processing on the designated feature map according to the first attention weight and the second attention weight to obtain a target feature map;

[0099] S4, performing hot spot defect detection on the pair of photovoltaic modules based on the target feature map.

[0100] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0101] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0102] An embodiment of the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps in any one of the above method embodiments are performed.

[0103] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0104] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0105] S1, determining an attention weight of a specified feature map at a channel level to obtain a first attention weight, wherein the specified feature map is a feature map obtained by processing an image of the photovoltaic module;

[0106] S2, determining the attention weight of the specified feature map at the scale level to obtain a second attention weight;

[0107] S3, performing feature processing on the designated feature map according to the first attention weight and the second attention weight to obtain a target feature map;

[0108] S4, performing hot spot defect detection on the pair of photovoltaic modules based on the target feature map.

[0109] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0110] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0111] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0112] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for detecting hot spot defects in photovoltaic modules, characterized in that: Applied to the target convolutional neural network model, including: determining an attention weight of a specified feature map at a channel level to obtain a first attention weight, wherein the specified feature map is a feature map obtained by processing the image of the photovoltaic module; and Determining an attention weight of the specified feature map at a scale level to obtain a second attention weight; Performing feature processing on the designated feature map according to the first attention weight and the second attention weight to obtain a target feature map; Hot spot defect detection is performed on the pair of photovoltaic modules based on the target feature map.

2. The method according to claim 1, characterized in that Determine the attention weight of the specified feature map at the channel level and obtain the first attention weight, including: Performing pooling processing on the specified feature map at N different scales to obtain N feature representations; Concatenate the N feature representations to obtain a target feature representation; The first attention weight is determined using the following formula: m=σ(f C (δ(f 21C / r (S)))); Where m is the first attention weight, S is the target feature representation, and f C and f 21C / r is the fully connected layer, f C The output dimension of f is C, 21C / r The output dimension is 21C / r, where C is the number of channels of the specified feature map, r is the reduction ratio, σ is the activation function, and δ is the function of refining features.

3. The method according to claim 1, characterized in that Determining the attention weight of the specified feature map at the scale level to obtain a second attention weight includes: Performing pooling processing on the specified feature map at N different scales to obtain N feature representations; Concatenate the N feature representations to obtain a target feature representation; The second attention weight is determined using the following formula: e=σ(f1(δ(f 21C / r (S)))); Among them, e is the second attention weight, S is the target feature representation, f1 and f 21C / r is a fully connected layer, the output dimension of f1 is 1, f 21C / r The output dimension is 21C / r, where C is the number of channels of the specified feature map, r is the reduction ratio, σ is the activation function, and δ is the function of refining features.

4. The method according to claim 1, wherein Performing feature processing on the designated feature map according to the first attention weight and the second attention weight to obtain a target feature map includes: Performing channel-level conversion on the specified feature map using the first attention weight to obtain a reference feature map; The reference feature map is scale-converted using the second attention weight to obtain the target feature map.

5. The method according to claim 4, characterized in that Performing channel-level conversion on the specified feature map using the first attention weight to obtain a reference feature map, including: The reference characteristic map is determined using the following formula: Wherein, U is the reference feature map, m is the first attention weight, I is the specified feature map, is channel-by-channel multiplication.

6. The method according to claim 4, characterized in that Performing a scale-level conversion on the reference feature map using the second attention weight to obtain the target feature map includes: The target feature map is determined using the following formula: Wherein, U is the reference feature map, e is the second attention weight, O is the target feature map, is channel-by-channel multiplication.

7. A hot spot defect detection device for photovoltaic modules, characterized in that: include: A first determination module is configured to determine an attention weight of a specified feature map at a channel level through a target convolutional neural network model to obtain a first attention weight, wherein the specified feature map is a feature map obtained by processing the image of the photovoltaic module; A second determination module is configured to determine the attention weight of the specified feature map at the scale level through the target convolutional neural network model to obtain a second attention weight; a processing module, configured to perform feature processing on the designated feature map according to the first attention weight and the second attention weight by using the target convolutional neural network model to obtain a target feature map; A detection module is used to perform hot spot defect detection on the photovoltaic components based on the target feature map through the target convolutional neural network model.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 6 when executed.

9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 6 through the computer program.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.