Photovoltaic panel shielding object detection method based on improved YOLOv8s network

By improving the YOLOv8s network, replacing the C2f module with the C2fGhost module, adding a small object detection head and GE attention mechanism module, the real-time and accuracy problems of photovoltaic panel occlusion detection are solved, and efficient detection of bird droppings and shadows is achieved, improving the improvement of The power generation efficiency and stability of photovoltaic power plants.

CN119027659APending Publication Date: 2024-11-26XIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410823243.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The power generation efficiency of photovoltaic panels is affected by factors such as solar radiation intensity, inclination angle, dust and shadow shading. In particular, bird droppings and shadow shading are difficult to detect in real time, resulting in a decrease in power generation efficiency. The existing methods are poor in real time and are difficult to meet the needs of intelligent maintenance.

Method used

Using the improved YOLOv8s network, by acquiring photovoltaic panel occlusion images, performing data enhancement processing and dividing the training set, verification set and test set, a photovoltaic panel occlusion detection model based on the improved YOLOv8s network, replacing the C2f module with the C2fGhost module, and adding small targets The detection head is introduced and the GE attention mechanism module is introduced to improve the detection accuracy.

Benefits of technology

It effectively reduces the amount of model parameters and calculations, improves the detection accuracy of small target objects, improves the real-time and accuracy of photovoltaic panel shading detection, and meets the intelligent detection needs of photovoltaic power stations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119027659A_ABST
    Figure CN119027659A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic panel shielding object detection method based on an improved YOLOv8s network. The method comprises the following specific steps: step 1, obtaining a photovoltaic panel shielding image; 2, performing data enhancement processing on the photovoltaic panel shielding image in the step 1 to obtain a photovoltaic panel shielding image data set; step 3, dividing the photovoltaic panel shielding image data set in the step 2 into a training set, a verification set and a test set according to a proportion of 6: 2: 2; 4, constructing a photovoltaic panel shielding object detection model based on the improved YOLOv8s network; and 5, inputting the training set and the verification set in the step 3 into a photovoltaic panel shielding object detection model based on the improved YOLOv8s network for training and verification, performing detection after training, and outputting a test set detection result. The method has the advantages that the parameter quantity and the calculated quantity of photovoltaic panel shielding object detection are reduced, and the detection precision of the photovoltaic panel shielding object can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of solar photovoltaic power generation, and in particular relates to a photovoltaic panel obstruction detection method based on an improved YOLOv8s network. Background Art

[0002] The new power system with new energy as the main body will further highlight its dominant position as the future power system. At the same time, building an efficient, clean, green and low-carbon new energy supply system has become a trend in energy transformation and development. As an important part of renewable energy, solar photovoltaics has the function of alleviating the shortage of traditional energy and protecting the ecological environment, and is an important way to achieve "dual carbon". However, in actual applications, the power generation efficiency of photovoltaic panels is easily affected by many factors, such as: solar radiation intensity, photovoltaic panel tilt angle, dust on the surface of photovoltaic panels, bird droppings and shadows, etc.

[0003] It should be pointed out that a large number of photovoltaic power stations have been built based on the rich solar energy and land resources in the northwest region. Due to the influence of the natural environment, the surface of photovoltaic panels will be blocked by some objects, among which the most common are bird droppings and shadows. If these obstructions are not cleaned for a long time, it will not only lead to a decrease in the power generation efficiency of photovoltaic panels, but also cause hot spot effects and other problems. At present, the detection of bird droppings and shadows on the surface of photovoltaic panels mainly relies on power station staff, but this method has the problem of poor real-time performance and is difficult to meet the urgent needs of photovoltaic power stations for the development of intelligent operation and maintenance. Therefore, studying how to intelligently detect bird droppings and shadows on the surface of photovoltaic panels and clean them in time is of great practical significance for improving the power generation of photovoltaic power stations and long-term stable operation. Summary of the invention

[0004] The present invention proposes a photovoltaic panel obstruction detection method based on an improved YOLOv8s network, which has the characteristic of improving the detection accuracy of photovoltaic panel obstructions.

[0005] The technical solution adopted by the present invention is implemented specifically according to the following steps:

[0006] Step 1: Obtain the photovoltaic panel occlusion image;

