Photovoltaic module EL image processing method and device based on semantic segmentation

Through the photovoltaic module EL image processing method based on semantic segmentation, using the PSPNet model and image preprocessing technology, the accuracy problem of photovoltaic module area extraction is solved, and the efficiency and accuracy of photovoltaic module detection are improved.

CN118736232APending Publication Date: 2024-10-01WUXI INSPECTION TESTING & CERTIFICATION INST +1
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410910091.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

It is difficult to accurately extract the photovoltaic module area with the existing technology, especially when there are shape and size differences and complex defects in the EL image, resulting in low photovoltaic module detection efficiency and accuracy.

Method used

The photovoltaic module EL image processing method based on semantic segmentation is used, the trained PSPNet semantic segmentation model is used for feature extraction and mask prediction, and the corrected photovoltaic module area is obtained by combining image preprocessing and perspective transformation.

Benefits of technology

It improves the segmentation accuracy of photovoltaic component areas in EL images, can effectively extract complete photovoltaic component areas, and is suitable for batch segmentation and extraction in refined operation and maintenance of photovoltaic power plants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736232A_ABST
    Figure CN118736232A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic module EL image processing method and device based on semantic segmentation, and relates to the technical field of image processing. The method comprises the following steps: acquiring a photovoltaic module EL image to be processed; processing the photovoltaic module EL image based on a trained semantic segmentation model to obtain a prediction mask image; performing image preprocessing on the predicted mask image to obtain a binary image; obtaining angular point coordinates of the photovoltaic module in the EL image based on the binary image; and carrying out perspective transformation on the angular point coordinates to obtain a corrected photovoltaic module EL image. The photovoltaic module EL image is segmented and corrected based on the semantic segmentation and image processing method, so that a complete photovoltaic module area is obtained, and the accuracy of photovoltaic module segmentation and correction is 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 image processing, and specifically provides a photovoltaic module EL image processing method and device based on semantic segmentation. Background Art

[0002] With the rapid development of photovoltaic power generation technology, the quality inspection and performance evaluation of photovoltaic modules, as the core component of solar power generation systems, have become increasingly important. The widespread application of drone technology has provided an efficient and convenient means for photovoltaic module inspection. Electroluminescence (EL) imaging technology has become a widely used inspection method because it can display defects and structural features inside photovoltaic modules.

[0003] EL images usually have complex structures and a large amount of information, making manual analysis and processing difficult and time-consuming. For EL images taken by drones, in order to ensure the efficiency of drone inspections, EL images contain multiple photovoltaic module areas and background areas, where the photovoltaic module area contains complete photovoltaic module areas and incomplete photovoltaic module areas. Therefore, developing an automated EL image segmentation method to accurately and efficiently extract the structural features and defect information of complete photovoltaic modules is of great significance for realizing the refined operation and maintenance of photovoltaic power stations and improving the efficiency and accuracy of photovoltaic module defect detection.

[0004] Currently, applying traditional image processing technology to EL image segmentation faces some challenges: there are differences in various shapes and sizes between photovoltaic modules, and there are various types of defects in EL images, especially for complex defects such as a large number of black flakes on the edges of modules in EL images. These factors make it difficult for traditional image processing technology to accurately extract the complete photovoltaic module area. Summary of the invention

[0005] In order to overcome the above defects, the present invention proposes a photovoltaic module EL image processing method and device based on semantic segmentation, which can solve or at least partially solve the technical problem of limited segmentation effect of complex EL images.

[0006] In a first aspect, the present invention provides a photovoltaic module EL image processing method based on semantic segmentation, the method comprising:

[0007] Acquire the EL image of the photovoltaic module to be processed;

[0008] Processing the photovoltaic module EL image based on the trained semantic segmentation model to obtain a predicted mask image;

[0009] Performing image preprocessing on the predicted mask image to obtain a binary image;

[0010] Obtaining the corner coordinates of the photovoltaic module in the EL image based on the binary image;

[0011] The corner point coordinates are perspective transformed to obtain a corrected photovoltaic module EL image.

