Energy storage power station target detection optimization method and system based on YOLOv8

Generate rich sample sets through 3D modeling, image enhancement and semi-supervised learning, combining multi-view perception and sparse activation technology, the YOLOv8 algorithm is optimized, which solves the data scarcity and small object detection problems in energy storage power plants, and improves detection accuracy and efficiency , suitable for complex environments and edge devices.

CN119131354APending Publication Date: 2024-12-13CENT CHINA BRANCH OF CHINA DATANG CORP SCI & TECH RES INST CO LTD

Patent Information

Application Number
CN202411156727.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The YOLOv8 algorithm faces data scarcity, insufficient diversity of model training samples, difficulty in small object detection and low computing efficiency in energy storage power station target detection, resulting in insufficient detection accuracy and generalization performance, making it difficult to identify key equipment in complex environments. and indicator lights.

Method used

3D modeling and image enhancement technology are used to generate a rich training sample set, combined with semi-supervised learning strategy, establish a multi-view perception module and integrate multi-view features, and use sparse activation technology to optimize the model structure and computing efficiency, and use sparse activation functions and dynamic shearing. Branch and quantization techniques reduce computational complexity.

Benefits of technology

显著提升了模型对复杂储能电站环境的适应能力和检测精度,解决了小目标检测难题,平衡了检测精度和推理速度,确保在资源受限的边缘设备上高效运行。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131354A_ABST
    Figure CN119131354A_ABST
Patent Text Reader

Abstract

The invention discloses a YOLOv8-based target detection optimization method and system for an energy storage power station, and relates to the field of computer vision and artificial intelligence, and the method comprises the following steps: generating a target detection training sample set through a semi-supervised learning strategy based on a 3D modeling and image enhancement technology; based on the target detection training sample set, establishing a multi-view perception module by using a YOLOv8 backbone network, and integrating multi-view features to obtain an optimized target detection result; and according to the multi-view sensing module and the target detection result, establishing a target detection optimization model by using a sparse activation technology, and outputting the detection result in real time. According to the energy storage power station target detection method provided by the invention, through innovative data enhancement, multi-view perception and sparse activation technologies, the problems of data scarcity, difficulty in small target detection and low calculation efficiency of the YOLOv8 algorithm in the application of the energy storage power station are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of computer vision and artificial intelligence, and in particular to a YOLOv8-based energy storage power station target detection optimization method and system. Background Art

[0002] With the rapid development of renewable energy and the advancement of grid modernization, energy storage power stations play an increasingly important role in the energy system. Energy storage power stations can not only balance electricity supply and demand and improve grid stability, but also promote the large-scale application of renewable energy. However, the safe operation and efficient management of energy storage power stations face many challenges, among which real-time monitoring and fault detection are particularly critical; traditional manual inspection methods can no longer meet the increasingly complex management needs of energy storage power stations. Therefore, intelligent monitoring systems based on artificial intelligence have emerged. These systems use computer vision technology, especially target detection algorithms, to achieve automatic monitoring, abnormal identification and early warning of energy storage equipment, greatly improving management efficiency and safety.

[0003] Among many target detection algorithms, the YOLO (You Only Look Once) series has attracted much attention due to its excellent real-time performance and high detection accuracy. As the latest version of the series, YOLOv8 has made significant improvements in network structure, training strategy and post-processing methods, further improving the detection performance. Applying YOLOv8 to target detection in energy storage power stations is expected to achieve real-time monitoring of key equipment such as battery packs, inverters, and distribution cabinets, and timely detect equipment anomalies, safety hazards or operational violations. However, directly applying general target detection algorithms to energy storage power station scenarios still faces many challenges, and targeted optimization and improvement are needed to meet actual application needs.

[0004] Although YOLOv8 performs well in the field of target detection, it still has some limitations in the special application scenario of energy storage power stations. First, data scarcity leads to a lack of diversity in model training samples, which affects detection accuracy and generalization performance. The energy storage power station environment is complex and has a wide variety of equipment, and it is often difficult to obtain a large amount of high-quality labeled data, which limits the learning ability of the model; secondly, small target detection has become a pain point for traditional algorithms due to the small size of the object, and accuracy attenuation and missed detections frequently occur. Small targets such as certain key components or indicator lights in energy storage power stations are easily overlooked or misidentified in complex backgrounds; finally, in algorithm design, improving detection accuracy is often accompanied by an increase in computational complexity, resulting in a decrease in inference speed. How to improve accuracy while maintaining detection efficiency has become a major problem. These problems have seriously restricted the actual application effect of the YOLOv8 algorithm in target detection in energy storage power stations, and a targeted optimization method is urgently needed to solve these challenges.

[0005] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention

[0006] In view of the above situation, in order to overcome the shortcomings of the prior art, the purpose of the present invention is to provide a method and system for optimizing target detection in an energy storage power station based on YOLOv8, which has the advantages of providing sufficient learning resources for the model so that it can better identify and process various complex scenes in the energy storage power station, thereby solving the problem that data scarcity in the prior art leads to a lack of diversity in model training samples, the energy storage power station environment is complex, and it is often difficult to obtain a large amount of high-quality labeled data, which limits the learning ability of the model, and small target detection becomes a pain point of traditional algorithms due to the small size of the object. Small targets such as certain key components or indicator lights in energy storage power stations are easily overlooked or misidentified in complex backgrounds, and the improvement of algorithm detection accuracy is often accompanied by an increase in computational complexity, making it difficult to grasp the detection efficiency while improving accuracy.