[0007] Step 2: Perform data enhancement processing on the photovoltaic panel occlusion image in step 1 to obtain a photovoltaic panel occlusion image dataset;

[0008] Step 3: Divide the photovoltaic panel occlusion image dataset in step 2 into a training set, a validation set, and a test set in a ratio of 6:2:2;

[0009] Step 4: Build a photovoltaic panel occlusion detection model based on the improved YOLOv8s network;

[0010] Step 5: Input the training set and validation set into the photovoltaic panel obstruction detection model based on the improved YOLOv8s network for training and validation to obtain the optimal photovoltaic panel obstruction detection model, and input the test set into the optimal photovoltaic panel obstruction detection model for detection to obtain the detection results.

[0011] The present invention is also characterized in that:

[0012] Step 2: Data enhancement processing includes contrast enhancement, noise addition, and horizontal mirror flipping.

[0013] Step 4: Improve the photovoltaic panel occlusion detection model of the YOLOv8s network, including the backbone network, neck network, and detection head.

[0014] Step 4: The photovoltaic panel occlusion detection model based on the improved YOLOv8s network replaces the C2f module in the backbone network of the original YOLOv8s network with the C2fGhost module; the detection head of the photovoltaic panel occlusion detection model based on the improved YOLOv8s network adds a small target detection head on the basis of the three detection heads of the original YOLOv8s network, forming four detection heads for targets of different sizes; the neck network of the photovoltaic panel occlusion detection model based on the improved YOLOv8s network introduces the GE attention mechanism module on the basis of the original YOLOv8s network.

[0015] Step 4: The size of the small target detection head is 160×160.

[0016] During training in step 5, the photovoltaic panel occlusion image is processed as follows in the photovoltaic panel occlusion detection model of the improved YOLOv8s network: the photovoltaic panel occlusion image in the training set is subjected to feature extraction twice using GhostConv, and the first feature map is output; the first feature map is subjected to feature extraction using the C2fGhost module, the GhostConv module, and the C2fGhost module in sequence, and the second feature map is output; the second feature map is subjected to feature extraction using the GhostConv module and the C2fGhost module in sequence, and the third feature map is output; the third feature map is subjected to feature extraction using the GhostConv module and the C2fGhost module in sequence, and the SPPF module is used in sequence to perform feature fusion, and the fourth feature map is output; the fourth feature map is subjected to upsample feature extraction using the Upsample layer, and the fifth feature map is output; the fifth feature map is subjected to feature extraction using the C2f module after the fifth feature map is spliced ​​with the third feature map; the sixth feature map is subjected to upsample feature extraction using the Upsample layer in sequence, and the seventh feature map is output; the seventh feature map is subjected to feature fusion using the C2fGhost module after the seventh feature map is spliced ​​with the second feature map f module feature extraction, output the eighth feature map; the eighth feature map is sequentially upsampled using the Upsample layer to extract features and then concatenated with the first feature map, the concatenated feature map is subjected to feature extraction using the C2f module, and then the GE attention mechanism module is used to extract features, and the ninth feature map is output; the ninth feature map is subjected to feature extraction using Conv and then concatenated with the eighth feature map, and after concatenation, the C2f module is used to extract features and the GE attention mechanism module is used to extract features, and the tenth feature map is output; the tenth feature map is subjected to feature extraction using Conv and then concatenated with the eighth feature map. The six feature maps are spliced, and after splicing, the C2f module is used for feature extraction, and then the GE attention mechanism module is used for feature extraction to output the eleventh feature map; Conv is used to extract features from the eleventh feature map and then spliced ​​with the fourth feature map, and after splicing, the C2f module is used for feature extraction, and then the GE attention mechanism module is used for feature extraction to output the twelfth feature map; the ninth feature map, the tenth feature map, the eleventh feature map and the twelfth feature map with output sizes of 160×160, 80×80, 40×40 and 20×20 are input into the detection head respectively.

[0017] The beneficial effects of the present invention are:

[0018] 1. The present invention provides a photovoltaic panel obstruction detection method based on an improved YOLOv8s network, replacing the C2f module of the backbone network part of the original YOLOv8s network model with the C2fGhost module, effectively reducing the number of parameters and the amount of calculation of the YOLOv8s network model;