[0012] In some implementation schemes, the acquiring of the EL image of the photovoltaic assembly to be processed specifically includes: acquiring the EL image of the photovoltaic assembly taken by a drone as the EL image of the photovoltaic assembly to be processed.

[0013] In some embodiments, the processing of the photovoltaic component EL image based on the trained semantic segmentation model to obtain the predicted mask image specifically includes: inputting the photovoltaic component EL image into the trained semantic segmentation model, performing feature extraction and mask prediction on the photovoltaic component EL image based on the semantic segmentation model, and outputting the predicted mask image.

[0014] In some implementation schemes, the semantic segmentation model adopts a semantic segmentation model based on PSPNet;

[0015] The training process of the PSPNet-based semantic segmentation model includes:

[0016] Construct training and validation sets based on the acquired EL images of photovoltaic modules;

[0017] Constructing a semantic segmentation model based on PSPNet, and introducing an attention mechanism into the semantic segmentation model based on PSPNet;

[0018] Performing a data augmentation operation on the data in the training set;

[0019] The semantic segmentation model based on PSPNet is trained based on the training set, and the model is evaluated and verified using the verification set to obtain a trained semantic segmentation model.

[0020] In some embodiments, the performing image preprocessing on the predicted mask image to obtain the binary image specifically includes: performing grayscale processing on the predicted mask image to convert it into a grayscale image, and then performing binarization processing on the grayscale image to obtain the binary image;

[0021] Or specifically including: performing grayscale processing on the predicted mask image to convert it into a grayscale image, performing binarization processing on the grayscale image to obtain the binary image, and performing morphological processing on the binary image.

[0022] In some embodiments, obtaining the corner coordinates of the photovoltaic component in the EL image based on the binary image specifically includes:

[0023] Performing contour detection on the binary image to find all contours of the photovoltaic component in the EL image, performing polygon fitting on the found contours to obtain fitted contours, and performing corner point detection based on the fitted contours to obtain the coordinates of the corner points of the photovoltaic component in the EL image;

[0024] Or it specifically includes: performing contour detection on the binary image to find all contours of the photovoltaic component in the EL image, performing polygon fitting on the found contours to obtain a fitted contour, performing convex hull processing on the fitted contour to obtain a target contour; performing corner point detection based on the target contour to obtain the corner point coordinates of the photovoltaic component in the EL image.

[0025] Furthermore, performing polygon fitting on the found contour to obtain the fitted contour specifically includes: performing polygon fitting on the contour using Douglas-Peucker algorithm to obtain the fitted contour.

[0026] In some implementation schemes, the perspective transformation formula used in the perspective transformation is as follows:

[0027]

[0028] Among them, the matrix is the transformation matrix of the perspective transformation, which is a 3×3 matrix. is the original target point, i.e. the coordinates of the corner point before transformation;

[0029] And the perspective transformation is obtained Use the following formula for further transformation:

[0030]

[0031] in, are the transformed corner coordinates.

[0032] In a second aspect, the present invention provides a control device comprising a processor and a storage device, wherein the storage device is suitable for storing a plurality of program codes, and the program codes are suitable for being loaded and run by the processor to execute the method described in any one of the technical solutions of the above-mentioned photovoltaic component EL image processing method based on semantic segmentation.

[0033] In a third aspect, the present invention provides a computer-readable storage medium storing a plurality of program codes, wherein the program codes are suitable for being loaded and run by a processor to execute the method described in any one of the technical solutions of the above-mentioned photovoltaic component EL image processing method based on semantic segmentation.

[0034] The above one or more technical solutions of the present invention have at least one or more of the following beneficial effects:

