A UNet-based photovoltaic panel deposit segmentation method

CN118397032BActive Publication Date: 2026-08-21NANCHANG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410618223.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-17
Publication Date
2026-08-21
Estimated Expiration
2044-05-17

AI Technical Summary

Technical Problem

传统方法主要基于数学和信号处理原理,计算复杂度较小,但在复杂多变的环境下无法准确识别光伏面板上的沉积物

Benefits of technology

(1)本发明提出了一种融合了小型深度学习网络与传统图像处理技术的光伏面板沉积物分割方法,能够对光伏面板中沉积物(包括灰尘、树叶以及鸟粪)进行精准分割与分类。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118397032B_ABST
    Figure CN118397032B_ABST
Patent Text Reader

Abstract

The application discloses a photovoltaic panel deposit segmentation method based on UNet, which comprises the following steps: acquiring a photovoltaic panel image, and pre-processing the image; inputting the pre-processed image into a pre-trained UNet network to obtain a photovoltaic panel mask image, and segmenting the photovoltaic panel in the image according to the photovoltaic panel mask image; detecting grid lines in the photovoltaic panel by using an erosion expansion and straight line detection algorithm, and fading the grid lines by using a domain average value filling method; and inputting the photovoltaic panel segmentation image with faded grid lines into a pre-trained UNet-CBAM network to segment and classify the deposits on the panel. The application segments the deposits on the photovoltaic panel by using two-step deep learning networks, uses the erosion expansion technology, the LSD algorithm and the neighborhood average value filling to fade the grid lines in the photovoltaic panel, reduces the interference on the deposit segmentation, and effectively improves the segmentation precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of photovoltaic panel inspection technology, specifically to a photovoltaic panel deposition segmentation method based on UNet. Background Technology

[0002] As the scale of photovoltaic power plants continues to expand, the problem of photovoltaic panel contamination is becoming increasingly prominent. The main factors affecting the efficiency of photovoltaic panels include dust accumulation, leaf and bird cover. When the area covered by deposits is too large, photovoltaic panels may develop hot spots and microcracks, thereby reducing light absorption and power generation efficiency, and affecting the overall system performance. Therefore, timely detection of deposits on photovoltaic panels is crucial to ensuring optimal energy production.

[0003] Currently, the detection and identification of deposits on photovoltaic panels mainly relies on manual inspections of photovoltaic power plants. However, this method has certain limitations in terms of real-time performance and accuracy, making it difficult to meet the needs of intelligent operation and maintenance such as real-time monitoring, cleaning and maintenance, and safe grid connection of photovoltaic panels.

[0004] In recent years, the detection of deposits on photovoltaic panels using image processing technology has become a research hotspot both domestically and internationally. Image processing technology can be divided into traditional methods and deep learning-based methods. Traditional methods are mainly based on mathematical and signal processing principles, with relatively low computational complexity, but they cannot accurately identify deposits on photovoltaic panels in complex and variable environments. Deep learning-based methods utilize deep neural networks for feature learning and image analysis, possessing stronger generalization capabilities and adaptability to complex scenes. However, due to the variability of the environment in which photovoltaic panels are located and the similarity between deposit features and environmental features, the results of deep learning algorithms are easily interfered with, reducing the accuracy of the algorithms. Summary of the Invention

[0005] The purpose of this invention is to improve and innovate upon the shortcomings and problems existing in the background technology, and to provide a photovoltaic panel deposition segmentation method based on UNet.

[0006] According to a first aspect of the present invention, a method for segmenting photovoltaic panel deposits based on UNet is provided, specifically including the following steps: Acquire images of photovoltaic panels and perform preprocessing on the photovoltaic panel images; The preprocessed photovoltaic panel image is input into a pre-trained UNet network model to obtain a photovoltaic panel mask image, which is used to segment the photovoltaic panel part and the background part in the photovoltaic panel image; The photovoltaic panel segmentation image is obtained by covering the background part of the preprocessed photovoltaic panel image with the photovoltaic panel mask image, and the start and end coordinates of the grid lines on the photovoltaic panel segmentation image are detected by the line detection algorithm. Based on the start and end coordinates of the grid lines, a grid line mask image is created. The grid lines on the photovoltaic panel segmentation image are then faded based on the grid line mask image to obtain a photovoltaic panel segmentation image with faded grid lines. A segmented image of a photovoltaic panel with faded grid lines is input into a pre-trained UNet-CBAM network to segment and classify the deposits on the photovoltaic panel image.

