Lightweight defect detection method and system for photovoltaic panel in Saggoke environment
By combining data augmentation, depthwise separable convolution, and CBAM attention modules with adversarial training and channel pruning techniques, the photovoltaic panel defect detection model was optimized, solving the problems of detection accuracy and real-time performance in the desert environment, and achieving efficient and lightweight defect detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INNER MONGOLIA UNIV OF TECH
- Filing Date
- 2025-12-12
- Publication Date
- 2026-04-28
AI Technical Summary
Existing photovoltaic panel defect detection models face challenges in complex environments such as deserts and wastelands, including varying lighting, dust cover, and complex shooting conditions, resulting in significant differences in image quality and strong background noise interference. Traditional models have insufficient generalization ability and high computational complexity, making it difficult to achieve real-time, high-precision online detection on edge devices such as drones.
Generative adversarial networks (GANs) are used for data augmentation to simulate and generate image samples under different lighting conditions and dust coverage. The standard convolutions of the backbone network are replaced with depthwise separable convolutions, a CBAM attention module is embedded, adversarial samples are introduced for adversarial training, and the model is optimized through channel pruning techniques. The model is then deployed to edge computing devices for real-time detection.
It achieves high-precision, real-time defect detection of photovoltaic panels in desert environments, improves the model's environmental adaptability and robustness, reduces computational complexity, and is suitable for resource-constrained edge devices.
Smart Images