[0035] In the technical solution of the present invention, firstly, the EL image of the photovoltaic component to be processed is obtained; based on the trained semantic segmentation model, the EL image of the photovoltaic component is processed to obtain a predicted mask image; the predicted mask image is subjected to image preprocessing to obtain a binary image; based on the binary image, the corner coordinates of the photovoltaic component in the EL image are obtained; the corner coordinates are subjected to perspective transformation to obtain the corrected EL image of the photovoltaic component. In the solution disclosed in the present invention, the EL image is subjected to semantic segmentation using a semantic segmentation model, and the complete photovoltaic component area in the image can be accurately obtained, and then the area identified by the semantic segmentation is subjected to image processing operations to obtain the segmented and corrected EL image of the photovoltaic component. This method effectively improves the accuracy of segmentation and extraction of complete photovoltaic components in EL images, and can also completely extract photovoltaic components with more black defects and mostly located at the edges, and can be well applied to batch segmentation and extraction of photovoltaic components in the refined operation and maintenance of photovoltaic power stations. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The disclosure of the present invention will become more easily understood with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present invention. In addition, similar numbers in the figures are used to represent similar components, among which:

[0037] Figure 1 It is a schematic flow chart of the main steps of a photovoltaic module EL image processing method based on semantic segmentation according to an embodiment of the present invention;

[0038] Figure 2 is a schematic diagram of an EL image of a photovoltaic assembly to be processed according to an embodiment of the present invention;

[0039] Figure 3 It is a schematic diagram of the effect of a predicted mask image obtained based on a semantic segmentation model according to an embodiment of the present invention.

[0040] Figure 4 is a schematic diagram of the effect of a binary image obtained by performing image preprocessing on a prediction mask image according to an embodiment of the present invention;

[0041] Figure 5 is a schematic diagram of the effect of performing perspective transformation on the diagonal point coordinates to obtain a corrected photovoltaic component EL image according to an embodiment of the present invention;

[0042] Figure 6 1 is a flowchart of main steps of a method for training a semantic segmentation model based on PSPNet according to an embodiment of the present invention;

[0043] Figure 7It is a schematic diagram of the main structural block diagram of a photovoltaic component EL image processing device based on semantic segmentation according to an embodiment of the present invention. DETAILED DESCRIPTION

[0044] Some embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0045] In the description of the present invention, "module" and "processor" may include hardware, software or a combination of the two. A module may include hardware circuits, various suitable sensors, communication ports, and memories, and may also include software parts, such as program codes, or a combination of software and hardware. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware, or a combination of the two. Non-temporary computer-readable storage media include any suitable medium that can store program codes, such as a magnetic disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, and the like. The term "A and / or B" means all possible combinations of A and B, such as only A, only B, or A and B. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B", and may include only A, only B, or A and B. The singular terms "one" and "the" may also include plural forms.

[0046] Here we first explain some terms involved in the present invention.

[0047] EL image: Electroluminescence image. Electroluminescence (EL) is a phenomenon that converts electrical energy into light energy. EL images are often used to detect defects in photovoltaic modules.

[0048] PSPNet: The full name is Pyramid Scene Parseing Network. The core idea of ​​PSPNet is to use the pyramid pooling module to capture contextual information at different scales to improve the understanding of image semantics and segmentation accuracy. PSPNet usually uses ResNet (deep residual network) as the backbone network to extract image features.

[0049] Douglas-Peucker algorithm: Douglas-Peucker algorithm is an algorithm for curve simplification that iteratively deletes points on the curve to reduce the number of points while keeping the shape of the curve roughly unchanged.

[0050] At present, the application of traditional image processing technology to EL image segmentation faces some challenges: there are differences in various shapes and sizes between photovoltaic modules, and there are various types of defects in EL images, especially for complex defects such as more black pieces at the edges of modules in EL images. These factors make it difficult for traditional image processing technology to accurately extract the complete photovoltaic module area. Therefore, it is necessary to develop a segmentation method based on the characteristics of photovoltaic module EL images. The EL image processing method proposed in the embodiment of this application realizes efficient and accurate segmentation of EL images by combining semantic segmentation algorithms with image processing methods, providing reliable technical support for refined operation and maintenance.

[0051] See attached Figure 1 , Figure 1 FIG. 1 is a flow chart showing the main steps of a photovoltaic module EL image processing method based on semantic segmentation according to an embodiment of the present invention. Figure 1 As shown, the photovoltaic module EL image processing method in the embodiment of the present invention mainly includes the following steps S101 to S105.

[0052] Step S101: Acquire the EL image of the photovoltaic module to be processed;