[0007] A further approach is that the preprocessing of the photovoltaic panel image includes: Perform noise reduction, cropping, random rotation, and random flipping operations on photovoltaic panel images; The noise reduction operation involves using Gaussian filtering to remove interfering pixels from the photovoltaic panel image; The cropping operation is used to crop an image to a preset size; The random rotation operation is used to randomly rotate the photovoltaic panel image from -45 degrees to 45 degrees. The random flip operation is used to randomly flip the photovoltaic panel image horizontally or vertically.

[0008] A further approach involves obtaining a photovoltaic panel segmentation image by covering the background portion of the preprocessed photovoltaic panel image with the photovoltaic panel mask image, and then using a line detection algorithm to detect the start and end coordinates of the grid lines in the photovoltaic panel segmentation image, including: Based on the photovoltaic panel mask image, the background part of the preprocessed photovoltaic panel image is assigned black, and the pixel value of each corresponding pixel is set to (0, 0, 0), while the pixel value of the photovoltaic panel part remains unchanged; in order to obtain the photovoltaic panel segmentation image; Morphological erosion and dilation operations are performed on the segmented image of the photovoltaic panel to connect broken grid lines and eliminate noise. The Line Detection (LSD) algorithm was used to detect the grid lines on the segmented image of the photovoltaic panel, and the start and end coordinates of each grid line were obtained. ,in This represents the starting coordinates of the i-th gate line. This represents the coordinates of the endpoint of the i-th grid line.

[0009] A further approach is that creating the grid line mask image based on the start and end coordinates of the grid lines includes: Create a grid line mask image, the size of which is equal to the size of the photovoltaic panel segmentation image; Based on the start and end coordinates of each grid line The pixel value of the pixel in the grid mask image that coincides with the grid line coordinates on the photovoltaic panel segmentation image is assigned as (255, 255, 0) to draw the grid line on the grid mask image. Set the width of the grid lines on the grid mask image to 2 pixels; Set the pixel value of the pixel outside the grid line position on the grid mask image to (0, 0, 0).

[0010] A further approach involves fading the grid lines on the photovoltaic panel segmentation image based on the grid line mask image to obtain a photovoltaic panel segmentation image with faded grid lines, which includes: Scan each pixel on the scan grid mask image, if the corresponding mask pixel If the pixel value is (0, 0, 0), then continue scanning; if the corresponding mask pixel value is... If the pixel value is (255, 255, 0), then the neighborhood average filling method is used to calculate and cover the pixels in the photovoltaic panel segmentation image. The corresponding pixel values ​​are used to obtain a photovoltaic panel segmentation image with faded grid lines. The calculation formula is as follows: ; Where n is the number of pixels involved in the calculation, and R is the pixel radius in the neighborhood. Pixels with the same pixel value are not included in the calculation. The pixel values ​​of corresponding pixels in the neighborhood of the photovoltaic panel segmentation image.

[0011] A further approach is to embed the CBAM attention module into the skip connections of the UNet network.

[0012] According to a second aspect of the present invention, an electronic device is provided, comprising: a memory and a processor; The memory is used to store programs; The processor is configured to invoke a program stored in the memory to execute a UNet-based photovoltaic panel deposition segmentation method as described in any of the preceding claims.

[0013] According to a third aspect of the present invention, a readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements a UNet-based photovoltaic panel deposition segmentation method as described in any of the preceding claims.

[0014] Compared with the prior art, the beneficial effects of the present invention are: (1) This invention proposes a photovoltaic panel sediment segmentation method that integrates small deep learning networks and traditional image processing technology, which can accurately segment and classify sediments (including dust, leaves and bird droppings) in photovoltaic panels.

