Video-based photovoltaic module accurate detection and tracking method and system

Through the combination of the eYOLO-PV model and the SORT algorithm, the problem of real-time tracking accuracy in photovoltaic module detection technology is solved, efficient and accurate detection and tracking of photovoltaic modules in the video is achieved, and the unique identification and rapid positioning of the modules are ensured.

CN118711084AActive Publication Date: 2024-09-27NANKAI UNIV +1

Patent Information

Application Number
CN202410719639.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-09-27
Estimated Expiration
2044-06-05

AI Technical Summary

Technical Problem

Existing photovoltaic module detection technology cannot achieve real-time and accurate component tracking, especially in processing the correspondence between different frames of the video, resulting in the same component being identified multiple times or being unable to be completely accurately tracked.

Method used

A video-based accurate detection and tracking method of photovoltaic modules is adopted. Videos of photovoltaic modules are captured by drones, and the eYOLO-PV target detection algorithm is combined with the lightweight SORT tracking algorithm to achieve real-time tracking. The eYOLO-PV model improves detection accuracy through the EfficientViT network, and the SORT algorithm ensures efficient tracking capabilities.

Benefits of technology

It achieves accurate detection and real-time tracking of photovoltaic components in videos, improves detection accuracy and tracking speed, and ensures the unique identification and efficient positioning of components. MOTA reaches 100%, and the tracking speed per frame is only 2ms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118711084A
    Figure CN118711084A
Patent Text Reader

Abstract

The invention discloses a video-based photovoltaic module accurate detection and tracking method and system, and relates to the technical field of computer vision, and the method comprises the steps: obtaining a photovoltaic module video shot by an unmanned plane; extracting a video frame in the photovoltaic module video as an image to obtain an image target detection data set; inputting the image target detection data set into a trained target detection model, and identifying a component target frame of each photovoltaic component in the photovoltaic component video; and according to the photovoltaic module video and the module target frame of the photovoltaic module, carrying out real-time tracking on the photovoltaic module based on a lightweight module tracking algorithm SORT. The eYOLO-PV model special for the photovoltaic power station video is designed, the detection accuracy is improved, a light-weight SORT video photovoltaic module tracking algorithm is developed, and efficient tracking of the same photovoltaic module in a plurality of continuous different video frames is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a method and system for accurately detecting and tracking photovoltaic components based on video. Background Art

[0002] Existing detection technologies for components in photovoltaic power stations are divided into three categories: traditional image threshold processing algorithms, semantic segmentation algorithms, and target detection algorithms. Traditional threshold segmentation and semantic segmentation both achieve detection at the string level. Target detection algorithms can distinguish different objects of the same category. In photovoltaic scenarios, they can help quickly detect different components. However, in the current research on using target detection algorithms to identify components, most of them only process component images taken offline, and do not consider the correspondence between components in different frames of the video. In actual inspections, most of the collected component images overlap, so the target detection algorithm will cause the same component to be identified multiple times. Using a target tracking algorithm to detect components can ensure that the components are uniquely tracked and given a unique identifier. Furthermore, the few current studies on photovoltaic component tracking algorithms cannot achieve real-time tracking on the end side, and cannot achieve completely accurate tracking of components. Summary of the invention

[0003] The purpose of the present invention is to provide a method and system for accurately detecting and tracking photovoltaic components based on video, which can accurately detect and track photovoltaic components of a photovoltaic power station.

[0004] To achieve the above object, the present invention provides the following solutions:

[0005] In a first aspect, the present invention provides a method for accurately detecting and tracking photovoltaic components based on video, comprising:

[0006] Get a video of the PV panels taken by a drone.

[0007] Image extraction is performed on video frames in the photovoltaic module video to obtain an image target detection data set.

[0008] The image target detection data set is input into a trained target detection model to identify the component target frame of each photovoltaic component in the photovoltaic component video; the target detection model is a detection model constructed by the eYOLO-PV target detection algorithm.

[0009] According to the photovoltaic component video and the component target frame of the photovoltaic component, based on the lightweight component tracking algorithm SORT, the photovoltaic component is tracked in real time.

[0010] In a second aspect, the present invention provides a video-based photovoltaic module precision detection and tracking system, comprising:

[0011] The video acquisition module is used to acquire the photovoltaic module video taken by the drone.

[0012] The image extraction module is used to extract the video frames in the photovoltaic module video as images to obtain an image target detection data set.

[0013] The detection module is used to input the image target detection data set into a trained target detection model to identify the component target frame of each photovoltaic component in the photovoltaic component video.

[0014] The tracking module is used to track the photovoltaic component in real time based on the photovoltaic component video and the component target frame of the photovoltaic component and based on the lightweight component tracking algorithm SORT.

[0015] Optionally, it also includes: a training module for training the target detection model.

[0016] Optionally, the training module specifically includes:

[0017] The image acquisition submodule is used to acquire sample infrared image data of photovoltaic modules in a photovoltaic power station; the sample infrared image data is obtained through historical photovoltaic module videos.

[0018] The labeling submodule is used to label the sample infrared image data with component frames to obtain the labeled sample infrared image data.

[0019] The training submodule is used to train the eYOLO-PV target detection algorithm based on the labeled sample infrared image data to obtain a trained target detection model; wherein the eYOLO-PV target detection algorithm is an algorithm obtained by replacing the backbone network with the EfficientViT network on the basis of the improved YOLOv8 target detection algorithm.

