Photovoltaic string defect identification method, device, equipment and medium

By calculating the component profile similarity score and component defect detection model in component pictures, the problems of low efficiency and inaccurate positioning in photovoltaic string defect recognition are solved, automatic identification and accurate positioning are realized, and photovoltaic string defect recognition is improved Efficiency and accuracy.

CN119048506BActive Publication Date: 2025-01-07SHENZHEN QIHANG TERRITORY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411528663.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-01-07
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

The prior art is inefficient in photovoltaic string defect identification and inaccurate positioning of defects, requiring a large amount of human resources.

Method used

By calculating the component profile similarity score in the component picture, the defect information in the component image is detected based on the component defect detection model, and the defect information is mapped on the string picture to generate defect recognition results of the photovoltaic string to achieve automatic identification and accuracy position.

Benefits of technology

It improves the efficiency of photovoltaic string defect identification and positioning accuracy, reduces manual participation, and realizes automatic identification and positioning without manual participation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048506B_ABST
    Figure CN119048506B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and medium for defect identification of photovoltaic strings, the method comprising: obtaining component images and string shape information of at least two photovoltaic components of a photovoltaic string, splicing component images to obtain a string image of the photovoltaic string; performing contour extraction on the same component image to obtain at least two groups of candidate contours; obtaining actual contour parameters of at least two groups of candidate contours, calculating contour scores of at least two groups of candidate contours based on a preset contour similarity score algorithm, standard contour parameters and actual contour parameters, and determining component contours; determining component images based on component contours, inputting component images into a pre-trained component defect detection model, and determining defect information in component images; mapping defect information to string images, and generating defect identification results of photovoltaic strings based on image processing. Through this technical solution, the efficiency of photovoltaic string defect identification and the accuracy of positioning can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image data processing technology, and specifically relates to a method, device, equipment and medium for identifying defects of photovoltaic strings. Background Art

[0002] A photovoltaic string is a group of battery modules formed by connecting multiple photovoltaic modules in series. Photovoltaic modules are devices that convert solar energy into electrical energy using the photovoltaic effect. They are the basic units of a photovoltaic system and consist of multiple photovoltaic cells electrically connected.

[0003] In the prior art, defect identification of photovoltaic strings is often performed by component inspectors to perform appearance inspections on photovoltaic components in the photovoltaic strings, and to determine whether the components are defective by manually observing the shape of each photovoltaic component or whether there are cracks, scratches, bulges, etc. on the outer surface. If a component defect is found, the component defect type is inferred, and the component defect location and the defective component location in the photovoltaic string are recorded. However, the use of prior art to identify defects in photovoltaic strings requires a large amount of human resources, and not only is the defect identification efficiency low, but also the defect location of the string cannot be accurately located. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a defect recognition method, device, equipment and medium for a photovoltaic string, which solves the problems of low defect recognition efficiency and inaccurate defect positioning when using the existing technology to identify photovoltaic strings. The component image is determined by calculating the similarity score of the component outline in the component image, and the defect information in the component image is detected based on the component defect detection model. The defect information is mapped to the string image, and the defect recognition result of the photovoltaic string is generated by image data processing. The purpose of automatically identifying string defects and locating defects without human participation can be achieved, thereby improving the efficiency of photovoltaic string defect recognition and the accuracy of positioning.

[0005] In a first aspect, an embodiment of the present application provides a method for identifying defects in a photovoltaic string, the method comprising:

[0006] Acquire component images and string shape information of at least two photovoltaic components constituting a photovoltaic string, and obtain a string image of the photovoltaic string by splicing the component images based on the string shape information, wherein the component images correspond one-to-one to the photovoltaic components;

[0007] Based on the first preset contour extraction strategy and the second preset contour extraction strategy, respectively, contour extraction is performed on the same component image to obtain at least two groups of candidate contours;

[0008] Acquire actual contour parameters of the at least two groups of candidate contours and standard contour parameters of the photovoltaic component, calculate contour scores of the at least two groups of candidate contours based on a preset contour similarity scoring algorithm, the standard contour parameters and the actual contour parameters, and determine the component contour in the component image based on the contour scores;

[0009] Determine a component image in the component picture based on the component outline, and input the component image into a pre-trained component defect detection model to determine defect information in the component picture based on the component defect detection model;

[0010] The defect information is mapped onto the string image to generate a defect identification result of the photovoltaic string.

[0011] Further, the actual contour parameters include the actual diagonal ratio, the actual length-width ratio, and the actual vertex-to-center distance ratio of the candidate contour, and the standard contour parameters include the standard diagonal ratio, the standard length-width ratio, and the standard vertex-to-center distance ratio of the component contour;

[0012] Accordingly, the calculating the contour scores of the at least two groups of candidate contours based on the preset contour similarity scoring algorithm, the standard contour parameters and the actual contour parameters respectively includes:

[0013] Calculating contour similarity scores of the at least two groups of candidate contours and the component contour respectively based on a preset contour similarity score algorithm, the actual diagonal ratio, the actual aspect ratio, the actual distance ratio, the standard diagonal ratio, the standard aspect ratio, and the standard distance ratio;

[0014] The contour similarity scores are sorted, and based on the sorting result, the candidate contour with the highest contour similarity score is determined as the component contour.

[0015] Furthermore, the preset contour similarity score algorithm is expressed by the following formula:

[0016] ;

[0017] in, is the actual diagonal ratio, is the standard diagonal ratio, The actual aspect ratio value, is the standard aspect ratio value, is the ratio of the actual distance from the vertex to the center point is the ratio of the distance from the vertex to the center point, is the preset diagonal ratio weight, is the preset aspect ratio weight, The weight of the ratio of the actual distance from the preset vertex to the center point, A contour similarity score is obtained for the candidate contour and the component contour.

[0018] Further, each of the at least two groups of candidate contours includes at least two contours;

[0019] Before respectively calculating the contour scores of the at least two groups of candidate contours based on a preset contour similarity scoring algorithm, the standard contour parameters and the actual contour parameters, the method further includes:

[0020] Performing rectangular fitting on at least two contours in each group of candidate contours to obtain at least two first rectangular contours;

[0021] Calculating the inner angles between two adjacent contours in each of the first rectangular contours respectively, and identifying whether there is an interfering inner angle exceeding a preset angle range in the inner angles;