[0015] (2) By using corrosion expansion technology, LSD algorithm and neighborhood average value filling, the grid lines in the photovoltaic panel are diluted, reducing the interference on the sediment segmentation and effectively improving the segmentation accuracy.

[0016] (3) By using a dual segmentation network, the photovoltaic panel area is first segmented using a traditional UNet network, which can effectively avoid the problem of reduced segmentation accuracy caused by the similarity of background and sediment features. Then, a UNet-CBAM network with a CBAM attention module is used to guide the network to focus on sediment features, thereby improving the segmentation accuracy. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic diagram of the process provided in the embodiment of the present invention; Figure 2 This is a schematic diagram of the photovoltaic panel image segmentation process provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the field average value filling method provided in an embodiment of the present invention, where the calculation radius is 2. Figure 4 This is a diagram of the UNet-CBAM network structure provided in an embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, features, and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0021] Please see Figure 1 and Figure 2 This invention provides a method for segmenting photovoltaic panel deposits based on UNet, specifically including the following steps: Step S1: Obtain the photovoltaic panel image and preprocess the photovoltaic panel image; In this embodiment, a photovoltaic panel image can be obtained by using a mobile phone or drone to capture the image; in order to expand the training set, the photovoltaic panel image is preprocessed.

[0022] Specifically, denoising, cropping, random rotation, and random flipping operations can be performed on photovoltaic panel images to increase sample diversity. Denoising can use Gaussian filtering to remove noise from the photovoltaic panel image, eliminating interfering pixels. Cropping can randomly crop the image to 512×512 pixels, ensuring that the photovoltaic panel occupies at least 3 / 4 of the image area after cropping. Random rotation can rotate the photovoltaic panel image randomly from -45 degrees to 45 degrees. Random flipping can randomly flip the photovoltaic panel image horizontally or vertically.

[0023] Step S2: Input the pre-processed photovoltaic panel image into the pre-trained UNet network model to obtain a photovoltaic panel mask image, which is used to segment the photovoltaic panel part and the background part in the photovoltaic panel image; It should be noted that the pre-processed photovoltaic panel image is input into the pre-trained UNet network model. The UNet network model needs to be trained in advance. The training process of the UNet network model is as follows: The EISeg (Efficient Interactive Segmentation) interactive segmentation and annotation software, developed based on PaddlePaddle, is used to classify each pixel of the photovoltaic panel image preprocessed in step S1. The categories include two types of labels: background and py_panel, i.e., background and photovoltaic panel. Based on the category label of each pixel, different colors are assigned to the pixels corresponding to the background and photovoltaic panel. The background part is labeled with the pixel value (0, 0, 0), while the photovoltaic panel part is labeled with the pixel value (170, 170, 170).

[0024] The labeled photovoltaic panel images are allocated as training and validation sets in a 4:1 ratio. The output class of the UNet network model is adjusted to 2. The training set is input into the UNet network model for training. A loss function is constructed based on the deviation between the pixel values ​​of each pixel in the photovoltaic panel mask image segmented by the UNet network model and the pixel values ​​of each pixel in the input image with different color annotations. The weights and thresholds of the UNet network model are continuously adjusted until the preset number of iterations is reached. The model is then validated on the validation set to obtain and retain the trained UNet network model.

[0025] The specific training parameters are as follows: the number of iterations of the UNet network model is set to 500, the activation function is Adam, the loss function is Dice, the learning strategy is Poly, the learning rate is set to 0.0001, and the number of training batches is set to 4, that is, the mini-batch gradient descent method is used to continuously adjust the weights and thresholds of the UNet network model.

[0026] After the UNet network model is trained, the preprocessed photovoltaic panel image is input into the trained UNet network model to obtain a photovoltaic panel mask image. This mask image accurately segments the photovoltaic panel portion and the background portion of the original photovoltaic panel image. The size of the photovoltaic panel mask image is the same as the size of the preprocessed photovoltaic panel image. The pixel values ​​of the pixels corresponding to the photovoltaic panel portion in the segmented photovoltaic panel mask image are (170, 170, 170), while the pixel values ​​of the pixels corresponding to the background portion are (0, 0, 0).