[0020] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0021] The present invention provides a method and system for accurate detection and tracking of photovoltaic components based on video, the method comprising: obtaining a video of photovoltaic components taken by a drone; extracting video frames in the photovoltaic component video as images to obtain an image target detection data set; inputting the image target detection data set into a trained target detection model to identify the component target frame of each photovoltaic component in the photovoltaic component video; and tracking the photovoltaic components in real time based on the photovoltaic component video and the component target frame of the photovoltaic component based on a lightweight component tracking algorithm SORT. The eYOLO-PV model proposed in the present invention is specially designed for video monitoring of photovoltaic power stations, which improves the detection accuracy. At the same time, the lightweight SORT in the present invention can be used for efficient tracking of photovoltaic components in continuous multi-frame videos, ensuring accurate positioning capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0023] Figure 1 A schematic flow chart of a method for accurate detection and tracking of photovoltaic components based on video provided in Embodiment 1 of the present invention.

[0024] Figure 2 is an infrared video screenshot of the photovoltaic components of the photovoltaic power station provided in Example 1 of the present invention; Figure 2(a) is an infrared video screenshot of the photovoltaic components of power station 1; Figure 2(b) is an infrared video screenshot of the photovoltaic components of power station 2; Figure 2(c) is an infrared video screenshot of the photovoltaic components of power station 3; Figure 2(d) is an infrared video screenshot of the photovoltaic components of power station 4.

[0025] Figure 3 This is a schematic diagram of the YOLOv8 network structure provided in Example 1 of the present invention.

[0026] Figure 4 This is a schematic diagram of the EfficientViT model structure provided in Example 1 of the present invention.

[0027] Figure 5 This is a schematic diagram of the eYOLO-PV network structure provided in Example 1 of the present invention.

[0028] Figure 6 shows three loss curves of different model training provided in Example 1 of the present invention; Figure 6(a) is a loss curve of the eYOLO-PV target detection model; Figure 6(b) is a loss curve of the YOLOv8 target detection model; Figure 6(c) is a loss curve of the YOLOv7 target detection model.

[0029] Figure 7 A schematic diagram of a curve showing average accuracy mean indicators of different model training provided in Example 1 of the present invention.

[0030] Figure 8 This is a flowchart of the SORT tracking algorithm provided in Example 1 of the present invention.

[0031] FIG. 9 is a schematic diagram of a DarkLabel interface provided in Embodiment 1 of the present invention.

[0032] Figure 10 is a schematic diagram of component target tracking results of four power stations provided in Example 1 of the present invention; Figure 10(a) is a schematic diagram of component target tracking results of power station 1; Figure 10(b) is a schematic diagram of component target tracking results of power station 2; Figure 10(c) is a schematic diagram of component target tracking results of power station 3; Figure 10(d) is a schematic diagram of component target tracking results of power station 4.

[0033] Fig.11 A schematic diagram of the structure of a video-based photovoltaic component precision detection and tracking system provided in Embodiment 2 of the present invention. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] The purpose of the present invention is to provide a method and system for accurately detecting and tracking photovoltaic components based on video, which can accurately detect and track photovoltaic components of a photovoltaic power station.

[0036] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0037] Embodiment 1

[0038] like Figure 1 As shown, this embodiment provides a method for accurately detecting and tracking photovoltaic components based on video, including:

[0039] Step 101: Obtain a video of a photovoltaic module taken by a drone.

[0040] Step 102: extracting images from video frames in the photovoltaic module video to obtain an image target detection data set.

[0041] Step 103: input the image target detection data set into a trained target detection model to identify the component target frame of each photovoltaic component in the photovoltaic component video; the target detection model is a detection model constructed by the eYOLO-PV target detection algorithm.

[0042] Step 104: According to the photovoltaic component video and the component target frame of the photovoltaic component, based on a lightweight component tracking algorithm SORT, the photovoltaic component is tracked in real time.

[0043] Before executing step 101, the method further includes:

[0044] Determine whether the climate at the shooting location meets the shooting standards.

[0045] When the shooting standards are met, the flight speed, flight altitude, camera angle and shooting route of the drone are set, and the drone is controlled to shoot the photovoltaic components.

[0046] Specifically, the requirements for drone inspections are as follows:

[0047] Compared with infrared images, infrared videos contain the correlation information of components in the previous and next frames. Therefore, in order to detect and track components more efficiently in the future, all videos are shot in clear weather and meet the IEC61215-2:2021 standard conditions. And the following requirements must be met:

[0048] (1) The resolution is 640 × 512 pixels and the frame rate is 29.97 frames per second.

[0049] (2) The camera moves monotonically along the row or column without obvious backward movement.

[0050] (3) Component rows must be roughly horizontal or vertical in each frame.

[0051] (4) The UAV’s flight speed, altitude and camera angle remain basically stable.

[0052] like Figure 2(a)-Figure 2(d) As shown, this embodiment uses thermal infrared videos of two photovoltaic power stations at sites A and B, including two centralized photovoltaic power stations and two rooftop distributed photovoltaic power stations. The total video length of the four power stations is about 1.514 hours, with a total of 163,555 frames, and each frame contains about 70 photovoltaic components on average.

[0053] When executing step 102, the specific steps may be as follows:

[0054] According to the infrared video of photovoltaic power station components, the infrared video frames are extracted into images and the infrared image target detection data set is divided.