[0022] In the case where there is an interfering inner angle exceeding a preset angle range in the inner angle number, the first rectangular outline where the interfering inner angle is located is deleted to obtain at least two groups of second rectangular outlines;

[0023] Accordingly, the calculating the contour scores of the at least two groups of candidate contours based on the preset contour similarity scoring algorithm, the standard contour parameters and the actual contour parameters respectively includes:

[0024] The contour scores of the at least two groups of second rectangular contours are respectively calculated based on a preset contour similarity score algorithm, the standard contour parameters and the actual contour parameters.

[0025] Furthermore, before inputting the component image into a pre-trained component defect detection model, the method further includes:

[0026] Based on a preset marking tool, the defect type and defect location of each component defect training image are marked respectively, and the marked component defect training images are preprocessed to obtain a component defect training data set;

[0027] A pre-built neural network model is trained based on the component defect training data set to obtain a component defect detection model.

[0028] Further, the defect information includes the defect type and defect location of the component image;

[0029] The mapping the defect information onto the string image includes:

[0030] Obtaining the image position of the component image in the group string image, the interval size of the component image, and the image size of the component image;

[0031] Identify the defect coordinates of the defect position in a preset component image coordinate system;

[0032] The defect coordinates are mapped to a preset string image coordinate system based on the image position, the interval size, and the image size to obtain coordinates of the defect type in the preset string image coordinate system.

[0033] Further, after determining the component image in the component picture based on the component outline, the method further includes:

[0034] Obtain the coordinates of the corner points of the component outline in the preset component image coordinate system;

[0035] Performing distortion correction on the component image based on the pre-stored perspective transformation matrix and the corner point coordinates to obtain a standard component image;

[0036] The component image is replaced by the standard component image to determine defect information in the component picture based on the standard component image and a component defect detection model.

[0037] In a second aspect, an embodiment of the present application provides a photovoltaic string defect identification device, the device comprising:

[0038] A string image acquisition module, used to acquire component images and string shape information of at least two photovoltaic components constituting a photovoltaic string, and to obtain a string image of the photovoltaic string by splicing the component images based on the string shape information, wherein the component images correspond one-to-one to the photovoltaic components;

[0039] A component contour extraction module, configured to extract contours from the same component image based on a first preset contour extraction strategy and a second preset contour extraction strategy to obtain at least two groups of candidate contours;

[0040] A component contour screening module, used to obtain actual contour parameters of the at least two groups of candidate contours and standard contour parameters of the photovoltaic component, calculate contour scores of the at least two groups of candidate contours based on a preset contour similarity scoring algorithm, the standard contour parameters and the actual contour parameters, and determine the component contour in the component image based on the contour scores;

[0041] a defect information determination module, configured to determine a component image in the component picture based on the component outline, and input the component image into a pre-trained component defect detection model to determine defect information in the component picture based on the component defect detection model;

[0042] The defect result generating module is used to map the defect information onto the string image to generate a defect identification result of the photovoltaic string.

[0043] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0044] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0045] In the fifth aspect, an embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium, and at least one processor of the device reads and executes the computer program from the computer-readable storage medium, so that the device performs the method described in the first aspect.

[0046] In an embodiment of the present application, component images and string shape information of at least two photovoltaic components constituting a photovoltaic string are obtained, and the component images are spliced ​​based on the string shape information to obtain a string image of the photovoltaic string, wherein the component images correspond one-to-one to the photovoltaic components; contour extraction is performed on the same component image based on a first preset contour extraction strategy and a second preset contour extraction strategy to obtain at least two groups of candidate contours; actual contour parameters of the at least two groups of candidate contours and standard contour parameters of the photovoltaic components are obtained, contour scores of the at least two groups of candidate contours are calculated based on a preset contour similarity score algorithm, the standard contour parameters and the actual contour parameters, and the component contour in the component image is determined based on the contour score; a component image in the component image is determined based on the component contour, and the component image is input into a pre-trained component defect detection model to determine defect information in the component image based on the component defect detection model; the defect information is mapped onto the string image to generate a defect recognition result for the photovoltaic string. The above-mentioned photovoltaic string defect recognition method solves the problems of low defect recognition efficiency and inaccurate defect location positioning when using the existing technology to identify photovoltaic string defects. The component image is determined by calculating the similarity score of the component outline in the component image, and the defect information in the component image is detected based on the component defect detection model. The defect information is mapped to the string image, and the photovoltaic string defect recognition result is generated by image data processing. The purpose of automatically identifying string defects and locating defects without human participation can be achieved, thereby improving the efficiency of photovoltaic string defect recognition and the accuracy of positioning. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 is a flow chart of a photovoltaic string defect identification method provided in an embodiment of the present application;

[0048] Figure 2 is a flow chart of calculating the contour score of a candidate contour provided by an embodiment of the present application;

[0049] Figure 3 is a flow chart of another photovoltaic string defect identification method provided in an embodiment of the present application;

[0050] Figure 4 is a flow chart of defect coordinate mapping provided by this application;

[0051] Figure 5 It is a structural block diagram of a photovoltaic string defect identification device provided in an embodiment of the present application;

[0052] Figure 6 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only part of the present application is shown in the accompanying drawings, but not all of the content. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0054] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0055] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0056] First of all, the usage scenario of this solution can be a scenario of defect detection for photovoltaic strings, especially the scenario of detecting the shape of each photovoltaic module in the photovoltaic string or whether there are defects such as fractures, scratches and bulges on the outer surface. The component image is determined by calculating the similarity score of the component contour in the component image, and the defect information in the component image is detected based on the component defect detection model. The defect information is mapped to the string image and the defect recognition result of the photovoltaic string is generated by image data processing. The purpose of automatically identifying string defects and locating defects without human participation can be achieved, thereby improving the efficiency of photovoltaic string defect recognition and the accuracy of positioning. Based on the above usage scenarios, it can be understood that the executor of this solution can be an electronic device, such as smart terminals such as mobile phones, tablets and desktop computers.

[0057] In conjunction with the accompanying drawings, a photovoltaic string defect identification method, device, equipment and medium provided by the embodiments of the present application are described in detail through specific embodiments and their application scenarios.

