Photovoltaic defect identification method and system based on multi-task algorithm

Through the photovoltaic defect identification method based on multi-task algorithm, using the improved YOLOP model combined with drone data collection, the accuracy of defect identification and small target detection problems in photovoltaic sheet inspection are solved, achieving higher identification accuracy and speed.

CN118736296APending Publication Date: 2024-10-01SHANDONG ZHIYANG ELECTRIC
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410807735.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The existing technology is difficult to accurately identify photovoltaic defects in industrial photovoltaic sheet inspection, especially in complex terrain areas and small target inspection, and it is impossible to determine the defect type at the same time.

Method used

A photovoltaic defect identification method based on a multi-task algorithm is adopted, visible light and infrared image data are collected through drones, an improved YOLOP algorithm model is constructed, a small target detection Anchor is added, the Hardswish activation function is replaced by the Silu activation function, and the BRA attention mechanism is introduced. And the SPPFCSCP structure is used in the spatial pyramid module to improve the recognition accuracy of segmentation and detection.

Benefits of technology

The accuracy and recognition speed of photovoltaic defect detection are improved, photovoltaic segmentation and defect detection results can be obtained simultaneously, and the recognition accuracy of small targets and detailed information acquisition of defect categories are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736296A_ABST
    Figure CN118736296A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic defect identification method and system based on a multi-task algorithm, and mainly relates to the technical field of computer vision and photovoltaic defect detection. The method includes the following steps that photovoltaic visible light and infrared image data are collected through an unmanned aerial vehicle, and training, testing and verification data sets are obtained after preprocessing; an improved YOLOP algorithm model is constructed; and based on the improved YOLOP algorithm model, respectively carrying out model training on visible light and infrared data, and obtaining a semantic segmentation mask graph of a photovoltaic region of the data to be identified and detection results of various defects. The method has the beneficial effects that the identification of various photovoltaic defects can be met, and meanwhile, the improved YOLOP algorithm model is constructed, so that the accuracy of defect detection is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer vision and photovoltaic defect detection, and in particular to a photovoltaic defect recognition method and system based on a multi-task algorithm. Background Art

[0002] With the completion of large-scale photovoltaic power stations, the operation and maintenance of photovoltaic power stations has become increasingly prominent. During the long-term use of photovoltaic systems, various defects may cause photovoltaics to fail to work properly. Therefore, in the detection of industrial photovoltaic cells, accurate defect detection of photovoltaic cells and rapid maintenance work are of great significance to reducing production losses.

[0003] Manual inspection is not applicable to areas with a large number of photovoltaics and complex terrain, and detection based on photovoltaic electrical parameter measurement cannot determine the type of defects. This year, with the development of the drone industry and the rapid development of deep learning, drone-based inspections have become more common.

[0004] Therefore, it is particularly important to design a photovoltaic defect recognition method and system based on a multi-task algorithm suitable for drone inspection. Summary of the invention

[0005] The purpose of the present invention is to provide a photovoltaic defect recognition method and system based on a multi-task algorithm, which can meet the recognition of various photovoltaic defects and at the same time construct an improved YOLOP algorithm model to further improve the accuracy of defect detection.

[0006] In order to achieve the above object, the present invention is implemented through the following technical solutions:

[0007] The photovoltaic defect recognition method based on the multi-task algorithm includes the following steps:

[0008] S1: Collect visible light and infrared image data of photovoltaics through drones, and obtain training, testing and verification data sets after preprocessing;

[0009] S2: Build an improved YOLOP algorithm model. The improved YOLOP algorithm includes: adding a small target detection anchor, replacing the Hardswish activation function in the backbone with the Silu activation function to accelerate model convergence, replacing the SPP structure with the SPPFCSCP used in the spatial pyramid module, and introducing the BRA attention mechanism to improve the recognition accuracy of segmentation and detection;

[0010] S3: Based on the improved YOLOP algorithm model, model training is performed for visible light and infrared data respectively, the semantic segmentation mask map of the photovoltaic area of ​​the data to be identified and the detection results of various defects are obtained, the photovoltaic area is segmented and numbered, the defect detection results are traversed, and it is determined that this result is located in a certain photovoltaic segmentation area. The visible light and infrared defect recognition results of the area with the same number are merged, and the defect detection results with the area number are returned.

[0011] Preferably, the step S1 specifically includes the following steps:

[0012] S11: Use a drone to take visible light and infrared image data of the photovoltaic area, and use the Labelme annotation tool to segment and annotate the photovoltaic area, create a segmentation data set, obtain the corresponding Json format annotation file, and convert the Json format file to PNG mask format;