[0055] Specifically, in the training and evaluation phases of supervised learning, the optimization and evaluation of the model depend on the real labels of the data set. In this embodiment, a total of 284 frames (71 frames for each power station) were selected from the 163,555 video frames of photovoltaic power stations 1, 2, 3, and 4, and the LableImg tool was used to annotate the components in each frame. The data set was divided according to a ratio of 7:2:1, of which 200 frames were used to train the photovoltaic component target detection model, 56 frames were used to verify the model, and 28 frames were used to test the model effect. The specific division is shown in Table 1 below:

[0056] Table 1 Division of PV module dataset

[0057]

[0058]

[0059] Before executing step 103, the method further includes:

[0060] To train the target detection model, you can do the following:

[0061] Sample infrared image data of photovoltaic modules in a photovoltaic power station is obtained; the sample infrared image data is obtained through historical photovoltaic module videos.

[0062] The sample infrared image data is annotated with component frames to obtain annotated sample infrared image data.

[0063] Based on the labeled sample infrared image data, the eYOLO-PV target detection algorithm is trained to obtain a trained target detection model; wherein the eYOLO-PV target detection algorithm is an algorithm obtained by replacing the backbone network with the EfficientViT network on the basis of the improved YOLOv8 target detection algorithm.

[0064] Specifically, the efficient component target detection model eYOLO-PV uses the EfficientViT structure as the backbone network to connect to the YOLOv8 model. The designed network not only utilizes the advanced feature extraction capabilities of EfficientViT, but also inherits the advantages of YOLOv8 in real-time target detection, which is in line with this experimental scenario.

[0065] Among them, the specific structure of the YOLOv8 model is as follows:

[0066] like Figure 3 As shown, the YOLOv8 network structure mainly consists of backbone, neck and head structures.

[0067] (1) Backbone structure. YOLOv8 uses the improved CSPDarknet53 as the backbone network, downsamples the input features five times, and obtains features of five different scales in turn. The structure of the backbone network is shown in Figure\. The Cross Stage Partial (CSP) module in the backbone network is replaced by the C2f module (n represents the number). The full name of C2f is "CSPDarknet53 to 2-Stage FPN". It implements gradient shunting connection based on the CSPDarknet53 backbone network and the two-stage feature pyramid structure (Feature PyramidNetwork, referred to as 2-Stage FPN), which enriches the information flow of the feature extraction network while maintaining lightweight. The CBS (Convolution Conv, Batch Normalization BN, Activation Function SiLU) module performs convolution operations on the input information, then performs batch normalization, and then uses the SiLU activation function to obtain the output result. The backbone network finally uses the Spatial Pyramid Pooling-Fast (SPPF) module to pool the input feature map into a fixed-size map for adaptive size output. SPPF connects three maximum pooling layers in gradient order, reducing the computational workload and having lower latency.

[0068] (2) Neck structure. Inspired by the Path Aggregation Network (PANet), YOLOv8 designed a Path Aggregation Network + Feature Pyramid Network (PAN+FPN) structure in the neck part. PAN+FPN constructs a top-down and bottom-up network structure, realizes the complementarity of shallow position information, and fully integrates multi-scale information. Except for the C2f module in FPN+PAN, the rest of the structure is basically the same as the PAN+FPN structure of YOLOv5.

[0069] (3) Head structure. The detection part of YOLOv8 adopts a decoupled head structure. This decoupled head structure sets up two independent branches for object classification and predicted bounding box regression, and uses different loss functions for these two tasks. For the classification task, the binary cross-entropy loss (BCE Loss) is used. For the predicted bounding box regression task, the distribution focal loss (DFL) and CIoU are used. This detection structure helps to improve the detection accuracy and accelerate the convergence of the model. YOLOv8 is an anchor-free detection model that can concisely specify positive and negative samples. In addition, it also uses a task-aligned assigner to dynamically allocate samples, which helps to improve the detection accuracy and robustness of the model.

[0070] The YOLOv8 model has a strong ability in real-time detection. However, the infrared images of photovoltaic modules are greatly affected by environmental factors and show diversity under different lighting and background conditions, such as temperature, humidity, and solar radiation. These factors will affect the quality of infrared images. For example, when solar radiation is weak, the infrared temperature difference between the module and the background is small, resulting in unclear boundaries in infrared images, making the problem of identifying and analyzing defects in photovoltaic modules more complicated, which puts higher requirements on target detection algorithms. Due to its high model capability and excellent performance, the Vision Transformer (ViT) has caused a great upsurge in the field of computer vision. ViT effectively solves the problem that traditional convolutional networks cannot extract the order and content information of global feature layers, and significantly improves the accuracy of detection algorithms. However, the continuous improvement in accuracy comes at the cost of increased model size and computational overhead. In order to improve memory efficiency and enhance communication between channels, Microsoft proposed a memory-efficient transformer model called EfficientViT.

[0071] Therefore, this embodiment adds the EfficientViT structure to the YOLOv8 model, such as Figure 4 As shown in the figure, part (a) is the EfficientViT network architecture, part (b) is the EfficientViT module with a sandwich structure, and part (c) is the cascade group attention module.

[0072] The EfficientViT module mainly improves the efficiency of the model in terms of memory usage and computational redundancy through the sandwich layout and cascaded group attention mechanism (CGA).

[0073] Sandwich Layout module. This structure reduces the use of memory-consuming self-attention mechanism and adds a memory-efficient feed-forward network (FFN) layer for channel communication. Specifically, the layout There is a self-attention layer in between The calculation can be expressed as shown in (1):

[0074]

