Power robot abnormal target detection method based on improved YOLOX

By introducing a multi-scale cross-level local network and a small target decoupled detection head into the abnormal target detection of electric robots, and combining it with a federated online incremental learning algorithm, the problems of insufficient perception capability and high computational overhead of abnormal small targets in existing technologies are solved, and efficient and adaptive abnormal target detection of electric robots is achieved.

CN120953583APending Publication Date: 2025-11-14STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO

Patent Information

Application Number
CN202511055884.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing technologies for abnormal target detection in electric robots suffer from problems such as insufficient perception of abnormal small targets, high computational overhead, poor real-time performance, inability to perform online adaptive optimization, and insufficient privacy and security.

Method used

We introduce the multi-scale cross-level local network MS-CSPNet and a small object decoupling detection head, and combine them with a federated online incremental learning algorithm to optimize the YOLOX model, realize multi-scale feature interaction and local context information extraction, and update and optimize the model through a federated learning mechanism.

Benefits of technology

It significantly improves the detection accuracy and inference efficiency of anomalous small targets, reduces computational overhead, achieves adaptive optimization and privacy protection in complex environments, and enhances the robustness and accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120953583A_ABST
    Figure CN120953583A_ABST
Patent Text Reader

Abstract

The invention discloses a power robot abnormal target detection method based on improved YOLOX. According to the method, image data shot by an electric power robot are acquired, an improved YOLOX model which introduces a multi-scale cross-level local network MS-CSPNet and a small target decoupling detection head is used for processing an image, and accurate detection and positioning of an abnormal target are realized. The MS-CSPNet enhances the feature expression ability of a small target through multi-path convolution, a decoupling detection head is combined with deep convolution, expansion convolution and 1 * 1 convolution, context and long-range dependency information is effectively extracted, classification and regression task separation is achieved, and the detection precision is improved. Each power robot model is continuously optimized based on a federated online incremental learning algorithm, multi-terminal cooperative training is supported, adaptive updating of the model is realized while data privacy is guaranteed, and the method is widely applied to power equipment state monitoring and fault early warning scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of target detection technology, specifically relating to an abnormal target detection method for electric robots based on an improved YOLOX. Background Technology

[0002] With the continuous advancement and development of science and technology, the application of robotics in power system monitoring is becoming increasingly widespread. The emergence of power robots has brought entirely new solutions for fault detection and early warning in power systems, offering numerous advantages and potential. On the one hand, robotics technology enables real-time monitoring of power systems, quickly understanding their operational status and promptly identifying potential faults. On the other hand, robotics technology possesses intelligent analysis capabilities, using built-in algorithms to monitor and analyze data in real time, achieving accurate judgments of system operating status and prompting staff to take timely countermeasures to prevent the escalation of faults.

[0003] Currently, computer vision-based anomaly detection methods are mainly divided into two types: anomaly detection based on traditional image processing and anomaly detection based on deep learning. Anomaly detection based on traditional image processing extracts manually defined image features and identifies anomalies based on feature differences. Anomaly detection based on deep learning, on the other hand, trains a model using a large amount of pre-labeled data to automatically detect anomalies in images. Traditional image processing algorithms can identify equipment features and judge abnormal states based on feature differences. Combining information such as the shape and feature distribution of power equipment, the system identifies the equipment status and thus judges anomalies. This type of method relies on manual design, has low requirements for hardware and sample size, and the algorithm flow is easy to implement. However, power equipment operates in complex environments, is diverse, has fast dynamic processes, small target size, low resolution, and blurred edge information; therefore, the recognition accuracy of traditional detection methods is relatively poor.

[0004] In the prior art, Chinese patent CN118608774A discloses a method, device, electronic device, and computer-readable storage medium for detecting anomalous facilities based on deep learning. This detection method is based on a pre-trained facility detection model. This model incorporates an MSDSF module after the feature extraction module at the last scale of the backbone network, fusing local target information and non-local background information at different scales. This enriches the features of small targets and enhances the distinction between small targets and the background. An ARFA submodule is included in the feature extraction module at each scale, fusing different regions of the input features at a single scale based on different weights. The weight learning mechanism dynamically adjusts the attention level of different regions of the input features, enabling more refined and adaptive processing of the input features, improving the expressive power of key features, and enhancing the accuracy of the facility detection model in detecting different anomalous urban facilities in complex and variable backgrounds.

[0005] However, this method only performs semantic fusion at the end of a single scale, lacking cross-level interaction of multi-scale features between layers. This makes it difficult to obtain sufficient contextual information for extremely small or sparsely distributed anomalous targets. The ARFA submodule needs to perform multiple convolutions, fully connected layers, and normalization operations with different dilation rates, resulting in high computational overhead and difficulty meeting the real-time requirements of power robots with limited computing power in the field. At the same time, this method still relies on centralized offline training and deployment, and cannot perform online adaptive optimization for the small number of localized anomalous samples obtained by each robot under different inspection routes and equipment types. It also cannot effectively protect the privacy and security of massive inspection images. These shortcomings limit the detection method's ability to detect small anomalous targets with high accuracy and low latency in actual power robot inspection tasks, as well as its continuous adaptive and collaborative optimization performance in heterogeneous multi-scene environments. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the existing technology and provide an abnormal target detection method for electric robots based on the improved YOLOX.