[0013] S12: Use LabelImg annotation tool to annotate the defect categories of visible light and infrared images;

[0014] S13: The labeled segmentation and detection datasets are randomly divided into training set, validation set and test set in a ratio of 7:2:1.

[0015] Preferably, the step S2 of constructing an improved YOLOP algorithm model specifically includes the following steps:

[0016] S21: Based on the YOLOP network model, the original three anchor boxes in YOLOP are modified to four anchor boxes for detecting matching small targets;

[0017] S22: Replace the Hardswish activation function in the backbone with the Silu activation function to accelerate model convergence. The Silu activation function is:

[0018] S23: The SPPFCSCP used in the spatial pyramid module replaces the SPP network layer, and the SPPFCSCP includes: 7 convolutional layers and 3 pooling layers are processed sequentially to obtain spatial feature information of different sizes to improve the recognition accuracy of the model.

[0019] Preferably, the BRA attention mechanism in step S2 is specifically:

[0020] The input feature data is divided into S×S different regions, each region contains HW / S 2feature vectors, where H and W are the feature data height and width respectively. Three inputs query(q), key(k) and value(v) are obtained through linear mapping. The average values ​​of q and k are Q and K. The adjacency matrix vector of regional correlation is constructed through Q and K: A_r=QK T , where A_r is the vector for constructing the adjacency matrix, and T represents the matrix transpose;

[0021] Keep the index of the top n connections of each region I = topnIndex(A_r), where I is the index matrix, gathering k, v, K g =gather(k,I),V g =gather(v,I), for the aggregated K g ,V g Use attention operation: Att(q,k,v) = sofmax(Q,K gT )×V g +LCE(v), where Att is the attention function, LCE(·) is parameterized using depthwise separable convolution, and sofmax is the normalized exponential function.

[0022] Preferably, the step S3 is specifically:

[0023] Based on the improved YOLOP algorithm and the training data set of annotated visible light and infrared images, the sub-model training is performed to obtain the semantic segmentation and defect detection model of the photovoltaic area of ​​the improved YOLOP algorithm of visible light and infrared images;

[0024] Based on the improved YOLOP algorithm model, the semantic segmentation mask map and defect detection results of the photovoltaic area of ​​the visible light and infrared images to be identified are obtained; the semantic segmentation mask map of the photovoltaic area is converted into a binary image, in which the area with a pixel value of 0 represents the background area, and the area with a pixel value of 255 represents the photovoltaic area. The minimum circumscribed rectangle of each photovoltaic area is obtained, and the center point coordinates of the rectangle are obtained. The photovoltaic areas are numbered from left to right and from top to bottom based on the center point coordinates to obtain a numbered photovoltaic segmentation area mask map;

[0025] The categories and location information of all detected targets in the obtained visible light and infrared images to be identified are saved in a list, and the list is composed of:

[0026] [[x1,y1,x2,y2,confidence,labels],[x1,y1,x2,y2,confidence,labels],...],

[0027] Among them, (x1, y1) and (x2, y2) are the coordinates of the upper left corner and lower right corner of the detection target box, confidence is the confidence of the detection target, and labels is the category of the detection target;

[0028] Traverse the defect detection results of the visible light and infrared images to be identified respectively, determine whether the defect is located in a certain photovoltaic segmentation area, merge the visible light and infrared defect recognition results of the same numbered area, and return the defect detection result with the area number.

[0029] Photovoltaic defect recognition system based on multi-task algorithm, including:

[0030] Image acquisition module: used to obtain visible light and infrared image data to be identified through the drone;

[0031] Image recognition module: used to recognize the visible light and infrared images to be recognized based on the improved YOLOP visible light and infrared algorithm models, obtain the location and category of the defects and the semantic segmentation mask map of the photovoltaic area, and convert them into a binary image;

[0032] Image processing module: used to obtain the photovoltaic area segmentation results and defect detection results based on the image recognition module, respectively, number the photovoltaic segmentation areas, respectively traverse the defect detection results, determine that this result is located in a certain photovoltaic segmentation area, merge the visible light and infrared defect recognition results of the same numbered area, and return the defect detection result with the area number.

[0033] Compared with the prior art, the beneficial effects of the present invention are:

[0034] Aiming at the problem of small targets in the photovoltaic defects photographed by monitoring drones, the present invention recognizes photovoltaic defects based on the improved YOLOP algorithm. Adding small target detection Anchor can further improve the recognition accuracy of small targets. The Hardswish activation function in the backbone is replaced by the Silu activation function to accelerate the convergence of the model. At the same time, the SPPFCSCP replaces the SPP network layer to obtain spatial feature information of different sizes. The BRA attention mechanism is added to suppress unimportant feature information, further improving the recognition accuracy of the model.

[0035] By using one model to simultaneously obtain photovoltaic segmentation and defect detection results, the recognition speed can be further improved. By analyzing the visible light and infrared image results separately, the defect category with detailed location information can be obtained, thereby improving the complementarity of defect targets. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 Flow chart of the photovoltaic defect identification method of the present invention

[0037] Figure 2 Schematic diagram of the improved YOLOP network structure of the present invention

[0038] Figure 3 This is the structural principle diagram of the BRA attention module of the present invention

[0039] Figure 4 This is a flow chart of photovoltaic defect identification based on multi-task algorithm according to the present invention

[0040] Figure 5 Schematic diagram of the structure of the system embodiment of the present invention DETAILED DESCRIPTION

[0041] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the application equally.

[0042] In the present invention, terms such as "upper", "lower", "left", "right", "front", "back", "vertical", "horizontal", "side", "bottom", etc. indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings. They are relational words determined only for the convenience of describing the structural relationships of the various parts or elements of the present invention, and do not specifically refer to any part or element in the present invention and should not be understood as limitations on the present invention.

[0043] In the present invention, terms such as "fixed connection", "connected", "connection", etc. should be understood in a broad sense, indicating that it can be fixedly connected, integrally connected or detachably connected; it can be directly connected or indirectly connected through an intermediate medium. Relevant scientific research or technical personnel in this field can determine the specific meanings of the above terms in the present invention according to specific circumstances, and they should not be understood as limiting the present invention.

[0044] Example:

[0045] like Figure 1 As shown, the photovoltaic defect recognition method based on the multi-task algorithm includes the following steps:

[0046] S1: Collect visible light and infrared image data of photovoltaics through drones, and obtain training, testing and verification data sets after preprocessing;

[0047] S2: Build an improved YOLOP algorithm model. The improved YOLOP algorithm includes: adding a small target detection anchor, replacing the Hardswish activation function in the backbone with the Silu activation function to accelerate model convergence, replacing the SPP structure with the SPPFCSCP used in the spatial pyramid module, and introducing the BRA attention mechanism to improve the recognition accuracy of segmentation and detection;

[0048] S3: Based on the improved YOLOP algorithm model, model training is performed for visible light and infrared data respectively, the semantic segmentation mask map of the photovoltaic area of ​​the data to be identified and the detection results of various defects are obtained, the photovoltaic area is segmented and numbered, the defect detection results are traversed, and it is determined that this result is located in a certain photovoltaic segmentation area. The visible light and infrared defect recognition results of the area with the same number are merged, and the defect detection results with the area number are returned.

[0049] Wherein, the step S1 specifically includes the following steps:

[0050] S11: Use a drone to take visible light and infrared image data of the photovoltaic area, and use the Labelme annotation tool to segment and annotate the photovoltaic area, create a segmentation data set, obtain the corresponding Json format annotation file, and convert the Json format file to PNG mask format;

[0051] S12: Using the LabelImg labeling tool to label the defect categories of the visible light and infrared images, the defect categories include but are not limited to: dust accumulation, hot spots, diode short circuit and other defects;

[0052] S13: The labeled segmentation and detection datasets are randomly divided into training set, validation set and test set in a ratio of 7:2:1.

[0053] In step S2, an improved YOLOP algorithm model is constructed as follows: Figure 2 As shown, the specific steps include:

[0054] S21: Based on the YOLOP network model, the original three anchor boxes in YOLOP are modified to four anchor boxes for detecting matching small targets;

[0055] S22: Replace the Hardswish activation function in the backbone with the Silu activation function to accelerate model convergence. The Silu activation function is:

[0056] S23: The SPPFCSCP used in the spatial pyramid module replaces the SPP network layer, and the SPPFCSCP includes: 7 convolutional layers and 3 pooling layers are processed sequentially to obtain spatial feature information of different sizes to improve the recognition accuracy of the model.

[0057] Among them, Figure 3 As shown, the BRA attention mechanism in step S2 is specifically:

[0058] The input feature data is divided into S×S different regions, each region contains HW / S 2 feature vectors, where H and W are the feature data height and width respectively. Three inputs query(q), key(k) and value(v) are obtained through linear mapping. The average values ​​of q and k are Q and K. The adjacency matrix vector of regional correlation is constructed through Q and K: A_r=QK T , where A_r is the vector for constructing the adjacency matrix, and T represents the matrix transpose;