[0075] Where X i is the complete input feature of the i-th block. Before and after a single Self-Attention, the block transforms X through N FFNs. i Convert to X i+1 This design reduces the memory time consumption caused by the self-attention layer in the model and applies more FFN layers to effectively achieve communication between different feature channels. In addition, a TokenInteraction layer is added before each FFN, and TokenInteraction uses Depthwise SeparableConvolution (DWConv) to enhance the model's capabilities.

[0076] Cascaded Group Attention Module. Under the Multi-Headed Self-Attention (MHSA) mechanism, each head performs the same task, resulting in low computational efficiency. First, inspired by group convolution in convolutional neural networks, CGA inputs each head with different cuts of the complete feature, thereby explicitly decomposing the attention calculation into different heads. Second, by calculating the attention map of each head in a cascaded manner, the output of each head is added to the subsequent head to improve the diversity of the attention map. The CGA expression is (2):

[0077]

[0078] Among them, the jth head calculates the input feature segmentation X ij Self-attention on X i =[X i1 , Xi2 , ..., X ij ], where 1≤j≤h, h is the total number of heads, It is to map the input features into different subspaces. is a linear layer that projects the concatenated output features back to the same dimension as the input.

[0079] The attention map of each head is calculated in a cascade manner, such as Figure 4 As shown in (c), the output of each head is added to the subsequent head to gradually improve the feature representation. The expression is shown in (3), where X′ ij is the jth input segmentation X ij and the output of the (j-1)th head calculated by formula (2) Add.

[0080]

[0081] This cascaded design has two advantages. First, feeding different feature splits to each head can improve the diversity of attention maps. Similar to group convolution, each head only receives a slice of the full feature, saving computation and parameters. Second, cascading attention heads allows increasing network depth, further improving model capacity without introducing any additional parameters. It only incurs a slight latency overhead because the attention map computation in each head uses a smaller QK channel dimension.

[0082] The overall architecture of the EfficientViT network is Figure 4 (a). Specifically, the model first introduces the OverlapPatchEmbedding method to downsample the image by 16 times, which enhances the model's ability to capture more local details and contextual information. The overall architecture of EfficientViT consists of three stages, each of which stacks the proposed EfficientViT module. Each subsampling layer (2x subsampling of the resolution) reduces the number of labels by 4 times. In order to achieve efficient subsampling, the authors further proposed the SubSample block of EfficientViT, which is also a sandwich layout, but the difference is that the CGA layer of the EfficientViT module is replaced with an inverted residual to reduce information loss during the subsampling process.

[0083] Specifically, the improvement ideas and specific structure of the eYOLO-PV model are as follows:

[0084] In the photovoltaic scene, although YOLOv8 has improved its performance by improving the model architecture and optimizing the loss function, it still faces challenges in handling this task. Compared with ordinary target detection tasks, the main differences of this embodiment are reflected in the following aspects:

[0085] First, this embodiment involves only one detection target, namely the photovoltaic module. This single detection target means that the target detection model does not need to pay too much attention to the deep information extraction of multiple classifications, nor does it need to deal with the possible overlap or occlusion between targets.

[0086] Secondly, the infrared image of the photovoltaic module is greatly affected by the environment. When the infrared radiation of the photovoltaic module is relatively weak, the boundaries and features of the photovoltaic module in the infrared image will not be obvious enough; and this embodiment processes the infrared video, and the resolution of the infrared video is usually low, which causes the detailed information of the module to be lost in the video frame; and the stability of the video may be affected by wind and operational control. Unstable shooting will not only cause blurred images, but also interfere with the performance of the target detection algorithm.

[0087] Therefore, although the overall structure of this embodiment needs to be relatively simplified, it puts forward higher requirements for accurate identification of component edges and extraction of component features.

[0088] In this context, EfficientViT combines the deep representation learning capabilities of the visual Transformer structure with the computational efficiency advantages of traditional convolutional neural networks, and can significantly improve the overall accuracy and robustness of the photovoltaic detection model while maintaining real-time processing speed. The eYOLO-PV high-efficiency component detection model designed in this embodiment for photovoltaic power station infrared images replaces the backbone network of YOLOv8 with the EfficientViT network to utilize the advanced feature extraction capabilities of EfficientViT while inheriting the advantages of YOLOv8 in real-time target detection. This combination not only reduces the computational complexity, but also is very effective for interference from factors such as low resolution, illumination changes, and unstable shooting in photovoltaic infrared scenes.

[0089] The efficient eYOLO-PV model structure diagram is shown in Figure 5 , where the input infrared image resolution is 640x640 pixels, the backbone network consists of three main stages, the size of the image patch is 16, the corresponding image patch embedding (PatchEmbedding) dimensions of the three stages are 64, 128 and 192 respectively, and the number of CGA attention heads in the three stages is 4. For efficiency reasons, the architecture uses BatchNorm (BN) instead of LayerNorm (LN), because BN can be integrated into the previous convolutional or linear layer, thus providing runtime advantages. ReLU is used as the activation function, mainly for speed considerations and support for various inference deployment platforms.

[0090] Therefore, the training process of the target detection model is as follows:

[0091] The hardware conditions for training are NVIDIA A800 GPU with 80GB of video memory, which provides sufficient computing resources to process large-scale infrared image data of photovoltaic modules. The training is carried out using the PyTorch 2.0 framework under the Ubuntu 20.04 operating system.

[0092] The 200 frames of video in the training set were preprocessed, including cropping, scaling to a uniform size (640x640 pixels), and data enhancement processing to improve the model's ability to recognize the boundaries of photovoltaic modules.