Figure CN121937522A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of image processing and artificial intelligence technology, and in particular to a method and system for detecting lightweight defects in photovoltaic panels in a desert environment. Background Technology
[0002] As the core area for the construction of large-scale national photovoltaic bases, the sandy and arid regions of Inner Mongolia present severe challenges to the development of the photovoltaic industry due to their unique geographical environment. These regions are frequently subjected to extreme climatic conditions such as strong winds and sandstorms, drastic temperature differences, and intense ultraviolet radiation, leading to defects such as micro-cracks, sand erosion damage, and dust accumulation on the surface of photovoltaic panels. These defects severely affect power generation efficiency and pose potential safety hazards. With the continuous expansion of photovoltaic power plants, traditional manual inspection methods are no longer sufficient to meet the demands for efficient and precise operation and maintenance.
[0003] Chinese invention patent application number 202411858852.4 discloses a lightweight photovoltaic panel defect detection method based on an improved YOLOv8, comprising: acquiring an image of the photovoltaic panel defect to be detected; inputting the image into a FasterNet backbone network for multi-scale feature extraction; inputting the multi-scale features into a feature fusion module for fusion to obtain a fused feature map; inputting the fused feature map into a target detection module to obtain a detection result; and the output module is used to output the detection result. By improving the YOLOv8 backbone network and feature fusion module, it has significant advantages over existing technologies in terms of computational complexity, detection accuracy, and real-time performance, especially in handling multi-scale defects, improving accuracy, and enhancing robustness. It can effectively solve the problems of high computational complexity, insufficient accuracy, and poor multi-scale defect handling capability in existing technologies.
[0004] Existing technologies have improved the detection accuracy and efficiency of multi-scale defects by introducing networks such as FasterNet to improve the backbone and feature fusion modules. However, in complex real-world scenarios such as deserts and wastelands, this method faces significant challenges: variable lighting, severe dust cover, and complex shooting conditions lead to large differences in image quality and strong background noise interference, resulting in insufficient generalization ability of traditional models. Furthermore, the computational complexity of existing models remains high, making it difficult to achieve real-time, high-precision online detection on edge devices such as drones, thus limiting their practical application in intelligent operation and maintenance of power plants. Therefore, there is an urgent need for a detection model that can adapt to complex environments, has strong anti-interference capabilities, and is lightweight, in order to achieve accurate and real-time identification of photovoltaic panel defects in field environments. Summary of the Invention
[0005] This application provides a lightweight defect detection method and system for photovoltaic panels in a desert environment. It provides a high-precision, high-efficiency, and highly robust photovoltaic panel defect detection method and system, making it particularly suitable for the complex environment of deserts and enabling it to operate in real time on resource-constrained edge devices.
[0006] This application provides a method for detecting lightweight defects in photovoltaic panels in a desert environment, the method comprising: S1. Collect multi-source images of photovoltaic panels in the desert area and use generative adversarial networks for data augmentation to simulate and generate image samples with different lighting conditions, different dust coverage, and different shooting angles, forming a training dataset covering a variety of complex scenes. S2 uses YOLOv8n as the baseline architecture, replacing the standard convolutions in its backbone network with depthwise separable convolutions; it also embeds CBAM attention modules at key positions in the backbone network and feature fusion network, enabling the model to focus on background noise interference in the image. S3. During model training, adversarial examples are introduced for adversarial training; after model training is completed, channel pruning technology is applied to compress the model and optimize the model training effect. S4 deploys the optimized lightweight model to an edge computing device to perform inference on the video stream transmitted back by the drone in real time, and outputs the defect type, location and confidence level.
[0007] Preferably, the formation of a training dataset covering multiple complex scenarios includes: using a drone equipped with a multispectral camera to collect images at a photovoltaic power station in the desert, covering different time periods and weather conditions during the collection process, and labeling the collected images to define multiple defect categories; implementing basic data augmentation, including image flipping, rotation, brightness adjustment, contrast adjustment, and noise addition; and using the CycleGAN architecture for advanced data augmentation, taking clear, unobstructed photovoltaic panel images as the source domain and images with sand and dust obstruction and strong light overexposure as the target domain, and generating augmented images through adversarial training and cycle consistency constraints.
[0008] Preferably, the step of focusing the model on the interference of background noise in the image includes: replacing the standard convolution in the C2f module of the backbone network of the benchmark model with depthwise separable convolution, wherein the depthwise separable convolution includes sequentially connected depthwise convolution and pointwise convolution, wherein the depthwise convolution uses grouped convolution kernels to process each channel of the input feature map respectively, and the pointwise convolution uses 1×1 convolution kernels to perform cross-channel feature fusion; embedding CBAM attention modules at key positions at the end of the backbone network and in the feature pyramid network, wherein the CBAM attention module includes sequentially executed channel attention submodules and spatial attention submodules, wherein the channel attention submodule generates channel weights through global pooling and multilayer perceptron, and the spatial attention submodule generates spatial weights through pooling operations and convolution operations.
[0009] Preferably, the optimization of model training effect includes: introducing adversarial training during model training by adding perturbations to training images to generate adversarial samples and training by mixing the original samples with adversarial samples; performing channel pruning after model training is completed by first reducing the importance of some channels through sparsity training, and then removing channels with lower importance and their connection weights; performing knowledge distillation fine-tuning on the pruned model, using the original model before pruning as the teacher model to guide the training of the pruned student model, restoring model performance and maintaining lightweight characteristics.
[0010] Preferably, the output of defect type, location, and confidence level specifically involves: converting the trained model into an open neural network exchange format, optimizing the model using a specialized software development kit, and serializing it into a lightweight inference engine format; subsequently, deploying the optimized model to an edge computing device, receiving real-time video streams transmitted from the drone via a high-speed wireless communication link; performing frame-by-frame analysis on the video stream, including image preprocessing, neural network inference, and post-processing operations; and finally outputting defect type, location coordinates, and confidence level information.
[0011] Preferably, the training dataset covering multiple complex scenarios includes: S11, by deploying a distributed environmental monitoring sensor network, collects environmental parameters in the desert area in real time and establishes a complete time-series database; S12 employs a multispectral imaging system to simultaneously acquire visible light, thermal infrared, and polarized light data, synchronizes them with multi-source images in the same time, and establishes a correspondence between multi-source image data and environmental parameters. S13. Based on historical environmental data in the time series database, key parameter features representing seasonal changes are extracted to construct a seasonal feature memory bank. At the same time, combined with multispectral image data, the morphological features and optical properties of photovoltaic panel defects under different seasonal conditions are analyzed to establish a seasonal-defect feature correlation model. S14 monitors the working status of the photovoltaic panel and changes in environmental parameters in real time. When the sensor network detects significant changes in environmental characteristics, it automatically triggers the panel detection parameter adjustment mechanism and formulates and executes an adaptive detection strategy transition scheme.
[0012] Preferably, establishing a complete time-series database includes: deploying a distributed sensor network in the photovoltaic power station area, setting up monitoring points using a grid-based layout strategy; equipping each monitoring point with multiple environmental parameter acquisition devices, and achieving synchronous data transmission between devices through wireless self-organizing network technology; performing real-time preprocessing on the acquired environmental parameters, including correcting and filtering sensor readings; constructing a time-series database, using a rolling window storage mechanism to store and manage the preprocessed environmental parameters; and using the time-series database to store all environmental parameters by timestamp index, forming a structured dataset.
[0013] Preferably, the establishment of the seasonal-defect feature correlation model includes: extracting key parameter features characterizing seasonal changes based on historical environmental data in a time-series database using time-series analysis methods; classifying the extracted seasonal features using a clustering algorithm to construct a seasonal feature memory; analyzing the morphological characteristics and optical properties of photovoltaic panel defects under different seasonal conditions by combining multispectral image data; and establishing a seasonal-defect feature correlation model to quantify the correlation between environmental features and defect characteristics. Preferably, in the formulation and execution of the adaptive detection strategy transition scheme, an automatic panel detection parameter adjustment mechanism is triggered, including: real-time monitoring of the photovoltaic panel's operating status and environmental parameter changes through a distributed sensor network; automatically triggering the detection parameter adjustment mechanism when a significant change in environmental characteristics is detected; dynamically adjusting the detection model parameters based on a reinforcement learning framework; balancing detection accuracy and resource consumption by defining the environmental parameter state space and the detection parameter action space, and using a reward function; formulating a detection strategy transition scheme using a smooth migration mechanism; achieving a smooth transition of the detection strategy through progressive parameter updates and dynamic adjustment of multimodal fusion weights; and implementing closed-loop optimization through a control loop, deploying the adjusted parameters to the edge inference engine.
[0014] This application also provides a photovoltaic panel lightweight defect detection system for a desert environment, the system comprising: The data acquisition and enhancement module is used to acquire multi-source images of photovoltaic panels in the desert area and use generative adversarial networks to perform data enhancement, simulate and generate image samples with different lighting conditions, different dust coverage, and different shooting angles, forming a training dataset covering a variety of complex scenes. A lightweight model building module is used to replace the standard convolutions in the backbone network of YOLOv8n with depthwise separable convolutions based on the YOLOv8n architecture; CBAM attention modules are embedded in key positions of the backbone network and feature fusion network to enable the model to focus on the interference of background noise in the image; The model training and optimization module is used to introduce adversarial examples for adversarial training during the model training process; after the model training is completed, channel pruning technology is applied to compress the model and optimize the model training effect. The edge deployment and inference module is used to deploy the optimized lightweight model to edge computing devices, perform inference on the video stream transmitted back by the drone in real time, and output the defect type, location and confidence level.
[0015] One or more technical solutions provided in this application have at least the following technical effects or advantages: Through systematic optimization tailored to the unique environment of the Gobi Desert, the solution demonstrates significant technological advantages. It effectively overcomes the impact of complex environmental factors such as strong light interference and sandstorm obstruction on detection accuracy, giving the model excellent environmental adaptability. Through innovative lightweight design, the system achieves smooth real-time detection performance on edge devices, significantly improving the efficiency and economy of photovoltaic inspection. The specialized technical approach solves the applicability issue of general-purpose models in special scenarios, and its outstanding practical value provides a reliable guarantee for the intelligent operation and maintenance of photovoltaic power plants, demonstrating promising prospects for widespread application.
[0016] By constructing an intelligent detection system that integrates environmental perception and multimodal fusion, the adaptability and reliability of photovoltaic panel defect detection in desert environments have been significantly improved. This system can dynamically respond to seasonal changes and environmental disturbances, effectively overcoming the impact of complex conditions such as strong sunlight and sandstorm obstruction on detection accuracy through real-time data acquisition, multispectral analysis, and adaptive adjustment mechanisms. Its advantages lie in achieving seamless transition of detection parameters and strategy optimization, ensuring stable and high-performance operation under different seasons and weather conditions. Simultaneously, closed-loop optimization continuously improves the robustness and accuracy of the model, providing an efficient and reliable solution for the intelligent operation and maintenance of photovoltaic power plants. Attached Figure Description
[0017] Figure 1 This is a schematic flowchart of a method for detecting lightweight defects in photovoltaic panels in a desert environment according to an embodiment of the present invention. Figure 2 This is a structural block diagram of a photovoltaic panel lightweight defect detection system in a desert environment according to an embodiment of the present invention. Detailed Implementation
[0018] To facilitate understanding of the present invention, a more complete description of this application will be given below with reference to the accompanying drawings, which illustrate preferred embodiments of the invention. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to enable a more thorough and complete understanding of the disclosure of the present invention.
[0019] It should be noted that the terms "vertical," "horizontal," "up," "down," "left," "right," and similar expressions used in this article are for illustrative purposes only and do not represent the only possible implementation.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains; the terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to limit the invention; the term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0021] Example 1: Figure 1 This is a schematic flowchart of a method for detecting lightweight defects in photovoltaic panels in a desert environment according to an embodiment of the present invention.
[0022] like Figure 1 As shown, a method for detecting lightweight defects in photovoltaic panels in a desert environment includes the following steps: S1 collects multi-source images of photovoltaic panels in the desert area and uses generative adversarial networks for data augmentation to simulate and generate image samples with different lighting conditions, different dust coverage, and different shooting angles, forming a training dataset covering a variety of complex scenarios.
[0023] Specifically, a DJI Matrice 350RTK drone equipped with a Zenmuse H20T camera was used to collect images of a typical desert photovoltaic power station in Inner Mongolia. The flight altitude was maintained between 5 and 10 meters to balance image coverage and the clarity of details related to defects. The data collection covered different times of day (e.g., dawn, noon, dusk) and weather conditions (e.g., sunny, dusty), resulting in approximately 15,000 raw images. This process ensured data diversity and simulated real-world environmental changes.
[0024] The LabelImg tool was used to perform fine-grained annotation on the images, defining three defect categories: micro-crack, sand-erosion, and dust-accumulation. The annotation process was based on bounding box localization, providing ground truth labels for subsequent supervised learning.
[0025] Basic enhancements are implemented to improve data diversity, including random horizontal / vertical flips, ±15° random rotations, ±30% brightness adjustments, ±20% contrast adjustments, and the addition of Gaussian noise. For example, brightness adjustment involves a linear transformation: new pixel value = original pixel value × (1 + α), where α is the adjustment factor (e.g., α = 0.3 indicates a 30% increase in brightness). Rotation operations use the rotation matrix formula: for a point (x, y) rotated by an angle θ, the new coordinates are (xcosθ - ysinθ, xsinθ + ycosθ). The contrast adjustment formula is: new pixel value = μ + (original pixel value - μ) × (1 + β), where μ is the image mean and β is the contrast factor (e.g., β = 0.2). Gaussian noise addition is based on a normal distribution: noise pixel value = original pixel value + ε, where ε = N(0, σ). 2 ), where σ is the noise standard deviation.
[0026] Advanced augmentation is performed using the CycleGAN architecture. A clear, unobstructed image of a photovoltaic panel is used as the source domain (Domain A), and an image with severe dust obstruction and overexposure due to strong sunlight is used as the target domain (Domain B). The CycleGAN model is trained to learn inter-domain mappings and generate realistic samples. The loss function of CycleGAN includes adversarial loss and cycle consistency loss. The adversarial loss is defined for the generator G and discriminator D as follows: ,in, It is the distribution of source domain data. It is the target domain. Cyclic consistency loss ensures the mapping is invertible: , where F is the inverse generator. The total loss is a weighted sum: , This is a hyperparameter (usually set to 10). Using this method, the dataset is expanded to approximately 45,000 images and divided into training, validation, and test sets in a 7:2:1 ratio.
[0027] With the above enhancements, the dataset covers a variety of complex scenarios (such as different lighting, dust coverage, and shooting angles), directly supporting the robust training of the model in the desert environment.
[0028] S2 uses YOLOv8n as the baseline architecture, replacing the standard convolutions in its backbone network with depthwise separable convolutions; it embeds CBAM attention modules at key positions in the backbone network and feature fusion network, enabling the model to focus on the interference of background noise in the image.
[0029] Specifically, all C2f modules within the backbone network of the baseline model are identified. These modules are key components of feature extraction and contain standard convolutional layers. Each standard 3x3 convolutional layer in the C2f module is decomposed. This standard convolution originally performed two functions simultaneously in one step: first, it computed (i.e., filtered) information at each spatial location of the input feature map; second, it combined information from different input channels to generate new output channels. This single operation is decomposed into two steps. The first step is depthwise convolution. This step uses a set of 3x3 convolutional kernels, each kernel processing only one corresponding channel of the input feature map, performing spatial filtering independently. This step focuses on analyzing the feature patterns of each channel itself, but has not yet mixed information from different channels. The second step is pointwise convolution. This step uses 1x1 convolutional kernels to operate on the feature map after depthwise convolution. The core function of the 1x1 convolution is cross-channel information integration; it is responsible for linearly combining information from all channels output by the depthwise convolution to generate a specified number of new output channels. By employing a "depth-first, point-by-point" decomposition, the filtering and channel combination processes are successfully decoupled. Depthwise convolution handles spatial correlation and requires fewer parameters; point-by-point convolution handles channel transformation.
[0030] Key locations within the model were selected for embedding CBAM modules. These locations included the ends of the backbone network (near feature extraction completion) and the upsampling / downsampling fusion paths within the feature pyramid network. A total of three CBAM modules were embedded. First, for the input feature map, global average pooling was performed on all values across the entire two-dimensional plane (height and width) for each channel, resulting in a single value representing the global feature intensity of that channel. The intensity values of all channels formed a one-dimensional vector. Next, this one-dimensional vector was fed into a small neural network (multilayer perceptron). The first layer of this network compressed the number of channels to one-sixteenth of the original number, and the second layer restored the original number of channels. After processing by this network and mapping with the activation function, a weight coefficient between 0 and 1 was generated for each channel. This coefficient represents the importance of the information in that channel. Finally, each channel of the original input feature map was multiplied by its corresponding weight coefficient. Important feature channels were amplified, while less important channels were suppressed.
[0031] For the channel-attention-weighted feature maps, max pooling and average pooling operations are performed along the channel dimension. Each operation produces a two-dimensional feature map, highlighting the most salient feature and the average feature at each spatial location, respectively. These two two-dimensional feature maps are concatenated along the channel dimension, forming a structure of two "images" stacked together. A 7x7 convolution kernel is applied to this concatenated structure, followed by an activation function, generating a single-channel two-dimensional spatial weight map with values between 0 and 1. The value at each location in the map represents the importance of that pixel region. This spatial weight map is multiplied by the output feature map of the channel attention submodule. In this way, key regions related to defects in the image are enhanced, while irrelevant background regions are weakened.
[0032] The CBAM module performs channel and spatial attention calculations sequentially. Channel attention determines "which features to focus on," while spatial attention determines "which location in the image to focus on." The combination of these two approaches enables the model to accurately pinpoint defects and effectively combat interference from complex environments.
[0033] S3 introduces adversarial examples for adversarial training during model training; after model training is completed, channel pruning is applied to compress the model and optimize the training effect.
[0034] Specifically, after model construction is complete, the training and robustness enhancement phase begins. This phase aims to improve the model's stability and generalization ability in the complex environment of the desert by optimizing training strategies and introducing adversarial examples. The training process is conducted on workstations equipped with multiple high-performance GPUs, using the PyTorch framework, and strictly adhering to preset hyperparameter configurations.
[0035] To specifically enhance the model's resistance to image interference, a PGD adversarial training method was introduced in the latter part of the training cycle. The specific process is as follows: First, in each training batch, a small perturbation is applied to the original image to generate adversarial examples. The perturbation parameters are carefully set, including the perturbation upper limit, attack step size, and number of iterations. Then, the original examples and the generated adversarial examples are mixed in a balanced ratio and used together for model weight updates. This strategy forces the model to learn to be insensitive to noise, occlusion, and other interference factors in the input image, thereby significantly improving its robustness. The entire training process continues for multiple epochs to ensure that the model fully converges and adapts to extreme environments.
[0036] After robust training is completed, the model is compressed to reduce complexity and meet the deployment requirements of edge devices. The compression process includes three consecutive steps: sparsification training, channel pruning, and knowledge distillation fine-tuning.
[0037] Sparsity training is the first step in compression, and its purpose is to reduce the importance of some channels within the model by applying regularization constraints. Specifically, an L1 regularization term is added to the scaling factor of the batch normalization layer, and the scaling factor values of some channels are brought close to zero through multiple training epochs, thus providing a basis for subsequent pruning.
[0038] Channel pruning is performed based on the results of sparse training. First, the absolute values of the batch normalization scaling factors in all convolutional layers are calculated and globally sorted. Then, a fixed pruning rate is set, and the channels with the smallest global scaling factor values and their connected weights are removed. This operation directly reduces the number of model parameters and computational cost.
[0039] Pruning operations can lead to a loss of model accuracy, thus requiring fine-tuning through knowledge distillation to restore performance. This method uses the pre-pruning large model as the teacher model and the post-pruning small model as the student model. The student model is fine-tuned based on the output of the teacher model. The fine-tuning process employs a low learning rate and multiple training epochs, allowing the student model to gradually approach the performance of the teacher model. Ultimately, the model achieves significant lightweighting while maintaining high accuracy, laying the foundation for edge deployment.
[0040] S4 deploys the optimized lightweight model to an edge computing device to perform inference on the video stream transmitted back by the drone in real time, and outputs the defect type, location and confidence level.
[0041] Specifically, the first step is to convert the trained PyTorch model into the Open Neural Network Exchange (ONE) format. This conversion process ensures the model framework's versatility and interoperability, laying the foundation for subsequent engine optimization. The converted model file contains complete network structure and parameter information, enabling cross-platform deployment.
[0042] Next, a specialized software development kit (SDK) was used to perform in-depth optimization of the model. By serializing the model into a half-precision floating-point inference engine format, the model's memory footprint and computational latency were significantly reduced. This optimization process was specifically tailored to the hardware characteristics of edge devices, including layer fusion and precision calibration, to maximize inference efficiency.
[0043] After engine optimization, it is deployed to a designated edge computing device. This device, as an embedded AI platform, provides the necessary computing resources and interface support for model execution. The deployment process includes steps such as engine loading, memory allocation, and inference pipeline establishment to ensure stable and reliable system operation.
[0044] After model deployment, the system enters the real-time inference phase. It receives high-definition video streams transmitted in real-time from the UAV platform via a high-speed wireless communication link. The video stream is transmitted at a fixed frame rate per second, maintaining the timeliness and continuity of the image data.
[0045] The inference engine analyzes the input video stream frame by frame, with each frame undergoing three standard stages: preprocessing, neural network inference, and post-processing. In preprocessing, the system performs operations such as image resizing and normalization to conform to the model's input requirements. In the neural network inference stage, the optimized model extracts and classifies image features, identifying potential defect areas. In post-processing, the system decodes and filters the inference results to generate the final detection result.
[0046] The detection results are output in a structured format, containing three core pieces of information: defect type, location coordinates, and confidence level. This information is encapsulated in a standard data format for easy visualization or further transmission and processing. The entire inference process maintains a high processing speed; actual testing shows that the system can stably process over thirty frames per second, fully meeting the real-time requirements of rapid inspection of photovoltaic power plants.
[0047] In the performance verification phase, through comprehensive evaluation on the reserved test set, the model achieved a high level of accuracy in identifying the three main types of defects. Even under simulated extreme environmental interference conditions, the system's performance remained stable, verifying the practicality and reliability of the invention in complex environments.
[0048] The technical solutions described in the embodiments of this application have at least the following technical effects or advantages: Through systematic optimization tailored to the unique environment of the Gobi Desert, the solution demonstrates significant technological advantages. It effectively overcomes the impact of complex environmental factors such as strong light interference and sandstorm obstruction on detection accuracy, giving the model excellent environmental adaptability. Through innovative lightweight design, the system achieves smooth real-time detection performance on edge devices, significantly improving the efficiency and economy of photovoltaic inspection. The specialized technical approach solves the applicability issue of general-purpose models in special scenarios, and its outstanding practical value provides a reliable guarantee for the intelligent operation and maintenance of photovoltaic power plants, demonstrating promising prospects for widespread application.
[0049] Example 2: In Example 1, when parameters such as light intensity and dust concentration in the desert environment change seasonally, the detection method based on fixed data augmentation and model parameters may not be able to adequately adapt to dynamic environmental conditions, leading to fluctuations in defect detection accuracy. Since Example 1 mainly relies on historical data for offline augmentation and does not integrate a real-time environmental perception mechanism, the model's generalization ability is limited when faced with seasonal differences (such as overexposure under strong light or loss of detail due to dust obscuring), and its detection performance is easily affected by environmental interference. To improve the model's robustness and accuracy in complex and variable environments, it is necessary to introduce real-time environmental monitoring and multispectral information fusion to achieve dynamic adaptive adjustment of detection parameters.
[0050] Therefore, the embodiments of this application are optimized based on the above embodiments.
[0051] In some embodiments, in step S1, forming a training dataset covering multiple complex scenarios includes: S11, by deploying a distributed environmental monitoring sensor network, collects environmental parameters in the desert region in real time and establishes a complete time-series database.
[0052] Specifically, a distributed sensor network is planned and deployed in the photovoltaic power station area, employing a grid-based layout strategy to ensure uniform coverage of monitoring points. Each monitoring point is equipped with devices such as a light intensity sensor, a temperature and humidity sensor, and a particulate matter concentration detector, and data synchronization between devices is achieved through wireless self-organizing network technology. The sensors collect environmental parameters at a fixed sampling frequency, including light intensity, temperature, humidity, and dust concentration, and each data point is appended with a precise timestamp to form a time series.
[0053] During data acquisition, to ensure data accuracy and consistency, real-time preprocessing of raw sensor readings is necessary. For example, for light intensity data, radiation intensity correction may be required, calculated using the following formula: ,in For the original readings, This is the atmospheric transmittance correction factor. Additionally, for dust concentration data, a particulate matter mass concentration conversion formula may be applied: ,in denoted as the sensor output voltage, and k as the calibration factor.
[0054] The collected data is transmitted to the central processing unit via the communication module, where a time-series database is constructed. The database employs a rolling window storage mechanism, supporting efficient time-range queries and data compression. For handling missing data, a linear interpolation method may be used: given a time point... and Measured values and The interpolation value at time t is In addition, moving average filtering may be applied to eliminate transient noise. ,in For window size, This is the original sequence.
[0055] Ultimately, the time-series database stores all environmental parameters indexed by timestamps, forming a structured dataset.
[0056] S12 employs a multispectral imaging system to simultaneously acquire visible light, thermal infrared, and polarized light data, synchronizes them with multi-source images in the same time, and establishes a correspondence between multi-source image data and environmental parameters.
[0057] S13. Based on historical environmental data in the time series database, key parameter features representing seasonal changes are extracted to construct a seasonal feature memory bank. At the same time, combined with multispectral image data, the morphological features and optical properties of photovoltaic panel defects under different seasonal conditions are analyzed to establish a seasonal-defect feature correlation model.
[0058] Specifically, key parameters of seasonal variation are extracted based on historical environmental data in a time-series database. This step utilizes time-series analysis to identify periodic fluctuations in environmental parameters such as temperature, light intensity, and dust concentration. Specifically, a seasonal decomposition model is employed to break down the data into three main components: a trend component representing the long-term direction of change, a seasonal component capturing periodic patterns, and a residual component reflecting random fluctuations. By performing frequency analysis on the seasonal component, dominant frequency characteristics are extracted, thereby quantifying typical environmental patterns in different seasons, such as characteristic indicators of strong sunlight in summer or frequent dust storms in winter.
[0059] A seasonal feature memory is constructed, and clustering algorithms are used to classify the extracted seasonal features. The clustering process groups similar environmental feature vectors into different seasonal categories, such as dry season and rainy season. The centroid of each category represents the typical environmental pattern of that season, and the memory stores these patterns in the form of a vector database, supporting fast retrieval and matching. This mechanism enables the system to quickly retrieve the corresponding seasonal features based on real-time environmental data, providing a basis for adjusting detection parameters.
[0060] By combining multispectral image data, the morphological characteristics and optical properties of defects under different seasonal conditions are analyzed. For visible light images, morphological operations are used to analyze the geometric properties of defects, such as the length and width of microcracks; for thermal infrared images, abnormal temperature distributions are detected and hotspot regions are identified; for polarized light images, surface scattering characteristics are analyzed to reveal minute damage that is difficult to detect with the naked eye. By integrating multimodal information, the system can comprehensively capture the performance characteristics of defects under different optical conditions.
[0061] A seasonal-defect characteristic correlation model was established, employing statistical methods to quantify the correlation between environmental characteristics and defect properties. This model determines the strength of the correlation by analyzing the co-variation of seasonal parameters and defect characteristics; for example, it reveals that microcracks are more easily visible under specific dust concentrations. The correlation model is stored as a weight matrix for dynamically adjusting the detection strategy, ensuring that the system automatically optimizes detection accuracy in response to environmental changes.
[0062] S14 monitors the working status of the photovoltaic panel and changes in environmental parameters in real time. When the sensor network detects significant changes in environmental characteristics, it automatically triggers the panel detection parameter adjustment mechanism and formulates and executes an adaptive detection strategy transition scheme.
[0063] Specifically, a distributed sensor network is used to monitor the operating status of photovoltaic panels and environmental parameters in real time. The system continuously collects key parameters such as temperature, light intensity, and dust concentration, and uses a sliding window mechanism to process time-series data. By calculating the instantaneous rate of change of environmental parameters, the system can promptly identify significant changes in environmental characteristics. When the rate of change exceeds a preset threshold, the system automatically determines that significant changes in environmental conditions have occurred and activates the corresponding response mechanism.
[0064] The system automatically triggers a panel detection parameter adjustment mechanism. This process is based on a reinforcement learning framework, defining the environmental parameter vector as the state space, including indicators such as temperature, illumination, and dust concentration. The adjustment amount of the detection parameters is defined as the action space, covering important parameters such as feature extraction weights and classification thresholds. The system balances detection accuracy and resource consumption through a carefully designed reward function and continuously optimizes the decision-making strategy using a Q-learning algorithm. This mechanism enables the system to intelligently adjust detection parameters according to environmental changes.
[0065] When formulating the transition plan for the detection strategy, the system employs a smooth migration mechanism to avoid sudden performance changes. By applying an exponentially weighted moving average method, parameters are updated incrementally to ensure system stability. Simultaneously, the multimodal fusion weights are dynamically adjusted based on environmental reliability; for example, the weight of the visible light mode is appropriately reduced under strong lighting conditions. This adaptive adjustment mechanism guarantees optimal system performance under various environmental conditions.
[0066] Closed-loop optimization is achieved through a control loop, and the adjusted parameters are deployed to the edge inference engine. The system continuously monitors key performance indicators, including detection accuracy and inference latency, to ensure the effectiveness of the transition scheme. The entire process forms a complete closed-loop system from environmental perception to decision execution, significantly improving the adaptability and robustness of the detection model in dynamic environments. This adaptive detection strategy ensures the stable operation of the photovoltaic panel defect detection system in the complex environment of the Gobi Desert.
[0067] The technical solutions described in the embodiments of this application have at least the following technical effects or advantages: By constructing an intelligent detection system that integrates environmental perception and multimodal fusion, the adaptability and reliability of photovoltaic panel defect detection in desert environments have been significantly improved. This system can dynamically respond to seasonal changes and environmental disturbances, effectively overcoming the impact of complex conditions such as strong sunlight and sandstorm obstruction on detection accuracy through real-time data acquisition, multispectral analysis, and adaptive adjustment mechanisms. Its advantages lie in achieving seamless transition of detection parameters and strategy optimization, ensuring stable and high-performance operation under different seasons and weather conditions. Simultaneously, closed-loop optimization continuously improves the robustness and accuracy of the model, providing an efficient and reliable solution for the intelligent operation and maintenance of photovoltaic power plants.
[0068] Furthermore, this embodiment of the invention also provides a photovoltaic panel lightweight defect detection system for desert environments.
[0069] Figure 2 This is a schematic diagram of a photovoltaic panel lightweight defect detection system in a desert environment according to an embodiment of the present invention.
[0070] like Figure 2 As shown, a lightweight defect detection system for photovoltaic panels in a desert environment includes: a data acquisition and enhancement module, a lightweight model construction module, a model training and optimization module, and an edge deployment and inference module.
[0071] The data acquisition and enhancement module is used to acquire multi-source images of photovoltaic panels in the desert area and use generative adversarial networks to perform data enhancement, simulate and generate image samples with different lighting conditions, different dust coverage, and different shooting angles, forming a training dataset covering a variety of complex scenes. A lightweight model building module is used to replace the standard convolutions in the backbone network of YOLOv8n with depthwise separable convolutions based on the YOLOv8n architecture; CBAM attention modules are embedded in key positions of the backbone network and feature fusion network to enable the model to focus on the interference of background noise in the image; The model training and optimization module is used to introduce adversarial examples for adversarial training during the model training process; after the model training is completed, channel pruning technology is applied to compress the model and optimize the model training effect. The edge deployment and inference module is used to deploy the optimized lightweight model to edge computing devices, perform inference on the video stream transmitted back by the drone in real time, and output the defect type, location and confidence level.
[0072] It should be noted that other specific implementations of the photovoltaic panel lightweight defect detection system in a desert environment according to the present invention can refer to the above-described photovoltaic panel lightweight defect detection method in a desert environment.
[0073] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for detecting lightweight defects in photovoltaic panels in a desert environment, characterized in that, The method includes: S1. Collect multi-source images of photovoltaic panels in the desert area and use generative adversarial networks for data augmentation to simulate and generate image samples with different lighting conditions, different dust coverage, and different shooting angles, forming a training dataset covering a variety of complex scenes. S2 uses YOLOv8n as the baseline architecture, replacing the standard convolutions in its backbone network with depthwise separable convolutions; it also embeds CBAM attention modules at key positions in the backbone network and feature fusion network, enabling the model to focus on background noise interference in the image. S3. During model training, adversarial examples are introduced for adversarial training; after model training is completed, channel pruning technology is applied to compress the model and optimize the model training effect. S4 deploys the optimized lightweight model to an edge computing device to perform inference on the video stream transmitted back by the drone in real time, and outputs the defect type, location and confidence level.
2. The method for detecting lightweight defects in photovoltaic panels in a desert environment as described in claim 1, characterized in that, The formation of a training dataset covering various complex scenarios includes: using a drone equipped with a multispectral camera to collect images at a photovoltaic power station in the desert, covering different time periods and weather conditions, and labeling the collected images to define various defect categories; implementing basic data augmentation, including image flipping, rotation, brightness adjustment, contrast adjustment, and noise addition; and using the CycleGAN architecture for advanced data augmentation, using clear, unobstructed photovoltaic panel images as the source domain and images with sand and dust obstruction and overexposed strong light as the target domain, and generating augmented images through adversarial training and cycle consistency constraints.
3. The method for detecting lightweight defects in photovoltaic panels in a desert environment as described in claim 1, characterized in that, The method of enabling the model to focus on background noise interference in the image includes: replacing the standard convolution in the C2f module of the backbone network of the baseline model with depthwise separable convolution, wherein the depthwise separable convolution includes sequentially connected depthwise convolution and pointwise convolution, wherein the depthwise convolution uses grouped convolution kernels to process each channel of the input feature map separately, and the pointwise convolution uses 1×1 convolution kernels to perform cross-channel feature fusion; embedding CBAM attention modules at key positions at the end of the backbone network and in the feature pyramid network, wherein the CBAM attention module includes a channel attention submodule and a spatial attention submodule executed sequentially, wherein the channel attention submodule generates channel weights through global pooling and multilayer perceptron, and the spatial attention submodule generates spatial weights through pooling operations and convolution operations.
4. The method for detecting lightweight defects in photovoltaic panels in a desert environment as described in claim 1, characterized in that, The optimization of model training performance includes: introducing adversarial training during model training by adding perturbations to training images to generate adversarial samples and mixing the original samples with the adversarial samples for training; performing channel pruning after model training by first reducing the importance of some channels through sparsification training and then removing channels with lower importance and their connection weights; and performing knowledge distillation fine-tuning on the pruned model by using the original model before pruning as the teacher model to guide the training of the pruned student model, thereby restoring model performance and maintaining lightweight characteristics.
5. The method for detecting lightweight defects in photovoltaic panels in a desert environment as described in claim 1, characterized in that, The output defect type, location, and confidence level are specifically determined as follows: the trained model is converted into an open neural network exchange format, and the model is optimized using a specialized software development kit and serialized into a lightweight inference engine format; then the optimized model is deployed to an edge computing device and receives the video stream transmitted back in real time from the drone via a high-speed wireless communication link; The video stream is analyzed frame by frame, including image preprocessing, neural network inference, and post-processing operations; the final output includes defect type, location coordinates, and confidence information.
6. The method for detecting lightweight defects in photovoltaic panels in a desert environment as described in claim 1, characterized in that, The training dataset, which covers a variety of complex scenarios, includes: S11, by deploying a distributed environmental monitoring sensor network, collects environmental parameters in the desert area in real time and establishes a complete time-series database; S12 employs a multispectral imaging system to simultaneously acquire visible light, thermal infrared, and polarized light data, synchronizes them with multi-source images in the same time, and establishes a correspondence between multi-source image data and environmental parameters. S13. Based on historical environmental data in the time series database, key parameter features representing seasonal changes are extracted to construct a seasonal feature memory bank. At the same time, combined with multispectral image data, the morphological features and optical properties of photovoltaic panel defects under different seasonal conditions are analyzed to establish a seasonal-defect feature correlation model. S14 monitors the working status of the photovoltaic panel and changes in environmental parameters in real time. When the sensor network detects significant changes in environmental characteristics, it automatically triggers the panel detection parameter adjustment mechanism and formulates and executes an adaptive detection strategy transition scheme.
7. The method for detecting lightweight defects in photovoltaic panels in a desert environment as described in claim 6, characterized in that, The establishment of a complete time-series database includes: deploying a distributed sensor network in the photovoltaic power station area, setting up monitoring points using a grid-based layout strategy; equipping each monitoring point with multiple environmental parameter acquisition devices, and achieving synchronous data transmission between devices through wireless self-organizing network technology; performing real-time preprocessing on the acquired environmental parameters, including correcting and filtering sensor readings; constructing a time-series database, using a rolling window storage mechanism to store and manage the preprocessed environmental parameters; and using the time-series database to store all environmental parameters indexed by timestamps, forming a structured dataset.
8. The method for detecting lightweight defects in photovoltaic panels in a desert environment as described in claim 6, characterized in that, The establishment of the seasonal-defect feature association model includes: extracting key parameter features characterizing seasonal changes based on historical environmental data in a time-series database using time-series analysis methods; classifying the extracted seasonal features using a clustering algorithm to construct a seasonal feature memory bank; analyzing the morphological features and optical properties of photovoltaic panel defects under different seasonal conditions by combining multispectral image data; and establishing a seasonal-defect feature association model to quantify the correlation between environmental features and defect characteristics.
9. The method for detecting lightweight defects in photovoltaic panels in a desert environment as described in claim 6, characterized in that, In the adaptive detection strategy transition scheme, an automatic panel detection parameter adjustment mechanism is triggered, including: real-time monitoring of the photovoltaic panel's operating status and environmental parameter changes through a distributed sensor network; automatically triggering the detection parameter adjustment mechanism when a significant change in environmental characteristics is detected; dynamically adjusting the detection model parameters based on a reinforcement learning framework, using a reward function to balance detection accuracy and resource consumption by defining the environmental parameter state space and the detection parameter action space; formulating a smooth transition scheme using a smooth migration mechanism, achieving a smooth transition of the detection strategy through progressive parameter updates and dynamic adjustment of multimodal fusion weights; and implementing closed-loop optimization through a control loop, deploying the adjusted parameters to the edge inference engine.
10. A photovoltaic panel lightweighting defect detection system for a desert environment, applied to a photovoltaic panel lightweighting defect detection method for a desert environment as described in any one of claims 1 to 9, characterized in that, The system includes: The data acquisition and enhancement module is used to acquire multi-source images of photovoltaic panels in the desert area and use generative adversarial networks to perform data enhancement, simulate and generate image samples with different lighting conditions, different dust coverage, and different shooting angles, forming a training dataset covering a variety of complex scenes. A lightweight model building module is used to replace the standard convolutions in the backbone network of YOLOv8n with depthwise separable convolutions based on the YOLOv8n architecture; CBAM attention modules are embedded in key positions of the backbone network and feature fusion network to enable the model to focus on the interference of background noise in the image; The model training and optimization module is used to introduce adversarial examples for adversarial training during the model training process; after the model training is completed, channel pruning technology is applied to compress the model and optimize the model training effect. The edge deployment and inference module is used to deploy the optimized lightweight model to edge computing devices, perform inference on the video stream transmitted back by the drone in real time, and output the defect type, location and confidence level.
Citation Information
Patent Citations
Lightweight photovoltaic panel defect detection method based on improved YOLOv8
CN119693712B