[0027] Step S3: Cover the background part of the preprocessed photovoltaic panel image with the photovoltaic panel mask image to obtain a photovoltaic panel segmentation image, and use a line detection algorithm to detect the start and end coordinates of the grid lines on the photovoltaic panel segmentation image; Specifically, in step S2, a photovoltaic panel mask image is obtained, which separates the background and the photovoltaic panel. Therefore, based on the photovoltaic panel mask image, the background part of the preprocessed photovoltaic panel image can be assigned black, and the pixel value of each corresponding pixel can be set to (0, 0, 0), while the pixel value of the photovoltaic panel part remains unchanged, so as to obtain a photovoltaic panel segmentation image. Next, morphological erosion and dilation operations are performed on the segmented image of the photovoltaic panel to connect broken grid lines and eliminate noise. Finally, the Line Detection (LSD) algorithm was used to detect the grid lines on the photovoltaic panel segmentation image, and the start and end coordinates of each grid line were obtained. ,in This represents the starting coordinates of the i-th gate line. This represents the coordinates of the endpoint of the i-th grid line.

[0028] It should be noted that the principle of the line detection algorithm LSD is to detect lines based on the gradient changes of pixel values ​​in an image. However, the background of a photovoltaic panel image may also contain gradient change features similar to those of the grid lines. Therefore, directly detecting lines in the preprocessed photovoltaic panel image will lead to the detection of other lines. In this embodiment, the background and panel portions of the photovoltaic panel image are first segmented using a UNet network, and then the pixel values ​​of the background portion are replaced with (0, 0, 0). This avoids interference from the background portion with the detection of the grid lines and facilitates the accurate detection of the start and end coordinates of the grid lines.

[0029] Step S4: Create a grid line mask image based on the start and end coordinates of the grid lines, and perform a fading process on the grid lines on the photovoltaic panel segmentation image based on the grid line mask image to obtain a photovoltaic panel segmentation image with faded grid lines. When the start and end coordinates of each grid line are obtained Then, a grid line mask image can be created based on the start and end coordinates of each grid line. The size of the grid line mask image is equal to the size of the photovoltaic panel segmentation image. The pixel values ​​of the pixels in the grid line mask image that coincide with the coordinates of the grid lines on the photovoltaic panel segmentation image are assigned as (255, 255, 0) to draw the grid lines on the grid line mask image. The width of the grid lines on the grid line mask image is set to 2 pixels. The pixel values ​​of the pixels to the right of the corresponding pixel can be assigned as (255, 255, 0), or the pixel values ​​of the pixels to the left of the corresponding pixel can be assigned as (255, 255, 0). This application does not make specific limitations. The pixel values ​​of the remaining positions in the grid line mask image are set to (0, 0, 0), thus obtaining the grid line mask image with the grid lines drawn.

[0030] Furthermore, scan each pixel on the grid mask image; if the corresponding mask pixel... If the pixel value is (0, 0, 0), then continue scanning; if the corresponding mask pixel value is... If the pixel value is (255, 255, 0), then the neighborhood average filling method is used to calculate and cover the pixels in the photovoltaic panel segmentation image. The corresponding pixel values ​​are used to obtain a photovoltaic panel segmentation image with faded grid lines. The calculation formula is as follows: ; Where n is the number of pixels involved in the calculation, and R is the pixel radius in the neighborhood. Pixels with the same pixel value are not included in the calculation. To segment the image of the photovoltaic panel and determine the pixel values ​​of corresponding pixels within the neighborhood, in this embodiment, R is set to 6, where... Figure 3 The above calculation and overlay result in a photovoltaic panel segmentation image; that is, a photovoltaic panel segmentation image with faded grid lines.

[0031] Step S5: Input the photovoltaic panel segmentation image with faded grid lines into the pre-trained UNet-CBAM network to segment and classify the deposits on the photovoltaic panel image; As mentioned earlier, inputting the pre-processed photovoltaic panel image into the pre-trained UNet network model requires prior training of the UNet network model; similarly, inputting the photovoltaic panel segmentation image with faded grid lines into the pre-trained UNet-CBAM network model requires prior training of the UNet-CBAM network model.