[0007] The objective of this invention can be achieved through the following technical solutions:

[0008] This invention provides a method for detecting abnormal targets in electric robots based on an improved YOLOX, comprising the following steps:

[0009] Acquire image data captured by the electric robot;

[0010] The acquired image data is input into the improved YOLOX model to detect abnormal targets, and the target detection box and category information are output.

[0011] Based on the detection frame information, abnormal targets in the image are located to monitor the operating status of power equipment;

[0012] The improved YOLOX models of each electric robot are updated using a federated online incremental learning algorithm;

[0013] The improved YOLOX model includes the following improvements:

[0014] In the backbone network of the YOLOX model, a multi-scale cross-level local network MS-CSPNet is introduced to perform multi-path convolution operations on the input feature map, extract multi-scale target features, and enhance the perception area of ​​abnormal small targets.

[0015] The detection head of the YOLOX model is replaced with a small target decoupled detection head. By combining depthwise convolution, dilated convolution and 1×1 convolution, contextual information and long-range dependency information are extracted respectively, thereby decoupling the classification and regression tasks.

[0016] Furthermore, the improved YOLOX model includes an image feature extraction backbone network (BackBone), a multi-scale feature fusion network (Neck), and an object detection and classification network (Head).

[0017] Furthermore, the image feature extraction backbone network includes a Focus module, a first CBS module, a first CSPNet module, a second CBS module, a first multi-scale cross-level local network, a third CBS module, a second multi-scale cross-level local network, a fourth CBS module, and a third multi-scale cross-level local network connected in sequence.

[0018] The BackBone input of the image feature extraction backbone network is equipped with a Focus module, which is used to segment and reassemble the input high-resolution image into multiple low-resolution feature maps by channel;

[0019] The low-resolution feature map is sequentially input into the feature selection CBS module. The CBS module consists of convolution, BatchNormalization and SiLU activation function, which are used to extract basic visual features.

[0020] The basic visual features output by the CBS module are divided into three effective feature layers along the channel dimension, and the three effective feature layers are respectively input into the multi-scale cross-level local network MS-CSPNet;

[0021] The multi-scale cross-level local network MS-CSPNet consists of three parallel paths: the first path is a single 3×3 convolution; the second path is a stacked 3×3 convolution plus BN module plus ReLU module, the output of which is divided into a branch to be merged and a branch to continue convolution; the third path is a ResBlock module containing residual structure.

[0022] The outputs of the three parallel paths are converged and fused along the channel dimension to achieve an efficient combination of multi-scale features and gradient information, and to output an enhanced multi-level feature map.

[0023] Furthermore, the multi-scale feature fusion network Neck includes a fifth CBS module, a first upsampling module, a first Concat module, a second CSPNet module, a sixth CBS module, and a second upsampling module connected in sequence.

[0024] The multi-scale feature fusion network Neck further includes a first stitching module, a second stitching module, and a third stitching module. The output of the second upsampling module is connected to the input of the first stitching module, the output of the sixth CBS module is connected to the input of the second stitching module, and the output of the sixth CBS module is connected to the input of the third stitching module.

[0025] The splicing module includes a Concat module and a CSPNet module connected in sequence.

[0026] Furthermore, the output of the third multi-scale cross-level local network of the image feature extraction backbone network is connected to the input of the fifth CBS module of the multi-scale feature fusion network, the output of the second multi-scale cross-level local network of the image feature extraction backbone network is connected to the input of the first Concat module of the multi-scale feature fusion network, and the output of the first multi-scale cross-level local network of the image feature extraction backbone network is connected to the input of the first stitching module of the multi-scale feature fusion network.

[0027] Furthermore, the multi-scale cross-level local network MS-CSPNet consists of three parallel paths: the first path is a single 3×3 convolution; the second path is a stacked 3×3 convolution plus BN module plus ReLU module, the output of which is divided into a branch to be merged and a branch to continue convolution; the third path is a ResBlock module containing residual structure.

[0028] Furthermore, the improved YOLOX models of each electric robot are updated using a federated online incremental learning algorithm, specifically including:

[0029] Each electric robot uses the improved YOLOX model parameters θ based on its local deployment at the current moment. t-1 Using the newly collected local dataset as the initial value. Perform local incremental training to obtain the improved YOLOX model parameters for local deployment after training, and calculate the local model parameter update gradient:

[0030]

[0031] Where, θ t-1 These are the global model parameters for round t-1. Let be the local training dataset for the k-th electric robot in the t-th iteration. The operator that represents the gradient of the model parameters θ. The loss function for the improved YOLOX model, Update the gradient for the model parameters of the k-th electric robot calculated in the t-th iteration;

[0032] Each electric robot uses a sliding window mechanism to fuse historical model parameters to update gradients, forming a multi-scale weighted gradient:

[0033]