[0007] The technical solution adopted by the present invention is:

[0008] A target detection optimization method for energy storage power station based on YOLOv8, comprising the following steps:

[0009] S1. Based on 3D modeling and image enhancement technology, a semi-supervised learning strategy is used to generate a target detection training sample set;

[0010] S2. Based on the target detection training sample set, a multi-view perception module is established using the YOLOv8 backbone network, and multi-view features are integrated to obtain optimized target detection results;

[0011] S3. Based on the multi-view perception module and target detection results, the sparse activation technology is used to establish a target detection optimization model and output the detection results in real time.

[0012] Further, the step S1 specifically includes the following steps:

[0013] S11. Generate a synthetic image dataset of the energy storage power station based on 3D modeling and image rendering technology;

[0014] S12. Expand and optimize synthetic image datasets using image enhancement techniques and automatic annotation tools;

[0015] S13. Based on the semi-supervised learning strategy, real energy storage power station images are integrated to establish a target detection training sample set.

[0016] Further, the step S2 specifically includes the following steps:

[0017] S21. Establish a multi-view perception module based on the YOLOv8 backbone network;

[0018] S22, using attention mechanism and feature fusion strategy to integrate multi-view features;

[0019] S23. Based on the integrated multi-view features, optimize the target detection performance and output the target detection result.

[0020] Further, the step S21 specifically includes the following steps:

[0021] S211. Based on the target detection training sample set, use the backbone network of the YOLOv8 algorithm to extract multi-scale feature maps and build a multi-view perception module;

[0022] S212, based on the multi-scale feature map, using the spatial pyramid pooling technology to generate multi-view features;

[0023] S213. Based on the residual connection mechanism, a fusion network of multi-view features is constructed.

[0024] Further, the step S22 specifically includes the following steps:

[0025] S221. Generate feature weight coefficients based on the channel attention mechanism;

[0026] S222, using spatial attention mechanism to enhance key area feature representation;

[0027] S223. Based on feature pyramid network, multi-scale feature information is integrated.

[0028] Further, the step S23 specifically includes the following steps:

[0029] S231, using deep convolution to extract spatial features and output classification probability and bounding box parameters;

[0030] S232, optimize target detection performance based on feature pyramid adaptive sampling;

[0031] S233. Generate target detection results using a multi-scale prediction strategy.

[0032] Further, the step S2 specifically includes the following steps:

[0033] S31, based on the multi-view perception module, using sparse activation technology to optimize the feature extraction network;

[0034] S32. Optimize the model structure using dynamic pruning strategy based on the target detection results;

[0035] S33. Based on the optimized model structure, the target detection optimization model is generated using quantization technology.

[0036] Further, the S31 specifically includes the following steps:

[0037] S311, based on the feature map extracted by the multi-view perception module, using an adaptive threshold strategy, generating a dynamic sparse activation mask;

[0038] S312, extracting spatial features according to the dynamic sparse activation mask to obtain a sparse representation of the feature map;

[0039] S313. Based on the sparse representation feature map, a multi-scale feature adaptive fusion network is used to integrate multi-scale features to generate the final feature representation.

[0040] Further, the expression for generating the dynamic sparse activation mask is:

[0041] A(x) = ReLU(x - λ*σ(x));

[0042] Where A(x) represents the adaptive sparse activation function, which is used to generate a sparse feature map;

[0043] x represents the input feature map obtained from the multi-view perception module;

[0044] λ represents the adaptive coefficient, which is used to dynamically adjust the sparsity;

[0045] σ(x) represents the standard deviation of the input feature map x, which is used to measure the degree of dispersion of the feature distribution;

[0046] ReLU stands for rectified linear unit function, which is used to introduce nonlinearity and increase the sparsity of the model.

[0047] A YOLOv8-based energy storage power station target detection optimization system for implementing the above-mentioned YOLOv8-based energy storage power station target detection optimization method, the system comprising:

[0048] A training sample generation unit, used to generate a target detection training sample set based on 3D modeling and image enhancement technology and using a semi-supervised learning strategy;

[0049] The multi-view target detection unit is used to establish a multi-view perception module based on the target detection training sample set using the YOLOv8 backbone network and integrate multi-view features to obtain optimized target detection results;

[0050] The target detection optimization output unit is used to establish a target detection optimization model based on the multi-view perception module and the target detection results, using sparse activation technology, and output the detection results in real time.

[0051] The beneficial technical effects of the present invention are:

[0052] (1) The energy storage power station target detection method proposed in the present invention effectively solves the problems of data scarcity, small target detection difficulty and low computational efficiency faced by the YOLOv8 algorithm in energy storage power station applications through innovative data enhancement, multi-view perception and sparse activation technology. In order to solve the problem of insufficient diversity of model training samples caused by data scarcity, the present invention uses 3D modeling, image enhancement technology and semi-supervised learning strategy to construct a rich and diverse training sample set, which not only greatly improves the quantity and quality of training samples, but also significantly enhances the model's adaptability to complex energy storage power station environments. At the same time, by combining synthetic data and real data, the model can learn a wider range of scene changes and target features, thereby showing stronger generalization ability when facing different environmental conditions and equipment types. This innovative solution effectively overcomes the challenges brought by data scarcity and provides sufficient learning resources for the model, enabling it to better identify and process various complex scenes in energy storage power stations.

