Power equipment target detection method, system and equipment for intelligent inspection
Through the improved YOLOv8 target detection model and local unattentional feature enhancer, the problem of insufficient small target detection and feature expression capabilities of intelligent inspection technology in complex backgrounds is solved, and the recognition accuracy and system of subtle changes in power facilities are improved. real-time operating efficiency.
Patent Information
- Application Number
- CN202410680559.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-05-29
AI Technical Summary
Existing intelligent inspection technology has insufficient small target detection and feature expression capabilities in complex backgrounds, and it is difficult to balance real-time performance and computing efficiency, resulting in insufficient real-time response to subtle status changes of power facilities, affecting the stable operation of the power system.
The improved YOLOv8 target detection model is used, combined with the local attention-free feature enhancer (LAFFE), to extract multi-scale features through the backbone network. The local attention-free feature enhancement module performs channel and spatial attention enhancement on the feature map to improve the accuracy of power facilities. Sensitivity and identification accuracy of subtle changes and signs of failure.
It improves the accuracy and efficiency of the intelligent inspection system for power facility target detection, enhances the ability to identify small targets in complex backgrounds, ensures high detection stability and accuracy when the environment changes, simplifies the feature processing process, and reduces Computational complexity to achieve efficient real-time operation.
Smart Images

Figure CN118799699A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to a method, system and device for detecting power equipment targets for intelligent inspection. Background Art
[0002] As data centers continue to expand in size and their operations become more complex, ensuring the reliability and security of data center equipment becomes increasingly important.
[0003] In the daily operation and maintenance of power facilities, inspection work is crucial to ensure the stable operation of data center equipment. However, current inspection work mainly relies on manual regular inspections or automated monitoring systems based on preset rules, but these methods are often time-consuming and inefficient, and are particularly inefficient in real-time response to subtle changes in the status of equipment, resulting in insufficient guarantee of inspection efficiency and accuracy. The expansion of the scale of data centers has made the limitations of these traditional inspection methods more prominent, and a more efficient and intelligent solution is urgently needed.
[0004] Driven by this demand, exploring and developing innovative intelligent inspection technologies can not only improve inspection efficiency and accuracy, but also achieve real-time monitoring and early warning of equipment status, providing solid guarantees for the stable and reliable operation of data centers. In this context, YOLOv8, as a leading target detection algorithm, has attracted widespread attention for its efficient processing speed and accurate recognition capabilities. The algorithm can quickly and accurately identify multiple targets in complex images while reducing computing resource consumption, demonstrating its broad potential and practical value in multiple application fields. However, when applying YOLOv8 to the intelligent inspection of data center equipment, it still faces a series of challenges, including the detection of small targets in complex backgrounds, the limitations of feature expression capabilities, the trade-off between real-time and computational efficiency, and adaptability to dynamic environments. When the status of facilities changes slightly, these systems may miss the best time to deal with them due to failure to identify or misjudge, posing potential risks to the stable operation of the power system. To address these challenges, the present invention proposes an improved YOLOv8 and target detection method algorithm that integrates an attention-free feature enhancer (LAFFE) to optimize the target detection performance in the intelligent inspection system and provide a key basis for subsequent equipment status analysis, fault diagnosis, etc. Summary of the invention
[0005] The purpose of the present invention is to overcome the problem in the prior art of insufficient real-time response to subtle changes in the status of power facilities during intelligent inspections of power facilities, and to provide a power facility target detection method for intelligent inspections that has high sensitivity to subtle changes in power facilities and can accurately identify power facilities in complex backgrounds.
[0006] In a first aspect, an embodiment of the present invention provides a method for detecting a target of an electric power device for intelligent inspection, the method comprising:
[0007] Acquire inspection images;
[0008] Inputting the inspection image into the improved Yolov8 target detection model to obtain the power equipment target detection result;
[0009] The improved Yolov8 target detection model includes:
[0010] A backbone network is used to extract multi-scale features of the inspection image and fuse the multi-scale features to obtain a first feature map containing multi-scale feature information;
[0011] A local inattention feature enhancement module, used for performing feature enhancement on the first feature map to obtain a second feature map;
[0012] A detection head is used to output a detection result according to the second feature map.
[0013] Performing feature enhancement on the first feature map includes:
[0014] The first feature map is divided into multiple image blocks, a relevance score of each image block is calculated, and attention is enhanced on each image block according to the relevance score.
[0015] Calculating the correlation score of the i-th image block among the plurality of image blocks comprises:
[0016] Calculate the correlation value between the i-th image block and each of the remaining image blocks;
[0017] Sum the correlation values between the ith image block and each of the remaining image blocks to obtain the correlation score r of the ith image block. i ;
[0018] Among them, the correlation value r between the i-th image block and the j-th image block i,j Calculate according to the following formula, i≠j;
[0019] r i,j =f(x i ,x j )=φ(x i ) T ψ(x j ) T (1);
[0020] Where φ(·) or ψ(·) is the embedding function, x i is the i-th image block, x j is the jth image block.
[0021] Performing attention enhancement on the i-th image block among the plurality of image blocks according to the correlation score comprises:
[0022] Perform channel attention enhancement on the i-th image block to obtain the first image block
[0023]
[0024] In the formula, ⊙ represents the element-wise product, x i is the i-th image block, γ c (·) is a channel attention function, which includes a fully connected layer. The channel attention function assigns different channel attention weights to each feature channel of the image block through adaptive learning;
[0025] For the first image block Perform spatial attention enhancement to obtain the second image block
[0026]
[0027] In the formula, ⊙ represents the element-wise product, x i is the i-th image block, δ s (·) is a spatial attention function, which includes a convolutional layer and assigns different spatial attention weights to each position in the image block through adaptive learning;
[0028] According to the i-th image block x i , the second image block The relevance score r of the i-th image patch i Get the enhanced i-th image block
[0029]
[0030] In the formula, λ is the learnable enhancement coefficient, r i is the i-th image block x i The relevance score of .
[0031] The backbone network includes a backbone network, an FPN structure, and an SPP structure;
[0032] The step of extracting multi-scale features of the inspection image and fusing the multi-scale features comprises:
[0033] The multi-scale features of the inspection images are extracted through the backbone network;
[0034] The multi-scale features are fused through FPN to construct a multi-scale feature pyramid;
[0035] The multi-scale feature pyramid is spatially pooled through the SPP structure to fuse features of different receptive fields.
[0036] The backbone network is a ResNeXt-101 network or a CSPDarknetX network.
[0037] Outputting the detection result according to the second feature map includes:
[0038] Based on the second feature map, predict the position and category of each key point;
[0039] Generate the category information corresponding to the prediction box and the target box according to the position and category of each key point;
[0040] Perform NMS processing on the predicted box, filter the predicted box based on the confidence threshold, and output the detection result.
[0041] In a second aspect, an embodiment of the present invention provides a power equipment target detection system for intelligent inspection, comprising:
[0042] An image acquisition unit, used for acquiring inspection images;
[0043] A target detection unit, used for inputting the inspection image into an improved Yolov8 target detection model to obtain a target detection result of the power equipment;
[0044] The improved Yolov8 target detection model includes:
[0045] A backbone network is used to extract multi-scale features of the image to be detected, and fuse the multi-scale features to obtain a first feature map containing multi-scale feature information;
[0046] A local inattention feature enhancement module, used for performing feature enhancement on the first feature map to obtain a second feature map;
[0047] The detection head is used to output a detection result according to the second feature map.
[0048] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising a memory and a processor, the memory being used to store computer program code and transmit the computer program code to the processor;
[0049] The processor is used to execute any of the above-mentioned methods for detecting power equipment targets for intelligent inspection according to the instructions in the computer program code.
[0050] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned methods for detecting power equipment targets for intelligent inspection are implemented.
[0051] The embodiment of the present invention provides a method, system, electronic device and storage medium for power equipment target detection for intelligent inspection. The method detects inspection images through an improved YOLOv8 target detection model. By integrating the algorithm of the local attention-free feature enhancer on the basis of the existing YOLOv8 model, the model is optimized from the two dimensions of feature enhancement and target detection, thereby improving the sensitivity and recognition accuracy of the target detection model to the detailed features of the power facilities, thereby improving the efficiency and accuracy of intelligent inspection.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] 1. In a method for detecting power facility targets for intelligent inspections of the present invention, an improved Yolov8 target detection model is used for target detection. The improved Yolov8 target detection model includes a backbone network, a local inattention feature enhancement model and a detection head, wherein the local inattention feature enhancement module is used to perform local feature enhancement on the image. The local feature enhancement includes attention enhancement and spatial attention enhancement, which can more effectively capture subtle changes and fault signs of power facilities, provide richer and more distinguishable feature representations, and improve the accuracy of target detection. Therefore, in this design, the local feature enhancement module is used to enhance the local features of the image to improve the accuracy of target detection.
[0054] 2. In a method for detecting power facility targets for intelligent inspections of the present invention, a local inattention feature enhancement module divides the first feature map into multiple image blocks, calculates the correlation values between the image blocks, and for any image block, sums the correlation values between the image block and all other image blocks to obtain the correlation score of the image block, and performs channel attention enhancement and spatial attention enhancement on the image block according to the correlation score. Through the above-mentioned feature enhancement steps, the degree of enhancement of each image block can be dynamically adjusted by using the inattention mechanism, and then the local features are refined and enhanced by channel and spatial attention. The local inattention feature enhancement module processes the feature map in detail through the idea of global guidance + local enhancement, and improves the expression ability of local features in a more targeted manner, and enhances the model's recognition ability of small targets in complex backgrounds. Therefore, the local inattention feature enhancement module in this design improves the expression ability of local features in a more targeted manner through the idea of global guidance + local enhancement, and enhances the model's recognition ability of small targets in complex backgrounds.
[0055] 3. In a method for detecting power facility targets for intelligent inspections of the present invention, the local feature enhancement function of the local inattention feature enhancement module is used to dynamically enhance the local features of the image, which can more effectively capture the subtle changes and fault signs of the power facilities, so that the image can provide a richer and more discriminative feature representation, and make a more accurate judgment; at the same time, the local inattention feature enhancement module improves the adaptability of the model to environmental changes, ensuring that even when factors such as lighting conditions and equipment positions change, the model can still maintain a high detection stability and accuracy. Therefore, the local inattention feature enhancement module in this design dynamically enhances the local features of the image, provides a richer and more discriminative feature representation for the image, and at the same time improves the adaptability of the model to environmental changes, and improves the detection accuracy of the target detection model.
[0056] 4. In the target detection method of power facilities for intelligent inspection of the present invention, the feature processing process is simplified through the attention-free mechanism, the computational complexity is reduced, and thus the intelligent inspection system is helped to achieve efficient real-time operation. Therefore, the design reduces the computational complexity of target detection, has high detection efficiency, and helps the intelligent inspection system to achieve efficient real-time operation.
[0057] 5. The target detection system for electric power facilities for intelligent inspection of the present invention comprises: an image acquisition unit for acquiring inspection images; a target detection unit for inputting the inspection images into the improved Yolov8 target detection model to obtain the target detection results of electric power facilities. The system is used to implement the steps of the target detection method for electric power facilities for intelligent inspection provided in the above technical solution. Therefore, the system also includes all the beneficial effects of the target detection method for electric power facilities for intelligent inspection provided in the above technical solution, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 It is a flow chart of a method for detecting power facility targets for intelligent inspection provided by an embodiment of the present invention.
[0059] Figure 2 It is a flow chart of a method for performing feature enhancement on a first feature map provided in an embodiment of the present invention.
[0060] Figure 3 It is a flow chart of performing attention enhancement on the i-th image block according to the correlation score provided by an embodiment of the present invention.
[0061] Figure 4 It is a schematic diagram of a flow chart for identifying a target in an image to be detected according to the second feature map provided by an embodiment of the present invention.
[0062] Figure 5It is a structural schematic diagram of the improved Yolov8 target detection model provided by an embodiment of the present invention.
[0063] Figure 6 It is a structural diagram of a backbone network provided by an embodiment of the present invention.
[0064] Figure 7 It is a detection flow diagram of the improved Yolov8 target detection model provided in an embodiment of the present invention.
[0065] Figure 8 It is a structural schematic diagram of an electric power equipment target detection system for intelligent inspection provided by an embodiment of the present invention.
[0066] Fig. 9 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0067] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0068] In the existing technology, the inspection work of data centers relies on regular manual inspections or automated monitoring systems based on preset rules. However, these methods are often time-consuming and inefficient, and are particularly insufficient in real-time response to subtle changes in the status of facilities. At the same time, the expansion of the scale of data centers has made the limitations of these traditional inspection methods increasingly prominent, and a more efficient and intelligent solution is urgently needed. Driven by this demand, the exploration and development of innovative intelligent inspection technologies can not only improve inspection efficiency and accuracy, but also realize real-time monitoring and early warning of the status of power facilities, providing a solid guarantee for the stable and reliable operation of data centers. At the same time, the rapid development of deep learning technology has brought theoretical and practical innovations to fields such as image recognition and sequence data analysis.
[0069] In order to improve the efficiency and accuracy of power equipment inspections, especially to meet the real-time response requirements for subtle changes in equipment status, intelligent inspection methods based on machine vision and target detection technology have gradually attracted attention. This method can simulate the human visual system, automatically acquire and process images of power facilities, and accurately identify power facilities and related components in the images. By analyzing facility status data in real time, the intelligent inspection system can respond quickly to subtle changes in facility status, providing timely and accurate decision support for operation and maintenance personnel.
[0070] In order to solve the technical problems existing in the related art, the present invention provides a method for detecting power facility targets for intelligent inspection, such as Figure 1 As shown, Figure 11 is a flow chart of a method for detecting a target of an electric power facility for intelligent inspection provided by an embodiment of the present invention, the method comprising steps S1 to S2:
[0071] S1. Obtain inspection images.
[0072] S2. Input the inspection image into the improved Yolov8 target detection model to obtain the power equipment target detection result.
[0073] Among them, power equipment refers to equipment related to power production and transmission and distribution. Power equipment can be power generation, transmission, transformation, and distribution equipment, or it can be auxiliary equipment such as servers, switches, monitoring equipment, UPS, refrigeration equipment, etc. used in power system data centers.
[0074] YOLOv8 is an advanced single-stage target detection algorithm that can achieve efficient and fast target detection with low computational overhead. The present invention improves on the original YOLOv8 to improve its performance in intelligent inspection scenarios. The improved Yolov8 target detection model in the present invention is a target detection model that has been pre-trained based on the prior art. Specifically, Figure 5 As shown, Figure 5 : is a structural schematic diagram of an improved Yolov8 target detection model provided by an embodiment of the present invention, wherein the improved Yolov8 target detection model includes:
[0075] A backbone network is used to extract multi-scale features of the image to be detected, and fuse the multi-scale features to obtain a first feature map containing multi-scale feature information;
[0076] A local inattention feature enhancement module, used for performing feature enhancement on the first feature map to obtain a second feature map;
[0077] The detection head is used to output a detection result according to the second feature map.
[0078] In this embodiment, if Figure 6 As shown, Figure 6 It is a structural diagram of a backbone network provided in an embodiment of the present invention. For the improved Yolov8 target detection model, its backbone network includes a backbone network, an FPN structure, and an SPP structure.
[0079] The backbone network is used to extract multi-scale features of the image to be detected and fuse the multi-scale features, specifically including:
[0080] The multi-scale features of the inspection images are extracted through the backbone network;
[0081] The multi-scale features are fused through FPN to construct a multi-scale feature pyramid;
[0082] The multi-scale feature pyramid is spatially pooled through the SPP structure to fuse the features of different receptive fields and enhance the detection capability of objects of different sizes.
[0083] Specifically, the backbone network is a ResNeXt-101 network or a CSPDarknetX network. In the improved Yolov8 target detection model, the backbone network of YOLOv8 is modified to adopt a deeper convolutional neural network structure, such as ResNeXt-101. Compared with the original YOLOv8 backbone network, ResNeXt-101 learns richer feature representations under the same amount of computation.
[0084] ResNeXt-101 is a deep convolutional neural network model that is improved and expanded on the basis of ResNet. ResNeXt-101 improves the model's expressiveness and performance by introducing mechanisms such as group convolution and residual connection. The ResNeXt-101 network combined with the Feature Pyramid Network (FPN) can process information from feature maps of different scales, thereby improving the performance of target detection and segmentation. When ResNeXt-101 is used as the backbone network of YOLOv8, the ResNeXt-101 network combined with the Feature Pyramid Network (FPN) enables YOLOv8 to better detect objects of different sizes.
[0085] The CSPDarknetX network is a deep convolutional neural network, where X represents the number of layers of the CSPDarknet network. The number of layers of the CSPDarknet network can be configured according to requirements.
[0086] In this embodiment, a spatial pyramid pooling (SPP) module is introduced into the backbone network. The spatial pyramid pooling (SPP) module obtains feature maps of different receptive fields through pooling kernels of different sizes, and splices them together to obtain a first feature map containing multi-scale feature information. The spatial pyramid pooling (SPP) module fuses features of different scales to enhance the detection capability of targets of different sizes.
[0087] In this embodiment, the local inattention feature enhancement module is used to perform feature enhancement on the first feature map to obtain a second feature map.
[0088] Among them, the local attention-free feature enhancement module aims to enhance the YOLOv8 model's ability to express detailed features of power facilities and improve its sensitivity to subtle changes and potential faults. The core idea of local attention-free feature enhancement is to dynamically enhance the representation of local features through the attention-free mechanism, thereby obtaining richer and more discriminative feature representations.
[0089] Specifically, Figure 2 As shown, Figure 2 1 is a flow chart of a method for performing feature enhancement on a first feature map provided by an embodiment of the present invention. The feature enhancement on the first feature map includes steps S101 to S103:
[0090] S101. Divide the first feature map into multiple image blocks.
[0091] Specifically, in this embodiment, when dividing the image blocks, the input first feature map is assumed to be X∈R C×H×W , where C, H, and W represent the number of channels, height, and width, respectively. The first feature map is divided into M×N image blocks of the same size, where the i-th image block
[0092] S102: Calculate the correlation score of each image block.
[0093] After dividing the image blocks, the correlation score of each image block is calculated. Specifically, taking the i-th image block as an example, calculating the correlation score between the i-th image block and the remaining image blocks includes steps S1021 to S1022:
[0094] S1021, calculating the correlation value between the i-th image block and each of the remaining image blocks;
[0095] Specifically, the i-th image block x i With the j-th image block x j The correlation value r i,j Calculate according to the following formula, where i≠j;
[0096] r i,j =f(x i ,x j )=φ(x i ) T ψ(x j ) T (1);
[0097] In formula (1), φ(·) or ψ(·) is the embedding function, x i is the i-th image block, x j is the jth image block.
[0098] In this embodiment, the embedding function can be a convolutional or fully connected layer. The embedding function is used to extract image block features, such as ResNeXt-101 networks, etc. These networks can learn effective representations in image blocks, and these representations can be used to compare the similarities between image blocks.
[0099] S1022, summing the correlation values between the ith image block and each of the remaining image blocks to obtain a correlation score r corresponding to the ith image block i , the correlation score r corresponding to the i-th image block i The calculation formula is as follows:
[0100] r i =∑ j r i,j (5).
[0101] Specifically, the local attention-free feature enhancement module first blocks the input feature map into multiple local regions, and then applies the attention-free mechanism to each local region and calculates its correlation score with all other regions.
[0102] S103, performing channel attention enhancement and spatial attention enhancement on each image block according to the correlation score.
[0103] In this embodiment, the correlation score reflects the similarity between the region and the global feature. The higher the score, the more important the region is and the more it needs to be enhanced. For each local region, the local inattention feature enhancement module dynamically adjusts its feature enhancement degree according to its correlation score. High correlation regions will be enhanced to a greater extent, while low correlation regions will be enhanced to a lesser extent.
[0104] Specifically, Figure 3 As shown, Figure 3 A flow chart of performing attention enhancement on an i-th image block according to a correlation score is provided. Taking an i-th image block among a plurality of image blocks as an example, performing attention enhancement on an i-th image block among a plurality of image blocks according to a correlation score includes the following steps S201 to S203:
[0105] S201, perform channel attention enhancement on the i-th image block to obtain the first image block
[0106]
[0107] In formula (2), ⊙ represents the element-wise product, x i is the i-th image block, γ c (·) is a channel attention function, which includes a fully connected layer. The channel attention function assigns different weights to each feature channel through adaptive learning.
[0108] Specifically, the channel attention function may include a fully connected layer, the parameters of the fully connected layer are obtained through adaptive learning, and the fully connected layer obtains a weight phasor by transforming the feature phasor. Each value in the weight phasor corresponds to the weight of a channel of the image block. The obtained weight vector is multiplied by the original image block channel by channel to achieve channel attention enhancement and obtain the first image block.
[0109] S202: for the first image block Perform spatial attention enhancement to obtain the second image block
[0110]
[0111] In the formula, ⊙ represents the element-wise product, x i is the i-th image block, δ s (·) is a spatial attention function, which includes a convolutional layer. The spatial attention function focuses on specific spatial regions in the image through adaptive learning, while ignoring those regions that are irrelevant or redundant to the target task.
[0112] Specifically, the spatial attention function may include a convolution layer, the parameters of the convolution layer are obtained through adaptive learning, and the spatial attention function generates a weight map with the same size as the feature map based on the input feature map. Each value in the weight map represents the importance or attention of the corresponding spatial position. By multiplying the weight map by the original first image block element by element, the spatial attention can be enhanced and the second image block can be obtained.
[0113] S203: According to the i-th image block x i , the second image block The relevance score r of the i-th image patch i Get the enhanced i-th image block
[0114]
[0115] In the formula, λ is the learnable enhancement coefficient, r i is the i-th image block x i The corresponding relevance score.
[0116] In this embodiment, the specific operation of feature enhancement includes two parts: channel attention enhancement and spatial attention enhancement. Specifically, channel attention enhancement uses a fully connected layer to calculate the attention weight of each channel, and then re-weights the channel features according to the weight to highlight the role of important channel features; spatial attention enhancement uses a convolution operation to calculate the attention weight of each position and re-encode the spatial position information.
[0117] After channel attention enhancement and spatial attention enhancement operations, the local attention-free feature enhancement module outputs the enhanced second feature map, and the second feature map is fused into the feature extraction stage of the YOLOv8 model for target detection.
[0118] The local attention-free feature enhancement module is introduced in the YOLOv8 model. The local attention-free feature enhancement module first divides the feature map into multiple local regions, then uses the attention-free mechanism to dynamically adjust the enhancement degree of each region, and then refines the local features through channel and spatial attention. This "global guidance + local enhancement" idea can improve the expressiveness of local features in a more targeted manner.
[0119] The local attention-free feature enhancement module enables the improved YOLOv8 model to better capture the detailed features of power facilities and improve its sensitivity to subtle changes and potential faults; at the same time, the attention-free mechanism simplifies the feature enhancement process, reduces the computational complexity, and is conducive to real-time detection; in addition, the strategy of dynamically adjusting the degree of enhancement also makes the model more adaptable to environmental changes, ensuring that even when factors such as lighting conditions and equipment location change, the model can still maintain a high level of detection stability and accuracy.
[0120] In this embodiment, if Figure 4 As shown, Figure 4 The present invention is a schematic diagram of a process of identifying a target in an image to be detected according to the second feature map, wherein identifying a target in an image to be detected according to the second feature map includes the following steps S401 to S403:
[0121] S301, predicting the position and category of each key point based on the second feature map;
[0122] S302, generating category information corresponding to the prediction box and the target box according to the position and category of each key point;
[0123] S303, perform NMS processing on the predicted box, filter the predicted box in combination with the confidence threshold, and output the detection result;
[0124] The detection result includes: the position of the target in the image to be detected and the category information of the target.
[0125] In this embodiment, the detection head is a key point detection head, such as Figure 7 As shown, Figure 7It is a detection process diagram of the improved Yolov8 target detection model provided by an embodiment of the present invention. The key point detection head adapts to key point detection and detects the coordinate information of the key point position in the figure. After obtaining the key point information, the target box and the corresponding category information are replied according to the key point information, and then through NMS (non-maximum suppression) processing and threshold filtering processing, redundant prediction results are removed, and finally the target box coordinates (Bbox Coord) and category coordinates (Class Coord) are output.
[0126] After the improved Yolov8 target detection model outputs the final detection results, the detection results are visualized and saved for subsequent analysis.
[0127] By integrating the algorithm of local attention-free feature enhancer on the basis of YOLOv8, the present invention optimizes the model from two dimensions: feature enhancement and target detection, thereby improving the model's sensitivity to the detailed features of power facilities and the recognition accuracy, thereby improving the efficiency and accuracy of intelligent inspection.
[0128] In terms of feature enhancement, the present invention uses a local attention-free mechanism to process feature maps in detail, enhancing the model's ability to identify small targets in complex backgrounds; at the same time, the local feature enhancement function of the local attention-free feature enhancer is used to more effectively capture subtle changes and fault signs of power facilities, providing richer and more distinguishable feature representations to assist YOLOv8 in making more accurate judgments; and the local attention-free feature enhancer simplifies the feature processing process and reduces the computational complexity by adopting the attention-free mechanism, thereby helping the intelligent inspection system to achieve efficient real-time operation. Therefore, by dynamically enhancing local features, the model's adaptability to environmental changes is improved, ensuring that even when factors such as lighting conditions and equipment locations change, the model can still maintain high detection stability and accuracy.
[0129] In terms of target detection, first, ResNeXt-101 is used as the backbone network. Compared with the original YOLOv8 backbone network, ResNeXt-101 learns richer feature representations under the same amount of computation; secondly, the detection head does not use the traditional anchor box mechanism, but instead uses key point representation. By predicting the position and category of the target key points and then indirectly restoring the target box, it can more flexibly adapt to targets of different shapes and sizes, reducing the missed detection of difficult samples (such as dense, occluded targets, etc.).
[0130] In summary, the present invention proposes a method for detecting power facility targets for intelligent inspection, which combines the local inattention feature enhancer and the YOLOv8 target detection algorithm, aiming to optimize the target detection performance in the intelligent inspection system, especially in the monitoring and maintenance tasks of power facilities in data centers. Compared with the traditional YOLOv8 algorithm, the power facility target detection method for intelligent inspection proposed by the present invention has significantly improved the accuracy of target detection and the recognition ability of small devices and devices in complex backgrounds. In addition, by introducing the local inattention feature enhancer, the algorithm's sensitivity to subtle changes in power facilities is improved, and potential signs of failure can be more effectively identified, thereby enhancing the timeliness and accuracy of early warning.
[0131] In terms of real-time performance, although the local attention-free feature enhancer increases the calculation steps of the model, by optimizing the detection model structure, the processing speed of the new model can still meet the needs of real-time monitoring and ensure the normal and efficient operation of the system. In terms of dynamic environmental adaptability, the new model can still maintain high detection stability and accuracy under changes in environmental conditions such as lighting changes and equipment displacement, reflecting its robustness in actual application environments.
[0132] The embodiment of the present invention also provides a power equipment target detection system for intelligent inspection. Figure 8 is a structural diagram of a power equipment target detection system for intelligent inspection provided by an embodiment of the present invention, such as Figure 8 As shown, the electric power equipment target detection system for intelligent inspection provided by the embodiment of the present invention includes:
[0133] An image acquisition unit, used for acquiring inspection images;
[0134] A target detection unit, used for inputting the inspection image into an improved Yolov8 target detection model to obtain a power facility target detection result;
[0135] The improved Yolov8 target detection model includes:
[0136] A backbone network is used to extract multi-scale features of the image to be detected, and fuse the multi-scale features to obtain a first feature map containing multi-scale feature information;
[0137] A local inattention feature enhancement module, used for performing feature enhancement on the first feature map to obtain a second feature map;
[0138] The detection head is used to output a detection result according to the second feature map.
[0139] In some embodiments, said performing feature enhancement on the first feature map comprises:
[0140] The first feature map is divided into multiple image blocks, the correlation score of each image block is calculated, and channel attention enhancement and spatial attention enhancement are performed on the corresponding image blocks according to the correlation score.
[0141] Specifically, taking the i-th image block as an example, calculating the correlation score between the i-th image block and the remaining image blocks among the multiple image blocks includes:
[0142] Calculate the correlation value between the i-th image block and each of the remaining image blocks;
[0143] Sum the correlation values between the ith image block and each of the remaining image blocks to obtain the correlation score r corresponding to the ith image block. i ;
[0144] Among them, the correlation value r between the i-th image block and the j-th image block is calculated i,j Calculate according to the following formula, i≠j;
[0145] r i,j =f(x i ,x j )=φ(x i ) T ψ(x j ) T (1);
[0146] Where φ(·) or ψ(·) is the embedding function, x i is the i-th image block, x j is the jth image block.
[0147] Performing channel attention enhancement and spatial attention enhancement on the i-th image block among the plurality of image blocks according to the correlation score includes:
[0148] Perform channel attention enhancement on the i-th image block among the multiple image blocks to obtain a first image block
[0149] In the formula, ⊙ represents the element-wise product, x i is the i-th image block, γ c (·) is a channel attention function, which includes a fully connected layer. The channel attention function assigns different channel attention weights to each feature channel of the image block through adaptive learning;
[0150] For the first image block Perform spatial attention enhancement to obtain the second image block
[0151]
[0152] In the formula, ⊙ represents the element-wise product, x i is the i-th image block, δ s (·) is a spatial attention function, which includes a convolutional layer and assigns different spatial attention weights to each position in the image block through adaptive learning;
[0153] According to the second image block Correlation score to obtain enhanced image patches
[0154]
[0155] In the formula, λ is the learnable enhancement coefficient, r i is the i-th image block x i The corresponding relevance score.
[0156] In some embodiments, the backbone network includes a backbone network, an FPN structure, and an SPP structure, wherein the backbone network is a ResNeXt-101 network or a CSPDarknetX network.
[0157] The step of extracting multi-scale features of the image to be detected and fusing the multi-scale features comprises:
[0158] The multi-scale features of the inspection images are extracted through the backbone network;
[0159] The multi-scale features are integrated through the FPN structure to construct a multi-scale feature pyramid;
[0160] The multi-scale feature pyramid is spatially pooled through the SPP structure to fuse features of different receptive fields.
[0161] In some embodiments, identifying a target in the image to be detected according to the second feature map includes:
[0162] Based on the second feature map, predict the position and category of each key point;
[0163] Generate the category information corresponding to the prediction box and the target box according to the position and category of each key point;
[0164] Perform NMS processing on the predicted box, filter the predicted box based on the confidence threshold, and output the detection result.
[0165] An embodiment of the present invention further provides an electronic device, such as Fig. 9 As shown, Fig. 91 is a structural diagram of an electronic device provided by an embodiment of the present invention. The electronic device includes a memory and a processor, the memory is used to store computer program codes and transmit the computer program codes to the processor; the processor is used to execute the above-mentioned power equipment target detection method for intelligent inspection according to the instructions in the computer program codes.
[0166] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned power equipment target detection method for intelligent inspection is implemented.
[0167] Generally speaking, the computer instructions for implementing the method of the present invention may be carried in any combination of one or more computer-readable storage media. Non-transitory computer-readable storage media may include any computer-readable media, except for the signal itself that is temporarily propagating.
[0168] Computer-readable storage media, for example, may be, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or devices, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with a system, device or device for executing instructions.
[0169] One or more programming languages or their combinations can be used to write computer program codes for performing the operation of the present invention. These programming languages include object-oriented programming languages, such as Java, Smalltalk, C++, and also include conventional procedural programming languages, such as C language or similar programming languages. In particular, Python language suitable for neural network calculations and platform frameworks based on TensorFlow, PyTorch, etc. can be used. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through various types of networks, including a local area network (LAN) or a wide area network (WAN), or an Internet connection is performed through an Internet service provider.
[0170] Although the embodiments of the present invention have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for detecting power equipment targets for intelligent inspection, characterized in that: The detection method comprises: Acquire inspection images; Inputting the inspection image into the improved Yolov8 target detection model to obtain the power equipment target detection result; The improved Yolov8 target detection model includes: A backbone network is used to extract multi-scale features of the inspection image and fuse the multi-scale features to obtain a first feature map containing multi-scale feature information; A local inattention feature enhancement module, used for performing feature enhancement on the first feature map to obtain a second feature map; A detection head is used to output a detection result according to the second feature map.
2. The method for detecting power equipment targets for intelligent inspection according to claim 1, characterized in that: Performing feature enhancement on the first feature map includes: The first feature map is divided into multiple image blocks, a relevance score of each image block is calculated, and attention is enhanced on each image block according to the relevance score.
3. The method for detecting power equipment targets for intelligent inspection according to claim 2, characterized in that: Calculating the correlation score of the i-th image block among the plurality of image blocks comprises: Calculate the correlation value between the i-th image block and each of the remaining image blocks; Sum the correlation values between the ith image block and each of the remaining image blocks to obtain the correlation score r of the ith image block. i ; Among them, the correlation value r between the i-th image block and the j-th image block i,j Calculate according to the following formula, i≠j; r i,j =f(x i ,x j )=φ(x i ) T ψ(x j ) T (1); Where φ(·) or ψ(·) is the embedding function, x i is the i-th image block, x j is the jth image block.
4. The method for detecting power equipment targets for intelligent inspection according to claim 3 is characterized in that: Performing attention enhancement on the i-th image block among the plurality of image blocks according to the correlation score comprises: Perform channel attention enhancement on the i-th image block to obtain the first image block In the formula, ⊙ represents the element-wise product, x i is the i-th image block, γ c (·) is a channel attention function, which includes a fully connected layer. The channel attention function assigns different channel attention weights to each feature channel of the image block through adaptive learning; For the first image block Perform spatial attention enhancement to obtain the second image block In the formula, ⊙ represents the element-wise product, x i is the i-th image block, δ s (·) is a spatial attention function, which includes a convolutional layer and assigns different spatial attention weights to each position in the image block through adaptive learning; According to the i-th image block x i , the second image block The relevance score r of the i-th image patch i Get the enhanced i-th image block x i : Where λ is the enhancement coefficient, r i is the i-th image block x i The relevance score of .
5. The method for detecting power equipment targets for intelligent inspection according to claim 1, characterized in that: The backbone network includes a backbone network, an FPN structure, and an SPP structure; The step of extracting multi-scale features of the inspection image and fusing the multi-scale features comprises: The multi-scale features of the inspection images are extracted through the backbone network; The multi-scale features are integrated through the FPN structure to construct a multi-scale feature pyramid; The multi-scale feature pyramid is spatially pooled through the SPP structure to fuse features of different receptive fields.
6. The method for detecting power equipment targets for intelligent inspection according to claim 5, characterized in that: The backbone network is a ResNeXt-101 network or a CSPDarknetX network.
7. The method for detecting power equipment targets for intelligent inspection according to claim 1, characterized in that: Outputting the detection result according to the second feature map includes: Based on the second feature map, predict the position and category of each key point; Generate the category information corresponding to the prediction box and the target box according to the position and category of each key point; Perform NMS processing on the predicted box, filter the predicted box based on the confidence threshold, and output the detection result.
8. A power equipment target detection system for intelligent inspection, the system being applied to the method according to any one of claims 1 to 7, the system comprising: An image acquisition unit, used for acquiring inspection images; A target detection unit, used for inputting the inspection image into an improved Yolov8 target detection model to obtain a target detection result of the power equipment; The improved Yolov8 target detection model includes: A backbone network is used to extract multi-scale features of the image to be detected and fuse the multi-scale features to obtain a first feature map containing multi-scale feature information; A local inattention feature enhancement module, used for performing feature enhancement on the first feature map to obtain a second feature map; The detection head is used to output a detection result according to the second feature map.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store computer program code and transmit the computer program code to the processor; The processor is used to execute the power equipment target detection method for intelligent inspection according to any one of claims 1 to 7 according to the instructions in the computer program code.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for detecting a target of electric power equipment for intelligent inspection as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Lightweight acceptance method based on unmanned aerial vehicle distribution line inspection
CN115861861A
Multi-scale and multi-target fitting string unmanned aerial vehicle autonomous inspection method and system
CN117635916A
Object detection method based on attention-enhanced bidirectional feature pyramid network (a-bifpn)
GB202217717D0
Contextual visual-based SAR target detection method and apparatus, and storage medium
US20230184927A1
Cited By
Intelligent inspection method and system for power distribution room
CN119625483A
Electric power inspection target identification method and system
CN121437844A