[0032] During the training of the UNet-CBAM network model, a photovoltaic panel sediment segmentation dataset is established using photovoltaic panel segmentation images with faded grid lines. The labels include four categories: clean, dust, leaf, and bird_dropping, which correspond to clean parts, dusty parts, leaf-covered parts, and bird-dropping parts, respectively. In this embodiment, the colors of the four labels (clean parts, dusty parts, leaf-covered parts, and bird-dropping parts) are set to (170, 255, 0), (255, 170, 0), (85, 0, 255), and (170, 85, 0), respectively, and the output category of the UNet-CBAM network is 4. Apart from this, the rest of the training process of the UNet-CBAM network model is the same as that of the UNet network model, and will not be described again in this application.

[0033] It should be noted that the network structure of UNet-CBAM is as follows: Figure 4 As shown, unlike the UNet network structure, the UNet-CBAM network embeds the CBAM attention module in the hop connections of the UNet network and adjusts it to adapt to the input and output of each hop connection. In this embodiment, the number of channels at the first hop connection of the UNet network is 64, so the input and output channels of the CBAM attention module embedded at the first hop connection need to be adjusted to 64, and so on, adjusting all embedded CBAM attention modules.

[0034] Finally, by inputting the photovoltaic panel segmentation image with faded grid lines into the pre-trained UNet-CBAM network, the pixel values ​​of each pixel on the photovoltaic panel image can be used to segment and classify the deposits.

[0035] In summary, this invention provides a photovoltaic panel deposition segmentation method based on UNet. First, the background and panel portions of the photovoltaic panel image are segmented using the UNet network. Then, the pixel values ​​of the background portion are all replaced with (0, 0, 0), thereby avoiding interference from the background portion on the detection of the grid lines in the photovoltaic panel image. This facilitates accurate detection of the start and end coordinates of the grid lines. Then, a grid line mask image is created based on the start and end coordinates of each grid line, and the grid lines on the segmented photovoltaic panel image are faded using the grid line mask image to obtain a photovoltaic panel segmentation image with faded grid lines. Because the grid lines in the segmented photovoltaic panel image are faded and the pixel values ​​of the background region are replaced with (0, 0, 0), interference with deposition segmentation is reduced, effectively improving segmentation accuracy and precision.

[0036] The present invention also provides an electronic device, comprising: a memory and a processor; The memory is used to store programs; The processor is configured to invoke a program stored in the memory to execute a UNet-based photovoltaic panel deposition segmentation method as described in any of the preceding claims.

[0037] The present invention also provides a readable storage medium storing a computer program, which, when executed by a processor, implements a UNet-based photovoltaic panel deposition segmentation method as described in any of the preceding claims.

[0038] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention.

[0039] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example.

[0040] Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The reference to "embodiment" herein means that a specific feature, structure, or characteristic described in connection with an embodiment can be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily indicate the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0041] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A photovoltaic panel deposition segmentation method based on UNet, characterized in that, Specifically, the following steps are included: Acquire images of photovoltaic panels and perform preprocessing on the photovoltaic panel images; The preprocessed photovoltaic panel image is input into a pre-trained UNet network model to obtain a photovoltaic panel mask image, which is used to segment the photovoltaic panel part and the background part in the photovoltaic panel image; The photovoltaic panel segmentation image is obtained by covering the background part of the preprocessed photovoltaic panel image with the photovoltaic panel mask image, and the start and end coordinates of the grid lines on the photovoltaic panel segmentation image are detected by the line detection algorithm. Based on the start and end coordinates of the grid lines, a grid line mask image is created. The grid lines on the photovoltaic panel segmentation image are then faded based on the grid line mask image to obtain a photovoltaic panel segmentation image with faded grid lines. The photovoltaic panel segmentation image with faded grid lines is input into a pre-trained UNet-CBAM network to segment and classify the deposits on the photovoltaic panel image. The step of fading the grid lines on the photovoltaic panel segmentation image based on the grid line mask image to obtain a photovoltaic panel segmentation image with faded grid lines includes: Scan each pixel on the scan grid mask image, if the corresponding mask pixel If the pixel value is (0, 0, 0), then continue scanning; if the corresponding mask pixel value is... If the pixel value is (255, 255, 0), then the neighborhood average filling method is used to calculate and cover the pixels in the photovoltaic panel segmentation image. The corresponding pixel values ​​are used to obtain a photovoltaic panel segmentation image with faded grid lines.