[0034] in, Let W be the historical weighted gradient of the k-th electric robot in the t-th iteration, where W is the sliding window length and β∈(0,1) is the historical gradient decay factor. Update the gradient for the model parameters of the k-th electric robot obtained in the ti-th iteration;

[0035] Each electric robot validates its performance on the local validation set based on historical weighted gradients. To evaluate the effectiveness of the model update, calculate the improvement in validation loss:

[0036]

[0037] Where, Δl (k) This represents the improvement in verification loss for the k-th electric robot. An improved YOLOX model representing the local deployment of electric robots is given by parameter θ. t-1 Local validation set The loss value, An improved YOLOX model representing the local deployment of electric robots is presented in terms of parameters. Local validation set The loss value, where η is the local learning rate;

[0038] The federated server increases the verification loss Δl of each power robot. (k) Calculate the attention weighting coefficient for performance:

[0039]

[0040] Where, α k λ represents the model weight of the k-th electric robot in the aggregation process; λ>0 is the temperature adjustment factor of the weight distribution, and K is the total number of electric robots participating in federated training.

[0041] The federated server aggregates the multi-scale weighted gradients uploaded by each electric robot according to the model weights and updates the global model parameters. The update formula is as follows:

[0042]

[0043] θ t =θ t-1 -η·G t +μ·(θ t-1 -θ t-2 )

[0044] Among them, H t Let θ be the global gradient obtained from the federated aggregation in the t-th iteration. t Here are the global model parameters after the t-th iteration update, and μ is the preset momentum factor;

[0045] Update the global model parameters θ t The parameters are distributed to all electric robots participating in federated training and used as initial model parameters for the next round of local training, enabling continuous online learning and adaptive model updates.

[0046] Furthermore, each electric robot uses the improved YOLOX model parameters θ for its local deployment at the current moment. t-1 Using the newly collected local dataset as the initial value. Local incremental training includes:

[0047] Each power robot performs inspections during each iteration, acquiring real-time images of the power equipment. These images are then normalized and cropped sequentially to form a local training set.

[0048] local training set The improved YOLOX model, deployed locally on each electric robot, is used for detection, and the detection bounding boxes and category prediction results for abnormal targets are output. The output includes the detection bounding box and category prediction results for the abnormal targets. Manual review is conducted to generate a set of real annotations.

[0049] According to the prediction results Compared with the real annotation set The improved YOLOX model deployed locally is trained using a loss function, the parameters of the improved YOLOX model deployed locally are updated, and the gradient of the local model parameter update is calculated based on the updated parameters.

[0050] Furthermore, each of the power robots performs inspections at different locations within the substation, and their inspection routes do not overlap. Each power robot has its own local verification set. This includes real-time images of damage collected by the k-th power robot on the power equipment it traverses along its inspection route, along with corresponding manual review and annotations.

[0051] Furthermore, the loss function of the improved YOLOX model is:

[0052]

[0053]

[0054] Where IoU represents the model prediction box B pred Compared with the true bounding box B in the true annotation set gt The intersection and union ratio, A r The area(Image) represents the pixel area of ​​the detected image, and the area(B) represents the relative area of ​​the target. gt B represents the ground truth bounding box of the detected image. gt The pixel area is p, which represents the model's confidence score for the category to which the detection box belongs. σ>0 is the exponential penalty factor, and κ>0 is the classification decay index.

[0055] Compared with the prior art, the present invention has the following advantages:

[0056] (1) This invention introduces a multi-scale cross-level local network MS-CSPNet into the backbone network of the YOLOX model to solve the problems of insufficient perception capability and low feature extraction efficiency of abnormal small targets in power equipment scenarios in the existing technology. When facing abnormal targets with extremely small size, low resolution and blurred edge information, the existing YOLOX relies only on single-scale or discrete cross-stage feature fusion, which makes it difficult to obtain rich gradient combinations and multi-scale details at the same time, resulting in inaccurate localization of small targets and high false negative rate; while large convolutional kernels or SPP modules can expand the receptive field, they will significantly increase the amount of computation and feature redundancy. To address this, the MS-CSPNet designed in this invention truncates the input channel into three parallel paths. The first path extracts fine-grained features using 3×3 convolutions; the second path refines and filters mid-scale information through stacked 3×3 convolutions + BN + ReLU modules; and the third path uses a ResBlock residual structure to obtain deep semantics. These three outputs converge along the channel dimension, achieving efficient interaction of multi-scale features. Simultaneously, multiple 3×3 convolutions replace 5×5 / 7×7 convolutions, significantly reducing the number of parameters, retaining cross-stage strategies to alleviate network overhead, and removing the underlying SPP module to improve computational speed. This structure not only significantly enhances the receptive field for abnormally small targets and improves the diversity of gradient propagation, but also improves the accuracy and inference efficiency of target detection while maintaining lightweight design.