[0058] Figure 1 1 is a flow chart of a photovoltaic string defect identification method provided in an embodiment of the present application. Figure 1 As shown, the specific steps include:

[0059] S101, obtaining component images and string shape information of at least two photovoltaic components constituting a photovoltaic string, and splicing the component images based on the string shape information to obtain a string image of the photovoltaic string, wherein the component images correspond to the photovoltaic components one by one.

[0060] Among them, the photovoltaic string can be a battery module with a certain voltage and current output connected by multiple photovoltaic modules in series and parallel. The voltage of the photovoltaic string is equal to the sum of the voltages of each photovoltaic module, and the current is equal to the current of each photovoltaic module and the value is fixed. The photovoltaic module can be a device that converts sunlight into electrical energy using the photovoltaic effect. For example: solar cells, etc. The component image can be a picture that can represent the outer surface features of the component. The component image can be obtained by photographing the entire photovoltaic module using an image acquisition device. The component image in this solution can be obtained by photographing the position where a drone is fixed at a distance from the photovoltaic module and only one photovoltaic module is included in a component image, that is, the component image corresponds to the photovoltaic module one by one. The component image can be named according to the shooting order, and can also be named according to the combination of the component model and the shooting order. The specific component image naming method is not specifically limited here, as long as different component images can be distinguished. The string shape information can be information used to describe the connection order and location of each component in the string. The string image can be a picture that can represent the component composition and distribution of the string. The string image can be obtained by connecting the photovoltaic modules. The photovoltaic components in a photovoltaic string can be distributed in a clustered manner or in a dispersed manner. This solution can avoid the problem of not being able to accurately obtain the entire string image when the photovoltaic components are distributed in a dispersed manner by collecting images of individual photovoltaic components and stitching the string images.

[0061] In one embodiment, component images of at least two photovoltaic components constituting a photovoltaic string can be obtained by an image acquisition device, and string shape information of the photovoltaic string can be obtained by recording the shooting path and shooting sequence of the image acquisition device. The component images are spliced ​​together according to the string shape information to obtain a string image of the photovoltaic string.

[0062] S102: Perform contour extraction on the same component image based on a first preset contour extraction strategy and a second preset contour extraction strategy to obtain at least two groups of candidate contours.

[0063] Among them, the first preset contour extraction strategy and the second preset contour extraction strategy can be different extraction methods for respectively performing contour extraction on the same component image. For example, the first preset contour extraction strategy can be to convert the image in the component image into a grayscale image, and then use Gaussian filtering to smooth the image according to the grayscale image characteristics of the photovoltaic component, remove the noise in the image, and obtain a binary image through adaptive threshold algorithm processing, and finally use a custom convolution kernel to perform a convolution operation on the image, remove scattered point sets, connect short-distance discontinuous areas, and extract contours; the second preset contour extraction strategy can be to convert the image in the component image into a grayscale image, and then use median filtering to smooth the image according to the shape characteristics of the photovoltaic component, remove image noise and retain edge information, capture the edge information of the image through Canny edge detection, calculate the sum of the pixel values ​​of all points on the straight line at the horizontal and vertical angles in the image, remove the point sets with too small sums, reduce interference, and improve detection accuracy, and finally use a custom convolution kernel to perform a convolution operation on the image, remove scattered point sets, connect short-distance discontinuous areas, and extract contours. The candidate contours can be contours obtained after contour extraction of the same component image using different contour extraction strategies.

[0064] In one embodiment, the first preset contour extraction strategy and the second preset contour extraction strategy can be used to perform contour extraction on the same component image respectively. Each contour extraction strategy will extract a set of contours for the component image. By performing contour extraction on the same component image with two different contour collection strategies, at least two sets of candidate contours can be extracted.

[0065] S103, obtaining actual contour parameters of at least two groups of candidate contours and standard contour parameters of photovoltaic components, respectively calculating contour scores of at least two groups of candidate contours based on a preset contour similarity scoring algorithm, standard contour parameters and actual contour parameters, and determining component contours in the component image based on the contour scores.

[0066] Among them, the actual contour parameter may be a contour parameter that can represent the shape characteristics of the candidate contour. For example, at least one of the parameters such as the ratio of the diagonal length of the candidate contour, the ratio of the length and width of the candidate contour, and the ratio of the distance between the contour vertex and the center point of the candidate contour. The preset contour similarity score algorithm may be a preset algorithm for calculating the similarity between the candidate contour and the component contour. The contour score may be a parameter representing the similarity between the candidate contour and the component contour. The higher the contour score of the candidate contour, the higher the similarity between the candidate contour and the component contour, and the greater the possibility that the candidate contour is a component in the component picture. The standard contour parameter may be a contour parameter that can represent the contour shape characteristics of the photovoltaic component. The standard contour parameter corresponds to the actual contour parameter and the parameter is fixed. For example, if the actual contour parameter is the ratio of the diagonal length of the candidate contour, then the standard contour parameter is also the ratio of the diagonal length of the photovoltaic component. Since the standard contour parameter is fixed, the standard contour parameter of the photovoltaic component can be calculated in advance and stored.

[0067] In one embodiment, the contour length of each contour in at least two groups of candidate contours can be obtained by image recognition and other technologies, and the actual contour parameters of each group of candidate contours can be calculated using the contour length, and the standard contour parameters of the photovoltaic module can be obtained by reading the contour data of the pre-stored photovoltaic module. The contour score of each group of candidate contours is calculated by a preset contour similarity score algorithm and each group of actual contour parameters, and the contour scores of at least two groups of candidate contours are obtained. By comparing the contour scores, the candidate contour with the highest contour score can be determined as the component contour in the component image; and by preset score thresholds, the candidate contour with a contour score higher than the preset score threshold can be determined as the component contour in the component image.

[0068] In one embodiment, optionally, each of the at least two groups of candidate contours includes at least two contours;

[0069] Before respectively calculating the contour scores of at least two groups of candidate contours based on the preset contour similarity scoring algorithm, the standard contour parameters and the actual contour parameters, the method further includes:

[0070] Performing rectangular fitting on at least two contours in each group of candidate contours to obtain at least two first rectangular contours;