[0053] Specifically in this embodiment, an EL image of a photovoltaic assembly photographed by a drone is obtained as the EL image of the photovoltaic assembly to be processed.

[0054] In one embodiment, a photovoltaic assembly installed on a roof can be photographed by a drone to obtain an EL image of the photovoltaic assembly, wherein the resolution of the EL image of the photovoltaic assembly can be 4240×2832. The EL image of the photovoltaic assembly to be processed obtained by photographing by a drone in this embodiment is shown in FIG2 .

[0055] Step S102: Processing the photovoltaic module EL image based on the trained semantic segmentation model to obtain a predicted mask image;

[0056] Specifically, in this embodiment, the photovoltaic module EL image obtained by the drone is input into a trained semantic segmentation model, and feature extraction and mask prediction are performed on the photovoltaic module EL image based on the semantic segmentation model, and the predicted mask image is output. That is, the semantic segmentation model in this embodiment includes two parts: feature extraction and mask prediction, wherein:

[0057] (1) The feature extraction part is usually composed of a backbone network, which is used to extract feature representations from the input image. Common backbone networks include ResNet, Mobilenet, etc. In PSPNet, the backbone network extracts high-level semantic features from the image to capture global and local information in the image. Then, PSPNet processes these features through a pyramid pooling module, which fuses features at four different scales to obtain contextual information at different scales, thereby improving the accuracy of the segmentation results.

[0058] (2) The mask prediction part uses the feature map obtained in the feature extraction part to perform pixel-level classification prediction. In PSPNet, the low-dimensional feature map is directly upsampled through bilinear interpolation to make it the same scale as the original feature map, and the probability distribution of each pixel belonging to each semantic category is generated.

[0059] In addition, since the traditional image processing method alone cannot meet the requirements, the present invention uses a semantic segmentation model based on PSPNet to process the photovoltaic module EL image to obtain a predicted mask image. This model can construct global scene prior information on the final layer feature map of the deep neural network. In order to make the model pay more attention to channel features with large amounts of information and suppress unimportant channel features, the embodiment of the present application improves the existing PSPNet model and adds an attention mechanism to the feature extraction module, so that the model can capture important features more accurately.

[0060] In one embodiment, the photovoltaic module EL image is input into a trained semantic segmentation model based on PSPNet to obtain a predicted mask image of the photovoltaic module. For most photovoltaic module images, the method based on this embodiment can better extract the photovoltaic module area. Figure 3 , which is a schematic diagram of the effect of the predicted mask image obtained by the semantic segmentation model based on PSPNet in an embodiment of the present application.

[0061] Furthermore, the training process of the semantic segmentation model based on PSPNet in this embodiment includes:

[0062] (1) Data preparation: Obtain EL images of photovoltaic modules taken by drones. To ensure image quality and inspection efficiency of photovoltaic power stations, EL images usually contain two or three complete modules, and it is inevitable that adjacent incomplete modules will be photographed. For the EL image segmentation dataset, Labelme is used to label the images. Since the goal is to segment the complete modules in the EL images, the dataset only needs to label the complete modules in the images. The labeled EL images are divided into training sets and validation sets.

[0063] (2) Model construction: Build the PSPNet model, including the feature extraction part and the mask prediction part. Use the pre-trained backbone network ResNet50 as the feature extraction part, and add a pyramid pooling module and appropriate convolutional layers for mask prediction. Add an attention module after the feature extraction part of the backbone network, and use the SENet (Squeeze-and-Excitation Network) module as the attention module. SENet dynamically adjusts the importance of each channel by weighted averaging the feature maps of each channel, so that the model can pay more attention to important features, thereby improving the performance of the model.

[0064] (3) Data augmentation: Perform data augmentation operations on the training data, such as flipping, rotating, and scaling, to increase data diversity and model robustness.

[0065] (4) Model training: The improved PSPNet model is trained using the training set. The image is input into the model, the model's prediction result is calculated, and compared with the true label, and then the model parameters are updated using the back propagation algorithm to minimize the loss function.

[0066] (5) Model evaluation: Use the validation set to evaluate and verify the model. Use evaluation indicators such as accuracy and recall to evaluate the performance of the model, and further tune the model based on the results.