[0019] 2. The present invention provides a photovoltaic panel obstruction detection method based on an improved YOLOv8s network. A small target detection head is added to the original detection head of the original YOLOv8s network, thereby improving the detection accuracy of the YOLOv8s model for small target objects; finally, a GE attention mechanism module is integrated into the neck network feature fusion part of the original YOLOv8s network model, thereby further improving the detection accuracy of the photovoltaic panel obstruction detection model. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic diagram of an improved YOLOv8s network structure model of a photovoltaic panel obstruction detection method based on an improved YOLOv8s network according to the present invention;

[0021] Figure 2 It is a schematic diagram of the structure of the GhostConv module of the photovoltaic panel obstruction detection method based on the improved YOLOv8s network of the present invention;

[0022] Figure 3 It is a schematic diagram of the structure of the GhostBottleneck module with a step size of 1 in the photovoltaic panel obstruction detection method based on the improved YOLOv8s network of the present invention;

[0023] Figure 4 It is a schematic diagram of the structure of the GhostBottleneck module with a step size of 2 of the photovoltaic panel obstruction detection method based on the improved YOLOv8s network of the present invention;

[0024] Figure 5 This is a schematic diagram of the structure of the C2fGhost module of the photovoltaic panel obstruction detection method based on the improved YOLOv8s network of the present invention;

[0025] Figure 6 The GE basic structure of the photovoltaic panel obstruction detection method based on the improved YOLOv8s network of the present invention;

[0026] Figure 7 This is a comparison chart of the accuracy curves of the improved YOLOv8s network model and the original YOLOv8s network in Example 1 of the present invention;

[0027] Figure 8 A comparison chart of the recall rate curves of the improved YOLOv8s network model and the original YOLOv8s network in Example 1 of the present invention;

[0028] Fig. 9 This is a comparison chart of the mean average precision mAP@0.5 curves of the improved YOLOv8s network model and the original YOLOv8s network in Example 1 of the present invention;

[0029] Fig.10This is a comparison chart of the mean average precision mAP@0.5:0.95 curves of the improved YOLOv8s network model and the original YOLOv8s network in Example 1 of the present invention;

[0030] Fig.11 The bird droppings occlusion image of the photovoltaic panel surface obtained in Example 1 of the present invention;

[0031] Fig.12 The shadow-blocking image of the photovoltaic panel surface obtained in Example 1 of the present invention;

[0032] Fig.13 The bird droppings and shadow occlusion image on the photovoltaic panel surface obtained in Example 1 of the present invention;

[0033] Fig.14 This is a rendering of the bird droppings occlusion image on the photovoltaic panel surface obtained in Example 1 of the present invention, using the original YOLOv8s network for detection;

[0034] Fig.15 This is a detection effect diagram of the photovoltaic panel obstruction detection method based on the improved YOLOv8s network for the bird droppings obstruction image on the photovoltaic panel surface obtained in Example 1 of the present invention;

[0035] Fig.16 This is a picture showing the effect of using the original YOLOv8s network to detect the shadow occlusion image of the photovoltaic panel surface obtained in Example 1 of the present invention;

[0036] Fig.17 This is a detection effect diagram of the photovoltaic panel obstruction detection method based on the improved YOLOv8s network for the photovoltaic panel surface shadow obstruction image obtained in Example 1 of the present invention;

[0037] Fig.18 This is a picture showing the effect of using the original YOLOv8s network to detect the bird droppings and shadow occlusion images on the photovoltaic panel surface obtained in Example 1 of the present invention;

[0038] Fig.19 This is a diagram showing the detection effect of the photovoltaic panel obstruction detection method based on the improved YOLOv8s network for the bird droppings and shadow occlusion images on the photovoltaic panel surface obtained in Example 1 of the present invention. DETAILED DESCRIPTION

[0039] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0040] The present invention is based on the photovoltaic panel obstruction detection method of improving the YOLOv8s network, and is specifically implemented according to the following steps:

[0041] Step 1: Obtain the photovoltaic panel occlusion image;

[0042] Step 2: Perform data enhancement processing on the photovoltaic panel occlusion image in step 1 to obtain a photovoltaic panel occlusion image dataset; perform data expansion on the collected data through three data enhancement methods: contrast enhancement, noise addition, and horizontal mirror flipping, thereby increasing the diversity of the data;