[0071] Calculate the inner angles between two adjacent contours in each first rectangular contour respectively, and identify whether there is an interfering inner angle exceeding a preset angle range in the inner angles;

[0072] When there is an interfering inner angle exceeding a preset angle range in the inner angle number, the first rectangular outline where the interfering inner angle is located is deleted to obtain at least two groups of second rectangular outlines;

[0073] Accordingly, contour scores of at least two groups of candidate contours are calculated based on the preset contour similarity scoring algorithm, the standard contour parameters and the actual contour parameters, including:

[0074] The contour scores of at least two groups of second rectangular contours are respectively calculated based on a preset contour similarity score algorithm, standard contour parameters and actual contour parameters.

[0075] Among them, at least two contours included in each group of candidate contours may be the component contour of a photovoltaic component and the contour of at least one other object outside the photovoltaic component. Since the component image may have objects such as plants or antennas in the surrounding environment in addition to the photovoltaic component, the contours of these objects will also be extracted during the contour extraction process, so each group of candidate contours may include at least two contours. Rectangular fitting may be an operation of smoothing the contour curve of the extracted candidate contours to fit the scattered contours into a rectangle. The first rectangular contour may be all contours obtained after rectangular fitting is performed on at least two groups of candidate contours. The second rectangular contour may be the contour remaining after deleting the contour whose inner angle is greater than the preset angle range in the first rectangular contour. The preset angle range may be a maximum inner angle degree floating range pre-set to determine whether the inner angle of the contour is close to 90 degrees. Due to factors such as lens distortion, there will be certain deformations in the component image of the photovoltaic component obtained, but in general, the component image is still an approximately rectangular shape in the picture, so an inner angle degree floating range can be pre-set based on parameters such as lens distortion of the image acquisition device to filter out contours close to a rectangle. The interfering inner angle may be an inner angle of a contour having a large deviation between the actual contour and the rectangular contour. The first rectangular contour where the interfering inner angle is located may be a contour including at least one interfering inner angle in the first rectangular contour.

[0076] In one embodiment, rectangular fitting can be performed on at least two contours in each group of candidate contours by smoothing the contour curve to obtain at least two first rectangular contours. The coordinates of the four corner points of each first rectangular contour are obtained by constructing a component image coordinate system, and the edge vector of each contour edge in the first rectangular contour is calculated based on the coordinates of the four corner points. The inner angle between two adjacent edge vectors is determined by calculating the vector product of two adjacent edge vectors. For example, the coordinates of the corner points of the first rectangular contour are represented by p, and the positions of the four corner points in the component image coordinate system are , then the interior angle between two adjacent edge vectors can be determined by calculating the vector product of the two adjacent edge vectors through the formula calculate.

[0077] Compare whether the inner angle angles of all inner angles in the same first rectangular contour are within a preset angle range, determine the inner angles that exceed the preset angle range as interfering inner angles, and delete the first rectangular contour where the interfering inner angles are located, and use the remaining rectangular contours after deleting the first rectangular contours with interfering inner angles in each group of candidate contours as second rectangular contours, and traverse the at least two groups of extracted candidate contours according to the above steps to obtain at least two groups of second rectangular contours.

[0078] Contour scores of at least two groups of second rectangular contours are calculated respectively according to a preset contour similarity score algorithm, standard contour parameters and actual contour parameters.

[0079] This solution performs rectangular fitting on at least two contours in each group of candidate contours, calculates the inner angle between two adjacent contours in the rectangular contour, and deletes the rectangular contours with interfering inner angles whose inner angles exceed a preset angle range to obtain at least two groups of rectangular contours. This can achieve the purpose of preliminary contour screening before calculating contour scores, reduce the number of contours that need to calculate contour scores, and improve the efficiency of component contour determination.

[0080] S104, determining a component image in the component picture based on the component outline, and inputting the component image into a pre-trained component defect detection model to determine defect information in the component picture based on the component defect detection model.

[0081] The component image may be an image of a photovoltaic component in a component picture. The component defect detection model may be a model for identifying and locating defects in a component. The defect information may be information describing a defect problem in the component image. The defect information may include the defect type and defect location in the component image.

[0082] In one embodiment, the image corresponding to the component outline in the component image can be determined as the component image, and the component image can be input into a pre-trained component defect detection model. The component image can be automatically detected by the component defect detection model, and the output result of the model can be used as the defect information in the component image.

[0083] In one embodiment, optionally, after determining the component image in the component picture based on the component outline, the method further includes:

[0084] Get the coordinates of the corner points of the component outline in the preset component image coordinate system;

[0085] The component image is distorted and corrected based on the pre-stored perspective transformation matrix and corner point coordinates to obtain a standard component image;

[0086] The component image is replaced with the standard component image to determine defect information in the component picture based on the standard component image and the component defect detection model.

[0087] The corner point coordinates may be the coordinates of the corner points of the contour when the image of the component contour has a deformation problem. The perspective transformation matrix may be a matrix that can map the image of the component contour from an image in a state where there is a deformation problem to a rectangular state. The standard component image may be an image after the component image is converted into a standard rectangle.

[0088] In one embodiment, the corner point coordinates of the component outline in a preset component image coordinate system can be obtained, and the component image is corrected from the original state to a standard rectangular shape using a pre-stored perspective transformation matrix and the corner point coordinates to obtain a standard component image. The corrected standard component image is used to replace the component image, so as to determine the defect information in the component image based on the standard component image and the component defect detection model.

[0089] This solution obtains a standard component image by performing distortion correction on the component image based on the pre-stored perspective transformation matrix and the corner point coordinates of the component outline in a preset component image coordinate system, and replaces the component image with the standard component image to determine the defect information in the component image based on the standard component image and the component defect detection model. This can avoid the problem of inaccurate defect detection results of the component image due to errors in the process of shooting the component image, thereby improving the accuracy of string defect detection and positioning.

[0090] In one embodiment, optionally, before inputting the component image into a pre-trained component defect detection model, the method further includes:

[0091] Based on a preset marking tool, the defect type and defect location of each component defect training image are marked respectively, and the marked component defect training images are preprocessed to obtain a component defect training data set;

[0092] The pre-built neural network model is trained based on the component defect training data set to obtain a component defect detection model.