[0067] Step S103: performing image preprocessing on the predicted mask image to obtain a binary image;

[0068] In this embodiment, the image preprocessing performed on the prediction mask image may at least include the steps of image grayscale and binarization, and may preferably also include the step of morphological processing.

[0069] In one embodiment, the performing image preprocessing on the predicted mask image to obtain the binary image specifically includes: performing grayscale processing on the predicted mask image to convert it into a grayscale image, and then performing binarization processing on the grayscale image to obtain the binary image.

[0070] In one embodiment, the image preprocessing of the predicted mask image to obtain the binary image specifically includes: converting the predicted mask image into a grayscale image by grayscale processing, binarizing the grayscale image to obtain the binary image, and then performing morphological processing on the binary image.

[0071] Specifically, the predicted mask image is grayed, the optimal threshold is automatically selected on the grayscale image using the Otsu algorithm, and then the image is binarized. Through adaptive threshold selection, the image contrast can be enhanced and the important features in the image can be highlighted, thereby achieving the best binarization effect. This method is suitable for images of different types and features, reducing the tedious process of manually selecting thresholds.

[0072] Specifically, morphological processing is an opening operation. When two adjacent components in the EL image are black, the mask image will be stuck and protruded, so these redundant areas need to be removed. First, an erosion operation is performed on the binary image to reduce the protruding parts of the image periphery, make the objects smaller and disconnect them; then, an expansion operation is performed on the eroded image. This combination of operations is also called an opening operation, which can be used to eliminate small background noise, separate some sticky targets, and smooth the boundaries of objects without significantly changing their areas.

[0073] In the embodiment of the present application, the effect diagram of the binary image obtained after graying, binarization and morphological processing of the predicted mask image is as follows: Figure 4 As shown, it can be seen that the adhesions of adjacent components have been removed after morphological processing.

[0074] Step S104: obtaining the corner coordinates of the photovoltaic module in the EL image based on the binary image;

[0075] Specifically in this embodiment, the binary image may be first subjected to contour detection and polygon fitting to obtain a fitted contour, and then corner point detection may be performed to obtain corner point coordinates; or the fitted contour may be further subjected to convex hull processing and then corner point detection may be performed to obtain corner point coordinates.

[0076] In one embodiment, firstly, contour detection is performed on the binary image to find all contours of the photovoltaic component in the EL image, polygon fitting is performed on the found contours to obtain fitted contours, and corner point detection is performed based on the fitted contours to obtain the corner point coordinates of the photovoltaic component in the EL image;

[0077] In one implementation, firstly, contour detection is performed on the binary image to find all contours of the photovoltaic component in the EL image, polygon fitting is performed on the found contour to obtain a fitted contour, and convex hull processing is performed on the fitted contour to obtain a target contour; corner point detection is performed based on the target contour to obtain the corner point coordinates of the photovoltaic component in the EL image. It should be understood that the convex hull refers to the smallest convex polygon surrounding a set of points, and the convex hull processing can further simplify the contour and extract a more compact shape representation.

[0078] Specifically, in this embodiment, the Douglas-Peucker algorithm (DP algorithm for short) may be used for polygon fitting. The basic principle of the DP algorithm is as follows:

[0079] (1) First, connect the first point (anchor) and the last point of the curve, and calculate the maximum distance from other points to this line.

[0080] (2) If the distance is less than a set threshold, the first and last points are retained and the other points are deleted. On the contrary, if the distance is greater than the threshold, the line segment is divided into two parts and the above steps are continued.

[0081] (3) Repeat all the above steps until all line segments are processed.

[0082] (4) Finally, all the points that have been used as curve anchors are connected to approximate a polygon.

[0083] Furthermore, convex hull processing is performed on the basis of the fitted contour. For most photovoltaic modules, excellent quadrilaterals can be obtained after convex hull processing. However, for some modules with more black film defects, quadrilaterals surrounding the modules cannot be formed. Therefore, the minimum circumscribed rectangle algorithm is further applied to the convex hull to obtain the coordinates of the four corner points of the photovoltaic module in the EL image.