[0093] During the training process, the key parameters were set as follows: using the Adam optimizer, the initial learning rate was set to 0.001, and the learning rate decay strategy was adopted to gradually reduce the learning rate during the training process to promote model convergence. According to the available computing resources, the batch size was set to 16 to ensure the stability and efficiency of the training. A composite loss function combining the regression loss of CIoU Loss and DFLLoss and the classification loss of BCE Loss was used to optimize the positioning accuracy and classification accuracy of the model at the same time. The model training was performed for a total of 300 epochs, which was enough to ensure that the model could fully learn the features in the dataset.

[0094] In order to improve the generalization ability and accuracy of the model, the following strategies were adopted during the training process: First, early stopping. Monitor the loss on the validation set and stop training when the loss does not decrease significantly after several consecutive epochs to avoid overfitting. Second, weight decay. Introduce weight decay (L2 regularization) to reduce model complexity and improve the generalization performance of the model.

[0095] Through the implementation of the above training process and strategy, the eYOLO-PV photovoltaic module defect detection algorithm proposed in this embodiment can effectively learn and identify photovoltaic modules, achieving the goals of high accuracy and rapid detection. The design of the experimental training process takes into account the maximization of model performance and the needs of actual application scenarios, ensuring that the algorithm has high practical value and reliability in the application of real-world photovoltaic power stations.

[0096] The evaluation process after the eYOLO-PV model training is completed is:

[0097] In order to verify the effect of the model, the performance of three different target detection models, eYOLO-PV, YOLOv8, and YOLOv7, during the training process is compared. Figures 6(a), (b), and (c) respectively show how three different losses (Box Loss, Class Loss, and DFLLoss) change with the training cycle under different network architectures.

[0098] After training, the Box Loss of the three networks in Figure 6 are 0.31785, 0.58495, and 0.76211, respectively. This loss value measures the difference between the bounding box predicted by the network and the true bounding box. For photovoltaic module detection, a lower Box Loss means that the network can more accurately locate the position of the photovoltaic panel. The performance of eYOLO-PV in this item shows that it can effectively identify the exact position of the photovoltaic module and can be used for subsequent positioning.

[0099] After training, the Class Loss of the three networks in Figure 6 are 0.23494, 0.38907, and 0.46316, respectively. Although there is only one category, Class Loss is still important because it measures the model's recognition confidence in that category. In a single-category detection task, a low Class Loss indicates that the model is very confident in the PV panels it detects and rarely misdetects background or other non-target objects as PV panels.

[0100] After training, the DFL Loss of the three networks in Figure 6 are 0.63127, 0.87673, and 1.23281, respectively. DFLLoss represents the fine-grained feature learning loss, which involves learning different subtle features of photovoltaic components in single-category detection tasks. Due to the differences in component features of the four power stations in this experiment and the differences in the details of different defects in the components, DFLLoss is higher than Box Loss and Class Loss. eYOLO-PV performs well in this indicator, which means that the network can not only detect the presence of photovoltaic components, but also capture important details of the components.

[0101] In summary, the eYOLO-PV network provides better feature representation, allowing the network to converge to better results at a faster speed, and is more accurate than YOLOv8 and YOLOv7 in component positioning, classification, and feature learning.

[0102] like Figure 7 As shown in the figure, the mean average precision (mAP) curves of the three models when the intersection over union (IoU) ranges from 0.5 to 0.95. After 300 rounds of iterative training, the mAP@0.5:0.95 of the training set for eYOLO-PV, original YOLOv8, and YOLOv7 are 0.98154, 0.94861, and 0.92175, respectively. It can be observed that eYOLO-PV has a higher accuracy from the beginning and converges quickly, showing fast learning ability and strong performance. In addition, the accuracy remains ahead throughout the training process, proving the high efficiency of the eYOLO-PV model.

[0103] In order to verify the robustness of the model, the model was evaluated on the test set after training. Table 2 compares the mAP average precision of the eYOLO-PV, YOLOv8 and YOLOv7 models. Among them, the eYOLO-PV model performs best, reaching 99.73%. Although the model size of eYOLO-PV is 8.35MiB, which is slightly larger than YOLOv8. However, in terms of reasoning speed, eYOLO-PV also shows high efficiency. For an infrared video stream containing multiple photovoltaic components, it only takes 3.12 milliseconds to detect multiple targets simultaneously per frame, which is 22.6% and 59.2% faster than YOLOv8 and YOLOv7, respectively. Finally, the number of floating point operations (FLOPs) of eYOLO-PV is 910 million, indicating that while maintaining high accuracy, the computational efficiency is also high. In summary, the eYOLO-PV model shows significant efficiency in accuracy, reasoning speed, model and parameter size, and computational efficiency.

[0104] Table 2 Indicators on different model test sets

[0105]

[0106] When executing step 104, the specific steps may be as follows:

[0107] Based on the Kalman filter, the motion state of the tracking target in the current video frame is predicted; the tracking target is a component target frame of the photovoltaic component.

[0108] Based on the tracking target in the next video frame and the tracking target in the current video frame, the Hungarian algorithm is used to perform target matching to obtain a matching result of the tracking target.

[0109] When the matching result is a matching failure, it is determined that the tracking target is lost, and the component target frame of the photovoltaic component corresponding to the tracking target is deleted.

[0110] When the matching result is a successful match, the state of the component target frame of the photovoltaic component is updated based on the tracking target in the current video frame; the state is the position and speed of the component target frame.