[0093] The preset marking tool may be a tool for marking the defect type of a component defect in a component image and the position of the defect in the component image. For example, the LabelImg marking tool. The defect type may include cracks, scratches, bulges, and mixed files. The defect position may be the position of the defect type in the component image. The photovoltaic component defect detection model file may be a neural network model. For example, the YOLOv8 model.

[0094] In one embodiment, a preset marking tool can be used to mark the defect type and defect location in each component defect training image, and OpenCV is used to perform data cleaning, rotation, cropping, flipping and translation on the marked component defect training images to remove erroneous or irrelevant data, improve the accuracy and generalization of the model, and obtain a component defect training data set. Based on the component defect training data set, the component image before marking is used as input, and the component image after marking is used as output, and the pre-built neural network model is trained to obtain a component defect detection model. In order to avoid false positives (wrongly marked as defects) and false negatives (missed defects) and subtle defect features in the process of photovoltaic component defect detection, this scheme introduces the CBAM channel attention mechanism in the YOLOv8 model. CBAM consists of two main parts, namely the channel attention module and the spatial attention module. The combination of the two can effectively reduce false detection and missed detection. At the same time, a small target detection head is added to the Head layer of the YOLOv8 network structure and combined with the CBAM mechanism to further enhance the model's ability to detect subtle defects in photovoltaic components. After the model structure is trained, the component defect training data set is divided into training set, test set and validation set at a ratio of 8:1:1. The test set and validation set are randomly sampled from the original data set to ensure data diversity. Finally, the YOLOv8 model is imported for training. After adjusting some network hyperparameters, a training period of 300 epochs is started to obtain the photovoltaic component defect detection model file.

[0095] This solution marks the defect type and defect location of each component defect training image, preprocesses the marked component defect training images to obtain a component defect training data set, and trains a pre-built neural network model based on the component defect training data set to obtain a component defect detection model, which can improve the accuracy of component defect detection using the model.

[0096] S105, mapping the defect information onto the string image, and generating a defect recognition result of the photovoltaic string by image data processing.

[0097] The defect identification result may be a summary of defects of the photovoltaic strings and the location of each defect.

[0098] In one embodiment, the defect information of each photovoltaic string can be mapped to the corresponding position of the string image according to the position of each component image in the string image and the defect information in each component image, and the defect conditions of each position in the string image are determined based on the mapped string image, and the defect identification results of the photovoltaic strings are generated by image data processing.

[0099] The technical solution provided in the embodiment of the present application obtains component images and string shape information of at least two photovoltaic components constituting a photovoltaic string, splices the component images based on the string shape information to obtain a string image of the photovoltaic string, and the component images correspond to the photovoltaic components one-to-one; based on a first preset contour extraction strategy and a second preset contour extraction strategy, contour extraction is performed on the same component image to obtain at least two groups of candidate contours; actual contour parameters of the at least two groups of candidate contours and standard contour parameters of the photovoltaic component are obtained, contour scores of the at least two groups of candidate contours are calculated based on a preset contour similarity score algorithm, the standard contour parameters and the actual contour parameters, and the component contour in the component image is determined based on the contour score; the component image in the component image is determined based on the component contour, and the component image is input into a pre-trained component defect detection model to determine the defect information in the component image based on the component defect detection model; the defect information is mapped to the string image to generate a defect recognition result of the photovoltaic string. The above-mentioned photovoltaic string defect recognition method solves the problems of low defect recognition efficiency and inaccurate defect location positioning when using the existing technology to identify photovoltaic string defects. The component image is determined by calculating the similarity score of the component outline in the component image, and the defect information in the component image is detected based on the component defect detection model. The defect information is mapped to the string image, and the photovoltaic string defect recognition result is generated by image data processing. The purpose of automatically identifying string defects and locating defects without human participation can be achieved, thereby improving the efficiency of photovoltaic string defect recognition and the accuracy of positioning.

[0100] Figure 2 : is a flowchart of calculating the contour score of a candidate contour provided by an embodiment of the present application. The actual contour parameters include the actual diagonal ratio, actual aspect ratio, and actual vertex to center distance ratio of the candidate contour, and the standard contour parameters include the standard diagonal ratio, standard aspect ratio, and standard vertex to center distance ratio of the component contour, such as Figure 2 As shown, the specific steps include:

[0101] S201, respectively calculating contour similarity scores of at least two groups of candidate contours and component contours based on a preset contour similarity scoring algorithm, an actual diagonal ratio, an actual aspect ratio, an actual distance ratio, a standard diagonal ratio, a standard aspect ratio, and a standard distance ratio.

[0102] Among them, the actual diagonal ratio may be the ratio of two diagonals of each contour in the candidate contour. The actual aspect ratio may be the ratio of two adjacent contour edges of each contour in the candidate contour. The actual vertex-to-center distance ratio may be the ratio of the line connecting two of the four corner points of each contour in the candidate contour to the contour center point. The standard diagonal ratio may be the ratio of two diagonals of the component contour. The standard aspect ratio may be the ratio of two adjacent contour edges of the component contour. The standard vertex-to-center distance ratio may be the ratio of the line connecting two of the four corner points of the component contour to the contour center point.

[0103] In one embodiment, based on a preset contour similarity scoring algorithm, a weighted calculation can be performed on the difference between the actual diagonal ratio and the standard diagonal ratio, the difference between the actual aspect ratio and the standard aspect ratio, and the difference between the actual distance ratio and the standard distance ratio to obtain contour similarity scores for at least two groups of candidate contours and the component contour.

[0104] In one embodiment, optionally, the preset contour similarity score algorithm is expressed by the following formula:

[0105] ;

[0106] in, is the actual diagonal ratio, is the standard diagonal ratio, The actual aspect ratio, is the standard aspect ratio, is the ratio of the actual distance from the vertex to the center point is the ratio of the distance from the vertex to the center point, is the preset diagonal ratio weight, is the preset aspect ratio weight, The weight of the ratio of the actual distance from the preset vertex to the center point, is the contour similarity score between the candidate contour and the component contour.

[0107] In one embodiment, the preset contour similarity score algorithm is expressed by the following formula:

[0108] ;