[0053] (2) The present invention innovatively introduces a multi-view perception module and an adaptive feature fusion strategy, generates multi-view features through spatial pyramid pooling technology, and constructs a fusion network of multi-view features based on the residual connection mechanism, which can more effectively capture and process target features of different scales, especially for small targets such as small equipment components and indicator lights commonly found in energy storage power stations; in addition, the present invention also enhances the feature representation of key areas through channel attention mechanism and spatial attention mechanism, and uses a feature pyramid network to fuse multi-scale feature information. This series of optimization measures not only effectively solves the problem of small target detection, but also improves the model's recognition accuracy of key equipment and indicators in the complex environment of energy storage power stations, providing reliable guarantees for safe monitoring and efficient management of power stations.

[0054] (3) The present invention cleverly combines sparse activation technology, dynamic pruning strategy and model quantization technology. By introducing an adaptive sparse activation function, the sparsity of the feature map can be dynamically adjusted according to the complexity of the energy storage power station scenario, effectively reducing redundant calculations. At the same time, the dynamic pruning strategy flexibly adjusts the network structure according to the detection requirements of different regions, greatly reducing the computational complexity while maintaining key features. In addition, the model quantization technology further compresses the model size, optimizes memory usage and computing efficiency. This series of innovative optimization measures not only successfully balances the contradiction between detection accuracy and inference speed, but also enables the model to run efficiently on resource-constrained edge devices, providing strong technical support for real-time monitoring and intelligent management of energy storage power stations. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 It is a flow chart of the target detection optimization method of energy storage power station based on YOLOv8 of the present invention;

[0056] Figure 2 It is a principle block diagram of the energy storage power station target detection optimization system based on YOLOv8 of the present invention. DETAILED DESCRIPTION

[0057] The specific implementation modes of the present invention are further described in detail below in conjunction with the embodiments.

[0058] like Figure 1 As shown, according to an embodiment of the present invention, a method for optimizing target detection in an energy storage power station based on YOLOv8 is provided, and the method comprises the following steps:

[0059] S1. Based on 3D modeling and image enhancement technology, a semi-supervised learning strategy is used to generate a target detection training sample set;

[0060] S2. Based on the target detection training sample set, a multi-view perception module is established using the YOLOv8 backbone network, and multi-view features are integrated to obtain optimized target detection results;

[0061] S3. Based on sparse activation technology, a highly efficient energy storage power station target detection model is implemented.

[0062] In this embodiment, based on 3D modeling and image enhancement technology, using a semi-supervised learning strategy, generating a target detection training sample set includes the following steps:

[0063] S11. Generate a synthetic image dataset of the energy storage power station based on 3D modeling and image rendering technology;

[0064] Specifically, 1) using 3D modeling software (Blender software is used in this embodiment) to build a virtual scene model of the energy storage power station, including a. opening the Blender software and creating a new project; b. using basic geometric bodies (cubes, cylinders) to build equipment models such as battery packs, inverters, and distribution cabinets; c. adding materials and textures to simulate the appearance of real equipment; d. setting scene lighting, using a three-point lighting method (main light source, fill light, and backlight) to create a realistic light and shadow effect.

[0065] Specifically, 2) in the 3D modeling software, a synthetic image is generated by the following steps: a. setting the camera position to simulate observation angles at different angles; b. based on the rendering engine (the Cycles rendering engine is used in this embodiment), setting the sampling number (set to 500 in this embodiment) to obtain high-quality rendering results; c. batch rendering to generate multiple (set to 1000 in this embodiment) synthetic images under different viewing angles and lighting conditions.

[0066] Specifically, 3) using an automatic annotation tool (the LabelImg tool is used in this embodiment) to add bounding box annotations to the generated composite image, including a. opening the LabelImg tool and loading the composite image; b. using the rectangle tool to draw a bounding box for each target object; c. assigning a corresponding category label to each bounding box (including "battery pack" and "inverter" in this embodiment); d. saving the annotation results as an XML file in PASCAL VOC format.

[0067] S12. Expand and optimize synthetic image datasets using image enhancement techniques and automatic annotation tools;

[0068] Specifically, 1) using traditional image enhancement technology to further expand the synthetic image data set, in this embodiment, using Python's imgaug library for image enhancement, including a. installing the imgaug library; b. writing a Python script to implement the enhancement operation, the code example is as follows:

[0069] seq = iaa.Sequential([

[0070] iaa.Fl iplr(0.5),#Horizontal flip, probability is 50%;

[0071] iaa.Rotate((-20,20)),#Rotation angle is between -20 and 20 degrees;

[0072] iaa.Multiply((0.8,1.2)),#brightness change;

[0073] iaa.GaussianBlur(sigma=(0,0.5))#Gaussian blur; ])

[0075] #Apply enhancement to each image;

[0076] augmented_images=seq(images=images);

[0077] c. For the 1000 synthetic images generated in step S11, generate 4 enhanced versions for each image, and finally obtain 5000 images.

[0078] Specifically, 2) using an automatic annotation tool to check and adjust the annotation of the enhanced image, including a. opening the enhanced image and the corresponding original XML annotation file; b. adjusting the position and size of the bounding box accordingly according to the changes in the image enhancement; c. saving the updated annotation file.

[0079] S13. Based on the semi-supervised learning strategy, real energy storage power station images are integrated to establish a target detection training sample set.

[0080] Specifically, 1) using the YOLOv8 model to generate pseudo labels for unlabeled real energy storage power station images, including a. installing YOLOv8; b. using the synthetic image data set optimized in step S12 to train the YOLOv8 model. The example code is as follows:

[0081] model = YOLO('yolov8s.pt') # load pre-trained model;

[0082] model.train(data='custom_data.yaml',epochs=100,imgsz=640,batch=16)#train model;

[0083] c. Use the trained model to infer the unlabeled images and generate pseudo labels. The example code is as follows:

[0084] model = YOLO('runs / detect / train / weights / best.pt')#load the trained model;

[0085] results = model ('path_to_unlabeled_images', save_txt = True) # Generate pseudo labels.

[0086] Specifically, 2) using consistency regularization technology to improve the quality of pseudo labels, including a. performing multiple data augmentations on each unlabeled image to obtain multiple versions; b. using the trained model to predict the enhanced images; c. calculating the consistency of multiple prediction results, and retaining the prediction with the highest consistency as the final pseudo label.