[0111] Specifically, the SORT tracking algorithm is a target tracking algorithm based on the Kalman filter and the Hungarian algorithm. The core idea is to first detect the target in the video through the target detection algorithm and represent it as a detection frame. SORT can be used with various target detectors (such as YOLO, Faster R-CNN, etc.) to extract the target position information in each frame. Then the Kalman filter algorithm is used to estimate and predict the state of the target, and finally the Hungarian algorithm is used to match the target detection frame of the current frame with the target tracked in the previous frame to achieve target tracking. Figure 8 The process of the SORT tracking algorithm is demonstrated. The basic steps are summarized as: eYOLO-PV component detection, Kalman filter component prediction, Hungarian IoU target matching, and target ID creation and destruction.

[0112] The Kalman filter is able to predict the position of the target in the next frame based on the linear constant velocity model by considering the target's dynamic model and measurement noise. When new detections match existing targets, these detections are used to update the state of the target. Expressions (4) and (5) are the state vector x and observation vector z of the original Kalman filter, respectively:

[0113]

[0114] Where u and v represent the horizontal and vertical pixel positions of the target center, s and r represent the scale (area) and aspect ratio of the target bounding box, respectively. is the speed at which the component box moves.

[0115] The Hungarian algorithm associates and matches the detection target Detections and the predicted target Tracks based on the IoU distance metric function. There are three situations when using the Hungarian algorithm for matching: Unmatched Tracks. If the mismatch lasts for T times, the ID is destroyed; Unmatched Detections. That is, a new target is added to the detection frame, but the new target does not exist in the tracking frame. No Tracks can match the Detections, a Track is assigned to this Detection, and a new ID is created; Matched Tracks. If the Detection and Track are matched successfully, the ID status is updated with the detection result as the observation value.

[0116] The lightweight SORT tracking algorithm is as follows:

[0117] In this embodiment, more than 70 components are detected and tracked per frame of video on average. The logic of the SORT algorithm is simple, and matching is only based on the position information of the detection frame. It does not involve a complex training process, so the tracking speed is very fast, which is very suitable for scenarios where large-scale data is processed in real time. There are two limitations of the SORT algorithm: First, the SORT algorithm is highly dependent on the detection results during the tracking process. Even if the actual target still exists but has not been detected for a long time, the SORT algorithm cannot continue to track. However, the component detection algorithm of this embodiment adopts the high-precision detection model of eYOLO-PV, and the component recognition accuracy in the same frame can reach more than 99.73%, which can ensure that the same component may not be correctly detected in very few frames, and does not affect the actual tracking effect. Second, the SORT algorithm only uses the position information of the detection frame for matching, and does not use the image texture features of the component. In scenes where the target is obstructed, a large number of ID switching phenomena may occur, affecting the stability of tracking. However, in photovoltaic scenarios, all component targets are arranged in a tiled manner and have a regular distribution. And when there is no debris on the surface of the component and the battery is healthy, the image features of different components in the same picture are basically similar. Therefore, it is suitable to use a simple and efficient SORT multi-target tracking algorithm.

[0118] The purpose of this embodiment is to achieve real-time panoramic stitching of photovoltaic power stations, which places high demands on the processing speed of each link. This section lightweights the SORT tracking algorithm. During the inspection of photovoltaic power stations by drones, the drones fly at a fixed altitude and a constant speed. Therefore, in the same power station scene, the size of the photovoltaic components in the video remains almost unchanged, and the movement speed of the components in the picture is basically uniform. The original SORT model uses the Kalman filter algorithm to predict the position of the component in the next frame. In expression (4), s represents the area of ​​the component target bounding box. This system removes the state vector of the Kalman filter. Variables in The physical meaning of is the rate of change of the component area. In this scenario, the area change rate is basically 0. Remove the variable After that, when tracking components in the same frame, not only the speed is increased by 1 times compared to the original, the tracking speed per frame is only 2ms, and the accuracy is not affected.

[0119] After real-time tracking of the photovoltaic components, the method further includes:

[0120] MOTA is used to evaluate the lightweight SORT target tracking algorithm, and the tracking accuracy of the lightweight SORT target tracking algorithm is obtained.

[0121] Specifically, this embodiment uses Multiple Object Tracking Accuracy (MOTA) to evaluate the overall performance of the lightweight SORT target tracking algorithm.

[0122] MOTA is calculated by considering three types of errors: false positives (FP), false negatives (FN), and ID switches (IDS), thus providing a quantitative way to measure the performance of the tracking algorithm in different aspects. The definition of MOTA is shown in (6):

[0123]

[0124] Among them, FN t Indicates the number of missed targets in time frame t. Missed targets refer to targets that actually exist but are not detected by the tracking algorithm. FP t Represents the number of falsely detected targets in time frame t. False detection refers to the situation where the algorithm mistakenly identifies the background or other non-target objects as targets. IDSW t Indicates the number of ID switches that occurred in time frame t. ID switching refers to the situation where the algorithm incorrectly assigns the ID of a tracked target to another target. GT t represents the true number of targets in time frame t.

[0125] The value of MOTA ranges from -∞ to 1, where 1 represents perfect tracking without any false detections, missed detections, or ID switches. The closer the value is to 1, the better the performance of the algorithm. On the contrary, if the sum of false detections, missed detections, and ID switches exceeds the total number of true targets, the value of MOTA may even be negative, indicating that the algorithm performs very poorly and needs further improvement and optimization.