[0109] is the actual diagonal ratio, The actual aspect ratio, is the ratio of the actual distance from the vertex to the center point. The above actual value is related to the actual contour shape of the candidate contour. For example, the actual diagonal lengths of the two diagonal lines in the candidate contour are and , then the actual diagonal ratio . is the standard diagonal ratio, is the standard aspect ratio, It is the ratio of the distance from the vertex to the center point, which is the average value of various ratios calculated after component contour extraction based on a large number of component images obtained historically, and the value is fixed. is the preset diagonal ratio weight, is the preset aspect ratio weight, It is the weight of the ratio of the actual distance from the preset vertex to the center point. It is a preset empirical value and the value is fixed. is the contour similarity score between the candidate contour and the component contour.

[0110] This solution, by setting a contour similarity score algorithm formula, can improve the accuracy of calculating the similarity between the candidate contour and the component contour.

[0111] S202 , sorting the contour similarity scores, and determining the candidate contour with the highest contour similarity score as the component contour based on the sorting result.

[0112] In one embodiment, the contour similarity scores may be sorted in order from large to small or from small to large, and based on the sorting result, the candidate contour with the highest contour similarity score is determined as the component contour.

[0113] The technical solution provided in the embodiment of the present application calculates the contour similarity scores of at least two groups of candidate contours and component contours based on a preset contour similarity score algorithm, an actual diagonal ratio, an actual aspect ratio, an actual distance ratio, a standard diagonal ratio, a standard aspect ratio and a standard distance ratio, respectively, sorts the contour similarity scores, and determines the candidate contour with the highest contour similarity score as the component contour based on the sorting result, thereby improving the efficiency of identifying the component contour.

[0114] Figure 3 is a flow chart of another photovoltaic string defect identification method provided in an embodiment of the present application. The defect information includes the defect type and defect location of the component image, such as Figure 3 As shown, the specific steps include:

[0115] S301, obtaining component images and string shape information of at least two photovoltaic components constituting a photovoltaic string, and splicing the component images based on the string shape information to obtain a string image of the photovoltaic string, wherein the component images correspond to the photovoltaic components one by one.

[0116] S302: Perform contour extraction on the same component image based on a first preset contour extraction strategy and a second preset contour extraction strategy to obtain at least two groups of candidate contours.

[0117] S303, obtaining actual contour parameters of at least two groups of candidate contours and standard contour parameters of photovoltaic components, respectively calculating contour scores of at least two groups of candidate contours based on a preset contour similarity scoring algorithm, standard contour parameters and actual contour parameters, and determining component contours in the component image based on the contour scores.

[0118] S304, determining a component image in the component picture based on the component outline, and inputting the component image into a pre-trained component defect detection model to determine defect information in the component picture based on the component defect detection model.

[0119] S305, obtaining the image position of the component image in the group string image, the interval size of the component image, and the image size of the component image.

[0120] The image position can be obtained in the form of row and column coordinates. For example, a photovoltaic string has N rows and M columns of component images, that is, the photovoltaic string contains photovoltaic modules, the module images can be obtained according to the time or order in which the module images were taken. The position of the picture in the string picture can be expressed as The interval size of component images can be the size between two adjacent component images.

[0121] In one embodiment, the image position of the component image in the string image can be obtained according to the shooting order or time of the component images, and the interval size of the component images can be determined according to the record of the string shooting path. The image size of the component image can be determined according to the shooting parameters.

[0122] S306, identifying the defect coordinates of the defect position in the preset component image coordinate system.

[0123] In one embodiment, the defect coordinates of the defect position in a preset component image coordinate system may be identified by marking the defect type of the component image.

[0124] S307, mapping the defect coordinates to a preset string image coordinate system based on the image position, the interval size, and the image size, and obtaining the coordinates of the defect type in the preset string image coordinate system.

[0125] In one embodiment, the coordinates of the picture with component defects in the preset string picture coordinate system can be determined according to the picture position, interval size and picture size, and the coordinates of the defect type in the preset string picture coordinate system can be determined according to the defect coordinates and the coordinates of the picture in the preset string picture coordinate system.

[0126] Figure 4 This is a flow chart of defect coordinate mapping provided by this application. Figure 4 As shown, the components of the photovoltaic module The position of the picture in the string picture can be expressed as , the defect location has been marked in the image, and the defect coordinates in the component image coordinate system are , component pictures The image size is , the horizontal interval between two adjacent component images is , the vertical spacing is , then when the origin of the preset string image coordinate system is the upper left corner of the image, the coordinates of the defect type in the preset string image coordinate system are .

[0127] S308, generating defect recognition results of the photovoltaic strings by image data processing.

[0128] The technical solution provided in the embodiment of the present application obtains the image position of the component image in the string image, the interval size of the component image and the image size of the component image, identifies the defect coordinates of the defect position in the preset component image coordinate system, and maps the defect coordinates to the preset string image coordinate system based on the image position, interval size and image size, and obtains the coordinates of the defect type in the preset string image coordinate system, which can achieve the purpose of mapping the fault position automatically identified by the model to the string image, thereby improving the efficiency and accuracy of locating component defects in the component.

[0129] Figure 5 is a structural block diagram of a photovoltaic string defect identification device provided in an embodiment of the present application. Figure 5 As shown, specifically including the following:

[0130] A string image acquisition module 501 is used to acquire component images and string shape information of at least two photovoltaic components constituting a photovoltaic string, and to obtain a string image of the photovoltaic string by splicing component images based on the string shape information, wherein the component images correspond to the photovoltaic components one by one;

[0131] A component contour extraction module 502, configured to extract contours from the same component image based on a first preset contour extraction strategy and a second preset contour extraction strategy to obtain at least two groups of candidate contours;

[0132] The component contour screening module 503 is used to obtain actual contour parameters of at least two groups of candidate contours, calculate contour scores of at least two groups of candidate contours based on a preset contour similarity scoring algorithm, standard contour parameters and actual contour parameters, and determine the component contour in the component image based on the contour scores;

[0133] A defect information determination module 504 is used to determine a component image in the component picture based on the component outline, and input the component image into a pre-trained component defect detection model to determine defect information in the component picture based on the component defect detection model;

[0134] The defect result generating module 505 is used to map the defect information onto the string image and generate the defect recognition result of the photovoltaic string by means of image data processing.