[0059] Keep the index of the top n connections of each region I = topnIndex(A_r), where I is the index matrix, gathering k, v, K g =gather(k,I),V g =gather(v,I), for the aggregated K g ,V g Use attention operation: Att(q,k,v) = sofmax(Q,K gT )×V g +LCE(v), where Att is the attention function, LCE(·) is parameterized using depthwise separable convolution, and sofmax is the normalized exponential function.

[0060] The step S3 is specifically as follows:

[0061] In this embodiment, based on the improved YOLOP algorithm, model training is performed based on the training data sets of the annotated visible light and infrared images, and the semantic segmentation and defect detection models of the photovoltaic area of ​​the improved YOLOP algorithm of the visible light and infrared images are obtained respectively;

[0062] Based on the improved YOLOP algorithm model, the semantic segmentation mask map and defect detection results of the photovoltaic area of ​​the visible light and infrared images to be identified can be obtained simultaneously; the semantic segmentation mask map of the photovoltaic area is converted into a binary image, in which the area with a pixel value of 0 represents the background area, and the area with a pixel value of 255 represents the photovoltaic area;

[0063] The categories and location information of all detected targets in the obtained visible light and infrared images to be identified are saved in a list, and the list is composed of:

[0064] [[x1,y1,x2,y2,confidence,labels],[x1,y1,x2,y2,confidence,labels],...],

[0065] Among them, (x1, y1) and (x2, y2) are the coordinates of the upper left corner and lower right corner of the detection target box respectively, confidence is the confidence of the detection target, and labels is the category of the detection target.

[0066] like Figure 4 As shown, in step S3, the photovoltaic segmentation areas are numbered respectively, and the defect detection results are traversed at the same time. It is determined that this result is located in a certain photovoltaic segmentation area, and the visible light and infrared defect recognition results of the same numbered area are merged. The defect detection results with the area number are returned, including:

[0067] Obtain the minimum circumscribed rectangle of each photovoltaic area, obtain the coordinates of the center point of the rectangle, number the photovoltaic areas from left to right and from top to bottom based on the coordinates of the center point, and obtain a numbered photovoltaic segmentation area mask map;

[0068] Traverse the defect detection results of the visible light and infrared images to be identified respectively, determine whether the defect is located in a certain photovoltaic segmentation area, merge the visible light and infrared defect recognition results of the same numbered area, and return the defect detection result with the area number.

[0069] like Figure 5 As shown, the photovoltaic defect recognition system based on the multi-task algorithm specifically includes:

[0070] The image acquisition module is used to obtain visible light and infrared image data to be identified through the drone.

[0071] The image recognition module recognizes the visible light and infrared images to be recognized based on the improved YOLOP visible light and infrared algorithm model, obtains the location and category of the defects and the semantic segmentation mask map of the photovoltaic area, and converts them into a binary image.

[0072] The image processing module obtains the photovoltaic area segmentation results and defect detection results based on the image recognition module, numbers the segmented photovoltaic areas respectively, traverses the defect detection results respectively, determines that this result is located in a certain photovoltaic segmentation area, merges the visible light and infrared defect recognition results of the same numbered area, and returns the defect detection results with the area number.

Claims

1. Photovoltaic defect recognition method based on multi-task algorithm, It is characterized in that The following steps are involved: S1: Collect visible light and infrared image data of photovoltaics through drones, and obtain training, testing and verification data sets after preprocessing; S2: Build an improved YOLOP algorithm model. The improved YOLOP algorithm includes: adding a small target detection anchor, replacing the Hardswish activation function in the backbone with the Silu activation function to accelerate model convergence, replacing the SPP structure with the SPPFCSCP used in the spatial pyramid module, and introducing the BRA attention mechanism to improve the recognition accuracy of segmentation and detection; S3: Based on the improved YOLOP algorithm model, model training is performed for visible light and infrared data respectively, the semantic segmentation mask map of the photovoltaic area of ​​the data to be identified and the detection results of various defects are obtained, the photovoltaic area is segmented and numbered, the defect detection results are traversed, and it is determined that this result is located in a certain photovoltaic segmentation area. The visible light and infrared defect recognition results of the area with the same number are merged, and the defect detection results with the area number are returned.