[0057] (2) This invention replaces the original YOLOX detection head with a decoupled detection head specifically designed for small targets, mainly solving the problems of traditional single convolutional heads lacking sensitivity to local context and insufficient ability to capture long-range dependencies when processing abnormal small targets. Although the existing YOLOX detection head separates classification and regression tasks, it relies on simple convolution operations, making it difficult to simultaneously obtain rich contextual information and deep semantics on small-sized feature maps, resulting in large classification ambiguities and localization errors for small targets. To address this, after inputting the feature map (80×80×256, 40×40×512, 20×20×1024) into the detection head, this invention first performs channel dimensionality reduction using 1×1 convolution, and then sets up depthwise separable convolutional branches and dilated convolutional branches in parallel: the depthwise convolutional branch captures fine local features through stacked depthwise convolutional layers, while the dilated convolutional branch captures long-range dependency information by expanding the receptive field through various dilation rates. The outputs of the two branches are then fused with the local features of the 1×1 convolution to generate classification and regression prediction results, which are then superimposed and output. This design, without significantly increasing the number of parameters, not only enhances the characterization of small target details but also improves the global perception capability during feature transfer, thereby significantly improving the classification accuracy and positioning precision of electric robots for abnormal small targets.

[0058] (3) This invention solves the problem that a single model is difficult to take into account the abnormal features of multiple scenarios and equipment types in a heterogeneous inspection environment by introducing a federated online incremental learning mechanism among various power robots, and overcomes the bandwidth and privacy risks brought about by the centralized transmission and storage of a large amount of on-site image data. Due to the different inspection routes and monitoring objects of each power robot, the abnormal images collected by them have the contradiction of scene diversity and small sample scarcity: some robots have difficulty obtaining sufficient and comprehensive fault samples, which makes the local model prone to overfitting or underfitting; while aggregating all the data to the central server increases the network transmission burden and poses a risk of equipment data leakage. To this end, in each iteration, each robot locally uses the latest model parameters and its own collected training set to perform incremental learning, calculates the local gradient and merges the historical gradient to form a multi-scale weighted gradient, and then adaptively generates attention weights based on the performance improvement on the local validation set; the federated server only aggregates the weighted gradient and weights, without transmitting the original images, realizing a closed loop of local learning - secure aggregation - global update - optimization distribution. This strategy enables the global model to quickly absorb environmental features and abnormal behaviors from different robot ends, significantly improving the detection accuracy and robustness for diverse small targets. It also eliminates the need for centralized storage of massive amounts of high-privacy image data, significantly reducing communication overhead and the risk of privacy leakage. Thus, it achieves the technical effect of continuous online adaptation and autonomous collaborative optimization of the power robot system in complex substation environments.

[0059] (4) This invention utilizes multiple pre-set, non-overlapping inspection routes within a substation to perform detection tasks by employing various power robots. This fully leverages the robots' mobility and area coverage capabilities, ensuring that power equipment in different locations can be monitored independently and comprehensively. Each robot's local validation set is constructed based on real-time images of equipment damage collected along its own inspection route, along with corresponding manual annotations. This allows for targeted evaluation of the local model's detection performance in that area. This technical feature addresses the shortcomings of previous methods that used a unified validation set to evaluate the global model, neglecting scene differences and failing to accurately reflect the fault distribution in different areas. It also avoids the redundancy and bias caused by all robots sharing the same validation set. By tailoring a validation set for each inspection route, this invention achieves more precise local model evaluation and differentiated allocation of federated aggregation weights, significantly improving the robustness and generalization ability of the global model in detecting abnormal targets in various substation areas.

[0060] (5) This invention effectively solves the problems of inaccurate localization and unstable classification of abnormal small targets by power robots in complex inspection scenarios by constructing a loss function that integrates region perception and confidence adaptation mechanisms. Since small targets usually account for a very small proportion in images, traditional IoU series losses are prone to gradient vanishing in their localization optimization, resulting in poor boundary regression performance; at the same time, the classification confidence of small targets is generally low, and they are easily misjudged or ignored during training, thus affecting the overall detection performance. To this end, this invention introduces a region perception factor based on the relative area of ​​the target. By exponentially weighting the IoU loss, the gradient of the localization error is significantly amplified when the target is small, thereby strengthening the network's ability to learn the boundary of small targets; at the same time, combined with the confidence decay mechanism, the weight of targets with lower classification scores is increased in the loss, guiding the model to pay more attention to and learn from weak samples. This loss function innovatively embeds target scale information and classification confidence into the regression error control process, constructing a highly coupled optimization path of regression and classification, and improving the perception, localization and recognition capabilities of small targets in complex backgrounds. Through this mechanism, the present invention significantly enhances the detection effect of sparsely distributed and vaguely defined abnormal targets while maintaining the lightweight nature of the network. It realizes high-precision identification and stable prediction of small target anomalies by the power robot system, and has strong practical value in the application of refined inspection of substations. Attached Figure Description

[0061] Figure 1 This is a flowchart of the abnormal target detection method for electric robots according to an embodiment of the present invention;

[0062] Figure 2 This is a structural diagram of the improved YOLOX model according to an embodiment of the present invention.

[0063] Figure 3The diagram shows the CSPNet module and the improved MS-CSPNet model in this embodiment of the invention. Detailed Implementation

[0064] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0065] Example 1:

[0066] This embodiment provides an abnormal target detection method for electric robots based on an improved YOLOX, such as... Figure 1 As shown, it includes the following steps:

[0067] Step S1: Acquire image data captured by the electric robot;

[0068] Step S2: Input the acquired image data into the improved YOLOX model to detect abnormal targets and output the target detection box and category information;

[0069] Step S3: Locate abnormal targets in the image based on the detection box information to monitor the operating status of power equipment;

[0070] Step S4: The improved YOLOX models of each electric robot are updated using a federated online incremental learning algorithm, specifically including:

[0071] Each electric robot uses the improved YOLOX model parameters θ based on its local deployment at the current moment. t-1 Using the newly collected local dataset as the initial value. Perform local incremental training to obtain the improved YOLOX model parameters for local deployment after training, and calculate the local model parameter update gradient:

[0072]

[0073] Where, θ t-1 These are the global model parameters for round t-1. Let be the local training dataset for the k-th electric robot in the t-th iteration. The operator that represents the gradient of the model parameters θ. The loss function for the improved YOLOX model, Update the gradient for the model parameters of the k-th electric robot calculated in the t-th iteration;

[0074] Each electric robot uses a sliding window mechanism to fuse historical model parameters to update gradients, forming a multi-scale weighted gradient:

[0075]

[0076] in, Let W be the historical weighted gradient of the k-th electric robot in the t-th iteration, where W is the sliding window length and β∈(0,1) is the historical gradient decay factor. Update the gradient for the model parameters of the k-th electric robot obtained in the ti-th iteration;

[0077] Each electric robot validates its performance on the local validation set based on historical weighted gradients. To evaluate the effectiveness of the model update, calculate the improvement in validation loss:

[0078]

[0079] Where, Δl (k) This represents the improvement in verification loss for the k-th electric robot. An improved YOLOX model representing the local deployment of electric robots is given by parameter θ. t-1 Local validation set The loss value, An improved YOLOX model representing the local deployment of electric robots is presented in terms of parameters. Local validation set The loss value, where η is the local learning rate;

[0080] The federated server increases the verification loss Δl of each power robot. (k) Calculate the attention weighting coefficient for performance:

[0081]

[0082] Where, α k λ represents the model weight of the k-th electric robot in the aggregation process; λ>0 is the temperature adjustment factor of the weight distribution, and K is the total number of electric robots participating in federated training.

[0083] The federated server aggregates the multi-scale weighted gradients uploaded by each electric robot according to the model weights and updates the global model parameters. The update formula is as follows:

[0084]

[0085] θ t =θ t-1 -η·G t +μ·(θ t-1 -θ t-2 )

[0086] Among them, G t Let θ be the global gradient obtained from the federated aggregation in the t-th iteration. t Here are the global model parameters after the t-th iteration update, and μ is the preset momentum factor;

[0087] Update the global model parameters θ t The parameters are distributed to all electric robots participating in federated training and used as initial model parameters for the next round of local training, enabling continuous online learning and adaptive model updates.

[0088] Each electric robot uses the improved YOLOX model parameters θ based on its local deployment at the current moment. t-1 Using the newly collected local dataset as the initial value. Local incremental training includes:

[0089] Each power robot performs inspections during each iteration, acquiring real-time images of the power equipment. These images are then normalized and cropped sequentially to form a local training set.

[0090] local training set The improved YOLOX model, deployed locally on each electric robot, is used for detection, and the detection bounding boxes and category prediction results for abnormal targets are output. The output includes the detection bounding box and category prediction results for the abnormal targets. Manual review is conducted to generate a set of real annotations.

[0091] According to the prediction results Compared with the real annotation set The improved YOLOX model deployed locally is trained using a loss function, the parameters of the improved YOLOX model deployed locally are updated, and the gradient of the local model parameter update is calculated based on the updated parameters.

[0092] Each power robot performs inspections at different locations within the substation, and their inspection routes do not overlap. Each power robot has its own local validation set. This includes real-time images of damage collected by the k-th power robot on the power equipment it traverses along its inspection route, along with corresponding manual review and annotations.

[0093] The loss function of the improved YOLOX model is:

[0094]

[0095] Where IoU represents the model prediction box B pred Compared with the true bounding box B in the true annotation set gt The intersection and union ratio, Ar The area(Image) represents the pixel area of ​​the detected image, and the area(B) represents the relative area of ​​the target. gt B represents the ground truth bounding box of the detected image. gt The pixel area is p, which represents the model's confidence score for the category to which the detection box belongs. σ>0 is the exponential penalty factor, and κ>0 is the classification decay index.

[0096] An improved YOLOX algorithm for anomaly detection in power robots is proposed. Using the anchorless YOLOX algorithm as the base network, and considering the requirements for small targets and high accuracy in anomaly detection in power robots, the YOLOX model is improved. The improved YOLOX model is shown below. Figure 2 As shown. The improved YOLOX model includes the following improvements:

[0097] In the backbone network of the YOLOX model, a multi-scale cross-level local network MS-CSPNet is introduced to perform multi-path convolution operations on the input feature map to extract multi-scale target features.

