Photovoltaic panel defect detection and positioning method based on deep learning
Through deep learning-based methods, the photovoltaic panel images are obtained using drones, combined with RHA, grayscale quantization algorithm and HOTL technology, the rapid and accurate detection and positioning of photovoltaic panel defects are achieved, and the detection efficiency and accuracy in the existing technology are solved. A problem of insufficient.
Patent Information
- Application Number
- CN202411398642.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art is difficult to detect and locate defects on photovoltaic panels quickly and accurately, especially when photovoltaic power plants are set up on mountains or water, manual inspection is time-consuming and labor-intensive and inaccurate.
Using a deep learning method, the image of the photovoltaic panel is obtained through a drone, and the RHA algorithm is used for preliminary analysis and processing. The improved grayscale quantization algorithm extracts crack features, and combines the defect support degree estimation algorithm model and the HOTL algorithm to achieve the Quick and accurate detection of the type and location of photovoltaic panel defects.
It realizes rapid and accurate detection and positioning of photovoltaic panel defects, improves detection efficiency and accuracy, and reduces the time and cost of manual inspection.
Smart Images

Figure CN119478039A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of photovoltaic panel defect detection, and in particular to a photovoltaic panel defect detection and positioning method based on deep learning. Background Art
[0002] Photovoltaic power plants are often composed of a large number of photovoltaic panels. During use, photovoltaic panels may fail. How to detect faulty or defective photovoltaic panels is a difficulty that needs to be solved urgently. Since many photovoltaic power plants are set up on mountains or water, manual direct detection is time-consuming and labor-intensive, and it is also difficult to detect accurately. Summary of the invention
[0003] The main purpose of the present invention is to provide a photovoltaic panel defect detection and positioning method based on deep learning, which can quickly and accurately obtain the location of defects on the photovoltaic panel.
[0004] To achieve the above objectives, the technical solution adopted by the present invention is: a photovoltaic panel defect detection and positioning method based on deep learning, which specifically includes the following steps:
[0005] Step 1: Use a drone to obtain an overall image of the photovoltaic panel, ensure that the image covers all photovoltaic panel areas, and obtain a photovoltaic image with cracks.
[0006] Step 2: Process the photovoltaic image with cracks obtained in step 1, and use the RHA algorithm to perform preliminary analysis and processing on the photovoltaic image containing cracks;
[0007] Step 3: After the preliminary processing is completed, the image obtained in step 2 is subjected to in-depth crack feature extraction using the improved grayscale quantization algorithm, where the crack features include the length, width and direction of the crack;
[0008] Step 4: Input the crack features extracted in step 3 into the defect support estimation algorithm model. The defect support estimation algorithm model comprehensively evaluates the defect type of the photovoltaic panel based on the crack features, including the severity of the crack and the scope of possible impact;
[0009] Step 5: According to the defect type of the photovoltaic panel determined in step 4, the HOTL algorithm is used to locate different types of defects.
[0010] Preferably, step 2 specifically includes the following steps:
[0011] Step 21. In this patent, the RHA algorithm is used to perform fine regional division on the photovoltaic image. The photovoltaic image is divided into sub-images of a predetermined size, and each sub-image is a region of interest. These regions of interest refer to the parts of the photovoltaic image that contain cracks. The RHA algorithm can effectively separate these crack areas from the overall image by identifying and extracting the crack features in the image. In this way, the defective area of the photovoltaic panel can be focused more accurately;
[0012] Step 22, generating sub-windows: in each region of interest, using the RHA algorithm to generate a corresponding sub-window for each pixel, and these sub-windows cover the entire region of interest;
[0013] Step 23, pixel value histogram statistics: The RHA algorithm performs histogram statistics on the pixel values in each sub-window, and can obtain the frequency distribution of each pixel value according to the histogram. Through the frequency distribution of each pixel value, the RHA algorithm can understand the overall characteristics and local characteristics of the photovoltaic image;
[0014] Step 24: Noise removal: Based on the statistical analysis of the pixel value histogram, the RHA algorithm can accurately identify and approximate noisy pixels.
[0015] Preferably, step three specifically includes the following technical features:
[0016] Step 31, using the Sobel edge detection algorithm on the preprocessed image, extracting panel texture features based on the detected edges;
[0017] Step 32, converting the detected edge image into a binary image and applying morphological operations, using a dual-mode quantizer, after linear prediction of the pixels within the block, making a quantization decision based on the calculated variance;
[0018] Step 33, if the calculated variance is greater than the estimated threshold, the difference between the predicted value and the original pixel value is quantized using a fixed piecewise uniform quantizer or a fixed uniform quantizer, and the panel texture is removed from the input grayscale image according to the morphological result;
[0019] Step 34, grayscale quantize the image after subtraction (variance calculation is performed on the difference image to evaluate the degree of difference), and segment the remaining features according to the grayscale value;
[0020] Step 35, extract texture from the segmented image, extract grayscale variance by measuring the average grayscale value of the panel feature segment and the grayscale value representing the generated defect segment, and calculate the average grayscale variance by calculating the variance between the two values.
[0021] Preferably, step five comprises the following steps:
[0022] Step 51, analyzing texture features;
[0023] Step 52, select the optimized threshold. The HOTL technology selects the optimal threshold to segment the image according to different defect categories and texture features, thereby distinguishing defects from the background. The process of optimizing the threshold selection is based on the support of different categories of defects obtained in step 4, aiming to maximize the significance of the defect area and improve the accuracy and precision of positioning.
[0024] Step 53: segment the image by thresholding to obtain the location of the defective image.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] The method of the present invention can process the image of the photovoltaic panel, and obtain the type and position of the photovoltaic panel defect through feature processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is a flow chart according to a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art may think of other obvious variations.
[0029] A photovoltaic panel defect detection and positioning method based on deep learning specifically includes the following steps:
[0030] Step 1: Use a drone to obtain a photovoltaic image of the photovoltaic panel and obtain a photovoltaic image with cracks;
[0031] Step 2: Use the RHA (Robust Homogeneity Analysis) algorithm to preliminarily process the photovoltaic image with cracks, which specifically includes the following steps:
[0032] Step 21, dividing the region of interest: The photovoltaic image is divided into small images of size usually 3×3 or 5×5 pixels using the RHA algorithm. Each small image is regarded as a region of interest. In this patent, the region of interest refers to the region where cracks exist in the photovoltaic image. By dividing the image into multiple small images, the crack characteristics in each region can be processed and analyzed more finely;
[0033] Step 22, generating sub-windows: In each region of interest, the RHA algorithm generates corresponding sub-windows for each pixel, which cover the entire region of interest and help to analyze and process local image features in more detail;
[0034] Step 23, pixel value histogram statistics: The RHA algorithm performs histogram statistics on the pixel values in each sub-window. The frequency distribution of each pixel value can be obtained according to the histogram. Through the frequency distribution of each pixel value, the distribution of pixel values in the image can be observed, and common pixel values and abnormal pixel values can be identified. The RHA algorithm can understand the overall and local characteristics of the photovoltaic image, thereby providing a basis for subsequent noise removal and feature extraction;
[0035] Step 24, noise removal: In the histogram, noise pixels are usually shown as abnormal pixel values with low frequency. These pixel values appear significantly less frequently in the image than normal pixel values. These abnormal pixel values can be identified by setting a frequency threshold, and pixel values below this frequency threshold are considered noise pixels. Based on the statistical analysis of the pixel value histogram, the RHA algorithm can accurately identify and approximate noise pixels.
[0036] Step 3: Use the improved grayscale quantization algorithm (D-GSQA) to extract features from the image of photovoltaic panel data, which specifically includes the following steps:
[0037] Step 31, applying the Sobel edge detection algorithm to the preprocessed image, first detecting the edges of the image, and then extracting the texture features of the panel based on these edges;
[0038] Step 32, converting the edge image detected in step 31 into a binary image and applying morphological operations. Using a dual-mode quantizer, after linear prediction of the binary image pixels, a quantization decision is made based on the calculated variance;
[0039] Step 33, if the calculated variance is greater than the estimated threshold (by analyzing a large amount of training data, the variance distribution of pixels in the image block is calculated, and then a variance threshold that can effectively distinguish noise and texture is determined), the difference between the predicted value and the original pixel value is quantized using a fixed piecewise uniform quantizer or a fixed uniform quantizer. According to the result of the morphological operation, the panel texture is removed from the input grayscale image. ;
[0040] Step 34, grayscale quantize the image after subtraction (variance calculation is performed on the difference image to evaluate the degree of difference), and segment the remaining features according to the grayscale value;
[0041] Step 35, extracting texture from the segmented image, extracting grayscale variance by measuring the average grayscale value of the panel feature segment and the grayscale value representing the generated defect segment, and calculating the average grayscale variance by calculating the variance between the two values;
[0042] Step 4. Use the texture features, average grayscale variance features, and contrast variance features obtained in step 3 as inputs to use the defect support estimation algorithm model (DCS) to determine the type of defects in the photovoltaic panel. DCS principle: It is specifically a feature extraction and classification model based on neural networks, with a multi-layer neural network structure. Each layer of the neural network structure is used to detect a defect category. These layers of neural network structures are connected by neurons and trained through a back-propagation algorithm to achieve classification of different defect features; neurons are designed to estimate the support for different types of defects. Each neuron identifies and locates a type of defect. By learning the weights and biases of the input features, neurons can gradually optimize their ability to recognize different types of defects.
[0043] DCS processes and learns the input features obtained in step three to accurately estimate the support of different types of defects. These support values reflect the confidence of the neural network in different defect categories, which can be used to identify the type of defects and classify different defect categories.
[0044] Step 5: Use HOTL (Hierarchical Optimal Thresholding Localization) technology to locate the defect:
[0045] Step 51, analyzing texture features;
[0046] Step 52, select the optimized threshold (threshold of the image pixel value), and accurately locate the defects by optimizing the threshold selection. The HOTL technology will select the best threshold to segment the image according to different defect categories and texture features, so as to distinguish the defects from the background. The process of optimizing the threshold selection is based on the support of different categories of defects obtained in step 4, aiming to maximize the significance of the defect area and improve the accuracy and precision of positioning.
[0047] Step 53: segment the image by thresholding to obtain the location of the defective image.
[0048] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.
Claims
1. A photovoltaic panel defect detection and positioning method based on deep learning, specifically comprising the following steps: Step 1: Use a drone to obtain an overall image of the photovoltaic panel, ensure that the image covers all photovoltaic panel areas, and obtain a photovoltaic image with cracks; Step 2: Process the photovoltaic image with cracks obtained in step 1, and use the RHA algorithm to perform preliminary analysis and processing on the photovoltaic image containing cracks; Step 3: After the preliminary processing is completed, the image obtained in step 2 is subjected to in-depth crack feature extraction using the improved grayscale quantization algorithm, where the crack features include the length, width and direction of the crack; Step 4: Input the crack features extracted in step 3 into the defect support estimation algorithm model. The defect support estimation algorithm model comprehensively evaluates the defect type of the photovoltaic panel based on the crack features, including the severity of the crack and the scope of possible impact; Step 5: According to the defect type of the photovoltaic panel determined in step 4, the HOTL algorithm is used to locate different types of defects.
2. The photovoltaic panel defect detection and positioning method based on deep learning according to claim 1, characterized in that: Step 2 specifically includes the following steps: Step 21, dividing the region of interest: using the RHA algorithm to perform region division on the photovoltaic image, dividing the photovoltaic image into sub-images of a predetermined size, where the sub-images are the regions of interest; Step 22, generating sub-windows: in each region of interest, using the RHA algorithm to generate a corresponding sub-window for each pixel, and these sub-windows cover the entire region of interest; Step 23, statistical pixel value histogram: The RHA algorithm performs histogram statistics on the pixel values in each sub-window, and can obtain the frequency distribution of each pixel value according to the histogram. Through the frequency distribution of each pixel value, the RHA algorithm can obtain the overall characteristics and local characteristics of the photovoltaic image; Step 24: Noise removal: Based on statistical analysis of the pixel value histogram, the RHA algorithm can identify noisy pixels.
3. A photovoltaic panel defect detection and positioning method based on deep learning according to claim 2, characterized in that: Step 3 specifically includes the following technical features: Step 31, using the Sobel edge detection algorithm on the preprocessed image, extracting panel texture features based on the detected edges; Step 32, converting the detected edge image into a binary image and applying morphological operations, using a dual-mode quantizer, after linear prediction of the pixels within the block, making a quantization decision based on the calculated variance; Step 33, if the calculated variance is greater than the estimated threshold, quantize the difference between the predicted value and the original pixel value using a fixed piecewise uniform quantizer or a fixed uniform quantizer. Remove the panel texture from the input grayscale image based on the morphological results; Step 34, grayscale quantize the subtracted image, and segment the remaining features according to the grayscale value; Step 35, extract texture from the segmented image, extract grayscale variance by measuring the average grayscale value of the panel feature segment and the grayscale value representing the generated defect segment, and calculate the average grayscale variance by calculating the variance between the two values.
4. A photovoltaic panel defect detection and positioning method based on deep learning according to claim 3, characterized in that: Step 5 includes the following steps: Step 51, analyzing texture features; Step 52: Select the optimized threshold. The HOTL technology selects the optimal threshold to segment the image according to different defect categories and texture features, thereby distinguishing the defect from the background. The process of optimizing the threshold selection is based on the support of different categories of defects, aiming to maximize the significance of the defect area and improve the accuracy and precision of positioning. Step 53: segment the image by thresholding to obtain the location of the defective image.