2. The photovoltaic defect recognition method based on the multi-task algorithm according to claim 1, It is characterized in that The step S1 specifically includes the following steps: S11: Use a drone to take visible light and infrared image data of the photovoltaic area, and use the Labelme annotation tool to segment and annotate the photovoltaic area, create a segmentation data set, obtain the corresponding Json format annotation file, and convert the Json format file to PNG mask format; S12: Use LabelImg annotation tool to annotate the defect categories of visible light and infrared images; S13: The labeled segmentation and detection datasets are randomly divided into training set, validation set and test set in a ratio of 7:2:

1.

3. The photovoltaic defect recognition method based on the multi-task algorithm according to claim 1, It is characterized in that The improved YOLOP algorithm model is constructed in step S2, which specifically includes the following steps: S21: Based on the YOLOP network model, the original three anchor boxes in YOLOP are modified to four anchor boxes for detecting matching small targets; S22: Replace the Hardswish activation function in the backbone with the Silu activation function to accelerate model convergence. The Silu activation function is: S23: The SPPFCSCP used in the spatial pyramid module replaces the SPP network layer, and the SPPFCSCP includes: 7 convolutional layers and 3 pooling layers are processed sequentially to obtain spatial feature information of different sizes to improve the recognition accuracy of the model.

4. The photovoltaic defect recognition method based on the multi-task algorithm according to claim 3, It is characterized in that The BRA attention mechanism in step S2 is specifically: The input feature data is divided into S×S different regions, each region contains HW / S 2 feature vectors, where H and W are the feature data height and width respectively. Three inputs query(q), key(k) and value(v) are obtained through linear mapping. The average values ​​of q and k are Q and K. The adjacency matrix vector of regional correlation is constructed through Q and K: A_r=QK T , where A_r is the vector for constructing the adjacency matrix, and T represents the matrix transpose; Keep the index of the top n connections of each region I = topnIndex(A_r), where I is the index matrix, gathering k, v, K g =gather(k,I),V g =gather(v,I), for the aggregated K g ,V g Use attention operation: Att(q,k,v) = sofmax(Q,K gT )×V g +LCE(v), where Att is the attention function, LCE(·) is parameterized using depthwise separable convolution, and sofmax is the normalized exponential function.

5. The photovoltaic defect recognition method based on the multi-task algorithm according to claim 1, It is characterized in that The step S3 is specifically as follows: Based on the improved YOLOP algorithm and the training data set of annotated visible light and infrared images, the sub-model training is performed to obtain the semantic segmentation and defect detection model of the photovoltaic area of ​​the improved YOLOP algorithm of visible light and infrared images; Based on the improved YOLOP algorithm model, the semantic segmentation mask map and defect detection results of the photovoltaic area of ​​the visible light and infrared images to be identified are obtained; the semantic segmentation mask map of the photovoltaic area is converted into a binary image, in which the area with a pixel value of 0 represents the background area, and the area with a pixel value of 255 represents the photovoltaic area. The minimum circumscribed rectangle of each photovoltaic area is obtained, and the center point coordinates of the rectangle are obtained. The photovoltaic areas are numbered from left to right and from top to bottom based on the center point coordinates to obtain a numbered photovoltaic segmentation area mask map; The categories and location information of all detected targets in the obtained visible light and infrared images to be identified are saved in a list, and the list is composed of: [[x1,y1,x2,y2,confidence,labels],[x1,y1,x2,y2,confidence,labels],...], Among them, (x1, y1) and (x2, y2) are the coordinates of the upper left corner and lower right corner of the detection target box, confidence is the confidence of the detection target, and labels is the category of the detection target; Traverse the defect detection results of the visible light and infrared images to be identified respectively, determine whether the defect is located in a certain photovoltaic segmentation area, merge the visible light and infrared defect recognition results of the same numbered area, and return the defect detection result with the area number.

6. Photovoltaic defect recognition system based on multi-task algorithm, It is characterized in that include: Image acquisition module: used to obtain visible light and infrared image data to be identified through the drone; Image recognition module: used to recognize the visible light and infrared images to be recognized based on the improved YOLOP visible light and infrared algorithm models, obtain the location and category of the defects and the semantic segmentation mask map of the photovoltaic area, and convert them into a binary image; Image processing module: used to obtain the photovoltaic area segmentation results and defect detection results based on the image recognition module, respectively, number the photovoltaic segmentation areas, respectively traverse the defect detection results, determine that this result is located in a certain photovoltaic segmentation area, merge the visible light and infrared defect recognition results of the same numbered area, and return the defect detection result with the area number.

Citation Information

Cited By

  • Defect detection method and device for photovoltaic module of power station, equipment and medium

    CN119850526A