[0098] The detection head of the YOLOX model is replaced with a small target decoupled detection head. By combining depthwise convolution, dilated convolution and 1×1 convolution, contextual information and long-range dependency information are extracted respectively, thereby decoupling the classification and regression tasks.

[0099] An improved YOLOX algorithm model was constructed by introducing a multi-scale cross-level local network (MS-CSPNet) and a small target decoupling head. MS-CSPNet enhances the receptive field of small, abnormal targets by extracting multi-scale feature information of the detected targets. The small target decoupling head obtains the contextual information of the target through multiple convolutions and captures the long-range dependencies of the target in the feature propagation process.

[0100] The improved YOLOX algorithm model mainly consists of three parts: an image feature extraction backbone network (BackBone), a multi-scale feature fusion network (Neck), and an object detection and classification network (Head). The image feature extraction backbone network (BackBone) includes a Focus module, a first CBS module, a first CSPNet module, a second CBS module, a first multi-scale cross-level local network MS-CSPNet, a third CBS module, a second multi-scale cross-level local network, a fourth CBS module, and a third multi-scale cross-level local network, connected sequentially. The Focus module at the input of the BackBone is used to segment and reconstruct the input high-resolution image into multiple low-resolution feature maps by channel. These low-resolution feature maps are then sequentially input into the feature selection CBS module, which consists of convolution, BatchNormalization, and SiLU activation. The function is composed of three layers to extract basic visual features. The basic visual features output by the CBS module are divided into three effective feature layers along the channel dimension, and these three effective feature layers are input into the multi-scale cross-level local network MS-CSPNet. The multi-scale cross-level local network MS-CSPNet consists of three parallel paths: the first path is a single 3×3 convolution; the second path is a stacked 3×3 convolution plus a BN module plus a ReLU module, the output of which is divided into a branch to be merged and a branch to continue convolution; the third path is a ResBlock module containing residual structures. The outputs of the three parallel paths are converged and fused along the channel dimension to achieve efficient combination of multi-scale features and gradient information, and output an enhanced multi-level feature map. The BackBone network first uses the Focus model to split the high-resolution image (feature map) into multiple low-resolution feature maps, then uses the feature selection CBS module to extract features from the input image, and divides the input features into three effective feature layers. These effective feature layers are then input into the MS-CSPNet network for feature extraction, efficiently fusing the feature maps at different levels and outputting feature maps at different levels. The purpose of introducing MS-CSPNet in this section is to enhance the receptive field of small targets while enabling the architecture to achieve rich gradient combinations, with a structure as follows: Figure 3 As shown in (b), the input channel is truncated into three parts: Path 1 uses a 3×3 convolutional kernel to extract target features; Path 2 enhances the target representation by stacking 3×3 convolutional kernels, BN layers, and ReLU activation functions, and divides the output into two parts, one part containing target information to be merged, and the other part continuing to extract target features; Path 3 completes feature extraction and provides the output through the ResBlock residual module. The multi-scale feature fusion network ensures that the model can handle targets of various sizes by performing feature extraction at different scales on the basic features extracted by the Backbone.

[0101] The multi-scale feature fusion network Neck includes a fifth CBS module, a first upsampling module Ups, a first Concat module, a second CSPNet module, a sixth CBS module, and a second upsampling module connected in sequence. The multi-scale feature fusion network Neck also includes a first stitching module, a second stitching module, and a third stitching module. The output of the second upsampling module is connected to the input of the first stitching module, the output of the sixth CBS module is connected to the input of the second stitching module, and the output of the sixth CBS module is connected to the input of the third stitching module. The stitching module includes a Concat module and a CSPNet module connected in sequence.

[0102] The output of the third multi-scale cross-level local network of the image feature extraction backbone network is connected to the input of the fifth CBS module of the multi-scale feature fusion network. The output of the second multi-scale cross-level local network of the image feature extraction backbone network is connected to the input of the first Concat module of the multi-scale feature fusion network. The output of the first multi-scale cross-level local network of the image feature extraction backbone network is connected to the input of the first stitching module of the multi-scale feature fusion network.

[0103] After acquiring effective feature maps, the label detection and classification network (Head) performs feature enhancement operations through the FPN structure, passing feature layers of size 80×80×256, 40×40×512, and 20×20×1024 to the detection head and obtaining the final detection result.

[0104] Example 2:

[0105] The improved YOLOX model (YOLOX++) of this invention was tested on three datasets: the High-Voltage Tower Bird Nest Dataset, the China Power Line Insulator Dataset (CPLID), and PASCALVOC. The High-Voltage Tower Bird Nest Dataset was a self-built dataset, and the detection target was bird nests observed on high-voltage towers under different weather and lighting conditions. To enrich the image dataset, image augmentation techniques (cropping, flipping, rotating, etc.) were used for expansion. A total of 2864 images were used for training, and 716 images were used to test network performance. CPLID provided 600 insulator images and 248 images containing defective insulators. The same data augmentation operations were performed on it, resulting in 2800 images for training and 700 images as the test set. In the High-Voltage Tower Bird Nest and Power Line Insulator datasets, the image size was uniformly cropped to 1368×912. Furthermore, the expanded portions of both datasets were annotated to conform to the standard format of the PASCAL VOC data.