[0043] Step 3: Divide the photovoltaic panel occlusion image dataset in step 2 into a training set, a validation set, and a test set in a ratio of 6:2:2;

[0044] Step 4: Build a photovoltaic panel occlusion detection model based on the improved YOLOv8s network;

[0045] The present invention constructs a photovoltaic panel obstruction detection model based on an improved YOLOv8s network, and its structure is as follows: Figure 1 As shown in the figure. First, the backbone network of the original YOLOv8s network is lightened and improved, and the GhostConv module and C2fGhost module are used to rebuild the backbone network part, which can reduce the number of parameters and calculations of the model; secondly, on the basis of the original detection head of the YOLOv8s network, a 160×160 small target detection head is added, forming four detection heads for large, medium, small and very small scale targets, which improves the detection accuracy of the model for small targets such as bird droppings and shadows on the surface of photovoltaic panels; finally, the GE attention mechanism module is integrated into the neck feature fusion part of the model to further improve the model's ability to extract feature information.

[0046] like Figure 2 As shown in the figure, the GhostConv module divides the input feature map into two parts, one part generates the feature map through convolution operation, and the other part obtains the feature map through linear operation. Finally, the two parts are spliced ​​to obtain the final feature map. Compared with the standard convolution, the use of the GhostConv module can effectively reduce the number of parameters and the amount of calculation of the model. The GhostNet network model is built with two GhostBottleneck modules. Figure 3 It is a GhostBottleneck module with a step size of 1, where the first GhostConv module is used to increase the number of channels, and the second GhostConv module is used to reduce the number of channels and match the number of output channels. Figure 4 It is a GhostBottleneck module with a stride of 2. Compared with the GhostBottleneck module with a stride of 1, a deep convolution with a stride of 2 is added between the two GhostConv modules for downsampling feature extraction.

[0047] like Figure 5As shown in the figure, the C2fGhost module is an improvement on the C2f module in the backbone network of the YOLOv8s network model. It mainly replaces all Bottleneck modules in the C2f module with GhostBottleneck modules, thereby reducing the number of model parameters and the amount of calculation. In the process of detecting bird droppings and shadows on the surface of photovoltaic panels, due to the small size of some bird droppings and shadow targets, the original YOLOv8s network model has poor detection effect on them. On the basis of the three detection heads contained in the original network model, a 160×160 small target detection head is added, which can obtain more detailed feature information in the original small target object, thereby improving the detection accuracy of the network model for small target occluders. In order to strengthen the model's attention to important feature information, the GE (Gather-Excite) attention mechanism module is integrated into the neck feature fusion part of the YOLOv8s network model; the GE module is a new attention mechanism module designed based on the SE module, and its structure is as follows Figure 6 As shown in Figure 2, the GE attention mechanism module consists of two parts: Gather and Excite. The Gather part is used to extract features from local spatial positions, and the Excite part is used to scale them back to their original size.

[0048] Step 5: Input the training set and validation set of step 3 into the photovoltaic panel occlusion detection model based on the improved YOLOv8s network for training and validation, and obtain the trained photovoltaic panel occlusion detection model. Input the test set into the trained photovoltaic panel occlusion detection model for detection, and output the test set detection result.

[0049] In step 5, the training set is used as input, and the photovoltaic panel occlusion images in the training set are processed as follows in the photovoltaic panel occlusion detection model based on the improved YOLOv8s network: the photovoltaic panel occlusion images in the training set are extracted features twice using GhostConv, and the first feature map is output; the first feature map is extracted features using the C2fGhost module, the GhostConv module, and the C2fGhost module in sequence, and the second feature map is output; the second feature map is extracted features using the GhostConv module and the C2fGhost module, and the third feature map is output; after the third feature map is extracted features using the GhostConv module and the C2fGhost module in sequence, the SPPF module is used in sequence to perform feature fusion, and the fourth feature map is output; the fourth feature map is upsampled and extracted using the Upsample layer, and the fifth feature map is output; after the fifth feature map and the third feature map are spliced, the C2f module is used to extract features, and the sixth feature map is output; the sixth feature map is upsampled and extracted using the Upsample layer in sequence, and the seventh feature map is output; the seventh feature map and the second feature map are spliced After that, the C2f module is used to extract features and the eighth feature map is output; the eighth feature map is sequentially upsampled and extracted using the Upsample layer and then concatenated with the first feature map, the concatenated feature map is subjected to feature extraction using the C2f module, and the GE attention mechanism module is used to extract features and the ninth feature map is output; the ninth feature map is subjected to feature extraction using Conv and then concatenated with the eighth feature map, the concatenated feature map is subjected to feature extraction using the C2f module, and the GE attention mechanism module is used to extract features and the tenth feature map is output; the tenth feature map is subjected to feature extraction using Conv After that, it is spliced ​​with the sixth feature map, and after splicing, the C2f module is used to extract features, and then the GE attention mechanism module is used to extract features, and the eleventh feature map is output; the eleventh feature map is spliced ​​with the fourth feature map after Conv is used to extract features, and after splicing, the C2f module is used to extract features, and then the GE attention mechanism module is used to extract features, and the twelfth feature map is output; the ninth feature map, the tenth feature map, the eleventh feature map and the twelfth feature map with output sizes of 160×160, 80×80, 40×40 and 20×20 are respectively input into the detection head.