[0126] Table 3 shows the accuracy of the components tracked by eYOLO-PV component detection and lightweight SORT algorithm in power station 1. Power station 1 is divided into 4 videos for easy evaluation. The real component frames are manually labeled using DarkLabel video annotation software to prepare for the evaluation. Figure 9(a) shows the visualization result of the tracking target under DarkLabel. It can be seen that the component frame with ID 313 is misaligned due to being close to the lower boundary of the screen. Figure 9(b) corrects the position of the component with ID 313 as the original annotation truth value.

[0127] Table 3 Tracking performance indicators of power station 1

[0128]

[0129] In Table 3, taking the first video segment of Power Station 1 as an example, the actual number of components in the video is 357, and each component will appear for more than 100 frames. A total of 37,389 component frames need to be detected and tracked. This system algorithm can ensure that all components are detected and tracked. However, in the video frame, individual errors occurred in the 37,389 component frames. In the first video, there were 9 ID switching situations and 6 false detection situations. In fact, 37,394 component frames were tracked and detected. The MOTA calculated by the formula is approximately 1.

[0130] Among the five videos of power station 1, the fourth video has the worst effect, with a MOTA of 0.995. After checking and analyzing, the fourth video has broken frames, the drone has interrupted the image transmission for more than 30 frames, and the components in the video frame suddenly change position from uniform motion. To solve this problem, this section tries to use: video interpolation algorithm; tracking algorithm with image feature extraction network (advanced ByteTrac tracking algorithm). Among them, the interpolation algorithm can improve MOTA to a certain extent, and the ByteTrack tracking algorithm greatly affects the tracking speed due to the complex feature matching network. Finally, this section divides the fourth video again from the broken frame, separates it into two small segments for detection and tracking, and finally splices it. This can not only effectively avoid false detection, missed detection, and ID switching, but also ensure high-speed video tracking. This method is used in subsequent power stations of this system when broken frames occur. After correction, a small number of false detections, missed detections, and ID switching in the four power station videos do not affect the final component extraction effect. Finally, the component tracking MOTA of the five video segments of power station 1 is 1.

[0131] As shown in Figure 10(a)-(d), the results of photovoltaic power stations 1, 2, 3, and 4 after processing based on the eYOLO-PV target detection algorithm and the lightweight SORT tracking algorithm are shown in the left and right sub-images for each power station. They capture the position dynamics of components in different frames respectively, and the movement of components over time can be clearly observed by comparison.

[0132] In addition, Figure 10 also shows the adaptability of the algorithm of this system to different types of power stations, different lighting conditions and environmental changes. Even when the infrared video resolution is not high, it can still accurately identify and track photovoltaic modules, with high robustness.

[0133] Embodiment 2

[0134] like Fig.11 As shown, this embodiment provides a video-based photovoltaic component precision detection and tracking system, including:

[0135] The video acquisition module 1101 is used to acquire the photovoltaic module video taken by the drone.

[0136] The image extraction module 1102 is used to extract the video frames in the photovoltaic module video as images to obtain an image target detection data set.

[0137] The detection module 1103 is used to input the image target detection data set into a trained target detection model to identify the component target frame of each photovoltaic component in the photovoltaic component video.

[0138] The tracking module 1104 is used to track the photovoltaic component in real time based on the photovoltaic component video and the component target frame of the photovoltaic component and based on a lightweight component tracking algorithm SORT.

[0139] The system also includes: a training module, used for training the target detection model.

[0140] The training module specifically includes:

[0141] The image acquisition submodule is used to acquire sample infrared image data of photovoltaic modules in a photovoltaic power station; the sample infrared image data is obtained through historical photovoltaic module videos.

[0142] The labeling submodule is used to label the sample infrared image data with component frames to obtain the labeled sample infrared image data.

[0143] The training submodule is used to train the eYOLO-PV target detection algorithm based on the labeled sample infrared image data to obtain a trained target detection model; wherein the eYOLO-PV target detection algorithm is an algorithm obtained by replacing the backbone network with the EfficientViT network on the basis of the improved YOLOv8 target detection algorithm.

[0144] In summary, the beneficial effects of the present invention are as follows:

[0145] The present invention provides a video-based photovoltaic component precision detection and tracking method, which uses a specific drone flight mode to collect infrared video data of qualified photovoltaic power stations. The designed eYOLO-PV model for photovoltaic power station video is used to detect photovoltaic components. The average accuracy on the test set reached 99.73%. For infrared video streams containing multiple photovoltaic components, it only takes 3.12 milliseconds to detect multiple targets per frame. Based on component target detection, a video-based lightweight SORT photovoltaic component tracking algorithm was developed to achieve efficient tracking of the same photovoltaic component in multiple consecutive different video frames. The tracking MOTA can be guaranteed to be 1, with 100% accuracy, and the tracking speed per frame is only 2ms.

[0146] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0147] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for accurate detection and tracking of photovoltaic modules based on video, characterized in that: include: Get the video of PV panels taken by drone; Performing image extraction on video frames in the photovoltaic module video to obtain an image target detection data set; Inputting the image target detection data set into a trained target detection model to identify the component target frame of each photovoltaic component in the photovoltaic component video; the target detection model is a detection model constructed by the eYOLO-PV target detection algorithm; According to the photovoltaic component video and the component target frame of the photovoltaic component, based on the lightweight component tracking algorithm SORT, the photovoltaic component is tracked in real time.