[0087] Specifically, 3) integrating the data sets, including a. merging the synthetic image data set optimized in step S12 with the real image data set processed by semi-supervised learning; b. reading the merged data set file list, and randomly shuffling the order of the data sets (in this embodiment, Python's random shuffle function is used), and dividing them into a training set, a validation set, and a test set according to a preset ratio (in this embodiment, the preset ratio is set to 8:1:1).

[0088] Specifically, the present invention forms a complete data preparation process from synthetic data generation to data enhancement optimization and then to real data integration through the above steps. This process effectively solves the data scarcity problem in energy storage power station target detection and provides rich and diverse high-quality samples for subsequent model training, thereby improving the detection accuracy and generalization performance of the model.

[0089] In this embodiment, based on the target detection training sample set, a multi-view perception module is established using the YOLOv8 backbone network, and multi-view features are integrated to obtain an optimized target detection result, including the following steps:

[0090] S21. Establish a multi-view perception module based on the YOLOv8 backbone network;

[0091] S22, using attention mechanism and feature fusion strategy to integrate multi-view features;

[0092] S23. Based on the integrated multi-view features, optimize the target detection performance and output the target detection result.

[0093] In this embodiment, based on the YOLOv8 backbone network, establishing a multi-view perception module includes the following steps:

[0094] S211. Based on the target detection training sample set, use the backbone network of the YOLOv8 algorithm to extract multi-scale feature maps and build a multi-view perception module;

[0095] Specifically, in this embodiment, taking the monitoring image of a certain energy storage power station as an example, after step S1 integrates the real energy storage power station image, the resolution of the sample image in the target detection training sample set is 3840×2160, and the CSPDarknet backbone network of YOLOv8 is used to extract three feature maps of different scales from the input sample image, with sizes of 120×68, 60×34 and 30×17, respectively. These feature maps correspond to large equipment (transformer in this embodiment), medium equipment (battery pack in this embodiment) and small equipment (control panel in this embodiment) in the energy storage power station.

[0096] S212, based on the multi-scale feature map, using the spatial pyramid pooling technology to generate multi-view features;

[0097] It should be noted that Spatial Pyramid Pooling (SPP) is a technology used in deep learning for image recognition and classification. It allows the network to capture image features at different scales and enhance the model's ability to recognize objects of different sizes. In SPP, by setting pooling windows of different sizes, the input feature map can be subjected to maximum pooling operations, and then the pooling results of these different scales are merged to form a single multi-scale feature map. This enables the model to utilize global and local information at the same time and improve the recognition accuracy of complex scenes.

[0098] Specifically, a spatial pyramid pooling (SPP) operation is applied to the feature map of each scale. In this embodiment, a maximum pooling operation is first performed using pooling kernels of three sizes: 5×5, 9×9, and 13×13, to obtain three pooling results. Then, the original feature map is concatenated with the three pooling results in the channel dimension, and then the number of channels is adjusted through a 1×1 convolution to obtain an enhanced multi-view feature map with sizes of 120×68×512, 60×34×512, and 30×17×512, respectively.

[0099] Specifically, through the above steps, the perception capability of the multi-view perception module for energy storage devices of different sizes is significantly improved.

[0100] S213. Based on the residual connection mechanism, a fusion network of multi-view features is constructed.

[0101] Specifically, in the above embodiment, a feature fusion network including three residual blocks is first designed, each residual block is composed of two 3×3 convolutional layers and a skip connection; then the multi-view features of three scales (120×68×512, 60×34×512, 30×17×512) obtained in step S212 are input into the fusion network, and the features of the three scales are adjusted to the same spatial resolution (60×34) through upsampling and downsampling operations; then the residual connection mechanism is used to gradually fuse the feature information of different scales, and finally a comprehensive multi-view feature map with a size of 60×34×512 is output.

[0102] Specifically, through the above steps, the feature fusion function of the multi-view perception module is improved, so that it can fully perceive the characteristics of various types of equipment in the energy storage power station.

[0103] In this embodiment, the attention mechanism and feature fusion strategy are used to integrate multi-view features, including the following steps:

[0104] S221. Generate feature weight coefficients based on the channel attention mechanism;

[0105] Specifically, in this embodiment, a channel attention module is designed and implemented. The main purpose of this module is to learn the importance of different channel features and generate weight coefficients accordingly. First, the 60×34×512 fused feature map obtained in step S213 is globally averaged and pooled to obtain a 1×1×512 vector; then, the correlation between channels is learned through two fully connected layers (the first layer reduces the 512 dimension to 32 dimensions, and the second layer restores the 32 dimensions to 512 dimensions); finally, a nonlinear activation function (the Sigmoid activation function is used in this embodiment) is used to map the result to between 0 and 1, and generate weight coefficients for 512 channels. These coefficients reflect the importance of the features of different types of energy storage devices. In the above embodiment, the channel corresponding to the battery pack obtains a higher weight of 0.85, while the channel weight corresponding to the background area is only 0.2.

[0106] Specifically, the generated weight coefficient is multiplied by the original feature map to highlight the features of important channels and suppress the features of unimportant channels. This weighted operation effectively improves the model's ability to identify key energy storage devices, especially the detection accuracy of important components such as battery packs.

[0107] S222, using spatial attention mechanism to enhance key area feature representation;

[0108] Specifically, in this embodiment, a spatial attention module is designed. First, the average value and the maximum value of the 60×34×512 feature map are calculated in the channel dimension to obtain two 60×34 2D feature maps; then the two feature maps are concatenated in the channel dimension to form a 60×34×2 feature map; then a 7×7 convolution layer (the number of output channels is 1) and a Sigmoid activation function are used to generate a 60×34 2D spatial attention map.

[0109] Specifically, the obtained 2D spatial attention map is multiplied element by element with the original feature map to highlight the feature representation of the area where key equipment (such as inverters and battery management systems) in the energy storage power station are located; this step significantly improves the model's perception of key areas of the energy storage power station and helps to improve the accuracy of small target detection.

[0110] S223. Based on feature pyramid network, multi-scale feature information is integrated.

[0111] Specifically, in this embodiment, a top-down feature pyramid network (FPN) is constructed. First, the 60×34×512 feature map obtained in step S221 and step S222 is used as the intermediate layer of FPN; then, the number of channels is adjusted to 256 through 1×1 convolution to obtain a 60×34×256 feature map; then, a high-resolution feature map of 120×68×256 is obtained through 2x upsampling, and a low-resolution feature map of 30×17×256 is obtained through maximum pooling.

[0112] Specifically, for the feature map of each scale, a lateral connection is added; in the above embodiment, the feature map of 60×34×256 is fused with the feature map of 60×34×512 obtained in S212 by 1×1 convolution and element-level addition; similarly, the feature maps of 120×68 and 30×17 scales are also fused accordingly; finally, in the above embodiment, feature maps of three scales (120×68×256, 60×34×256, 30×17×256) are output through FPN, and each feature map contains multi-scale information of large, medium and small devices in the energy storage power station.

[0113] Specifically, through the above steps, the effective fusion of multi-scale features is achieved, and the model's detection capability for energy storage devices of different sizes is enhanced, especially the detection performance for small devices (such as sensors and controllers).

[0114] In this embodiment, optimizing the target detection performance based on the integrated multi-view features and outputting the target detection results include the following steps:

[0115] S231, using deep convolution to extract spatial features and output classification probability and bounding box parameters;

[0116] Specifically, depthwise separable convolution is used instead of standard convolution to design a multi-scale feature extraction and prediction network structure; first, for each scale feature map (120×68×256, 60×34×256, 30×17×256) obtained in step S223, 3×3 depthwise convolution is used for spatial feature extraction; then, 1×1 point-by-point convolution is used for channel feature fusion, and the number of channels is adjusted to 128; finally, two parallel and independent 1×1 convolution layers are used as the output of the classification branch and regression branch required for target detection, one for predicting the target category (classification probability) and the other for predicting the target position (bounding box parameters).

[0117] Specifically, in the above embodiment, the classification branch outputs the probabilities of five categories of energy storage devices (transformers, battery packs, control panels, inverters and sensors), and the regression branch outputs four parameters of the bounding box (center point x-coordinate, center point y-coordinate, width and height), wherein the center point x-coordinate represents the relative position of the target center in the width direction of the feature map, the center point y-coordinate represents the relative position of the target center in the height direction of the feature map, the width represents the relative size of the target bounding box in the width direction of the feature map; the height represents the relative size of the target bounding box in the height direction of the feature map; by using depthwise separable convolution, the amount of model parameters and computational complexity are significantly reduced while maintaining detection performance, which is particularly suitable for resource-constrained edge device deployment.

[0118] S232, optimize target detection performance based on feature pyramid adaptive sampling;

[0119] Specifically, a feature pyramid adaptive sampling (FPAS) module is designed. In this embodiment, feature maps of three scales, 120×68×128, 60×34×128, and 30×17×128, are firstly globally average pooled to obtain feature vectors of 1×1×128. Then, the scale factor and offset of each scale are learned through a fully connected layer, where the scale factor is used to adjust the spatial resolution of the feature map, and the offset is used to fine-tune the spatial position of the feature map.

[0120] Specifically, the learned parameters are applied to the original feature map. In the above embodiment, for a feature map of 60×34×128, if the learned scale factor is 1.2, the feature map is adjusted to 72×41×128; if the learned offset is (2, -1), the feature map is translated accordingly. Through this adaptive adjustment, the model's ability to represent the features of small energy storage devices (such as sensors and controllers) is enhanced, and the accuracy of target detection, especially small target detection, is improved.

[0121] S233. Generate target detection results using a multi-scale prediction strategy.

[0122] Specifically, detection heads are applied in parallel at three feature scales (120×68, 60×34, and 30×17); in this embodiment, the 120×68 scale is mainly responsible for detecting small energy storage devices (area <32×32 pixels), the 60×34 scale is responsible for medium-sized devices (32×32 to 96×96 pixels), and the 30×17 scale is responsible for large devices (>96×96 pixels). Each detection head outputs the position, size, confidence, and category probability of the prediction box.

[0123] It should be noted that Non-Maximum Suppression (NMS) is a technique used to optimize the performance of target detection algorithms. It is used to remove overlapping prediction boxes and retain the best prediction. The intersection-over-union ratio is an indicator that measures the degree of overlap between two prediction boxes, and is calculated as the ratio of the intersection area of ​​the two boxes to the union area. The confidence level is the degree of certainty of the model that the prediction box belongs to a specific category, and is usually represented by the output of the classification layer. In target detection, NMS works by setting the intersection-over-union ratio threshold and the confidence threshold to effectively reduce duplicate detection and improve detection accuracy.

[0124] Specifically, the prediction results of all scales are merged, and redundant detections are removed by non-maximum suppression (NMS). In the above embodiment, the intersection-over-union ratio threshold is set to 0.5 and the confidence threshold is set to 0.3; for each category, the prediction box with the highest confidence is selected, and then the other prediction boxes are compared one by one. If the intersection-over-union ratio is greater than 0.5, the boxes with higher overlap are deleted; finally, the location, size and category information of various types of equipment in the energy storage power station are output.

[0125] Specifically, through a multi-scale prediction strategy, the model is able to handle targets of different sizes simultaneously, especially improving the detection sensitivity for small energy storage devices while maintaining accurate identification of medium and large devices.

[0126] In this embodiment, based on the multi-view perception module and the target detection results, the target detection optimization model is established by using the sparse activation technology, and the detection results are output in real time, including the following steps:

[0127] S31, based on the multi-view perception module, using sparse activation technology to optimize the feature extraction network;

[0128] S32. Optimize the model structure using dynamic pruning strategy based on the target detection results;

[0129] Specifically, in this embodiment, the target detection results output by step S2 are first obtained, and based on these results, the feature extraction network optimized by step S31 is analyzed, and the importance score of each convolution kernel is calculated; in this embodiment, for the battery management system area, the top 75% of the convolution kernels with the highest importance scores are retained; for the transformer area, the top 65% of the convolution kernels are retained; and for the open aisle area, the top 55% of the convolution kernels are retained.

[0130] Specifically, through this dynamic pruning strategy, the model parameter size in the above embodiment is reduced from the original 35MB to 24.5MB, a reduction of about 30%; while maintaining an average decrease in detection accuracy of only 0.3%, the model inference speed is increased by 24%.

[0131] S33. Based on the optimized model structure, the target detection optimization model is generated using quantization technology.

[0132] Specifically, the pruned model in step S32 is quantized. In this embodiment, the K-means clustering algorithm is used to divide the model weights into 256 cluster centers, and then the 32-bit floating-point weights are mapped to the nearest cluster center and represented by 8-bit integers; for the 32×32×64 feature map generated in step S31, 8-bit quantization is also performed. During the inference process, a lookup table (LUT) is used to quickly map the 8-bit integer back to a floating point number for calculation.

[0133] Specifically, through quantization technology, the model size in the above embodiment is further reduced from 24.5MB to 6.8MB, a reduction of about 72%; the inference speed is improved by 35% compared with the result of step S32, while maintaining 97.5% of the original detection accuracy.

[0134] In this embodiment, based on the multi-view perception module and using sparse activation technology, optimizing the feature extraction network includes the following steps:

[0135] S311, based on the feature map extracted by the multi-view perception module, using an adaptive threshold strategy, generating a dynamic sparse activation mask;

[0136] Specifically, first obtain the feature map output by the multi-view perception module. In this embodiment, the size of the output feature map is 64×64×256, so as to calculate the standard deviation σ(x) for each channel and obtain a standard deviation vector with a length of 256; then, dynamically adjust the λ value according to the complexity of the energy storage power station scene. In this embodiment, for the battery management system area, λ is set to 0.3; for the transformer area, λ is set to 0.5; for the open aisle area, λ is set to 0.7; finally, apply the adaptive sparse activation function A(x)=ReLU(x-λ*σ(x)) to generate a dynamic sparse activation mask.

[0137] Specifically, through the above steps, a binary mask of the same size as the input feature map is generated, in which about 45% of the elements are set to 0, achieving preliminary sparsification.

[0138] S312, extracting spatial features according to the dynamic sparse activation mask to obtain a sparse representation of the feature map;

[0139] Specifically, first, the dynamic sparse activation mask generated in step S311 is applied to the input feature map to obtain a preliminary sparse feature map; then, adaptive depthwise separable convolution is used for feature extraction. In this embodiment, a 3×3 depth convolution kernel is used for the battery management system area; a 5×5 depth convolution kernel is used for the transformer area; and a 7×7 depth convolution kernel is used for the open aisle area; thereafter, a 1×1 point-by-point convolution is used to adjust the number of channels.

[0140] Specifically, through the above steps, a sparse feature map representation with a size of 32×32×128 is obtained, in which the proportion of non-zero elements is about 50% of the original feature map, which significantly reduces the amount of calculation.

[0141] S313. Based on the sparse representation feature map, a multi-scale feature adaptive fusion network is used to integrate multi-scale features to generate the final feature representation.

[0142] Specifically, in this embodiment, a multi-scale feature adaptive fusion network is designed, which contains three branches, processing feature maps of 32×32, 16×16 and 8×8 sizes respectively. Each branch contains two residual blocks, each of which consists of two 3×3 convolutional layers and a skip connection; then, all feature maps are upsampled to 32×32 using bilinear interpolation, and the number of channels is adjusted to 64 through 1×1 convolution, and finally element-level addition fusion is performed.

[0143] Specifically, through this step, the final feature representation is generated with a size of 32×32×64. This multi-scale fusion strategy improves the small target detection accuracy by 3.2 percentage points while reducing the computational effort by 22%.

[0144] In this embodiment, the expression for generating the dynamic sparse activation mask is:

[0145] A(x) = ReLU(x - λ*σ(x));

[0146] Where A(x) represents the adaptive sparse activation function, which is used to generate a sparse feature map;

[0147] x represents the input feature map obtained from the multi-view perception module;

[0148] λ represents the adaptive coefficient, which is used to dynamically adjust the sparsity;

[0149] σ(x) represents the standard deviation of the feature graph x, which is used to measure the degree of dispersion of the feature distribution;

[0150] ReLU stands for the rectified linear unit function, which is defined as ReLU(z)=max(0,z). This function remains unchanged when the input is positive and outputs zero when the input is negative. It is used to introduce nonlinearity and increase the sparsity of the model.

[0151] like Figure 2 As shown, another embodiment of the present invention further provides a target detection optimization system for an energy storage power station based on YOLOv8, the system comprising:

[0152] A training sample generating unit 1 is used to generate a target detection training sample set based on 3D modeling and image enhancement technology and using a semi-supervised learning strategy;

[0153] The multi-view target detection unit 2 is used to establish a multi-view perception module based on the target detection training sample set using the YOLOv8 backbone network, and integrate multi-view features to obtain an optimized target detection result;

[0154] The target detection optimization output unit 3 is used to establish a target detection optimization model based on the multi-view perception module and the target detection results using sparse activation technology, and output the detection results in real time.

[0155] In summary, with the help of the above technical solutions of the present invention, through innovative data enhancement, multi-view perception and sparse activation technology, the problems of data scarcity, small target detection and computational efficiency faced by the YOLOv8 algorithm in energy storage power station applications are effectively solved; in view of the problem of insufficient diversity of model training samples caused by data scarcity, the present invention uses 3D modeling, image enhancement technology and semi-supervised learning strategy to construct a rich and diverse training sample set, which not only greatly improves the quantity and quality of training samples, but also significantly enhances the model's adaptability to complex energy storage power station environments; by combining synthetic data and real data, the model can learn a wider range of scene changes and target features, thereby showing stronger generalization ability when facing different environmental conditions and equipment types. This innovative solution effectively overcomes the challenges brought by data scarcity and provides sufficient learning resources for the model, enabling it to better identify and process various complex scenes in energy storage power stations; at the same time, the present invention innovatively introduces a multi-view perception module and an adaptive feature fusion strategy, generates multi-view features through spatial pyramid pooling technology, and constructs a fusion network of multi-view features based on the residual connection mechanism, which can more effectively capture and process targets of different scales. The invention also enhances the key area feature representation through the channel attention mechanism and the spatial attention mechanism, and fuses the multi-scale feature information by using the feature pyramid network. This series of optimization measures not only effectively solves the problem of small target detection, but also improves the recognition accuracy of the model for key equipment and indicators in the complex environment of the energy storage power station, providing a reliable guarantee for the safe monitoring and efficient management of the power station. In addition, the invention cleverly combines the sparse activation technology, the dynamic pruning strategy and the model quantization technology. By introducing the adaptive sparse activation function, the sparsity of the feature map can be dynamically adjusted according to the complexity of the energy storage power station scene, effectively reducing redundant calculations. The dynamic pruning strategy flexibly adjusts the network structure according to the detection requirements of different areas, greatly reducing the computational complexity while maintaining the key features. The model quantization technology further compresses the model size, optimizes the memory usage and the computational efficiency. This series of innovative optimization measures not only successfully balances the contradiction between detection accuracy and inference speed, but also enables the model to run efficiently on resource-constrained edge devices, providing strong technical support for the real-time monitoring and intelligent management of energy storage power stations.

[0156] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A target detection optimization method for energy storage power station based on YOLOv8, characterized in that: The following steps are involved: S1. Based on 3D modeling and image enhancement technology, a semi-supervised learning strategy is used to generate a target detection training sample set; S2. Based on the target detection training sample set, a multi-view perception module is established using the YOLOv8 backbone network, and multi-view features are integrated to obtain optimized target detection results; S3. Based on the multi-view perception module and target detection results, the sparse activation technology is used to establish a target detection optimization model and output the detection results in real time.

2. The energy storage power station target detection optimization method based on YOLOv8 according to claim 1 is characterized in that: The step S1 specifically includes the following steps: S11. Generate a synthetic image dataset of the energy storage power station based on 3D modeling and image rendering technology; S12. Expand and optimize synthetic image datasets using image enhancement techniques and automatic annotation tools; S13. Based on the semi-supervised learning strategy, real energy storage power station images are integrated to establish a target detection training sample set.

3. The energy storage power station target detection optimization method based on YOLOv8 according to claim 1 is characterized in that: The step S2 specifically includes the following steps: S21. Establish a multi-view perception module based on the YOLOv8 backbone network; S22, using attention mechanism and feature fusion strategy to integrate multi-view features; S23. Based on the integrated multi-view features, optimize the target detection performance and output the target detection result.

4. The energy storage power station target detection optimization method based on YOLOv8 according to claim 3 is characterized in that: The step S21 specifically includes the following steps: S211. Based on the target detection training sample set, use the backbone network of the YOLOv8 algorithm to extract multi-scale feature maps and build a multi-view perception module; S212, based on the multi-scale feature map, using the spatial pyramid pooling technology to generate multi-view features; S213. Based on the residual connection mechanism, a fusion network of multi-view features is constructed.

5. The energy storage power station target detection optimization method based on YOLOv8 according to claim 3 is characterized in that: The step S22 specifically includes the following steps: S221. Generate feature weight coefficients based on the channel attention mechanism; S222, using spatial attention mechanism to enhance key area feature representation; S223. Based on feature pyramid network, multi-scale feature information is integrated.

6. The energy storage power station target detection optimization method based on YOLOv8 according to claim 3 is characterized in that: The step S23 specifically includes the following steps: S231, using deep convolution to extract spatial features and output classification probability and bounding box parameters; S232, optimize target detection performance based on feature pyramid adaptive sampling; S233. Generate target detection results using a multi-scale prediction strategy.

7. The energy storage power station target detection optimization method based on YOLOv8 according to claim 1 is characterized in that: The step S2 specifically includes the following steps: S31, based on the multi-view perception module, using sparse activation technology to optimize the feature extraction network; S32. Optimize the model structure using dynamic pruning strategy based on the target detection results; S33. Based on the optimized model structure, the target detection optimization model is generated using quantization technology.

8. The energy storage power station target detection optimization method based on YOLOv8 according to claim 7 is characterized in that: The S31 specifically includes the following steps: S311, based on the feature map extracted by the multi-view perception module, using an adaptive threshold strategy, generating a dynamic sparse activation mask; S312, extracting spatial features according to the dynamic sparse activation mask to obtain a sparse representation of the feature map; S313. Based on the sparse representation feature map, a multi-scale feature adaptive fusion network is used to integrate multi-scale features to generate the final feature representation.

9. The energy storage power station target detection optimization method based on YOLOv8 according to claim 8, characterized in that: The expression for generating the dynamic sparse activation mask is: A(x) = ReLU(x - λ*σ(x)); Where A(x) represents the adaptive sparse activation function, which is used to generate a sparse feature map; x represents the input feature map obtained from the multi-view perception module; λ represents the adaptive coefficient, which is used to dynamically adjust the sparsity; σ(x) represents the standard deviation of the input feature map x, which is used to measure the degree of dispersion of the feature distribution; ReLU stands for rectified linear unit function, which is used to introduce nonlinearity and increase the sparsity of the model.

10. A YOLOv8-based energy storage power station target detection optimization system for implementing the YOLOv8-based energy storage power station target detection optimization method according to any one of claims 1 to 9, characterized in that: The system includes: A training sample generation unit, used to generate a target detection training sample set based on 3D modeling and image enhancement technology and using a semi-supervised learning strategy; The multi-view target detection unit is used to establish a multi-view perception module based on the target detection training sample set using the YOLOv8 backbone network and integrate multi-view features to obtain optimized target detection results; The target detection optimization output unit is used to establish a target detection optimization model based on the multi-view perception module and the target detection results, using sparse activation technology, and output the detection results in real time.

Citation Information

Patent Citations

  • Intelligent power plant small target detection method and system based on YOLOv5

    CN115471794A

  • Target detection method based on feature adaptive aggregation

    CN115631344A

  • Method for enhancing power business target detection precision by using synthetic sample

    CN117523442A

  • Abnormality detection method based on dynamic feature adaptive fusion and Z-Score optimization

    CN117649629A

  • Target detection method and device and storage medium

    CN118155157A

Cited By

  • Transformer substation intelligent detection method and satellite image processing system

    CN120126029A

  • A substation intelligent detection method and satellite image processing system

    CN120126029B