[0050] The GhostConv module uses a GhostConv module with a stride of 2 and a convolution kernel size of 3×3, and the Conv module uses a Conv module with a stride of 2 and a convolution kernel size of 3×3.

[0051] Example 1

[0052] This embodiment is based on the photovoltaic panel occlusion detection method of the improved YOLOv8s network, and is specifically implemented according to the following steps:

[0053] Step 1: Obtain photovoltaic panel occlusion images; The photovoltaic panel occlusion images collected by the present invention were obtained by manual photography at the photovoltaic power station in July and January. A total of 726 photovoltaic panel images containing bird droppings and shadows were collected by using multiple shooting angles. Among them, 622 photovoltaic panel occlusion images were collected in July, and 104 photovoltaic panel occlusion images were collected in January. Figure 1 Shown are data patterns of bird droppings and shadows on the surface of photovoltaic panels.

[0054] Step 2: Perform data enhancement processing on the photovoltaic panel occlusion images to obtain a photovoltaic panel occlusion image dataset; the data enhancement processing includes contrast enhancement, noise addition, and horizontal mirror flipping, and finally 2904 photovoltaic panel images with bird droppings and shadow occlusions are obtained.

[0055] Step 3: Divide the photovoltaic panel occlusion image dataset in step 2 into a training set, a validation set, and a test set in a ratio of 6:2:2, including 1742 training sets, 580 validation sets, and 582 test sets;

[0056] Step 4: Build a photovoltaic panel occlusion detection model based on the improved YOLOv8s network;

[0057] Step 5: Input the training set and validation set in step 3 into the photovoltaic panel obstruction detection model based on the improved YOLOv8s network for training and verification. After 200 rounds of training, the trained photovoltaic panel obstruction detection model is obtained. Input the test set into the trained photovoltaic panel obstruction detection model for detection, and output the test set detection results.

[0058] In order to comprehensively evaluate the performance of the network model on the data set, the precision (Precision, P), recall (Recall, R), and mean Average Precision (mAP) indicators are used to evaluate the performance of the model.

[0059] In order to more intuitively demonstrate the improvement of the improved model, the original YOLOv8s network model and the photovoltaic panel occlusion detection model based on the improved YOLOv8s network are visualized in terms of P, R, mAP50 and mAP50-95 indicators. The line graphs are shown in Figure 2. Figures 7 to 10 shown.