2. A method for accurate detection and tracking of photovoltaic components based on video according to claim 1, characterized in that: Before obtaining the PV module video taken by the drone, it also includes: Determine whether the climate of the shooting location meets the shooting standards; When the shooting standards are met, the flight speed, flight altitude, camera angle and shooting route of the drone are set, and the drone is controlled to shoot the photovoltaic components.

3. The method for accurate detection and tracking of photovoltaic components based on video according to claim 1, characterized in that: The training process of the target detection model is: Acquire sample infrared image data of photovoltaic modules in a photovoltaic power station; the sample infrared image data is obtained through historical photovoltaic module videos; Performing component box annotation on the sample infrared image data to obtain annotated sample infrared image data; Based on the labeled sample infrared image data, the eYOLO-PV target detection algorithm is trained to obtain a trained target detection model; wherein the eYOLO-PV target detection algorithm is an algorithm obtained by replacing the backbone network with the EfficientViT network on the basis of the improved YOLO target detection algorithm.

4. The method for accurate detection and tracking of photovoltaic components based on video according to claim 3, characterized in that: The YOLO target detection algorithm is an algorithm obtained by using the improved CSPDarket53 as the backbone network, replacing the CSP module in the backbone network with the C2f module, using the PAN+FPN structure in the neck part to construct a feature pyramid, and using the decoupled head structure as the detection part on the basis of the original YOLO series target detection algorithm.

5. The method for accurate detection and tracking of photovoltaic components based on video according to claim 1, characterized in that: According to the photovoltaic component video and the component target frame of the photovoltaic component, based on the lightweight component tracking algorithm SORT, the photovoltaic component is tracked in real time, specifically including: Based on the lightweight component tracking algorithm SORT, the motion state of the tracking target in the current video frame is predicted; the tracking target is the component target frame of the photovoltaic component; the lightweight component tracking algorithm SORT is used to use the Kalman filter algorithm to predict the position of the component in the next frame. The lightweight component tracking algorithm SORT is an algorithm obtained by removing the change rate of the component area in the state vector of the Kalman filter on the basis of the original SORT model; Based on the tracking target in the next video frame and the tracking target in the current video frame, the Hungarian algorithm is used to perform target matching to obtain a matching result of the tracking target; When the matching result is a matching failure, it is determined that the tracking target is lost, and the component target frame of the photovoltaic component corresponding to the tracking target is deleted; When the matching result is a successful match, the state of the component target frame of the photovoltaic component is updated based on the tracking target in the current video frame; the state is the position and speed of the component target frame.

6. The method for accurate detection and tracking of photovoltaic components based on video according to claim 1, characterized in that: After real-time tracking of the photovoltaic components, the method further includes: MOTA is used to evaluate the lightweight SORT target tracking algorithm, and the tracking accuracy of the lightweight SORT target tracking algorithm is obtained.

7. A method for accurate detection and tracking of photovoltaic components based on video according to claim 6, characterized in that: The expression of the MOTA is as follows: Among them, FN t Indicates the number of missed targets in time frame t; missed targets refer to targets that actually exist but are not detected by the tracking algorithm; FP t It represents the number of misdetected targets in time frame t; misdetection refers to the situation where the algorithm mistakenly identifies the background or other non-target objects as targets; IDSW t represents the number of ID switches that occurred in time frame t; ID switching refers to the situation where the algorithm incorrectly assigns the ID of a tracked target to another target; GT t represents the true number of targets in time frame y.

8. A video-based photovoltaic module precision detection and tracking system, characterized in that: include: Video acquisition module, used to acquire the video of photovoltaic modules taken by drone; An image extraction module is used to extract video frames in the photovoltaic module video as images to obtain an image target detection data set; A detection module, used to input the image target detection data set into a trained target detection model to identify a component target frame of each photovoltaic component in the photovoltaic component video; The tracking module is used to track the photovoltaic component in real time based on the photovoltaic component video and the component target frame of the photovoltaic component and based on the lightweight component tracking algorithm SORT.

9. The video-based photovoltaic module precision detection and tracking system according to claim 8, characterized in that: Also includes: A training module is used for training the target detection model.

10. A video-based photovoltaic module precision detection and tracking system according to claim 9, characterized in that: The training module specifically includes: An image acquisition submodule is used to acquire sample infrared image data of photovoltaic modules in a photovoltaic power station; the sample infrared image data is obtained through historical photovoltaic module videos; A labeling submodule, used for labeling the sample infrared image data with component frames to obtain labeled sample infrared image data; The training submodule is used to train the eYOLO-PV target detection algorithm based on the labeled sample infrared image data to obtain a trained target detection model; wherein the eYOLO-PV target detection algorithm is an algorithm obtained by replacing the backbone network with the EfficientViT network on the basis of the improved YOLOv8 target detection algorithm.

Citation Information

Patent Citations

  • Lightweight pedestrian tracking method in complex scene

    CN115984969A

  • Forward driving method and driving device in photovoltaic panel matrix

    CN116880475A

  • Moving target detection and tracking method for robot navigation

    CN117333833A

  • Video analytics accuracy using transfer learning

    US20240037778A1

  • Darkflow-deepsort-based multi-target tracking detection method, device, and storage medium

    WO2021017291A1

Cited By

  • Speed measurement method and inspection system based on dynamic zooming of unmanned aerial vehicle

    CN120722002A

  • Photovoltaic module identification model training method, identification method and related equipment

    CN121095820A

  • A photovoltaic module identification model training method, an identification method, and related equipment

    CN121095820B