[0135] Further, the actual contour parameters include the actual diagonal ratio, the actual length-width ratio, and the actual vertex-to-center distance ratio of the candidate contour, and the standard contour parameters include the standard diagonal ratio, the standard length-width ratio, and the standard vertex-to-center distance ratio of the component contour;

[0136] Accordingly, the component profile screening module 503 is specifically used for:

[0137] Calculate contour similarity scores of at least two groups of candidate contours and the component contour based on a preset contour similarity score algorithm, an actual diagonal ratio, an actual aspect ratio, an actual distance ratio, a standard diagonal ratio, a standard aspect ratio, and a standard distance ratio;

[0138] The contour similarity scores are sorted, and based on the sorting result, the candidate contour with the highest contour similarity score is determined as the component contour.

[0139] Furthermore, the preset contour similarity score algorithm is expressed by the following formula:

[0140] ;

[0141] in, is the actual diagonal ratio, is the standard diagonal ratio, The actual aspect ratio, is the standard aspect ratio, is the ratio of the actual distance from the vertex to the center point is the ratio of the distance from the vertex to the center point, is the preset diagonal ratio weight, is the preset aspect ratio weight, The weight of the ratio of the actual distance from the preset vertex to the center point, is the contour similarity score between the candidate contour and the component contour.

[0142] Further, each of the at least two groups of candidate contours includes at least two contours;

[0143] The device further comprises:

[0144] A rectangle fitting module, used to perform rectangle fitting on at least two contours in each group of candidate contours to obtain at least two first rectangular contours;

[0145] An interfering inner angle recognition module is used to respectively calculate the inner angle between two adjacent contours in each first rectangular contour, and identify whether there is an interfering inner angle exceeding a preset angle range in the inner angle number;

[0146] A contour deletion module, configured to, when there is an interfering inner angle exceeding a preset angle range in the inner angle number, delete the first rectangular contour where the interfering inner angle is located to obtain at least two groups of second rectangular contours;

[0147] Accordingly, the component profile screening module 503 is specifically used for:

[0148] The contour scores of at least two groups of second rectangular contours are respectively calculated based on a preset contour similarity score algorithm, standard contour parameters and actual contour parameters.

[0149] Furthermore, the device also includes:

[0150] A training set construction module is used to mark the defect type and defect location of each component defect training image based on a preset marking tool, and preprocess the marked component defect training images to obtain a component defect training data set;

[0151] The model training module is used to train a pre-built neural network model based on a component defect training data set to obtain a component defect detection model.

[0152] Furthermore, the defect information includes the defect type and defect location of the component image;

[0153] The defect result generating module 505 is specifically used for:

[0154] Get the image position of the component image in the group string image, the interval size of the component image, and the image size of the component image;

[0155] Identify the defect coordinates of the defect location in the preset component image coordinate system;

[0156] Based on the image position, interval size and image size, the defect coordinates are mapped to the preset string image coordinate system to obtain the coordinates of the defect type in the preset string image coordinate system.

[0157] Furthermore, the defect information determination module 504 is also used to:

[0158] Get the coordinates of the corner points of the component outline in the preset component image coordinate system;

[0159] The component image is distorted and corrected based on the pre-stored perspective transformation matrix and corner point coordinates to obtain a standard component image;

[0160] The component image is replaced with the standard component image to determine defect information in the component picture based on the standard component image and the component defect detection model.

[0161] The technical solution provided in the embodiment of the present application includes a string image acquisition module, which is used to acquire component images and string shape information of at least two photovoltaic components constituting a photovoltaic string, and to splice the component images based on the string shape information to obtain a string image of the photovoltaic string, wherein the component images correspond to the photovoltaic components one-to-one; a component contour extraction module, which is used to perform contour extraction on the same component image based on a first preset contour extraction strategy and a second preset contour extraction strategy to obtain at least two groups of candidate contours; a component contour screening module, which is used to acquire actual contour parameters of the at least two groups of candidate contours and standard contour parameters of the photovoltaic component, and to calculate contour scores of the at least two groups of candidate contours based on a preset contour similarity score algorithm, the standard contour parameters and the actual contour parameters, and to determine the component contour in the component image based on the contour score; a defect information determination module, which is used to determine the component image in the component image based on the component contour, and to input the component image into a pre-trained component defect detection model to determine the defect information in the component image based on the component defect detection model; and a defect result generation module, which is used to map the defect information onto the string image to generate a defect recognition result of the photovoltaic string. The above-mentioned photovoltaic string defect recognition device solves the problems of low defect recognition efficiency and inaccurate defect location positioning when using the existing technology to identify photovoltaic strings. The component image is determined by calculating the similarity score of the component outline in the component image, and the defect information in the component image is detected based on the component defect detection model. The defect information is mapped to the string image, and the photovoltaic string defect recognition result is generated by image data processing. The purpose of automatically identifying string defects and locating defects without human participation can be achieved, thereby improving the efficiency of photovoltaic string defect recognition and the accuracy of positioning.

[0162] A defect identification device for a photovoltaic string in an embodiment of the present application can be configured in a device, or in a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0163] A photovoltaic string defect identification device in the embodiment of the present application may be an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0164] A photovoltaic string defect identification device provided in an embodiment of the present application can implement each process implemented in the above-mentioned method embodiments, and will not be described again here to avoid repetition.

[0165] like Figure 6 As shown, an embodiment of the present application further provides an electronic device 600, including a processor 601, a memory 602, and a program or instruction stored in the memory 602 and executable on the processor 601. When the program or instruction is executed by the processor 601, each process of the above-mentioned photovoltaic string defect identification method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0166] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0167] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned photovoltaic string defect identification method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0168] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0169] The present application embodiment further provides a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of the method according to various exemplary embodiments of the present application described above in this specification. For example, the computer device can execute a photovoltaic string defect identification method recorded in the embodiment of the present application. The program product can be implemented using any combination of one or more readable media.

[0170] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

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

[0172] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0173] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.

Claims