[0060] In order to more intuitively demonstrate the detection effect of the model before and after the improvement of the occlusion, a photovoltaic panel bird droppings occlusion image is randomly selected in the test set. Fig.11 As shown in Figure 1, a photovoltaic panel shadow occlusion image is shown in Figure 1 Fig.12 As shown in the figure, a photovoltaic panel bird droppings and shadow occlusion image is shown in the figure. Fig.13As shown in the figure, the original YOLOv8s network model and the photovoltaic panel occlusion detection model based on the improved YOLOv8s network are used for detection comparison. The output result of the original YOLOv8s network model detecting the bird droppings occlusion image on the photovoltaic panel surface is as follows Fig.14 As shown in the figure, the photovoltaic panel occlusion detection model based on the improved YOLOv8s network detects the output of the bird droppings occlusion image on the photovoltaic panel surface. Fig.15 As shown; the output result of the original YOLOv8s network model detecting the photovoltaic panel shadow occlusion image is as follows Fig.16 As shown in the figure, the photovoltaic panel occlusion detection model based on the improved YOLOv8s network detects the output of the photovoltaic panel surface shadow occlusion image. Fig.17 As shown; the original YOLOv8s network model detects the bird droppings and shadow occlusion images on the photovoltaic panel surface output results are as follows Fig.18 As shown in the figure, the photovoltaic panel occlusion detection model based on the improved YOLOv8s network detects the bird droppings and shadow occlusion image output of the photovoltaic panel surface. Fig.19 As shown in the figure. Compared with the original YOLOv8s network model, the proposed improved YOLOv8s network model can better adapt to the detection tasks of bird droppings and shadows on the surface of photovoltaic panels. In addition, the original YOLOv8s network model has the problem of missed detection or low detection accuracy in the detection of small target bird droppings, while the proposed improved YOLOv8s network model effectively improves the missed detection of small target bird droppings and improves the overall detection accuracy of bird droppings and shadows.

[0061] Compared with the original YOLOv8s network model, the proposed improved YOLOv8s network model achieves P, R, mAP@0.5 and mAP@0.5:0.95 indicators of 97.52%, 95.31%, 97.93% and 70.53% respectively with less loss of computing resources.

[0062] Example 2

[0063] This embodiment is based on the photovoltaic panel occlusion detection method of the improved YOLOv8s network, and is specifically implemented according to the following steps:

[0064] Step 1: Obtain photovoltaic panel occlusion images; The photovoltaic panel occlusion images collected by the present invention were obtained by manual photography at the photovoltaic power station in July and January. A total of 726 photovoltaic panel images containing bird droppings and shadows were collected by using multiple shooting angles. Among them, 622 photovoltaic panel occlusion images were collected in July, and 104 photovoltaic panel occlusion images were collected in January. Figure 1 Shown are data patterns of bird droppings and shadows on the surface of photovoltaic panels.

[0065] Step 2: Perform data enhancement processing on the photovoltaic panel occlusion image to obtain a photovoltaic panel occlusion image dataset; the data enhancement processing includes contrast enhancement, noise addition, and horizontal mirror flipping.

[0066] Step 3: Divide the photovoltaic panel occlusion image dataset in step 2 into a training set, a validation set, and a test set in a ratio of 6:2:2;

[0067] Step 4: Construct a photovoltaic panel occlusion detection model based on the improved YOLOv8s network; the photovoltaic panel occlusion detection model of the improved YOLOv8s network includes a backbone network, a neck network and a detection head. The photovoltaic panel occlusion detection model based on the improved YOLOv8s network replaces the C2f module of the backbone network of the original YOLOv8s network with the C2fGhost module; the detection head of the photovoltaic panel occlusion detection model based on the improved YOLOv8s network adds a small target detection head on the basis of the three detection heads of the original YOLOv8s network, forming four detection heads for targets of different sizes; the neck network of the photovoltaic panel occlusion detection model based on the improved YOLOv8s network introduces the GE attention mechanism module on the basis of the original YOLOv8s network; the C2fGhost module is an improvement on the C2f module, and the specific improvement is to replace all the Bottleneck modules in the C2f module with the GhostBottleneck module;

[0068] Step 5: Input the training set and validation set of step 3 into the photovoltaic panel occlusion detection model based on the improved YOLOv8s network for training and validation, and obtain the trained photovoltaic panel occlusion detection model. Input the test set into the trained photovoltaic panel occlusion detection model for detection, and output the test set detection result.

[0069] Example 3

[0070] This embodiment is based on the photovoltaic panel occlusion detection method of the improved YOLOv8s network, and is specifically implemented according to the following steps:

[0071] Step 1: Obtain photovoltaic panel occlusion images; The photovoltaic panel occlusion images collected by the present invention were obtained by manual photography at the photovoltaic power station in July and January. A total of 726 photovoltaic panel images containing bird droppings and shadows were collected by using multiple shooting angles. Among them, 622 photovoltaic panel occlusion images were collected in July, and 104 photovoltaic panel occlusion images were collected in January. Figure 1 Shown are data patterns of bird droppings and shadows on the surface of photovoltaic panels.

