Solar cell anomaly detection method and device, electronic equipment and storage medium
By performing anomaly detection on solar cell images and combining boundary and electrode position screening, the problem of low detection accuracy in the existing technology is solved and higher detection accuracy is achieved.
Patent Information
- Application Number
- CN202310258716.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-06
- Publication Date
- 2024-09-10
AI Technical Summary
The accuracy of solar cell abnormality detection in the prior art is low, and it is easy to misjudge the electrodes as abnormal, resulting in inaccurate detection results.
By obtaining the image of the solar cell to be detected, the target detection algorithm is used for abnormal detection, and the relative position of the solar cell boundary and the electrode is used for screening to eliminate the interference caused by the electrode and improve the detection accuracy.
It effectively improves the accuracy of solar cell anomaly detection, reduces misjudgments, and enhances the reliability of detection results.
Smart Images

Figure CN118628783A
Abstract
Description
Technical Field
[0001] The present application relates to the field of visual detection technology, and more specifically, to a method, device, electronic device and storage medium for detecting abnormalities in solar cells. Background Art
[0002] With the gradual depletion of disposable energy such as coal and oil and their deteriorating impact on the environment, solar cells have gradually become the new favorite in the development of new energy due to their inexhaustible and green advantages. In the production process of solar cells, it is inevitable that factors such as thermal stress and mechanical stress will cause abnormalities on the surface of solar cells, shortening the service life of solar cells. Therefore, it is of great significance to detect abnormalities on solar cells to improve their reliability.
[0003] However, when using an abnormality detection model to perform abnormality detection on solar cells in the prior art, there is a defect that the electrode is misjudged as abnormal, resulting in a low accuracy rate of abnormality detection on solar cells.
[0004] It can be seen that the prior art still has the defect of low accuracy in detecting abnormalities of solar cells. Summary of the invention
[0005] The embodiments of the present application provide a method, device, electronic device and storage medium for detecting abnormality of solar cells, which can solve the problem of low accuracy of detecting abnormality of solar cells in related technologies. The technical solution is as follows:
[0006] According to one aspect of an embodiment of the present application, a method for detecting anomalies in solar cells includes: acquiring an image to be detected of a solar cell; performing anomaly detection on the image to be detected using a target detection algorithm to obtain an anomaly detection result; judging a boundary of a solar cell in the image to be detected to obtain a preliminary judgment result; and screening the anomaly detection result according to the preliminary judgment result to obtain an anomaly judgment result of a fusion analysis.
[0007] According to one aspect of an embodiment of the present application, a solar cell anomaly detection device includes: an image acquisition module, used to acquire an image to be detected of a solar cell; an anomaly detection module, used to perform anomaly detection on the image to be detected using a target detection algorithm to obtain an anomaly detection result; a preliminary judgment module, used to judge the boundary of the solar cell in the image to be detected to obtain a preliminary judgment result; and an anomaly judgment module, used to screen the anomaly detection result according to the preliminary judgment result to obtain an anomaly judgment result of a fusion analysis.
[0008] In an exemplary embodiment, the device further includes: an abnormality analysis module, which is used to perform foreground extraction on the abnormality judgment result, analyze the severity of the abnormality from multiple angles, and obtain an abnormality analysis result.
[0009] According to one aspect of an embodiment of the present application, an electronic device includes: at least one processor, at least one memory, and at least one communication bus, wherein a computer program is stored in the memory, and the processor reads the computer program in the memory through the communication bus; when the computer program is executed by the processor, the solar cell abnormality detection method as described above is implemented.
[0010] According to one aspect of an embodiment of the present application, a storage medium stores a computer program, and when the computer program is executed by a processor, the solar cell abnormality detection method as described above is implemented.
[0011] According to one aspect of an embodiment of the present application, a computer program product includes a computer program, the computer program is stored in a storage medium, a processor of a computer device reads the computer program from the storage medium, and the processor executes the computer program, so that the solar cell abnormality detection method as described above is implemented when the computer device executes the computer program.
[0012] The beneficial effects of the technical solution provided by this application are:
[0013] In the above technical solution, the image to be detected of the solar cell is obtained, and the abnormality detection is performed on the image to be detected to obtain the abnormality detection result, wherein the abnormality detection result is used to indicate the area and type of abnormality in the solar cell. Then, the boundary of the solar cell in the image to be detected is judged, and the electrode position is determined by combining the prior knowledge of the relative position of the boundary and the electrode. The abnormality detection result is screened by integrating the boundary judgment result of the solar cell and the electrode position to obtain the output result, thereby eliminating the interference of the electrode on the abnormality detection result and improving the accuracy of abnormality detection of the solar cell. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in describing the embodiments of the present application.
[0015] Figure 1 is a flow chart showing a method for detecting abnormality of a solar cell according to an exemplary embodiment;
[0016] Figure 2 is a flowchart of a YOLOv5 network training process according to an exemplary embodiment;
[0017] Figure 3 According to an exemplary embodiment Figure 1 Flowchart of step 350;
[0018] Figure 4 is an image of a solar cell according to an exemplary embodiment;
[0019] Figure 5 is a flow chart showing another method for detecting abnormality of a solar cell according to an exemplary embodiment
[0020] Figure 6 According to an exemplary embodiment Figure 1 Flowchart of step 390;
[0021] Figure 7 is a structural block diagram of a solar cell abnormality detection device according to an exemplary embodiment;
[0022] Figure 8 is a hardware structure diagram of an electronic device according to an exemplary embodiment;
[0023] Fig. 9 The present invention is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0024] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0025] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0026] As mentioned above, during the production process of solar cells, it is inevitable that thermal stress, mechanical stress and other factors will cause abnormalities on the surface of the solar cells. Therefore, abnormality detection of solar cells is particularly critical.
[0027] However, in the prior art, when performing abnormality detection on solar energy, there is a problem of misdetecting electrodes as defects, which results in low accuracy of abnormality detection on solar cells.
[0028] It can be seen that the related technology still has the problem of low accuracy in detecting abnormalities of solar cells.
[0029] To this end, the solar cell anomaly detection method provided in the present application can effectively eliminate the interference caused by the electrodes, thereby improving the detection accuracy of the solar cell. Accordingly, the solar cell anomaly detection method is suitable for a solar cell anomaly detection device, which can be deployed in an electronic device, which can be a CCD camera or other electronic device with image acquisition function.
[0030] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0031] See also Figure 1 An embodiment of the present application provides a method for detecting abnormalities of a solar cell. The method is applicable to an electronic device, which may be a CCD camera or other electronic device with an image acquisition function.
[0032] In the following method embodiments, for ease of description, the execution subject of each step of the method is taken as an electronic device as an example for illustration, but this is not intended to be limiting.
[0033] like Figure 1 As shown, the method may include the following steps:
[0034] Step 310: Acquire an image of a solar cell to be inspected.
[0035] The embodiments of the present application can be applied to electronic devices, which may be CCD cameras or other electronic devices with image acquisition functions. By using the electronic device to photograph the solar cell, the image to be detected can be obtained.
[0036] Step 330: Use the target detection algorithm to perform anomaly detection on the image to be detected to obtain anomaly detection results.
[0037] After acquiring the image to be detected, the electronic device can perform anomaly detection on the image to be detected to obtain an anomaly detection result.
[0038] In a possible implementation, the anomaly detection of the image to be detected is implemented based on an anomaly detection model. The anomaly detection model is a deep learning model that has been trained and has the ability to detect anomalies in the image to be detected containing solar cells and output anomaly areas and anomaly types. The deep learning model can be an SSD network (SingleShot MultiBox Detector, single-stage target detection algorithm), an R-CNN network, a Fast R-CNN network, a Faster R-CNN network, and a YOLO series network.
[0039] In an exemplary embodiment, the YOLOv5 network is used as an example for explanation, but this is not intended to be limiting. Figure 2 As shown, the training process of the YOLOv5 network includes the following steps:
[0040] Step 410 , collect a number of real images of solar cells from actual scenes, divide them into different abnormal categories, and divide them into a training set and a test set in a ratio of 9:1.
[0041] Specifically, 100,000 valid images are collected from actual solar cell detection scenarios, and are divided into several abnormal categories according to the actual abnormal conditions of the solar cells in the images. Optionally, the abnormal categories include one or more of broken grid, leakage, black film, missing corner, crack, poor solder joint, and short circuit. The classified images are divided into training set and test set according to a certain ratio.
[0042] Step 430, performing data enhancement on the collected real images of the plurality of solar cells; the data enhancement includes one or more of mosaic enhancement, affine transformation, color transformation and random noise.
[0043] Step 450 , training the YOLOv5 network model using the real image after data enhancement, to obtain an anomaly detection model capable of performing anomaly detection on the image to be detected including the solar cell.
[0044] Among them, the YOLOv5 network consists of four parts: input end, Backbone layer, Neck layer and Prediction layer, using the standard YOLOv5 structure.
[0045] Among them, the Backbone layer uses FOCUS+CSP Darknet+SiLU activation function; the Neck layer uses CSPBlock, SPP, FPN+PAN structure; the Prediction layer uses CIOU_Loss combined with DIOU_NMS operation.
[0046] The loss function of YOLOv5 mainly consists of three parts:
[0047] Classes loss: Classification loss, using BCE loss, only calculates the classification loss of positive samples.
[0048] Objectness loss: obj loss, still using BCE loss, obj refers to the CIoU between the target bounding box predicted by the network and the GT Box, and the obj loss of all samples is calculated.
[0049] Location loss, positioning loss, uses CIoU loss, which only calculates the positioning loss of positive samples.
[0050] Loss=λ1Lcls+λ2Lobj+λ3Lloc.
[0051] Among them, λ1, λ2, λ3 are balance coefficients.
[0052] Through the above process, the anomaly detection model built based on the YOLOv5 algorithm is used to detect possible anomalies in solar cells, and the areas where abnormalities may exist in the solar cells and the types of abnormalities are output as anomaly detection results to complete the preliminary detection of solar cells.
[0053] Step 350 , judging the boundary of the solar cell in the image to be detected, and obtaining a preliminary judgment result.
[0054] In an exemplary embodiment, in order to remove the interference of electrodes in a solar cell image on the detection result, the present application proposes a positioning method.
[0055] Specifically, based on the prior knowledge of the relative position of the electrode and the boundary of the solar cell, the electrode position is determined when the boundary of the solar cell is determined to be normal, thereby eliminating the result of misdetecting the electrode as a defect in the abnormal detection result and obtaining the abnormal judgment result.
[0056] Alternatively, if Figure 3 As shown, the method may include the following steps:
[0057] Step 351, performing global binarization processing on the image to be detected to obtain a preprocessed image.
[0058] The threshold t1 is used to perform global binarization processing on the image to be detected of the solar cell, thereby removing possible interference caused by the extremely dark background in the image to be detected.
[0059] Step 353: Use asymptotes to gradually locate several vertices of the solar cell at the four corners of the preprocessed image, and connect the several vertices in sequence to obtain several boundary lines of the solar cell.
[0060] Specifically, Figure 4 As shown, since the high temperature oxygen precipitation in the manufacturing process of solar cell single crystal silicon is composed of eight faces, forming an octahedron, in order to reduce the formation of a large number of surface dislocations, the image of the solar cell is an octagon. The areas of the four corners of the pre-processed image are S1 (0:100, 0:100), S2 (400:500, 0:100), S3 (400:500, 400:500), S4 (0:100, 400:500), representing the square area with a side length of 100 in the four corners of the pre-processed image. Then, eight asymptotes with slopes of K1-K8 are used to locate the eight vertices D1-D8 of the solar cell in the four areas, and the eight vertices D1-D8 are connected in sequence to obtain the eight boundary lines L1-L8 of the solar cell.
[0061] It is worth mentioning that the slopes of the eight asymptotes are adjusted through testing to find the specific position of the solar cell in the image to be detected.
[0062] It is understandable that when there is no abnormality in the boundary of the solar cell, the lengths of the eight boundary lines must be within a certain set range. Therefore, the position of the electrode in the solar cell image can be found based on the boundary line without abnormality combined with the prior knowledge of the relative position of the boundary line and the electrode, thereby eliminating the false detection results caused by the electrode in the abnormal detection results.
[0063] Optionally, among the eight boundary lines of the solar cell image, the set length threshold t2 of the four diagonal boundary lines is between 10:30, and the set length threshold t3 of the four upper, lower, left and right boundary lines is between 390:410. Based on the obtained eight boundary lines L1-L8, their lengths are compared with the set length thresholds t2 and t3 to obtain a preliminary judgment result.
[0064] Step 355, according to the lengths of the plurality of boundary lines being consistent with the set length, the electrode position is determined based on the relative position of the boundary line and the electrode, and the solar cell boundary is normal and the electrode position is output as a preliminary judgment result.
[0065] Step 357 , outputting a solar cell boundary abnormality as a preliminary judgment result based on the fact that the lengths of the plurality of boundary lines do not conform to the set lengths.
[0066] Through the above steps, after obtaining the normal solar cell boundary, the position of the electrode in the solar cell image is determined by combining the prior knowledge that the relative position between the boundary and the cell is a fixed value. When the boundary line does not meet the set length, the boundary abnormality is output as the output result.
[0067] Step 370, based on the electrode position obtained from the preliminary judgment result, the abnormal detection result of the electrode position is eliminated to obtain the output result.
[0068] Specifically, the obtained electrode position is subtracted from the electrode position detection result indicated in the abnormal detection result, thereby eliminating the interference caused by mistakenly detecting the electrode as abnormal in the abnormal detection result, thereby improving the accuracy of the abnormal detection result.
[0069] In an exemplary embodiment, if Figure 5 As shown, after step 370, the above method may further include the following steps:
[0070] Step 390, perform foreground extraction on the abnormality judgment result, analyze the severity of the abnormality from multiple angles, and obtain the abnormality analysis result.
[0071] Optionally, depending on the training process of the anomaly detection model, its output result can be only a binary classification result, that is, whether there is an abnormality in the image to be detected; or when there is an abnormality, the category of the abnormality is output, and the abnormality category includes one or more of broken grid, leakage, black piece, missing corner, crack, poor solder joint, and short circuit. In a possible implementation, the present application proposes a method to analyze the severity of the abnormal detection results of the same type in the output results to obtain an abnormal analysis result.
[0072] Specifically, Figure 6 As shown, the above method may include the following steps:
[0073] Step 391, denoising the target area in the output result.
[0074] Specifically, for the screened image to be detected, according to its abnormality detection result set P, for several target areas P1-Pn corresponding to the abnormality detection results in P, where the target area is the abnormal area in the image to be detected, the detection frames X1-Xn corresponding to the target areas P1-Pn are cut out from the image to be detected, and the detection frames X1-Xn are binarized.
[0075]
[0076] Among them, t4 is the binarization threshold. For the detection frame X1-Xn corresponding to the target area P1-Pn, the pixel value less than the threshold t4 is converted to 0, and the pixel value greater than the threshold t4 is retained unchanged.
[0077] Perform an opening operation on the detection box X1-Xn in the binary image to be detected to eliminate some noise points and obtain Xn".
[0078]
[0079] First, the convolution kernel B is used to corrode Xn to obtain Xn', that is, the minimum value of the local area in Xn is calculated, so that the bright area in Xn becomes smaller and the dark area becomes larger; then the convolution kernel B is used to expand Xn' to obtain Xn", that is, the maximum value of the local area in Xn' is calculated, so that the highlight area in Xn' gradually increases.
[0080] Step 393, performing weighted calculation on the length, area and average grayscale of the target area after denoising to obtain a calculation result.
[0081] l=max(l(xn(h):xn(lo)),l(nx(r)-xn(le)))
[0082] s=s+1ifxn(i,j)>1
[0083]
[0084] Y=(λ1*l+λ2*s+λ3*g)
[0085] Wherein, l is the length of the target area in the image to be detected, s is the area of the target area in the image to be detected, g is the average grayscale of the target area in the image to be detected, λ1, λ2, λ3 are obtained from experimental tests, and Y is the calculation result.
[0086] Step 395, compare the calculation result with the set abnormal threshold to obtain the abnormal analysis result.
[0087] The abnormality detection result is used to indicate the severity of the abnormality of the solar cell in the image to be detected.
[0088] Optionally, the present application may set multiple severity abnormality thresholds according to different implementation environments. For example, when the calculation result Y is between Y1-Y2, the abnormality is slight; when the calculation result Y is between Y2-Y3, the abnormality is severe; when the calculation result Y is between Y3-Y4, the abnormality is very severe, where Y1, Y2, and Y3 increase in sequence.
[0089] Optionally, the same type of anomalies may be considered as two anomalies according to different severities to adapt to anomaly classification in specific scenarios.
[0090] Through the above process, after the image to be detected is subjected to anomaly detection and the preliminary anomaly detection results are obtained, the electrode position is determined based on the solar cell boundary judgment result and the prior knowledge of the relative position between the boundary and the electrode position. The anomaly detection results are screened according to the electrode position to eliminate the interference caused by the electrode and thus improve the accuracy of anomaly detection. At the same time, the severity of the anomaly in the output results is analyzed and judged from multiple angles, and the anomaly analysis results are output to improve the accuracy of anomaly classification.
[0091] The following is an embodiment of the device of the present application, which can be used to execute the solar cell abnormality detection method involved in the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the method embodiment of the solar cell abnormality detection method involved in the present application.
[0092] See also Figure 7 The embodiment of the present application provides a solar cell abnormality detection device 500, including but not limited to: an image acquisition module 510, an abnormality detection module 520, a preliminary judgment module 530, and an abnormality judgment module 540.
[0093] The image acquisition module 510 is used to acquire the image to be inspected of the solar cell.
[0094] The anomaly detection module 520 is used to perform anomaly detection on the image to be detected using a deep learning model to obtain anomaly detection results.
[0095] The preliminary judgment module 530 is used to judge the boundary of the solar cell in the image to be detected and obtain a preliminary judgment result.
[0096] The abnormality judgment module 540 is used to screen the abnormality detection results according to the preliminary judgment results to obtain the abnormality judgment results of the fusion analysis.
[0097] In an exemplary embodiment, the solar cell abnormality detection device 500 further includes: an abnormality analysis module, which is used to perform foreground extraction on the abnormality judgment result, analyze the severity of the abnormality from multiple angles, and obtain the abnormality analysis result.
[0098] It is worth mentioning that the device embodiment provided in this application is only an exemplary embodiment. The solar cell anomaly detection method provided in this application can be installed on various platforms such as image acquisition equipment, chips, software and cloud services, and cannot be regarded as a limitation of this application.
[0099] It should be noted that, when the solar cell abnormality detection device provided in the above embodiment performs abnormality detection, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the solar cell abnormality detection device will be divided into different functional modules to complete all or part of the functions described above.
[0100] In addition, the solar cell anomaly detection device provided in the above embodiment and the embodiment of the solar cell anomaly detection device belong to the same concept, wherein the specific manner in which each module performs the operation has been described in detail in the method embodiment and will not be repeated here.
[0101] Figure 8 A schematic structural diagram of an electronic device is shown according to an exemplary embodiment.
[0102] It should be noted that the electronic device is only an example adapted to the present application and cannot be considered to provide any limitation on the scope of use of the present application. The electronic device cannot be interpreted as requiring dependence on or having Figure 8 One or more components of exemplary electronic device 2000 are shown.
[0103] The hardware structure of the electronic device 2000 may vary greatly due to differences in configuration or performance, such as Figure 8 As shown, the electronic device 2000 includes: a power supply 210 , an interface 230 , at least one memory 250 , and at least one central processing unit (CPU) 270 .
[0104] Specifically, the power supply 210 is used to provide operating voltage for each hardware device on the electronic device 2000 .
[0105] The interface 230 includes at least one wired or wireless network interface 231 for interacting with external devices.
[0106] Of course, in other examples adapted by the present application, the interface 230 may further include at least one serial-to-parallel conversion interface 233, at least one input-output interface 235, and at least one USB interface 237, etc. Figure 8 As shown, this is not intended to be a specific limitation.
[0107] The memory 250 is a carrier for storing resources, which may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 251, an application 253 and data 255, etc. The storage method may be temporary storage or permanent storage.
[0108] Among them, the operating system 251 is used to manage and control various hardware devices and application programs 253 on the electronic device 2000 to enable the central processor 270 to calculate and process the massive data 255 in the memory 250. It can be WindowsServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0109] The application program 253 is a computer program that performs at least one specific task based on the operating system 251, and may include at least one module ( Figure 8 (not shown), each module may respectively include a computer program for the electronic device 2000. For example, the solar cell abnormality detection device may be regarded as an application 253 deployed in the electronic device 2000.
[0110] The data 255 may be photos, images, etc. stored on a disk, stored in the memory 250 .
[0111] The central processor 270 may include one or more processors, and is configured to communicate with the memory 250 through at least one communication bus to read the computer program stored in the memory 250, thereby realizing the operation and processing of the mass data 255 in the memory 250. For example, the solar cell abnormality detection method is completed in the form of the central processor 270 reading a series of computer programs stored in the memory 250.
[0112] In addition, the present application can also be implemented through hardware circuits or hardware circuits combined with software. Therefore, the implementation of the present application is not limited to any specific hardware circuits, software, or a combination of the two.
[0113] See also Fig. 9 An embodiment of the present application provides an electronic device 4000, which can be a desktop computer, a laptop computer, a server, etc.
[0114] exist Fig. 9 In the embodiment, the electronic device 4000 includes at least one processor 4001, at least one communication bus 4002 and at least one memory 4003.
[0115] The processor 4001 and the memory 4003 are connected, such as through a communication bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.
[0116] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0117] The communication bus 4002 may include a path to transmit information between the above components. The communication bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0118] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.
[0119] The memory 4003 stores a computer program, and the processor 4001 reads the computer program stored in the memory 4003 through the communication bus 4002 .
[0120] When the computer program is executed by the processor 4001 , the solar cell abnormality detection method in the above-mentioned embodiments is implemented.
[0121] In addition, a storage medium is provided in an embodiment of the present application. A computer program is stored on the storage medium. When the computer program is executed by a processor, the solar cell abnormality detection method in the above embodiments is implemented.
[0122] In an embodiment of the present application, a computer program product is provided, the computer program product includes a computer program, the computer program is stored in a storage medium. A processor of a computer device reads the computer program from the storage medium, and the processor executes the computer program, so that the computer device executes the solar cell abnormality detection method in each of the above embodiments.
[0123] Compared with the related art, on the one hand, the present application performs preliminary detection on the solar cell image through the anomaly detection model to obtain the anomaly detection result; and determines the electrode position by judging the solar cell boundary and combining the prior knowledge of the relative position of the boundary and the electrode, thereby eliminating the interference caused by the electrode from the anomaly detection result and improving the accuracy of solar cell anomaly detection; on the other hand, the anomaly analysis method is used to judge the severity of the anomaly in the anomaly detection result, and the anomaly analysis result is output to improve the accuracy of anomaly classification.
[0124] Without increasing additional resources and consumption, this application achieves a higher accuracy rate in detecting abnormalities in solar cells than the prior art, and is applicable to all solar cell scenarios with good portability; not only that, the detection results can also be analyzed and judged according to the actual application scenarios to obtain better analysis and judgment results.
[0125] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0126] The above is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for detecting abnormality of a solar cell, characterized in that: The method comprises: Acquire an image of a solar cell to be inspected; Performing anomaly detection on the image to be detected using a target detection algorithm to obtain an anomaly detection result; Determining the boundary of the solar cell in the image to be detected to obtain a preliminary determination result; The abnormal detection results are screened according to the preliminary judgment results to obtain abnormal judgment results of fusion analysis.
2. The method according to claim 1, characterized in that After obtaining the screening results, the method further comprises: The foreground is extracted from the abnormal judgment result, and the severity of the abnormality is analyzed from multiple angles to obtain the abnormality analysis result.
3. The method according to claim 1, characterized in that The step of determining the boundary of the solar cell in the image to be detected to obtain a preliminary determination result includes: Performing global binarization processing on the image to be detected to obtain a preprocessed image; Using asymptotes to gradually locate several vertices of the solar cell at four corners of the preprocessed image, and sequentially connecting the several vertices to obtain several boundary lines of the solar cell; According to the lengths of the plurality of boundary lines being consistent with the set lengths, the electrode position is determined based on the relative position of the boundary line and the electrode, and the solar cell boundary is normal and the electrode position is output as a preliminary judgment result; According to the fact that the lengths of the plurality of boundary lines do not meet the set lengths, a solar cell boundary abnormality is output as a preliminary judgment result.
4. The method according to claim 1, characterized in that The abnormal detection results are screened according to the preliminary judgment results to obtain the abnormal judgment results of the fusion analysis, including: According to the electrode position obtained from the preliminary judgment result, the abnormal detection result of the electrode position is eliminated to obtain the output result.
5. The method according to claim 2, characterized in that The abnormal analysis and judgment of the screening result to obtain the abnormal analysis result includes: Performing denoising on the target area in the output result; Performing weighted calculation on the length, area and average grayscale of the target area after the denoising process to obtain a calculation result; The calculation result is compared with a set abnormality threshold to obtain an abnormality analysis result.
6. The method according to claim 1, characterized in that The anomaly detection result is obtained by calling an anomaly detection model based on the Yolov5 algorithm; the anomaly detection model is a trained deep learning model that has the ability to perform anomaly detection on an image to be detected containing solar cells and output anomaly areas and anomaly types.
7. The method according to claim 6, characterized in that The training process of the anomaly detection model includes: Collect several real images of solar cells from actual scenes, divide them into different abnormal categories, and divide them into training sets and test sets according to a certain ratio; Performing data enhancement on the collected real images of the plurality of solar cells; the data enhancement includes one or more of mosaic enhancement, affine transformation, color transformation and random noise; The YOLOv5 network model is trained using the real image after the data enhancement to obtain an anomaly detection model capable of performing anomaly detection on an image to be detected containing a solar cell and outputting anomaly types.
8. A solar cell abnormality detection device, characterized in that: The device comprises: An image acquisition module, used for acquiring an image of a solar cell to be inspected; Anomaly detection module, used to perform anomaly detection on the image to be detected by using the target detection algorithm to obtain anomaly detection results; A preliminary judgment module is used to judge the boundary of the solar cell in the image to be detected and obtain a preliminary judgment result; The anomaly judgment module is used to filter the anomaly detection results according to the preliminary judgment results to obtain the anomaly judgment results of the fusion analysis.
9. An electronic device, characterized in that: include: at least one processor, at least one memory, and at least one communication bus, wherein: The memory stores a computer program, and the processor reads the computer program in the memory through the communication bus; When the computer program is executed by the processor, the solar cell abnormality detection method according to any one of claims 1 to 7 is implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the solar cell abnormality detection method according to any one of claims 1 to 7 is implemented.