[0106] The experimental results at the bird's nest on the high-voltage tower are shown in Table 1 below:

[0107] Table 1

[0108]

[0109] The YOLOX model's detection results for bird nests on high-voltage power towers at different depths and widths (S, M, L, X). In terms of AP and F1 scores, different YOLOX++ detection models outperformed the YOLOX network. Among them, the YOLOX-X model, with the most parameters, achieved a 12% improvement in F1 score, a 9.4% improvement in detection accuracy, and an AP of 86.8%. The results in the table above show that different models of YOLOX++ have better performance than YOLOX in detecting bird nests on high-voltage power towers.

[0110] Secondly, to verify the effectiveness of the YOLOX++ model for other target detection scenarios, relevant experiments were conducted on the CPID benchmark dataset for defective insulators. The results are shown in Table 2 below.

[0111] Table 2

[0112]

[0113] Compared to the Bird's Nest target, the defective insulator has a smaller physical size. However, due to the absence of obstructions, the YOLOX-S algorithm achieves 90% insulator detection accuracy. The YOLOX++S model in this patent further improves the detection accuracy by 6.6%.

[0114] Finally, to verify the robustness of the improved YOLOX++ model to small targets, experiments were conducted on the PASCAL VOC dataset to detect small targets of multiple categories. The experimental results are shown in Table 3 below.

[0115] Table 3

[0116]

[0117] As can be seen from the results in Table 3 above, the YOLOX++ model improved the detection accuracy of small targets such as "bird", "boat" and "bottle" by 9.6%, 15.5% and 10.5% respectively, indicating that the YOLOX++ model in this invention has better robustness for small target detection.

[0118] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0119] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for detecting abnormal targets in electric robots based on an improved YOLOX, characterized in that, Includes the following steps: Acquire image data captured by the electric robot; The acquired image data is input into the improved YOLOX model to detect abnormal targets, and the target detection box and category information are output. Based on the detection frame information, abnormal targets in the image are located to monitor the operating status of power equipment; The improved YOLOX models of each electric robot are updated using a federated online incremental learning algorithm; The improved YOLOX model includes the following improvements: In the backbone network of the YOLOX model, a multi-scale cross-level local network MS-CSPNet is introduced to perform multi-path convolution operations on the input feature map to extract multi-scale target features. The detection head of the YOLOX model is replaced with a small target decoupled detection head. By combining depthwise convolution, dilated convolution and 1×1 convolution, contextual information and long-range dependency information are extracted respectively, thereby decoupling the classification and regression tasks.

2. The abnormal target detection method for electric robots based on improved YOLOX according to claim 1, characterized in that, The improved YOLOX model includes an image feature extraction backbone network (BackBone), a multi-scale feature fusion network (Neck), and an object detection and classification network (Head).

3. The abnormal target detection method for electric robots based on improved YOLOX according to claim 2, characterized in that, The image feature extraction backbone network BackBone includes a Focus module, a first CBS module, a first CSPNet module, a second CBS module, a first multi-scale cross-level local network, a third CBS module, a second multi-scale cross-level local network, a fourth CBS module, and a third multi-scale cross-level local network, connected in sequence. The BackBone input of the image feature extraction backbone network is equipped with a Focus module, which is used to segment and reassemble the input high-resolution image into multiple low-resolution feature maps by channel. The low-resolution feature map is sequentially input into the feature selection CBS module. The CBS module consists of convolution, BatchNormalization and SiLU activation function, which are used to extract basic visual features. The basic visual features output by the CBS module are divided into three effective feature layers along the channel dimension, and the three effective feature layers are respectively input into the multi-scale cross-level local network MS-CSPNet; The multi-scale cross-level local network MS-CSPNet consists of three parallel paths: the first path is a single 3×3 convolution; the second path is a stacked 3×3 convolution plus BN module plus ReLU module, the output of which is divided into a branch to be merged and a branch to continue convolution; the third path is a ResBlock module containing residual structure. The outputs of the three parallel paths are converged and fused along the channel dimension to achieve an efficient combination of multi-scale features and gradient information, and to output an enhanced multi-level feature map.

4. The abnormal target detection method for electric robots based on improved YOLOX according to claim 2, characterized in that, The multi-scale feature fusion network Neck includes a fifth CBS module, a first upsampling module, a first Concat module, a second CSPNet module, a sixth CBS module, and a second upsampling module connected in sequence. The multi-scale feature fusion network Neck further includes a first stitching module, a second stitching module, and a third stitching module. The output of the second upsampling module is connected to the input of the first stitching module, the output of the sixth CBS module is connected to the input of the second stitching module, and the output of the sixth CBS module is connected to the input of the third stitching module. The splicing module includes a Concat module and a CSPNet module connected in sequence.

5. A method for detecting abnormal targets in an electric robot based on an improved YOLOX, as described in claim 3 or 4, characterized in that, The output of the third multi-scale cross-level local network of the image feature extraction backbone network is connected to the input of the fifth CBS module of the multi-scale feature fusion network. The output of the second multi-scale cross-level local network of the image feature extraction backbone network is connected to the input of the first Concat module of the multi-scale feature fusion network. The output of the first multi-scale cross-level local network of the image feature extraction backbone network is connected to the input of the first stitching module of the multi-scale feature fusion network.