[0072] Step 2: Perform data enhancement processing on the photovoltaic panel occlusion images to obtain a photovoltaic panel occlusion image dataset; the data enhancement processing includes contrast enhancement, noise addition, and horizontal mirror flipping, and finally 2904 photovoltaic panel images with bird droppings and shadow occlusions are obtained.

[0073] Step 3: Divide the photovoltaic panel occlusion image dataset in step 2 into a training set, a validation set, and a test set in a ratio of 6:2:2, including 1742 training sets, 580 validation sets, and 582 test sets;

[0074] Step 4: Construct a photovoltaic panel occlusion detection model based on the improved YOLOv8s network; the photovoltaic panel occlusion detection model of the improved YOLOv8s network includes a backbone network, a neck network and a detection head. The photovoltaic panel occlusion detection model based on the improved YOLOv8s network replaces the C2f module of the backbone network of the original YOLOv8s network with the C2fGhost module; the detection head of the photovoltaic panel occlusion detection model based on the improved YOLOv8s network adds a small target detection head on the basis of the three detection heads of the original YOLOv8s network, forming four detection heads for targets of different sizes; the neck network of the photovoltaic panel occlusion detection model based on the improved YOLOv8s network introduces the GE attention mechanism module on the basis of the original YOLOv8s network; the C2fGhost module is an improvement on the C2f module, and the specific improvement is to replace all the Bottleneck modules in the C2f module with the GhostBottleneck module;

[0075] Step 5: Input the training set and validation set of step 3 into the photovoltaic panel occlusion detection model based on the improved YOLOv8s network for training and validation, and obtain the trained photovoltaic panel occlusion detection model. Input the test set into the trained photovoltaic panel occlusion detection model for detection, and output the test set detection result.

[0076] During training, the photovoltaic panel occlusion image is processed as follows in the photovoltaic panel occlusion detection model of the improved YOLOv8s network: the photovoltaic panel occlusion image in the training set is subjected to feature extraction twice using GhostConv, and the first feature map is output; the first feature map is subjected to feature extraction using the C2fGhost module, the GhostConv module, and the C2fGhost module in sequence, and the second feature map is output; the second feature map is subjected to feature extraction using the GhostConv module and the C2fGhost module in sequence, and the third feature map is output; the third feature map is subjected to feature extraction using the GhostConv module and the C2fGhost module in sequence, and the SPPF module is used in sequence to perform feature fusion, and the fourth feature map is output; the fourth feature map is subjected to upsample feature extraction using the Upsample layer, and the fifth feature map is output; the fifth feature map is subjected to feature extraction using the C2f module after the fifth feature map is spliced ​​with the third feature map; the sixth feature map is subjected to upsample feature extraction using the Upsample layer in sequence, and the seventh feature map is output; the seventh feature map is subjected to feature fusion using the C2f after the seventh feature map is spliced ​​with the second feature map Module feature extraction, output the eighth feature map; the eighth feature map is sequentially upsampled using the Upsample layer to extract features and then concatenated with the first feature map, the concatenated feature map is subjected to feature extraction using the C2f module, and then the GE attention mechanism module is used to extract features, and the ninth feature map is output; the ninth feature map is subjected to feature extraction using Conv and then concatenated with the eighth feature map, and after concatenation, the C2f module is used to extract features and the GE attention mechanism module is used to extract features, and the tenth feature map is output; the tenth feature map is subjected to feature extraction using Conv and then concatenated with the sixth feature map The feature maps are spliced, and after splicing, the C2f module is used to extract features, and then the GE attention mechanism module is used to extract features, and the eleventh feature map is output; Conv is used to extract features from the eleventh feature map and then spliced ​​with the fourth feature map, and after splicing, the C2f module is used to extract features, and then the GE attention mechanism module is used to extract features, and the twelfth feature map is output; the ninth feature map, the tenth feature map, the eleventh feature map and the twelfth feature map with output sizes of 160×160, 80×80, 40×40 and 20×20 are input into the detection head respectively.

Claims