2. The photovoltaic panel deposition segmentation method based on UNet according to claim 1, characterized in that, The preprocessing of the photovoltaic panel image includes: Perform noise reduction, cropping, random rotation, and random flipping operations on photovoltaic panel images; The noise reduction operation involves using Gaussian filtering to remove interfering pixels from the photovoltaic panel image; The cropping operation is used to crop an image to a preset size; The random rotation operation is used to randomly rotate the photovoltaic panel image from -45 degrees to 45 degrees. The random flip operation is used to randomly flip the photovoltaic panel image horizontally or vertically.

3. The photovoltaic panel deposition segmentation method based on UNet according to claim 1, characterized in that, The process of covering the background portion of the preprocessed photovoltaic panel image with the photovoltaic panel mask image to obtain a photovoltaic panel segmentation image, and using a line detection algorithm to detect the start and end coordinates of the grid lines on the photovoltaic panel segmentation image, includes: Based on the photovoltaic panel mask image, the background part of the preprocessed photovoltaic panel image is assigned black, and the pixel value of each corresponding pixel is set to (0, 0, 0), while the pixel value of the photovoltaic panel part remains unchanged; in order to obtain the photovoltaic panel segmentation image; Morphological erosion and dilation operations are performed on the segmented image of the photovoltaic panel to connect broken grid lines and eliminate noise. The Line Detection (LSD) algorithm was used to detect the grid lines on the segmented image of the photovoltaic panel, and the start and end coordinates of each grid line were obtained. ,in This represents the starting coordinates of the i-th gate line. This represents the coordinates of the endpoint of the i-th grid line.

4. The photovoltaic panel deposition segmentation method based on UNet according to claim 3, characterized in that, Creating the grid line mask image based on the start and end coordinates of the grid lines includes: Create a grid line mask image, the size of which is equal to the size of the photovoltaic panel segmentation image; Based on the start and end coordinates of each grid line The pixel value of the pixel in the grid mask image that coincides with the grid line coordinates on the photovoltaic panel segmentation image is assigned as (255, 255, 0) to draw the grid line on the grid mask image. Set the width of the grid lines on the grid mask image to 2 pixels; Set the pixel value of the pixel outside the grid line position on the grid mask image to (0, 0, 0).

5. The photovoltaic panel deposition segmentation method based on UNet according to claim 4, characterized in that: The calculation formula for fading the grid lines on the photovoltaic panel segmentation image based on the grid line mask image to obtain a photovoltaic panel segmentation image with faded grid lines is as follows: ; Where n is the number of pixels involved in the calculation, and R is the pixel radius in the neighborhood. Pixels with the same pixel value are not included in the calculation. Calculate the pixel values ​​of corresponding pixels within the neighborhood of a photovoltaic panel segmentation image.

6. The photovoltaic panel deposition segmentation method based on UNet according to claim 1, characterized in that: The UNet-CBAM network embeds the CBAM attention module into the skip connections of the UNet network.

7. An electronic device, characterized in that, include: Memory and processor; The memory is used to store programs; The processor is configured to call a program stored in the memory to execute a UNet-based photovoltaic panel deposition segmentation method as described in any one of claims 1-6.

8. A readable storage medium, characterized in that, The readable storage medium stores a computer program, which, when executed by a processor, implements a UNet-based photovoltaic panel deposition segmentation method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Photovoltaic camera visual angle deviation judgment method and system based on artificial intelligence

    CN112150455A

  • Photovoltaic module glass burst early warning method and system based on artificial intelligence

    CN112529875A