6. The abnormal target detection method for electric robots based on improved YOLOX according to claim 1, characterized in that, The multi-scale cross-level local network MS-CSPNet consists of three parallel paths: the first path is a single 3×3 convolution; the second path is a stacked 3×3 convolution plus BN module plus ReLU module, the output of which is divided into a branch to be merged and a branch to continue convolution; the third path is a ResBlock module containing residual structure.

7. The abnormal target detection method for electric robots based on improved YOLOX according to claim 1, characterized in that, The improved YOLOX models of each electric robot are updated using a federated online incremental learning algorithm, specifically including: Each electric robot uses the improved YOLOX model parameters θ based on its local deployment at the current moment. t-1 Using the newly collected local dataset as the initial value. Perform local incremental training to obtain the improved YOLOX model parameters for local deployment after training, and calculate the local model parameter update gradient: Where, θ t-1 These are the global model parameters for round t-1. Let be the local training dataset for the k-th electric robot in the t-th iteration. The operator that represents the gradient of the model parameters θ. The loss function for the improved YOLOX model, Update the gradient for the model parameters of the k-th electric robot calculated in the t-th iteration; Each electric robot uses a sliding window mechanism to fuse historical model parameters to update gradients, forming a multi-scale weighted gradient: in, Let W be the historical weighted gradient of the k-th electric robot in the t-th iteration, where W is the sliding window length and β∈(0,1) is the historical gradient decay factor. Update the gradient for the model parameters of the k-th electric robot obtained in the ti-th iteration; Each electric robot validates its performance on the local validation set based on historical weighted gradients. To evaluate the effectiveness of the model update, calculate the improvement in validation loss: Where, Δl (k) This represents the improvement in verification loss for the k-th electric robot. An improved YOLOX model representing the local deployment of electric robots is given by parameter θ. t-1 Local validation set The loss value, An improved YOLOX model representing the local deployment of electric robots is presented in terms of parameters. Local validation set The loss value, where η is the local learning rate; The federated server increases the verification loss Δl of each power robot. (k) Calculate the attention weighting coefficient for performance: Where, α k λ represents the model weight of the k-th electric robot in the aggregation process; λ>0 is the temperature adjustment factor of the weight distribution, and K is the total number of electric robots participating in federated training. The federated server aggregates the multi-scale weighted gradients uploaded by each electric robot according to the model weights and updates the global model parameters. The update formula is as follows: i t =θ t-1 -η·G t +μ·(θ t-1 -θ t-2 ) Among them, G t Let θ be the global gradient obtained from the federated aggregation in the t-th iteration. t Here are the global model parameters after the t-th iteration update, and μ is the preset momentum factor; Update the global model parameters θ t The parameters are distributed to all electric robots participating in federated training and used as initial model parameters for the next round of local training, enabling continuous online learning and adaptive model updates.

8. The abnormal target detection method for electric robots based on improved YOLOX according to claim 7, characterized in that, Each electric robot is deployed locally at the current moment using the improved YOLOX model parameters θ. t-1 Using the newly collected local dataset as the initial value. Local incremental training includes: Each power robot performs inspections during each iteration, acquiring real-time images of the power equipment. These images are then normalized and cropped sequentially to form a local training set. local training set The improved YOLOX model, deployed locally on each electric robot, is used for detection, and the detection bounding boxes and category prediction results for abnormal targets are output. The output includes the detection bounding box and category prediction results for the abnormal targets. Manual review is conducted to generate a set of real annotations. According to the prediction results Compared with the real annotation set The improved YOLOX model deployed locally is trained using a loss function, the parameters of the improved YOLOX model deployed locally are updated, and the gradient of the local model parameter update is calculated based on the updated parameters.

9. The abnormal target detection method for electric robots based on improved YOLOX according to claim 7, characterized in that, Each power robot performs inspections at different locations within the substation, and their inspection routes do not overlap. Each power robot has its own local validation set. This includes real-time images of damage collected by the k-th power robot on the power equipment it traverses along its inspection route, along with corresponding manual review and annotations.

10. The method for detecting abnormal targets in an electric robot based on an improved YOLOX according to claim 7, characterized in that, The loss function of the improved YOLOX model is: Where IoU is the model prediction box B pred Compared with the true bounding box B in the true annotation set gt The intersection and union ratio, A r The area(Image) represents the pixel area of ​​the detected image, and the area(B) represents the relative area of ​​the target. gt B represents the ground truth bounding box of the detected image. gt The pixel area is p, which represents the model's confidence score for the category to which the detection box belongs. σ>0 is the exponential penalty factor, and k>0 is the classification decay index.

Citation Information

Patent Citations

  • Deep learning-based abnormal facility detection method and apparatus, and electronic device

    CN118608774A

Cited By

  • Power transmission corridor foreign matter intrusion detection method based on ISD-Net

    CN121459255A