1. Photovoltaic panel occlusion detection method based on improved YOLOv8s network, It is characterized in that The specific steps are as follows: Step 1: Obtain the photovoltaic panel occlusion image; Step 2: Perform data enhancement processing on the photovoltaic panel occlusion image in step 1 to obtain a photovoltaic panel occlusion image dataset; Step 3: Divide the photovoltaic panel occlusion image dataset described in step 2 into a training set, a validation set, and a test set in a ratio of 6:2:2; Step 4: Build a photovoltaic panel occlusion detection model based on the improved YOLOv8s network; Step 5: Input the training set and the validation set into the photovoltaic panel obstruction detection model based on the improved YOLOv8s network for training and validation to obtain the optimal photovoltaic panel obstruction detection model, and input the test set into the optimal photovoltaic panel obstruction detection model for detection to obtain the detection result.

2. According to the photovoltaic panel obstruction detection method based on the improved YOLOv8s network of claim 1, It is characterized in that The data enhancement processing described in step 2 includes contrast enhancement, noise addition and horizontal mirror flipping.

3. According to the photovoltaic panel obstruction detection method based on the improved YOLOv8s network of claim 1, It is characterized in that The photovoltaic panel occlusion detection model of the improved YOLOv8s network described in step 4 includes a backbone network, a neck network and a detection head.

4. According to the photovoltaic panel obstruction detection method based on the improved YOLOv8s network of claim 3, It is characterized in that Step 4: The photovoltaic panel obstruction detection model based on the improved YOLOv8s network replaces the C2f module of the original YOLOv8s network backbone network part with the C2fGhost module; the detection head of the photovoltaic panel obstruction detection model based on the improved YOLOv8s network adds a small target detection head on the basis of the three detection heads of the original YOLOv8s network, forming four detection heads for targets of different sizes; the neck network of the photovoltaic panel obstruction detection model based on the improved YOLOv8s network introduces the GE attention mechanism module on the basis of the original YOLOv8s network.

5. According to the photovoltaic panel obstruction detection method based on the improved YOLOv8s network according to claim 4, It is characterized in that In step 4, the C2fGhost module replaces all Bottleneck modules in the C2f module with GhostBottleneck modules.

6. According to the photovoltaic panel obstruction detection method based on the improved YOLOv8s network according to claim 4, It is characterized in that The size of the small target detection head in step 4 is 160×160.

7. According to the photovoltaic panel obstruction detection method based on the improved YOLOv8s network of claim 1, It is characterized in that During step 5 training, the photovoltaic panel occlusion image is processed as follows in the photovoltaic panel occlusion detection model of the improved YOLOv8s network: the photovoltaic panel occlusion image in the training set is subjected to feature extraction twice using GhostConv, and the first feature map is output; the first feature map is subjected to feature extraction using the C2fGhost module, the GhostConv module, and the C2fGhost module in sequence, and the second feature map is output; the second feature map is subjected to feature extraction using the GhostConv module and the C2fGhost module, and the third feature map is output; the third feature map is subjected to feature extraction using the GhostConv module and the C2fGhost module in sequence, and the SPPF module is used in sequence to perform feature fusion, and the fourth feature map is output; the fourth feature map is subjected to upsample feature extraction using the Upsample layer, and the fifth feature map is output; the fifth feature map is subjected to feature extraction using the C2f module after the fifth feature map and the third feature map are spliced, and the sixth feature map is output; The sixth feature map is sequentially subjected to upsample feature extraction using the Upsample layer to output the seventh feature map; the seventh feature map is spliced ​​with the second feature map, and the C2f module is used to extract features to output the eighth feature map; the eighth feature map is sequentially subjected to upsample feature extraction using the Upsample layer and then spliced ​​with the first feature map, the spliced ​​feature map is subjected to feature extraction using the C2f module, and the GE attention mechanism module is used to extract features to output the ninth feature map; the ninth feature map is subjected to feature extraction using Conv and then spliced ​​with the eighth feature map, the spliced ​​feature map is subjected to feature extraction using the C2f module, and the GE attention mechanism module is used to extract features, Output the tenth feature map; use Conv to extract features from the tenth feature map and then concatenate it with the sixth feature map, use the C2f module to extract features after concatenation, and use the GE attention mechanism module to extract features, and output the eleventh feature map; use Conv to extract features from the eleventh feature map and concatenate it with the fourth feature map, use the C2f module to extract features after concatenation, and use the GE attention mechanism module to extract features, and output the twelfth feature map; input the ninth feature map, the tenth feature map, the eleventh feature map and the twelfth feature map with output sizes of 160×160, 80×80, 40×40 and 20×20 into the detection head respectively.