[0084] Specifically, the convex hull of the fitted polygon is processed, the area of ​​the convex hull is calculated, and the minimum circumscribed rectangle of the convex hull is obtained according to the area. After obtaining the minimum circumscribed rectangle, the four corner points of the rectangle can be obtained. By calculating the centroid of the quadrilateral and the polar angle of each corner point relative to the centroid, the corner points are sorted according to the polar angle to ensure that they are arranged in the order of upper left, upper right, lower right, and lower left, and the coordinates of the four corner points are recorded.

[0085] Step S105: performing perspective transformation on the corner point coordinates to obtain a corrected photovoltaic module EL image.

[0086] Specifically, in this embodiment, after obtaining the corner coordinates of the photovoltaic module area based on the binary image, in the photovoltaic module EL image (i.e. Figure 2The coordinates of the corner points are transformed in perspective on the image shown in FIG. 1 to obtain the corrected photovoltaic module EL image, i.e., the photovoltaic module segmentation result. Specifically, Figure 5 shown.

[0087] Specifically, the perspective transformation formula used in the perspective transformation is as follows:

[0088]

[0089] Among them, the matrix is the transformation matrix of the perspective transformation, which is a 3×3 matrix. is the original target point, i.e. the coordinates of the corner point before transformation;

[0090] The perspective transformation is obtained Use the following formula for further transformation:

[0091]

[0092] in, are the transformed corner point coordinates.

[0093] Based on the above step S102, the semantic segmentation model adopts a semantic segmentation model based on PSPNet; for this purpose, the embodiment of the present application also provides a training method for a semantic segmentation model based on PSPNet, such as Figure 6 As shown, the training method mainly includes the following steps S201 to S204.

[0094] Step S201: constructing a training set and a validation set based on the acquired photovoltaic module EL images;

[0095] Specifically, obtain the EL image of the photovoltaic module taken by the drone, and use the image annotation tool (such as Labelme) to annotate the complete components in the EL image. The annotated data set is divided into a training set and a validation set. Among them, the format of the dataset annotated by Labelme is json format. It is necessary to convert the json format label image into PNG format before dividing the data set.

[0096] Step S202: constructing a semantic segmentation model based on PSPNet, and introducing an attention mechanism into the semantic segmentation model based on PSPNet;

[0097] Specifically, the constructed semantic segmentation model based on PSPNet includes feature extraction and mask prediction. Based on the existing PSPNet model, the pre-trained backbone network ResNet50 is used as the feature extraction part, and the attention mechanism is introduced into the PSPNet model. Among them, the pyramid pooling module of the PSPNet model integrates four feature maps of different scales, whose sizes are 1×1, 2×2, 3×3, and 6×6. The coarsest 1×1 is the global scale pooling. The global pooling level captures the global features of the entire image. The remaining levels will divide the image into different sub-regions to form information representations of different regions. The outputs of different levels in the pyramid pooling module contain feature maps of different proportions. In order to maintain the weight of the global feature, a 1×1 convolution layer is used after each pyramid level to reduce the feature dimension to 1 / 4 of the original. The low-dimensional feature map is upsampled by bilinear interpolation to make it the same scale as the original feature map. The features of different levels are spliced ​​together as the global features of pyramid pooling. The fused global features are then merged with the original feature map to obtain the final output feature map. Finally, a convolution layer is used to obtain the prediction result, i.e., the predicted mask image.

[0098] The feature extraction network uses a pre-trained ResNet model with dilated convolutions. The main function of dilated convolutions is to increase the receptive field. An attention module is added to the feature extraction of the backbone network. The SENet module is used as the attention module. A SENet module is inserted after the output of each residual block of ResNet50 to adjust its attention. The SENet module can help the network learn the importance of different channels in each residual block and adjust the feature map accordingly.

[0099] Step S203: performing data enhancement operation on the data in the training set;

[0100] Specifically, since the number of EL images of photovoltaic modules is small, it belongs to a small-scale dataset, and the number of datasets will greatly affect the training accuracy of deep learning models, so the dataset needs to be expanded. In order to ensure the integrity of the components, data enhancement operations such as rotation, vertical flipping, left-right flipping, adding Gaussian noise, and scaling are used here to expand the samples.

[0101] Step S204: Train the PSPNet-based semantic segmentation model based on the training set, and use the verification set to evaluate and verify the model to obtain a trained semantic segmentation model.

[0102] Specifically, the training optimizer can select an adaptive gradient algorithm (such as the Adam optimizer) and set an appropriate learning rate, batch size, and number of training rounds to ensure the training effect and performance of the model. By evaluating and verifying the model through the validation set, the best model weights can be selected and input into the model network for subsequent prediction of the mask map of the EL image.

[0103] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art can understand that in order to achieve the effects of the present invention, different steps do not have to be performed in such an order. They can be performed simultaneously (in parallel) or in other orders. These changes are within the scope of protection of the present invention.

[0104] Furthermore, the present invention also provides a photovoltaic module EL image processing device based on semantic segmentation. Figure 7 , Figure 7 FIG. 1 is a schematic diagram of the main structure of a photovoltaic module EL image processing device based on semantic segmentation according to an embodiment of the present invention. Figure 7 As shown, the photovoltaic module EL image processing device in the embodiment of the present invention mainly includes an original image acquisition module 301, a mask image prediction module 302, an image preprocessing module 303, a corner point detection module 304 and a target image output module 305, wherein the function configuration of each module is as follows:

[0105] Original image acquisition module 301: used to acquire the EL image of the photovoltaic module to be processed;

[0106] The mask image prediction module 302 is used to process the photovoltaic module EL image based on the trained semantic segmentation model to obtain a predicted mask image;

[0107] Image preprocessing module 303: used for performing image preprocessing on the predicted mask image to obtain a binary image;

[0108] Corner point detection module 304: used to obtain the corner point coordinates of the photovoltaic module in the EL image based on the binary image;

[0109] The target image output module 305 is used to perform perspective transformation on the corner point coordinates to obtain a corrected photovoltaic module EL image.

[0110] The photovoltaic module EL image processing device based on semantic segmentation is used to perform Figure 1The embodiment of the photovoltaic module EL image processing method based on semantic segmentation is shown, and the technical principles, technical problems solved and technical effects produced by the two are similar. Technical personnel in this technical field can clearly understand that for the convenience and conciseness of description, the specific working process and related instructions of the photovoltaic module EL image processing device based on semantic segmentation can refer to the contents described in the embodiment of the photovoltaic module EL image processing method based on semantic segmentation, which will not be repeated here.

[0111] It is understood by those skilled in the art that the present invention implements all or part of the processes in the method of the above embodiment, and can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code.

[0112] Furthermore, the present invention also provides a control device. In an embodiment of a control device according to the present invention, the control device includes a processor and a storage device. The storage device can be configured to store a program for executing the photovoltaic component EL image processing method based on semantic segmentation of the above method embodiment, and the processor can be configured to execute the program in the storage device, which includes but is not limited to the program for executing the photovoltaic component EL image processing method based on semantic segmentation of the above method embodiment. For ease of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The control device can be a control device device formed by various electronic devices.

[0113] Furthermore, the present invention also provides a computer-readable storage medium. In a computer-readable storage medium embodiment according to the present invention, the computer-readable storage medium can be configured to store a program for executing the photovoltaic component EL image processing method based on semantic segmentation of the above method embodiment, and the program can be loaded and run by the processor to implement the above photovoltaic component EL image processing method based on semantic segmentation. For ease of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The computer-readable storage medium can be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present invention is a non-temporary computer-readable storage medium.

[0114] Further, it should be understood that since the setting of each module is only for illustrating the functional units of the device of the present invention, the physical devices corresponding to these modules may be the processor itself, or a part of the software in the processor, a part of the hardware, or a part of the combination of software and hardware. Therefore, the number of each module in the figure is only schematic.

[0115] Those skilled in the art will appreciate that the modules in the device can be adaptively split or merged. Such splitting or merging of specific modules will not cause the technical solution to deviate from the principle of the present invention, and therefore, the technical solutions after splitting or merging will fall within the protection scope of the present invention.

[0116] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

Claims

1. A photovoltaic module EL image processing method based on semantic segmentation, characterized in that: The method comprises: Acquire the EL image of the photovoltaic module to be processed; Processing the photovoltaic module EL image based on the trained semantic segmentation model to obtain a predicted mask image; Performing image preprocessing on the predicted mask image to obtain a binary image; Obtaining the corner coordinates of the photovoltaic module in the EL image based on the binary image; The corner point coordinates are perspective transformed to obtain a corrected photovoltaic module EL image.

2. The method according to claim 1, characterized in that: The acquiring of the photovoltaic assembly EL image to be processed specifically includes: acquiring the photovoltaic assembly EL image photographed by a drone as the photovoltaic assembly EL image to be processed.

3. The method according to claim 1, characterized in that: The processing of the photovoltaic component EL image based on the trained semantic segmentation model to obtain the predicted mask image specifically includes: inputting the photovoltaic component EL image into the trained semantic segmentation model, performing feature extraction and mask prediction on the photovoltaic component EL image based on the semantic segmentation model, and outputting the predicted mask image.

4. The method according to claim 1 or 3, characterized in that: The semantic segmentation model adopts a semantic segmentation model based on PSPNet; The training process of the PSPNet-based semantic segmentation model includes: Construct training and validation sets based on the acquired EL images of photovoltaic modules; Constructing a semantic segmentation model based on PSPNet, and introducing an attention mechanism into the semantic segmentation model based on PSPNet; Performing a data augmentation operation on the data in the training set; The semantic segmentation model based on PSPNet is trained based on the training set, and the model is evaluated and verified using the verification set to obtain a trained semantic segmentation model.

5. The method according to claim 1, characterized in that: The performing image preprocessing on the predicted mask image to obtain the binary image specifically includes: performing grayscale processing on the predicted mask image to convert it into a grayscale image, and then performing binarization processing on the grayscale image to obtain the binary image; Or specifically including: performing grayscale processing on the predicted mask image to convert it into a grayscale image, performing binarization processing on the grayscale image to obtain the binary image, and performing morphological processing on the binary image.

6. The method according to claim 1, characterized in that: The step of obtaining the corner point coordinates of the photovoltaic component in the EL image based on the binary image specifically includes: Performing contour detection on the binary image to find all contours of the photovoltaic component in the EL image, performing polygon fitting on the found contours to obtain fitted contours, and performing corner point detection based on the fitted contours to obtain the coordinates of the corner points of the photovoltaic component in the EL image; Or it specifically includes: performing contour detection on the binary image to find all contours of the photovoltaic component in the EL image, performing polygon fitting on the found contours to obtain a fitted contour, performing convex hull processing on the fitted contour to obtain a target contour; performing corner point detection based on the target contour to obtain the corner point coordinates of the photovoltaic component in the EL image.

7. The method according to claim 6, characterized in that: The performing polygon fitting on the found contour to obtain the fitted contour specifically comprises: performing polygon fitting on the contour using the Douglas-Peucker algorithm to obtain the fitted contour.

8. The method according to claim 1, characterized in that: The perspective transformation formula used in the perspective transformation is as follows: Among them, the matrix is the transformation matrix of the perspective transformation, which is a 3×3 matrix. is the original target point, i.e. the coordinates of the corner point before transformation; And the perspective transformation is obtained Use the following formula for further transformation: in, are the transformed corner coordinates.

9. A control device, comprising a processor and a storage device, wherein the storage device is suitable for storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by the processor to execute a photovoltaic component EL image processing method based on semantic segmentation according to any one of claims 1 to 8.

10. A computer-readable storage medium storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by a processor to execute a photovoltaic component EL image processing method based on semantic segmentation according to any one of claims 1 to 8.

Citation Information

Cited By

  • Photovoltaic module defect diagnosis method, device and equipment

    CN119338820A

  • Corner point detection method and device, electronic equipment, storage medium and program product

    CN119810470A

  • Photovoltaic module edge position extraction method and device, storage medium and robot

    CN120807941A