Photovoltaic hot spot defect detection method and device and storage medium
Through YOLOv5_OBB network structure and infrared image analysis, combined with photovoltaic panel morphology and hot spot temperature characteristics, the problems of low accuracy and high false alarm rate of existing photovoltaic hot spot detection methods are solved, and high-precision photovoltaic hot spot detection is achieved. Defect detection.
Patent Information
- Application Number
- CN202410861724.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-12-29
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-01
AI Technical Summary
Existing photovoltaic hot spot defect detection methods based on image analysis have low detection accuracy and precision, and high false alarm rates.
Using the YOLOv5_OBB network structure combined with infrared image analysis, a photovoltaic array target detection model is constructed through the training sample data set, the photovoltaic array target area is identified, and the photovoltaic panel morphological characteristics and hot spot temperature characteristics are combined for high-precision detection.
High-precision detection of photovoltaic array target areas in complex scenes greatly suppresses ground background interference, enables dynamic identification and intelligent detection of photovoltaic hot spot defects, reduces false alarm rates, and improves detection accuracy and practicality.
Smart Images

Figure CN118735890A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of automated operation and maintenance inspection of solar photovoltaic power plants, and in particular to a photovoltaic hot spot defect detection method, device and storage medium. Background Art
[0002] Photovoltaic array hot spot failure is a phenomenon in which the characteristics of some cells change during the operation of photovoltaic modules, causing the load to consume the energy of other photovoltaic modules and continue to heat up. When using solar power generation in practice, photovoltaic hot spot phenomenon is inevitable. This phenomenon not only affects the power generation efficiency, but also poses a serious threat to the safety of the photovoltaic power generation system itself. Therefore, with the rapid development of the solar photovoltaic industry, photovoltaic array hot spot defect detection technology has become a more popular research topic.
[0003] At present, the commonly used hot spot detection methods can be roughly divided into two categories, namely, the detection method based on the electrical characteristics monitoring of solar cells and the detection method based on infrared image analysis. Among them, the detection method based on electrical characteristics monitoring has a simple implementation principle, but for large-scale photovoltaic power stations, thousands of sensors are required to collect data, which is costly and the detection efficiency decreases as the scale of the photovoltaic power station increases; the detection method based on image analysis has high detection efficiency and does not require the construction of peripheral physical circuits. It is a non-contact hot spot defect detection method that will not have any impact on photovoltaic modules. However, the accuracy and precision of the existing detection methods based on image analysis are low, and the false alarm rate is high. Summary of the invention
[0004] The purpose of the present application is to provide a photovoltaic hot spot defect detection method, device and storage medium to solve the problem that the hot spot detection method based on image analysis in the prior art has low accuracy and precision and high false alarm rate.
[0005] To achieve the above-mentioned purpose, the embodiment of the present application provides a photovoltaic hot spot defect detection method, comprising the following steps: Step 1) constructing a YOLOv5_OBB network structure, using a training sample data set to perform model training, and obtaining a photovoltaic array target detection model;
[0006] Step 2) acquiring an infrared image containing a photovoltaic array target, and using the photovoltaic array target detection model to detect the infrared image to identify the photovoltaic array target area;
[0007] Step 3) Based on the identified target area of the photovoltaic array, combined with the photovoltaic panel morphological characteristics and hot spot temperature characteristics, high-precision hot spot defect detection is performed on the infrared image.
[0008] Optionally, the step 1) specifically includes:
[0009] Acquire infrared video data of photovoltaic array targets and perform data preprocessing operations, wherein the data preprocessing operations include frame size normalization, scene segmentation, and image enhancement;
[0010] The target infrared video after data preprocessing is divided into different scenes, and repeated scenes and videos are filtered out. For different scenes, video frames with photovoltaic array targets are extracted according to different sizes of photovoltaic arrays as training samples, and the rotated true annotation box data of the photovoltaic array targets in the annotated training samples are obtained;
[0011] The training sample data set is divided into a training set, a validation set and a test set for each scene, and then the training set, validation set and test set of each scene are merged, renumbered and converted into a training sample data set in YOLO format;
[0012] The training set is passed to the YOLOv5_OBB network structure for target detection, the bias information of each target is calculated according to the detection results and the corresponding real annotation box annotation data, and then the weight parameters of the model are updated. The above steps are repeated for multiple rounds of iterations until the model reaches the end of training conditions, and the photovoltaic array target detection model can be obtained.
[0013] Optionally, the step 2) specifically includes:
[0014] Acquire the infrared image containing the photovoltaic array target, and input it into the photovoltaic array target detection model in units of frames, to obtain the photovoltaic array target detection output result including a probability sequence and a target frame sequence corresponding to each frame of the image;
[0015] For the detection output result, the probability sequence corresponding to each frame is traversed, and a judgment is made based on a preset safety threshold. When the probability sequence corresponding to a certain frame image is greater than the safety threshold, it indicates that a photovoltaic array target exists in the corresponding area in the infrared image. The target frame line value at this time is recorded to identify the photovoltaic array target area.
[0016] Optionally, the step 3) specifically includes:
[0017] Analyzing the temperature image and original temperature data corresponding to the infrared image;
[0018] Based on the recorded detection frame of the photovoltaic array target area, a corresponding rotation angle is obtained, a corresponding region of interest is obtained from the infrared image, the temperature image and the temperature raw data, and then an affine transformation is performed to transform the photovoltaic array target into a horizontal position, so as to obtain a standard photovoltaic array target area infrared image region of interest, temperature image region of interest and temperature raw data region of interest;
[0019] Based on the infrared image region of interest, the temperature image region of interest and the temperature raw data region of interest, the photovoltaic panel morphological characteristics and hot spot temperature characteristics are analyzed to achieve high-precision detection of photovoltaic hot spot defects.
[0020] Optionally, the photovoltaic panel morphological characteristics and hot spot temperature characteristics analysis based on the infrared image region of interest, the temperature image region of interest and the temperature raw data region of interest to achieve high-precision detection of photovoltaic hot spot defects specifically includes:
[0021] Using the infrared image region of interest and the temperature image region of interest of the standard photovoltaic array target area, removing edge interference of the photovoltaic array target;
[0022] Performing image enhancement processing on the region of interest of the infrared image to improve image clarity and morphological features of small-sized hot spots;
[0023] Using the infrared image region of interest and the temperature image region of interest to remove row and column segmentation line interference in the photovoltaic array target, a hot spot morphology mask and a hot spot temperature mask are obtained;
[0024] Obtain the intersection of the photovoltaic array target area mask, the photovoltaic array high temperature area mask, the hot spot morphology mask and the hot spot temperature mask, and use morphology to eliminate the interference of isolated points;
[0025] The contour area, relative maximum temperature and relative average temperature are obtained, and contours that meet the conditions of relative maximum temperature and relative average temperature are selected from contours that meet the area threshold, thereby achieving high-precision detection of photovoltaic hot spot defects.
[0026] Optionally, the removing edge interference of the photovoltaic array target by using the infrared image region of interest and the temperature image region of interest of the standard photovoltaic array target area specifically includes:
[0027] The region of interest of the infrared image is obtained, and the pure color background interference in the region of interest of the infrared image is removed by using adaptive threshold segmentation. Then, the optimal grayscale segmentation threshold is calculated by using histogram statistics to obtain the pixel area with relatively concentrated grayscale, and the open operation is used to eliminate the interference of isolated points. Finally, the convex hull operation is used to obtain the target area mask of the photovoltaic array.
[0028] The region of interest of the temperature image is obtained, the average temperature threshold is calculated, the region of interest of the temperature image is segmented by the binary threshold, the low-temperature pixel area is removed, and the open operation is used to eliminate the interference of isolated points to obtain the high-temperature area mask of the photovoltaic array.
[0029] Optionally, the using the infrared image region of interest and the temperature image region of interest to remove row and column segmentation line interference in the photovoltaic array target to obtain a hot spot morphology mask and a hot spot temperature mask specifically includes:
[0030] The region of interest of the infrared image is obtained, the horizontal gradient and the vertical gradient are calculated, and the gradient map of the infrared image is obtained. The adaptive threshold is used for segmentation and inversion to remove the interference of the row and column segmentation lines. Then, the histogram statistics are used to calculate the optimal segmentation threshold and obtain the hot spot morphology mask.
[0031] The region of interest of the temperature image is obtained, the horizontal gradient and vertical gradient are calculated, and the gradient map of the infrared image is obtained. The adaptive threshold is used for segmentation and inversion to remove the interference of the row and column segmentation lines. Then the average temperature segmentation threshold is calculated, and the binary threshold segmentation is performed to obtain the hot spot temperature mask.
[0032] Optionally, the obtaining of the contour area, the relative maximum temperature and the relative average temperature, and screening the contours satisfying the relative maximum temperature and the relative average temperature from the contours satisfying the area threshold, thereby achieving high-precision detection of photovoltaic hot spot defects, specifically includes:
[0033] According to the contour information, the contour area is calculated, and the contours that meet the conditions are screened out as candidate areas for photovoltaic hot spot defects;
[0034] In the candidate area of the photovoltaic hot spot defect, calculate the relative maximum temperature T max and the relative average temperature T avg for:
[0035]
[0036]
[0037] Among them, T max and T avg Represents the relative maximum temperature and relative average temperature of the relevant image blocks, t max ,t avg They represent the absolute maximum temperature and the absolute average temperature of the relevant image blocks respectively, and t0 is the average temperature of the photovoltaic array.
[0038] To achieve the above-mentioned purpose, the present application also provides a photovoltaic hot spot defect detection device, comprising: a memory; and
[0039] A processor connected to the memory, the processor being configured to execute the steps of the method as described above.
[0040] To achieve the above objectives, the present application also provides a computer storage medium on which a computer program is stored, wherein the computer program implements the steps of the above method when executed by a machine.
[0041] The embodiments of the present application have the following advantages:
[0042] The embodiment of the present application provides a photovoltaic hot spot defect detection method, including: step 1) constructing a YOLOv5_OBB network structure, using a training sample data set to perform model training, and obtaining a photovoltaic array target detection model; step 2) acquiring an infrared image containing a photovoltaic array target, using the photovoltaic array target detection model to detect the infrared image, and identifying the photovoltaic array target area therefrom; step 3) based on the identified photovoltaic array target area, combined with the photovoltaic panel morphological characteristics and hot spot temperature characteristics, performing high-precision hot spot defect detection on the infrared image.
[0043] Through the above method, combining the respective advantages of the deep learning YOLOv5_OBB framework and computer vision analysis methods, using deep learning models to detect large-size targets, and using computer vision analysis methods to detect small-size targets, it is not only possible to detect the target area of the photovoltaic array with high precision in complex scenes and greatly suppress the interference of complex background on the ground, but also to separate photovoltaic hot spot defects in the target area of the photovoltaic array with high precision, realizing dynamic recognition, intelligent detection and active traceability of photovoltaic hot spot defect targets, and can work normally with low false alarms and high practicality in any complex scene. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the implementation methods of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings described below are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0045] Figure 1 A flow chart of a photovoltaic hot spot defect detection method provided in an embodiment of the present application;
[0046] Figure 2 is an infrared image obtained;
[0047] Figure 3 for Figure 2 The photovoltaic hot spot defect detection result obtained by processing the infrared image of the photovoltaic hot spot defect detection method provided by an embodiment of the present application;
[0048] Figure 4 Another infrared image is obtained;
[0049] Figure 5 for Figure 4The photovoltaic hot spot defect detection result obtained by processing the infrared image of the photovoltaic hot spot defect detection method provided by an embodiment of the present application;
[0050] Figure 6 A module block diagram of a photovoltaic hot spot defect detection device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] The following is a description of the implementation of the present application by specific specific embodiments. People familiar with the technology can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0052] It should be noted that the terms "step 1)", "step 2)", "step 3)", etc. in the claims and specification of the present application are used to distinguish different steps rather than to describe a specific order or sequence. It should be understood that these steps can be executed substantially in parallel or in reverse order under appropriate circumstances, depending on the functions involved.
[0053] In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.
[0054] An embodiment of the present application provides a photovoltaic hot spot defect detection method, referring to Figure 1 , Figure 1 This is a flowchart of a photovoltaic hot spot defect detection method provided in one embodiment of the present application. It should be understood that the method may also include additional boxes not shown and / or the boxes shown may be omitted, and the scope of the present application is not limited in this respect.
[0055] In step 1), a YOLOv5_OBB network structure is constructed, and a training sample data set is used for model training to obtain a photovoltaic array target detection model.
[0056] In some embodiments, step 1) specifically includes the steps of:
[0057] 1. Obtain infrared video data of photovoltaic array targets and perform data preprocessing operations, including frame size normalization, scene segmentation, and image enhancement;
[0058] Specifically, infrared video images of photovoltaic array targets containing photovoltaic hot spot defects are obtained, and frame size is normalized, images containing photovoltaic hot spot defects are extracted as key frame data, and key frames are subjected to data preprocessing such as image enhancement processing, such as image rotation, flipping, brightness and contrast adjustment, etc., to enhance the diversity of training samples and improve the robustness and accuracy of the model.
[0059] 2. Divide the target infrared video after data preprocessing according to different scenes, filter out repeated scenes and videos, and extract video frames with photovoltaic array targets according to different sizes of photovoltaic arrays for different scenes as training samples;
[0060] In addition, the rotation true annotation box (GT box, i.e., ground truth box) of the photovoltaic array target in the training sample annotated by common annotation software such as labelme or labelImg is obtained, and each ground truth annotation box data contains (x1, y1, x2, y2, x3, y3, x4, y4) values, where (x n ,y n ) represents the coordinates of the four vertices of the rotated rectangular annotation box.
[0061] 3. The training sample data set is divided according to the scene (for example, common photovoltaic arrays have 2 rows and 13 columns, 2 rows and 17 columns, or 3 rows and 28 columns, that is, the data set is divided according to the row and column arrangement scene of the photovoltaic array), and the training sample data set corresponding to each scene is divided into a training set, a validation set, and a test set (for example, the training set, the validation set, and the test set are divided in a ratio of 7:1:2), and then the training set, validation set, and test set of each scene are merged, renumbered, and converted into a training sample data set in YOLO format.
[0062] 4. The training set is passed to the YOLOv5_OBB network structure for target detection. The bias information of each target is calculated according to the detection results and the corresponding real annotation box annotation data, and then the weight parameters of the model are updated. The above steps are repeated for multiple rounds of iterations until the model reaches the end of training conditions, and the photovoltaic array target detection model can be obtained;
[0063] Specifically, yolov5s.pt is first used as a pre-training model, and the batch size is set to 128, the maximum number of iterations is set to 500, and 128 annotated images are extracted from the training set in each iteration, and sent to the YOLOv5_OBB framework for forward propagation, and features are extracted through multi-layer convolution and pooling operations to generate prediction boxes and category probability scores. The bias information of each target is calculated based on the detection results and annotated data, and the weight parameters of the model are updated. Repeat the above steps, after multiple rounds of iterations, until the model reaches the end of the training condition, the detection model of the photovoltaic array target can be obtained. In some embodiments, the accuracy, recall rate and precision of the model of two consecutive iterations on the test set are compared. When the improvement of the three indicators is less than or equal to 0.1% or the maximum number of iterations is reached, it is considered that the model has reached the end condition. If the training does not reach the end condition, the next round of iteration is performed until the end condition is met.
[0064] In step 2), an infrared image containing a photovoltaic array target is acquired, and the photovoltaic array target detection model is used to detect the infrared image to identify the photovoltaic array target area.
[0065] Specifically, when the value is higher than the preset safety threshold Th1, the detection frame line value of the corresponding image portion is recorded. In some embodiments, the safety threshold used is 0.8. When the confidence value of the detected target is higher than 0.8, it is considered that there is a photovoltaic array target, and the photovoltaic array target detection frame line value is recorded at this time.
[0066] In some embodiments, step 2) specifically includes the steps of:
[0067] 1. Obtain the infrared image containing the photovoltaic array target, and input it into the photovoltaic array target detection model in units of frames, to obtain the photovoltaic array target detection output result including the probability sequence and the target frame sequence corresponding to each frame image;
[0068] Specifically, for each frame of the image, the detection model will output a probability sequence P and a target box sequence B. The two sequences correspond one to one and are arranged in descending order according to the values in the probability sequence P. The i-th (i = 0, 1, 2, ..., 99) value P in the sequence i (P i ∈[0,1]), the corresponding target box B i =(x ul ,y ul ,x ur ,y ur ,x ll ,y ll ,x lr ,y lr ), where (x ul ,y ul) represent the x-coordinate and y-coordinate of the upper left corner of the target box, respectively. ur ,y ur ) represent the x-coordinate and y-coordinate of the upper right corner of the target box, respectively. ll ,y ll ) represent the x-coordinate and y-coordinate of the lower left corner of the target box, respectively. lr ,y lr ) represent the x-coordinate and y-coordinate of the lower right corner of the target box respectively.
[0069] 2. For the detection output results, traverse the probability sequence P corresponding to each frame and make a judgment based on the preset safety threshold Th1 (0.8 is used as an example in this embodiment). If for all probability sequences P i When both are less than the safety threshold, it means that there is no photovoltaic array target in the infrared image; when the probability sequence P corresponding to a certain frame image appears i When >Th1, it means that there is a photovoltaic array target in the corresponding area of the infrared image, and the target frame line value at this time is recorded (that is, the coordinate information of the four vertices of the target frame is recorded), so as to identify the photovoltaic array target area. In this implementation, because the photovoltaic array target is a large-size target with relatively obvious characteristics, setting the safety threshold to a relatively high 0.8 will not reduce the detection rate of the photovoltaic array target, and can also greatly suppress the interference of complex background on the photovoltaic hot spot defect detection results.
[0070] In step 3), based on the identified target area of the photovoltaic array, combined with the photovoltaic panel morphological characteristics and hot spot temperature characteristics, the infrared image is subjected to high-precision detection of hot spot defects.
[0071] In some embodiments, step 3) specifically includes the steps of:
[0072] 1. Analyze the temperature image and original temperature data corresponding to the infrared image.
[0073] 2. Based on the recorded detection frame of the photovoltaic array target area, the corresponding rotation angle is obtained, and the corresponding region of interest is obtained from the infrared image, temperature image and temperature raw data. Then, an affine transformation is performed to transform the photovoltaic array target into a horizontal arrangement, and the standard photovoltaic array target area infrared image region of interest, temperature image region of interest and temperature raw data region of interest are obtained, which is helpful for the subsequent detection of row and column segmentation lines in the photovoltaic array target.
[0074] 3. Based on the infrared image area of interest, the temperature image area of interest and the temperature raw data area of interest, the photovoltaic panel morphological characteristics and hot spot temperature characteristics are analyzed to achieve high-precision detection of photovoltaic hot spot defects.
[0075] In some embodiments, the above step 3 specifically includes:
[0076] 1. Using the infrared image region of interest and the temperature image region of interest of the standard photovoltaic array target area, removing edge interference of the photovoltaic array target;
[0077] In some embodiments, the steps can be broken down into two steps:
[0078] Step 1: Obtain the region of interest of the infrared image, use adaptive threshold segmentation to remove the pure color background interference in the region of interest of the infrared image, and then use histogram statistics to calculate the optimal grayscale segmentation threshold, obtain the pixel area with relatively concentrated grayscale, and use the open operation to eliminate the interference of isolated points, and finally use the convex hull operation to obtain the target area mask of the photovoltaic array; in some embodiments, the frequency value F with the highest grayscale frequency in the region of interest of the infrared image is obtained by using histogram statistics. peak , that is, the peak frequency, and then calculate the frequency threshold Th F , calculation formula:
[0079] Th F =F peak *f1
[0080] Among them, f1 is the scaling factor, which is set to 0.1 in this example. Finally, starting from the peak frequency, search in two directions for grayscale frequencies less than the frequency threshold Th F The corresponding two gray values G min and G max , which is the optimal grayscale segmentation threshold, and the pixel area between the optimal grayscale segmentation thresholds is extracted as the candidate area of the photovoltaic array component;
[0081] Step 2: Obtain the region of interest of the temperature image, calculate the average temperature threshold, divide the region of interest of the temperature image by the binary threshold, remove the low-temperature pixel area, and use the opening operation to eliminate the interference of isolated points to obtain the high-temperature area mask of the photovoltaic array; in some embodiments, the temperature characteristics of the hot spot defect are fully considered, and only the pixel area in the region of interest of the temperature image whose temperature value is greater than the average temperature is extracted.
[0082] 2. Perform image enhancement processing on the region of interest of the infrared image to improve image clarity and the morphological features of small-sized hot spots, which is beneficial to the high-precision detection of hot spot defects. In this embodiment, local adaptive histogram equalization is used to separate the low-frequency and high-frequency components in the infrared image, and then enhance the high-frequency components to achieve image detail enhancement effect.
[0083] 3. Using the infrared image region of interest and the temperature image region of interest to remove the row and column dividing line interference in the photovoltaic array target, to obtain a hot spot morphology mask and a hot spot temperature mask;
[0084] In some embodiments, the steps can be broken down into two steps:
[0085] Step 1: Obtain the region of interest of the infrared image, calculate the horizontal gradient and the vertical gradient, obtain the gradient map of the infrared image, use the adaptive threshold segmentation and inversion, remove the interference of the row and column segmentation lines, and then use the histogram statistics to calculate the optimal segmentation threshold to obtain the hot spot morphology mask; In this embodiment, the Sobel operator is used to calculate the horizontal and vertical gradients of the region of interest of the standard infrared image, and the gradient map of the infrared image is obtained by weighting, and the horizontal and vertical segmentation lines of the photovoltaic array can be extracted. In addition, the method for calculating the optimal segmentation threshold is the same as step 1 of the aforementioned method for removing the edge interference of the photovoltaic array target;
[0086] Step 2: Get the region of interest of the temperature image, calculate the horizontal gradient and vertical gradient, get the gradient map of the infrared image, use adaptive threshold segmentation and inversion to remove the interference of row and column segmentation lines, then calculate the average temperature segmentation threshold, perform binary threshold segmentation, and get the hot spot temperature mask.
[0087] 4. Obtain the intersection of the photovoltaic array target area mask, the photovoltaic array high temperature area mask, the hot spot morphology mask and the hot spot temperature mask, and use morphology to eliminate isolated point interference.
[0088] 5. Obtain the contour area, relative maximum temperature and relative average temperature, and select the contours that meet the conditions of relative maximum temperature and relative average temperature from the contours that meet the area threshold, so as to achieve high-precision detection of photovoltaic hot spot defects;
[0089] In some embodiments, the following two steps can be broken down:
[0090] Step 1: Calculate the contour area according to the contour information, and select the contours that meet the conditions as candidate areas for photovoltaic hot spot defects; in some embodiments, the contour area threshold Th area Setting it to 50 can greatly improve the detection rate of small-sized photovoltaic hot spot targets.
[0091] Step 2: Calculate the relative maximum temperature T in the candidate area of the photovoltaic hot spot defect max and the relative average temperature T avg for:
[0092]
[0093]
[0094] Among them, T max and T avg Represents the relative maximum temperature and relative average temperature of the relevant image blocks, t max ,t avgrepresents the absolute maximum temperature and the absolute average temperature of the relevant image block respectively, and t0 is the average temperature of the photovoltaic array;
[0095] In some embodiments, the relative maximum temperature threshold Th max Set to 0.5, relative to the average temperature threshold Th avg Setting it to 0.5 can greatly improve the detection accuracy of photovoltaic hot spot targets.
[0096] The photovoltaic hot spot defect detection method provided by this application not only greatly suppresses the interference of the ground background area, but also improves the accuracy and precision of hot spot defect detection, which is of great significance for improving the power generation efficiency of solar photovoltaic arrays and ensuring the safe and efficient operation of large photovoltaic power stations. This application aims to ensure the detection rate and accuracy of hot spot defects in photovoltaic arrays, and can be widely used in the field of automated operation and maintenance inspection of solar photovoltaic power plants.
[0097] The detection effect of the photovoltaic hot spot defect detection method provided by the embodiment of the present application is referenced Figures 2 to 5 , Figure 2 and Figure 4 To obtain the infrared image, Figure 3 and Figure 5 It is a photovoltaic hot spot defect detected after being processed by the photovoltaic hot spot defect detection method in the embodiment of the present application.
[0098] Through the above method, combining the respective advantages of the deep learning YOLOv5_OBB framework and computer vision analysis methods, using deep learning models to detect large-size targets, and using computer vision analysis methods to detect small-size targets, it is not only possible to detect the target area of the photovoltaic array with high precision in complex scenes and greatly suppress the interference of complex background on the ground, but also to separate photovoltaic hot spot defects in the target area of the photovoltaic array with high precision, realizing dynamic recognition, intelligent detection and active traceability of photovoltaic hot spot defect targets, and can work normally with low false alarms and high practicality in any complex scene.
[0099] This application has the following advantages:
[0100] 1. This application uses the powerful scene adaptability and real-time reasoning of the YOLOv5_OBB framework to greatly suppress the interference of complex background areas on the ground, providing a prerequisite for improving the accuracy and precision of hot spot defect detection;
[0101] 2. This application combines the respective advantages of the deep learning YOLOv5_OBB framework and the computer vision analysis method, uses the deep learning model to detect large-size targets, and uses the computer vision analysis method to detect small-size targets, so it has the following characteristics: 1. It can realize the training of deep learning models with small samples; 2. It has good robustness for scenes with large-size targets; 2. It can realize high-precision detection of small-size targets and improve the accuracy and precision of hot spot defect detection;
[0102] 3. This application starts from the three dimensions of morphological characteristics of photovoltaic hot spots in infrared images, infrared temperature images and temperature characteristics in original temperature data, comprehensively considers the characteristic performance of hot spot defects in different dimensions, and further improves the accuracy and precision of the detection results;
[0103] 4. Starting from the pain points of automated operation and maintenance inspection of solar photovoltaic power plants, this application fully evaluates the detection accuracy and computing power cost of the method, and can realize dynamic identification, intelligent detection and active traceability of photovoltaic hot spot defect targets. It has high real-time data processing and high detection accuracy, and can effectively solve the problem of high false alarm rate. It can be widely used in the field of automated operation and maintenance inspection of solar photovoltaic power plants.
[0104] Figure 6 A module block diagram of a photovoltaic hot spot defect detection device provided in an embodiment of the present application. The device includes:
[0105] A memory 101; and a processor 102 connected to the memory 101, wherein the processor 102 is configured to: Step 1) construct a YOLOv5_OBB network structure, perform model training using a training sample data set, and obtain a photovoltaic array target detection model;
[0106] Step 2) acquiring an infrared image containing a photovoltaic array target, and using the photovoltaic array target detection model to detect the infrared image to identify the photovoltaic array target area;
[0107] Step 3) Based on the identified target area of the photovoltaic array, combined with the photovoltaic panel morphological characteristics and hot spot temperature characteristics, high-precision hot spot defect detection is performed on the infrared image.
[0108] In some embodiments, the processor 102 is further configured to: the step 1) specifically includes:
[0109] Acquire infrared video data of photovoltaic array targets and perform data preprocessing operations, wherein the data preprocessing operations include frame size normalization, scene segmentation, and image enhancement;
[0110] The target infrared video after data preprocessing is divided into different scenes, and repeated scenes and videos are filtered out. For different scenes, video frames with photovoltaic array targets are extracted according to different sizes of photovoltaic arrays as training samples, and the rotated true annotation box data of the photovoltaic array targets in the annotated training samples are obtained;
[0111] The training sample data set is divided into a training set, a validation set and a test set for each scene, and then the training set, validation set and test set of each scene are merged, renumbered and converted into a training sample data set in YOLO format;
[0112] The training set is passed to the YOLOv5_OBB network structure for target detection, the bias information of each target is calculated according to the detection results and the corresponding real annotation box annotation data, and then the weight parameters of the model are updated. The above steps are repeated for multiple rounds of iterations until the model reaches the end of training conditions, and the photovoltaic array target detection model can be obtained.
[0113] In some embodiments, the processor 102 is further configured to: the step 2) specifically includes:
[0114] Acquire the infrared image containing the photovoltaic array target, and input it into the photovoltaic array target detection model in units of frames, to obtain the photovoltaic array target detection output result including a probability sequence and a target frame sequence corresponding to each frame of the image;
[0115] For the detection output result, the probability sequence corresponding to each frame is traversed, and a judgment is made based on a preset safety threshold. When the probability sequence corresponding to a certain frame image is greater than the safety threshold, it indicates that a photovoltaic array target exists in the corresponding area in the infrared image. The target frame line value at this time is recorded to identify the photovoltaic array target area.
[0116] In some embodiments, the processor 102 is further configured to: the step 3) specifically includes:
[0117] Analyzing the temperature image and original temperature data corresponding to the infrared image;
[0118] Based on the recorded detection frame of the photovoltaic array target area, a corresponding rotation angle is obtained, a corresponding region of interest is obtained from the infrared image, the temperature image and the temperature raw data, and then an affine transformation is performed to transform the photovoltaic array target into a horizontal position, so as to obtain a standard photovoltaic array target area infrared image region of interest, temperature image region of interest and temperature raw data region of interest;
[0119] Based on the infrared image region of interest, the temperature image region of interest and the temperature raw data region of interest, the photovoltaic panel morphological characteristics and hot spot temperature characteristics are analyzed to achieve high-precision detection of photovoltaic hot spot defects.
[0120] In some embodiments, the processor 102 is further configured to: perform photovoltaic panel morphological characteristics and hot spot temperature characteristics analysis based on the infrared image region of interest, the temperature image region of interest, and the temperature raw data region of interest to achieve high-precision detection of photovoltaic hot spot defects, specifically including:
[0121] Using the infrared image region of interest and the temperature image region of interest of the standard photovoltaic array target area, removing edge interference of the photovoltaic array target;
[0122] Performing image enhancement processing on the region of interest of the infrared image to improve image clarity and morphological features of small-sized hot spots;
[0123] Using the infrared image region of interest and the temperature image region of interest to remove row and column segmentation line interference in the photovoltaic array target, a hot spot morphology mask and a hot spot temperature mask are obtained;
[0124] Obtain the intersection of the photovoltaic array target area mask, the photovoltaic array high temperature area mask, the hot spot morphology mask and the hot spot temperature mask, and use morphology to eliminate the interference of isolated points;
[0125] The contour area, relative maximum temperature and relative average temperature are obtained, and contours that meet the conditions of relative maximum temperature and relative average temperature are selected from contours that meet the area threshold, thereby achieving high-precision detection of photovoltaic hot spot defects.
[0126] In some embodiments, the processor 102 is further configured to: remove edge interference of the photovoltaic array target by using the infrared image region of interest and the temperature image region of interest of the standard photovoltaic array target area, specifically including:
[0127] The region of interest of the infrared image is obtained, and the pure color background interference in the region of interest of the infrared image is removed by using adaptive threshold segmentation. Then, the optimal grayscale segmentation threshold is calculated by using histogram statistics to obtain the pixel area with relatively concentrated grayscale, and the open operation is used to eliminate the interference of isolated points. Finally, the convex hull operation is used to obtain the target area mask of the photovoltaic array.
[0128] The region of interest of the temperature image is obtained, the average temperature threshold is calculated, the region of interest of the temperature image is segmented by the binary threshold, the low-temperature pixel area is removed, and the open operation is used to eliminate the interference of isolated points to obtain the high-temperature area mask of the photovoltaic array.
[0129] In some embodiments, the processor 102 is further configured to: remove the row and column segmentation line interference in the photovoltaic array target by using the infrared image region of interest and the temperature image region of interest to obtain the hot spot morphology mask and the hot spot temperature mask, specifically including:
[0130] The region of interest of the infrared image is obtained, the horizontal gradient and the vertical gradient are calculated, and the gradient map of the infrared image is obtained. The adaptive threshold is used for segmentation and inversion to remove the interference of the row and column segmentation lines. Then, the histogram statistics are used to calculate the optimal segmentation threshold and obtain the hot spot morphology mask.
[0131] The region of interest of the temperature image is obtained, the horizontal gradient and vertical gradient are calculated, and the gradient map of the infrared image is obtained. The adaptive threshold is used for segmentation and inversion to remove the interference of the row and column segmentation lines. Then the average temperature segmentation threshold is calculated, and the binary threshold segmentation is performed to obtain the hot spot temperature mask.
[0132] In some embodiments, the processor 102 is further configured to: obtain the contour area, relative maximum temperature and relative average temperature, and select contours that meet the conditions of relative maximum temperature and relative average temperature from contours that meet the area threshold, so as to achieve high-precision detection of photovoltaic hot spot defects, specifically including:
[0133] According to the contour information, the contour area is calculated, and the contours that meet the conditions are screened out as candidate areas for photovoltaic hot spot defects;
[0134] In the candidate area of the photovoltaic hot spot defect, calculate the relative maximum temperature T max and the relative average temperature T avg for:
[0135]
[0136]
[0137] Among them, T max and T avg Represents the relative maximum temperature and relative average temperature of the relevant image blocks, t max ,t avg They represent the absolute maximum temperature and the absolute average temperature of the relevant image blocks respectively, and t0 is the average temperature of the photovoltaic array.
[0138] The specific implementation method is referred to the aforementioned method embodiment and will not be described in detail here.
[0139] The present application may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present application.
[0140] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.
[0141] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0142] The computer program instructions for performing the operation of the present application can be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions can be executed completely on a user's computer, partially on a user's computer, executed as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of a computer-readable program instruction to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA) or a programmable logic array (PLA), the electronic circuit can execute a computer-readable program instruction, thereby realizing various aspects of the present application.
[0143] Various aspects of the present application are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0144] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0145] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0146] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can also be executed in the opposite order sometimes, depending on the function involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a dedicated hardware-based system that performs the function or action of the specification, or can be realized by a combination of special-purpose hardware and computer instructions.
[0147] Note that, unless otherwise directly stated, all features disclosed in this specification (including any attached claims, abstracts and drawings) may be replaced by alternative features for achieving the same, equivalent or similar purposes. Therefore, unless otherwise explicitly stated, each feature disclosed is only an example of a group of equivalent or similar features. Where used, further, preferably, further and more preferably are simple beginnings for elaborating another embodiment based on the aforementioned embodiment, and the content of the further, preferably, further or more preferably followed by the combination with the aforementioned embodiment constitutes a complete construction of another embodiment. Several further, preferably, further or more preferably settings following the same embodiment can be arbitrarily combined to form another embodiment.
[0148] Although the present application has been described in detail above with general descriptions and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements may be made to the present application. Therefore, these modifications or improvements made without departing from the spirit of the present application are within the scope of protection claimed by the present application.
Claims
1. A photovoltaic hot spot defect detection method, characterized in that: The following steps are involved: Step 1) construct the YOLOv5_OBB network structure, use the training sample data set to train the model, and obtain the photovoltaic array target detection model; Step 2) acquiring an infrared image containing a photovoltaic array target, and using the photovoltaic array target detection model to detect the infrared image to identify the photovoltaic array target area; Step 3) Based on the identified target area of the photovoltaic array, combined with the morphological characteristics of the photovoltaic panel and the temperature characteristics of the hot spots, the infrared image is subjected to high-precision detection of hot spot defects.
2. The photovoltaic hot spot defect detection method according to claim 1, characterized in that: The step 1) specifically includes: Acquire infrared video data of photovoltaic array targets and perform data preprocessing operations, wherein the data preprocessing operations include frame size normalization, scene segmentation, and image enhancement; The target infrared video after data preprocessing is divided into different scenes, and repeated scenes and videos are filtered out. For different scenes, video frames with photovoltaic array targets are extracted according to different sizes of photovoltaic arrays as training samples, and the rotated true annotation box data of the photovoltaic array targets in the annotated training samples are obtained; The training sample data set is divided into a training set, a validation set and a test set for each scene, and then the training set, validation set and test set of each scene are merged, renumbered and converted into a training sample data set in YOLO format; The training set is passed to the YOLOv5_OBB network structure for target detection, the bias information of each target is calculated according to the detection results and the corresponding real annotation box annotation data, and then the weight parameters of the model are updated. The above steps are repeated for multiple rounds of iterations until the model reaches the end of training conditions, and the photovoltaic array target detection model can be obtained.
3. The photovoltaic hot spot defect detection method according to claim 1, characterized in that: The step 2) specifically includes: Acquire the infrared image containing the photovoltaic array target, and input it into the photovoltaic array target detection model in units of frames, to obtain the photovoltaic array target detection output result including a probability sequence and a target frame sequence corresponding to each frame of the image; For the detection output result, the probability sequence corresponding to each frame is traversed, and a judgment is made based on a preset safety threshold. When the probability sequence corresponding to a certain frame image is greater than the safety threshold, it indicates that a photovoltaic array target exists in the corresponding area in the infrared image. The target frame line value at this time is recorded to identify the photovoltaic array target area.
4. The photovoltaic hot spot defect detection method according to claim 1, characterized in that: The step 3) specifically includes: Analyzing the temperature image and original temperature data corresponding to the infrared image; Based on the recorded detection frame of the photovoltaic array target area, a corresponding rotation angle is obtained, a corresponding region of interest is obtained from the infrared image, the temperature image and the temperature raw data, and then an affine transformation is performed to transform the photovoltaic array target into a horizontal position, so as to obtain a standard photovoltaic array target area infrared image region of interest, temperature image region of interest and temperature raw data region of interest; Based on the infrared image region of interest, the temperature image region of interest and the temperature raw data region of interest, the photovoltaic panel morphological characteristics and hot spot temperature characteristics are analyzed to achieve high-precision detection of photovoltaic hot spot defects.
5. The photovoltaic hot spot defect detection method according to claim 4, characterized in that: The photovoltaic panel morphological characteristics and hot spot temperature characteristics analysis based on the infrared image region of interest, the temperature image region of interest and the temperature raw data region of interest to achieve high-precision detection of photovoltaic hot spot defects specifically includes: Using the infrared image region of interest and the temperature image region of interest of the standard photovoltaic array target area, removing edge interference of the photovoltaic array target; Performing image enhancement processing on the region of interest of the infrared image to improve image clarity and morphological features of small-sized hot spots; Using the infrared image region of interest and the temperature image region of interest to remove row and column segmentation line interference in the photovoltaic array target, a hot spot morphology mask and a hot spot temperature mask are obtained; Obtain the intersection of the photovoltaic array target area mask, the photovoltaic array high temperature area mask, the hot spot morphology mask and the hot spot temperature mask, and use morphology to eliminate the interference of isolated points; The contour area, relative maximum temperature and relative average temperature are obtained, and contours that meet the conditions of relative maximum temperature and relative average temperature are selected from contours that meet the area threshold, thereby achieving high-precision detection of photovoltaic hot spot defects.
6. The photovoltaic hot spot defect detection method according to claim 5, characterized in that: The method of removing edge interference of the photovoltaic array target by using the infrared image region of interest and the temperature image region of interest of the standard photovoltaic array target region specifically includes: The region of interest of the infrared image is obtained, and the pure color background interference in the region of interest of the infrared image is removed by using adaptive threshold segmentation. Then, the optimal grayscale segmentation threshold is calculated by using histogram statistics to obtain the pixel area with relatively concentrated grayscale, and the open operation is used to eliminate the interference of isolated points. Finally, the convex hull operation is used to obtain the target area mask of the photovoltaic array. The region of interest of the temperature image is obtained, the average temperature threshold is calculated, the region of interest of the temperature image is segmented by the binary threshold, the low-temperature pixel area is removed, and the open operation is used to eliminate the interference of isolated points to obtain the high-temperature area mask of the photovoltaic array.
7. The photovoltaic hot spot defect detection method according to claim 5 or 6, characterized in that: The method of removing the row and column segmentation line interference in the photovoltaic array target by using the infrared image region of interest and the temperature image region of interest to obtain a hot spot morphology mask and a hot spot temperature mask specifically includes: The region of interest of the infrared image is obtained, the horizontal gradient and the vertical gradient are calculated, and the gradient map of the infrared image is obtained. The adaptive threshold is used for segmentation and inversion to remove the interference of the row and column segmentation lines. Then, the histogram statistics are used to calculate the optimal segmentation threshold and obtain the hot spot morphology mask. The region of interest of the temperature image is obtained, the horizontal gradient and vertical gradient are calculated, and the gradient map of the infrared image is obtained. The adaptive threshold is used for segmentation and inversion to remove the interference of the row and column segmentation lines. Then the average temperature segmentation threshold is calculated, and the binary threshold segmentation is performed to obtain the hot spot temperature mask.
8. The photovoltaic hot spot defect detection method according to claim 5 or 6, characterized in that: The method of obtaining the contour area, the relative maximum temperature and the relative average temperature, and selecting contours that meet the conditions of the relative maximum temperature and the relative average temperature from contours that meet the area threshold, thereby realizing high-precision detection of photovoltaic hot spot defects, specifically includes: According to the contour information, the contour area is calculated, and the contours that meet the conditions are screened out as candidate areas for photovoltaic hot spot defects; In the candidate area of the photovoltaic hot spot defect, calculate the relative maximum temperature T max and the relative average temperature T avg for: Among them, T max and T avg Represents the relative maximum temperature and relative average temperature of the relevant image blocks, t max ,t avg They represent the absolute maximum temperature and the absolute average temperature of the relevant image blocks respectively, and t0 is the average temperature of the photovoltaic array.
9. A photovoltaic hot spot defect detection device, characterized in that: include: Memory; as well as A processor connected to the memory, the processor being configured to perform the steps of the method according to any one of claims 1 to 8.
10. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a machine, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Photovoltaic array hot spot detection method and system based on image processing
CN112446863A
Multi-type photovoltaic array hot spot detection method based on hybrid improved Faster R-CNN
CN112927222A
Photovoltaic module hot spot detection method and system based on unmanned aerial vehicle
CN116046796A
Photovoltaic defect detection method and device based on Yolov5, computer equipment and medium
CN116228670A
Photovoltaic module fault detection method and device, electronic equipment and storage medium
CN117197571A
Cited By
Diffusion model-based photovoltaic module defect image fusion method and system
CN120318100A
Photovoltaic module defect image fusion method and system based on diffusion model
CN120318100B
Photovoltaic defect identification method and system based on unmanned aerial vehicle, and electronic equipment
CN120598891A
A photovoltaic defect identification method and system based on a UAV and an electronic device
CN120598891B