1. A method for identifying defects in photovoltaic strings, characterized in that: The method comprises: Acquire component images and string shape information of at least two photovoltaic components constituting a photovoltaic string, and obtain a string image of the photovoltaic string by splicing the component images based on the string shape information, wherein the component images correspond to the photovoltaic components one by one; Based on the first preset contour extraction strategy and the second preset contour extraction strategy, contour extraction is performed on the same component image to obtain at least two groups of candidate contours, each of the at least two groups of candidate contours including at least two contours; Acquire actual profile parameters of the at least two groups of candidate profiles and standard profile parameters of the photovoltaic module; Performing rectangular fitting on at least two contours in each group of candidate contours to obtain at least two first rectangular contours; Calculating the inner angles between two adjacent contours in each of the first rectangular contours respectively, and identifying whether there is an interfering inner angle exceeding a preset angle range in the inner angles; In the case where there is an interfering inner angle exceeding a preset angle range in the inner angle number, the first rectangular outline where the interfering inner angle is located is deleted to obtain at least two groups of second rectangular outlines; Calculating the contour scores of the at least two groups of candidate contours based on a preset contour similarity scoring algorithm, the standard contour parameters, and the actual contour parameters, respectively, including: calculating the contour scores of the at least two groups of second rectangular contours based on a preset contour similarity scoring algorithm, the standard contour parameters, and the actual contour parameters; determining a component outline in the component image based on the outline score; Determine a component image in the component picture based on the component outline, and input the component image into a pre-trained component defect detection model to determine defect information in the component picture based on the component defect detection model; The defect information is mapped onto the string image to generate a defect identification result of the photovoltaic string.

2. The photovoltaic string defect identification method according to claim 1, characterized in that: The actual contour parameters include the actual diagonal ratio, the actual length-width ratio, and the actual vertex-to-center distance ratio of the candidate contour, and the standard contour parameters include the standard diagonal ratio, the standard length-width ratio, and the standard vertex-to-center distance ratio of the component contour; Accordingly, the calculating the contour scores of the at least two groups of candidate contours based on the preset contour similarity scoring algorithm, the standard contour parameters and the actual contour parameters respectively includes: Calculating contour similarity scores of the at least two groups of candidate contours and the component contour based on a preset contour similarity score algorithm, the actual diagonal ratio, the actual aspect ratio, the actual vertex-to-center distance ratio, the standard diagonal ratio, the standard aspect ratio, and the standard vertex-to-center distance ratio; The contour similarity scores are sorted, and based on the sorting result, the candidate contour with the highest contour similarity score is determined as the component contour.

3. The photovoltaic string defect identification method according to claim 2, characterized in that: The preset contour similarity score algorithm is expressed by the following formula: ; in, is the actual diagonal ratio, is the standard diagonal ratio, The actual aspect ratio value, is the standard aspect ratio value, is the ratio of the distance from the actual vertex to the center point, is the ratio of the distance from the standard vertex to the center point, is the preset diagonal ratio weight, is the preset aspect ratio weight, The preset vertex to center distance ratio weight, A contour similarity score is obtained for the candidate contour and the component contour.

4. The photovoltaic string defect identification method according to claim 1, characterized in that: Before inputting the component image into a pre-trained component defect detection model, the method further includes: Based on a preset marking tool, the defect type and defect location of each component defect training image are marked respectively, and the marked component defect training images are preprocessed to obtain a component defect training data set; A pre-built neural network model is trained based on the component defect training data set to obtain a component defect detection model.

5. The photovoltaic string defect identification method according to claim 4, characterized in that: The defect information includes the defect type and defect location of the component image; The mapping the defect information onto the string image includes: Obtaining the image position of the component image in the group string image, the interval size of the component image, and the image size of the component image; Identify the defect coordinates of the defect position in a preset component image coordinate system; The defect coordinates are mapped to a preset string image coordinate system based on the image position, the interval size, and the image size to obtain coordinates of the defect type in the preset string image coordinate system.

6. The photovoltaic string defect identification method according to claim 1, characterized in that: After determining the component image in the component picture based on the component outline, the method further includes: Obtain the coordinates of the corner points of the component outline in the preset component image coordinate system; Performing distortion correction on the component image based on the pre-stored perspective transformation matrix and the corner point coordinates to obtain a standard component image; The component image is replaced by the standard component image to determine defect information in the component picture based on the standard component image and a component defect detection model.

7. A photovoltaic string defect identification device, characterized in that: The device comprises: A string image acquisition module, used to acquire component images and string shape information of at least two photovoltaic components constituting a photovoltaic string, and to obtain a string image of the photovoltaic string by splicing the component images based on the string shape information, wherein the component images correspond one-to-one to the photovoltaic components; A component contour extraction module, configured to extract contours from the same component image based on a first preset contour extraction strategy and a second preset contour extraction strategy to obtain at least two groups of candidate contours, wherein each of the at least two groups of candidate contours includes at least two contours; A component profile screening module, used for obtaining actual profile parameters of the at least two groups of candidate profiles and standard profile parameters of the photovoltaic component; A rectangle fitting module, used to perform rectangle fitting on at least two contours in each group of candidate contours to obtain at least two first rectangular contours; An interfering inner angle recognition module, used to respectively calculate the inner angle between two adjacent contours in each of the first rectangular contours, and identify whether there is an interfering inner angle exceeding a preset angle range in the inner angle counts; A contour deletion module, configured to, when there is an interfering inner angle exceeding a preset angle range in the inner angle number, delete the first rectangular contour where the interfering inner angle is located to obtain at least two groups of second rectangular contours; The component contour screening module is further used to calculate the contour scores of the at least two groups of candidate contours based on a preset contour similarity scoring algorithm, the standard contour parameters and the actual contour parameters, respectively, including: calculating the contour scores of the at least two groups of second rectangular contours based on a preset contour similarity scoring algorithm, the standard contour parameters and the actual contour parameters; The component outline screening module is further used to determine the component outline in the component image based on the outline score; a defect information determination module, configured to determine a component image in the component picture based on the component outline, and input the component image into a pre-trained component defect detection model to determine defect information in the component picture based on the component defect detection model; The defect result generating module is used to map the defect information onto the string image to generate a defect identification result of the photovoltaic string.

8. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of a photovoltaic string defect identification method as described in any one of claims 1 to 6.

9. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of a photovoltaic string defect identification method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Photovoltaic string automatic numbering method based on visual identification model and related device

    CN117037042A

  • Method and apparatus for establishing defect pattern database, and device and readable storage medium

    WO2024130874A1