CA-YOLO-based power system personnel abnormal behavior detection method
Through the CA-YOLO method, combined with the fusion of coordinated attention mechanism and multi-scale feature, the abnormal behavior detection problem in complex backgrounds in the power system is solved, and higher detection accuracy and robustness are achieved, especially effective identification of small targets.
Patent Information
- Application Number
- CN202510448633.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-08-22
AI Technical Summary
In the existing power systems, the traditional security system has insufficient feature extraction, high detection rate of small targets and insufficient adaptability to multi-scale dynamic targets in the detection of abnormal behaviors of people under complex backgrounds, resulting in insufficient detection accuracy and robustness, which is difficult to meet the needs of intelligent development.
The CA-YOLO-based personnel abnormal behavior detection method is adopted, and the coordinated optimization architecture that integrates coordinated attention mechanism and multi-scale features is introduced, and the feature extraction capability is improved by using the RFCAConv module, the C3k2-CA module and the CAFusion module, and the EMAM-MPDIoU loss function are used to optimize model training to enhance the detection performance of the model in complex environments.
It improves the detection accuracy and robustness of the model in the power system, especially the recognition ability of small targets, and can extract key features more accurately in multi-scale and multi-view environments, improving the recognition ability and adaptability of abnormal behaviors.
Smart Images

Figure CN120526470A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision and power system security technology, and in particular to a method for detecting abnormal behavior of power system personnel based on CA-YOLO. Background Art
[0002] With the accelerated digitalization of power systems, the deep integration of energy and digital technologies has significantly improved grid operation and maintenance efficiency. However, areas such as power supply security and plant-grid coordinated management and control still face significant challenges. In digital power plants and intelligent inspection scenarios, traditional security systems lack the real-time ability to detect abnormal human behavior. Unexpected dangerous actions such as climbing and overtaking can escalate safety hazards into operational accidents. Existing inspection technologies rely heavily on manual monitoring, resulting in delayed response, high labor costs, and significant risks in high-risk environments. These technologies are unable to meet the demands of intelligent power system development.
[0003] Computer vision-based abnormal behavior detection technology offers a new solution to these problems. Deep learning-based algorithms have achieved breakthroughs in target detection. Neural network models can automatically identify and warn of human behavior, significantly reducing false positives and improving real-time performance. However, existing methods still face significant limitations in complex power scenarios: complex background interference leads to insufficient feature extraction, a high rate of missed detection of small targets, insufficient model adaptability to multi-scale dynamic targets, and inefficient optimization of traditional loss functions. These issues severely restrict detection accuracy and robustness.
[0004] These technical bottlenecks make it difficult to effectively deploy existing detection systems in typical power scenarios, such as substations and transmission corridors. Overcoming interference in complex environments, improving small target detection capabilities, and enhancing the dynamic adaptability of models have become core challenges that must be addressed in achieving intelligent and secure power system operation and maintenance. Summary of the Invention
[0005] Based on the above-mentioned technical issues of insufficient feature extraction due to complex background interference, high small target missed detection rate, insufficient model adaptability to multi-scale dynamic targets, and low efficiency of traditional loss function optimization, a method for detecting abnormal behavior of power system personnel based on CA-YOLO is provided. The present invention mainly utilizes a collaborative optimization architecture that coordinates attention mechanism and multi-scale feature fusion to achieve the technical effects of complex environmental interference, improving small target detection capabilities, and enhancing the dynamic adaptability of the model.
[0006] The technical means adopted in the present invention are as follows:
[0007] A method for detecting abnormal behavior of power system personnel based on CA-YOLO, comprising:
[0008] S1. Collecting images of human behavior in power scenarios to form a dataset, preprocessing the dataset, and dividing the dataset into a training set, a test set, and a validation set;
[0009] Construct a CA-YOLO model, which is improved based on the YOLOv11 model. The CA-YOLO model includes a Backbone part, a Neck part, and a Head part. The CA-YOLO model uses the RFCAConv module to replace the traditional convolutional layer in the YOLOv11 model; the Backbone part uses the C3k2-CA module to replace the traditional C3k2 module in the YOLOv11 model; the Neck part uses the CAFusion module to replace the traditional splicing layer in the YOLOv11 model; the Detect module of the Head part uses the EMAM-MPDIoU loss function;
[0010] S3. Train the CA-YOLO model using the training set and the validation set to obtain a trained CA-YOLO model;
[0011] S4. Use the trained CA-YOLO model to perform personnel behavior detection in the power scenario on the test set to obtain personnel behavior detection results in the power scenario.
[0012] Furthermore, the RFCAConv module includes a connected receptive field attention convolution module and a coordinated attention module,
[0013] The feature processing process in the receptive field attention convolution module is as follows:
[0014] Use grouped convolution to operate on the input features, perform batch normalization and ReLU function operations on the features after operation, and obtain the output features of the receptive field attention convolution module;
[0015] The feature processing process in the coordinated attention module is:
[0016] First, the output features of the receptive field attention convolution module are average pooled along the height and width directions;
[0017] Subsequently, the pooled features along the height direction and the features along the width direction are concatenated to generate concatenated features, which are then passed through a convolutional layer to fuse the feature information and generate a compact intermediate feature map.
[0018] Secondly, the intermediate feature map is divided into two parts along the vertical and horizontal directions, and the feature map along the vertical direction and the feature map along the horizontal direction are convolved respectively. Then, the convolved feature map along the vertical direction and the convolved feature map along the horizontal direction are respectively subjected to the Sigmoid function to generate height attention weight and width attention weight;
[0019] Finally, the output features of the receptive field attention convolution module are multiplied by the height attention weight and the width attention weight respectively to generate optimized features, and the optimized features are convolved to obtain the output features of the coordinated attention module.
[0020] Furthermore, the C3k2-CA module is implemented in the following manner:
[0021] The Bottleneck unit in the traditional C3k2 module is replaced by a Bottleneck-CA unit, which adds a coordinated attention mechanism after the convolutional layer in the traditional Bottleneck unit.
[0022] Furthermore, the workflow of the CAFusion module is as follows:
[0023] First, the shallow input features and the deep input features are fused, and the fused features are sent to the coordinated attention mechanism to calculate the horizontal attention weight and the vertical attention weight:
[0024] Attention h =δ(K h GAP(concat(X,Y))),
[0025] Attention w =δ(K w GAP(concat(X,Y))),
[0026] F att =concat(X,Y)*Attention h *Attention w ,
[0027] Among them, X is the shallow input feature, Y is the deep input feature, K w is the horizontal convolution kernel, K h is the vertical convolution kernel, δ is the Sigmoid activation function, GAP is the average pooling operation, Attention w is the horizontal attention weight, Attention h is the attention weight in the vertical direction, F attis the weighted feature after the coordinated attention mechanism;
[0028] Secondly, the horizontal attention weight and the vertical attention weight are weighted by element-by-element multiplication with the shallow input features and the deep input features respectively, and the weighted features are added to the original features from the other branch to obtain the weighted features after the coordinated attention mechanism. Finally, the weighted features after the coordinated attention mechanism are fused by element-by-element addition to obtain the output features:
[0029] F u =concat((Y+(X*F att )),(X+(Y*F att )),
[0030] Among them, X is the shallow input feature, Y is the deep input feature, and F att is the weighted feature after the coordinated attention mechanism, F u is the output feature.
[0031] Furthermore, the calculation steps of the EMAM-MPDIoU loss function are as follows:
[0032] First, based on the upper left corner coordinates and lower right corner coordinates of the predicted box and the upper left corner coordinates and lower right corner coordinates of the real box, calculate the square of the Euclidean distance between the predicted box and the upper left corner and lower right corner of the real box:
[0033]
[0034] in, is the square of the Euclidean distance between the predicted box and the upper left corner of the true box, is the square of the Euclidean distance between the predicted box and the upper right corner of the true box, is the coordinate of the upper left corner of the prediction box, is the coordinate of the upper right corner of the prediction box, is the coordinate of the upper left corner of the real box, is the coordinate of the upper right corner of the real box, A is the predicted box, and B is the real box;
[0035] Then, MPDIoU is calculated based on the intersection area of the predicted box and the true box, the union area of the predicted box and the true box, the width smoothing coefficient of the input image, the height smoothing coefficient of the input image, the coordinate difference of the upper left corner, and the coordinate difference of the upper right corner:
[0036]
[0037] Among them, A is the predicted box and B is the real box. is the square of the Euclidean distance between the predicted box and the upper left corner of the true box, is the square of the Euclidean distance between the predicted box and the upper right corner of the true box, w is the width smoothing coefficient of the input image, h is the height smoothing coefficient of the input image, and MPDIoU is the bounding box similarity comparison metric based on the minimum point distance;
[0038] Finally, MPDIoU is converted into a bounding box regression loss value, and the bounding box regression loss value is averaged by the exponential moving average method to generate the EMAM-MPDIoU loss value:
[0039] L MPDIoU =1-MPDIoU
[0040] L EMAM-MPDIoU (t)=α*L MPDIoU (t)+(1-α)*L EMAM-MPDIoU (t-1)
[0041] Among them, MPDIoU is the bounding box similarity comparison metric based on the minimum point distance, L MPDIoU is the bounding box regression loss value, L EMAM-MPDIoU is the EMAM-MPDIoU loss value, α is the preset smoothing coefficient, α∈(0,1).
[0042] Furthermore, the step S1 includes the following steps:
[0043] S101, collecting, by crawling, images of human behavior in power scenarios, wherein the images of human behavior in power scenarios include images of illegal climbing over railings, climbing utility poles, and normal behavior;
[0044] S102, using a labeling tool to label the target category and location information of the human behavior image in the power scene to generate a labeled image;
[0045] S103: randomly crop, rotate, and enhance the noise of the image, and divide the enhanced image into a training set, a test set, and a validation set in a ratio of 7:2:1.
[0046] Furthermore, the Backbone part includes a first RFCAConv module, a second RFCAConv module, a first C3k2-CA module, a third RFCAConv module, a second C3k2-CA module, a fourth RFCAConv module, a third C3k2-CA module, an SPPF module and a C2PSA module, which are connected in sequence; wherein, the first C3k2-CA module, the second C3k2-CA module and the C2PSA module output the first feature, the second feature and the third feature respectively.
[0047] Furthermore, the Neck part includes a first Upsample module, a first CAFusion module, a first C3k2 module, a second Upsample module, a second CAFusion module, a second C3k2 module, a fifth RFCAConv module, a third CAFusion module, a third C3k2 module, a sixth RFCAConv module, a fourth CAFusion module and a fourth C3k2 module, which are connected in sequence, and the first C3k2 module and the third CAFusion module are connected; wherein, the input of the second CAFusion module is the first feature output by the first C3k2-CA module, the input of the first CAFusion module is the second feature output by the second C3k2-CA module, and the input of the first Upsample module is the third feature output by the C2PSA module.
[0048] Furthermore, the Head part includes three Detect modules, which respectively receive features output by the second C3k2 module, the third C3k2 module, and the fourth C3k2 module.
[0049] Compared with the prior art, the present invention has the following advantages:
[0050] The improved network of the present invention can capture local features at a finer level, effectively solving the problems of complex power system background, small abnormal personnel targets, and strong dependence on context.
[0051] This invention improves the model's ability to extract underlying features, thereby enhancing its accuracy and robustness in detecting abnormal behavior. This improvement allows the model to more accurately extract key features in multi-scale and multi-view environments, improving its performance in different power scenarios.
[0052] This invention dynamically adjusts the contribution ratio of features from different sources through different weighted fusion methods, improving the interactivity between different features. Especially for small objects, the CAFusion module combines coordinated attention to assign higher response weights to local regions, ensuring that the model can retain the detailed features of small objects and further enhancing the ability to identify abnormal behavior.
[0053] This paper introduces the average moving average (EMAM) model to smooth the MPDIoU loss. By dynamically adjusting the contribution ratio of features from different sources through different weighted fusion methods, it improves the interactivity between different features. Especially for small objects, the CAFusion module combines coordinated attention to assign higher response weights to local regions, ensuring that the model retains the detailed features of small objects and further enhancing the ability to identify abnormal behavior.
[0054] Based on the above reasons, the present invention can be widely promoted in the fields of computer vision and power system security. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0056] Figure 1 This is the CA-YOLO model diagram of the present invention.
[0057] Figure 2 This is the structural diagram of RFCAConv of the present invention.
[0058] Figure 3 This is the C3k2-CA module diagram of the present invention.
[0059] Figure 4 This is the CAFusion module diagram of the present invention.
[0060] Figure 5 This is a mAP accuracy comparison curve diagram in an embodiment of the present invention.
[0061] Figure 6 2 is a comparison chart of target detection results according to an embodiment of the present invention. DETAILED DESCRIPTION
[0062] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0063] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0064] like Figure 1 As shown, the present invention provides a method for detecting abnormal behavior of power system personnel based on CA-YOLO. The overall network structure of CA-YOLO is based on the basic framework of YOLO11, and introduces the RFCAConv module, C3k2-CA module, CAFusion module, and EMAM-MPDIoU loss function to replace the CIOU loss function. Among them, by introducing RFCAConv, the positioning accuracy of key areas is improved and background interference is reduced, especially in the detection of small targets. The improved C3k2 backbone network is combined with the coordinated attention mechanism to achieve dynamic weight adjustment for multi-scale feature extraction. The CAFusion module replaces the traditional Concat to achieve cross-fusion of features at different levels. Finally, the proposed EMAM-MPDIoU loss function smoothes the loss through the exponential moving average module, improving the bounding box positioning accuracy.
[0065] The specific steps of the CA-YOLO-based method for detecting abnormal behavior of power system personnel are as follows:
[0066] S1. Collect images of human behavior in power scenarios to form a dataset, preprocess the dataset, and divide the dataset into training set, test set, and validation set.
[0067] Step S1 includes:
[0068] S101. Collecting images of human behavior in power scenarios through a crawler. The images of human behavior in power scenarios include images of illegally climbing over railings, climbing utility poles, and normal behavior.
[0069] S102: Use a labeling tool to label the target category and location information of the human behavior image in the power scene to generate a labeled image.
[0070] S103: randomly crop, rotate, and enhance the noise of the image, and divide the enhanced image into a training set, a test set, and a validation set in a ratio of 7:2:1.
[0071] Furthermore, the present invention selected a mixed dataset of three types of behaviors: climbing, clambering, and normal. The original images contained approximately 1,500 images, including a large number of overlapping and occluded target images. The dataset was randomly divided into training, validation, and test sets in a ratio of 7:1:2.
[0072] Use the Make Sense tool to annotate the original dataset images. By drawing bounding rectangles within the images, we can label different types of behaviors. The annotations include the category and location of the anomalous behavior targets. The location information includes the width, height, and horizontal and vertical coordinates of the center point of the rectangle. The annotated data is saved as a txt file for easier training.
[0073] In order to improve the quality of the dataset samples, make them applicable to various scenarios, and prevent overfitting, data augmentation is performed on the training set. Before training, the images are randomly cropped, rotated, and subjected to noise.
[0074] S2. Construct a CA-YOLO model. The CA-YOLO model is improved based on the YOLOv11 model. The CA-YOLO model includes Backbone, Neck and Head parts. The CA-YOLO model uses the RFCAConv module to replace the traditional convolutional layer in the YOLOv11 model; the Backbone part uses the C3k2-CA module to replace the traditional C3k2 module in the YOLOv11 model; the Neck part uses the CAFusion module to replace the traditional splicing layer in the YOLOv11 model; the Head part uses the EMAM-MPDIoU loss function to replace the original CIOU loss function in the YOLOv11 model.
[0075] The structure diagram of the RFCAConv module is as follows Figure 2 As shown in Figure 3, the RFCAConv module consists of a connected receptive field attention convolution module and a coordinated attention module.
[0076] The feature processing process in the receptive field attention convolution module is:
[0077] Using grouped convolution to compute input features, we spatially expand each input channel to expand the receptive field, enhancing feature extraction while reducing the number of parameters. Batch normalization and ReLU operations are performed on the computed features to enhance the model's nonlinearity, resulting in the output features of the receptive field-attention convolution module.
[0078] The feature processing process in the coordinated attention module is:
[0079] First, the output features of the receptive field attention convolution module are average pooled along the height and width directions.
[0080] Subsequently, the pooled features along the height direction and the features along the width direction are concatenated to generate concatenated features, which are then passed through a 1×1 convolutional layer to fuse the feature information and generate a compact intermediate feature map.
[0081] Secondly, the intermediate feature map is divided into two parts along the vertical and horizontal directions, and the feature map along the vertical direction and the feature map along the horizontal direction are convolved respectively. Then, the convolved feature map along the vertical direction and the convolved feature map along the horizontal direction are passed through the Sigmoid function respectively to generate height attention weight and width attention weight.
[0082] Finally, the output features of the receptive field attention convolution module are multiplied by the height attention weight and the width attention weight respectively to highlight the key features of the important area and generate optimized features. The optimized features are subjected to a convolution operation with a step size of K. While reducing parameter sharing, the local features within the receptive field are ensured to be efficiently aggregated to obtain the output features of the coordinated attention module.
[0083] C3k2-CA module such as Figure 3 As shown in Figure 2, the Bottleneck unit in the traditional C3k2 module is replaced with a Bottleneck-CA unit. The C3k2-CA module consists of two convolutional layers and n series-connected Bottleneck-CA units. Each Bottleneck-CA unit incorporates a coordinated attention mechanism after the convolutional layer in the traditional bottleneck structure.
[0084] Figure 4 The structural diagram of the CAFusion module used for multi-level and multi-scale feature fusion.
[0085] First, shallow and deep input features are fused to achieve complementarity between local details and global information. The fused features are fed into a coordinated attention mechanism to further enhance the model's spatial information modeling capabilities. Horizontal and vertical attention weights are calculated, enabling the model to more accurately perceive the target's spatial location information. The calculation formulas for horizontal and vertical attention weights are as follows:
[0086] Attention h =δ(K h GAP(concat(X,Y))),
[0087] Attention w =δ(K w GAP(concat(X,Y))),
[0088] F att =concat(X,Y)*Attention h *Attention w ,
[0089] Among them, X is the shallow input feature, Y is the deep input feature, K w is the horizontal convolution kernel, K h is the vertical convolution kernel, δ is the Sigmoid activation function, GAP is the average pooling operation, Attention w is the horizontal attention weight, Attention h is the attention weight in the vertical direction, Fatt is the weighted feature after the coordinated attention mechanism.
[0090] Secondly, the horizontal attention weight and the vertical attention weight are weighted by element-by-element multiplication with the shallow input features and the deep input features respectively to strengthen the feature expression of the salient area, and the weighted features are added to the original features from the other branch to increase the interaction of each other's information and obtain the weighted features after the coordinated attention mechanism. Finally, the weighted features after the coordinated attention mechanism are fused by element-by-element addition to obtain the output features:
[0091] F u =concat((Y+(X*F att )),(X+(Y*F att )),
[0092] Among them, X is the shallow input feature, Y is the deep input feature, and F att is the weighted feature after the coordinated attention mechanism, F u is the output feature.
[0093] This paper proposes the EMAM-MPDIoU loss function, which effectively solves the problem of CIoU's lack of sensitivity when dealing with the aspect ratio similarity between the predicted box and the ground-truth box, improves the bounding box positioning accuracy, and significantly improves the detection performance of the model. The calculation steps of the EMAM-MPDIoU loss function are as follows:
[0094] First, based on the upper left corner coordinates and lower right corner coordinates of the predicted box and the upper left corner coordinates and lower right corner coordinates of the real box, calculate the square of the Euclidean distance between the predicted box and the upper left corner and lower right corner of the real box:
[0095]
[0096] in, is the square of the Euclidean distance between the predicted box and the upper left corner of the true box, is the square of the Euclidean distance between the predicted box and the upper right corner of the true box, is the coordinate of the upper left corner of the prediction box, is the coordinate of the upper right corner of the prediction box, is the coordinate of the upper left corner of the real box, is the coordinate of the upper right corner of the real box, A is the predicted box, and B is the real box.
[0097] Then, MPDIoU is calculated based on the intersection area of the predicted box and the true box, the union area of the predicted box and the true box, the width smoothing coefficient of the input image, the height smoothing coefficient of the input image, the coordinate difference of the upper left corner, and the coordinate difference of the upper right corner.
[0098]
[0099] Among them, A is the predicted box and B is the real box. is the square of the Euclidean distance between the predicted box and the upper left corner of the true box, is the square of the Euclidean distance between the predicted box and the upper right corner of the true box, w is the width smoothing coefficient of the input image, h is the height smoothing coefficient of the input image, and MPKIoU is the bounding box similarity comparison metric based on the minimum point distance;
[0100] Finally, MPDIoU is converted into a bounding box regression loss value, and the bounding box regression loss value is averaged by the exponential moving average method to generate the EMAM-MPDIoU loss value:
[0101] L MPDIoU =1-MPDIoU
[0102] L EMAM-MPDIoU (t)=α*L MPDIoU (t)+(1-α)*L EMAM-MPDIoU (t-1)
[0103] Among them, MPDIoU is the bounding box similarity comparison metric based on the minimum point distance, L MPDIoU is the bounding box regression loss value, L EMAM-MPDIoU is the EMAM-MPDIoU loss value, α is the preset smoothing coefficient, α∈(0,1).
[0104] S3. Use the training set and validation set to train the CA-YOLO model to obtain a trained CA-YOLO model.
[0105] The training parameters for the network model were set as follows: Experiments were conducted on a 64-bit Windows 11 operating system, using a 13th Gen Intel(R) Core(TM) i7-13700H 2.40GHz CPU, an NVIDIA GeForce RTX 4060 Laptop GPU, CUDA version 12.4, and PyTorch version 2.3.0. The specific experimental parameters are shown in the table, with an initial learning rate of 0.01, a batch size of 16, 250 epochs, and an input image resolution of 640×640.
[0106] The CA-YOLO network model was trained for 250 rounds. To avoid overfitting and underfitting, evaluation and verification were performed on the validation set after each round of training. Figure 5The following are the loss curves for the training and validation sets. During the first 25 epochs of training, the training loss rapidly decreases. After around 150 epochs, the training loss gradually stabilizes. The convergence of the loss on the training and validation sets is satisfactory, meeting the test requirements. Therefore, the optimal model output after 150 epochs is selected as the final pre-trained model.
[0107] S4. Use the trained CA-YOLO model to detect human behavior in power scenarios on the test set to obtain the human behavior detection results in power scenarios.
[0108] The present invention uses mean average precision (mAP), mAP@0.5:0.95, precision (Precision) and recall (Recall) as evaluation indicators for the accuracy of detecting abnormal behavior of power system personnel. The calculation formula of mean average precision (mAP) is as follows:
[0109]
[0110]
[0111] In the formula, TP represents the number of correctly detected samples, FP represents the number of falsely detected samples, FN represents the number of missed samples, AP is the precision for a single class, and mAP is the average precision for all classes. mAP@0.5 calculates the mean AP for each class when the IoU threshold in the confusion matrix is 0.5. mAP@0.5:0.95 represents the mean AP when the IoU varies between 0.50 and 0.95, with a step size of 0.05.
[0112] The network architecture involved in the present invention is specifically:
[0113] The Backbone part includes a first RFCAConv module, a second RFCAConv module, a first C3k2-CA module, a third RFCAConv module, a second C3k2-CA module, a fourth RFCAConv module, a third C3k2-CA module, an SPPF module and a C2PSA module connected in sequence; among them, the first C3k2-CA module, the second C3k2-CA module and the C2PSA module output the first feature, the second feature and the third feature respectively.
[0114] The Neck part includes a first Upsample module, a first CAFusion module, a first C3k2 module, a second Upsample module, a second CAFusion module, a second C3k2 module, a fifth RFCAConv module, a third CAFusion module, a third C3k2 module, a sixth RFCAConv module, a fourth CAFusion module and a fourth C3k2 module, which are connected in sequence. The first C3k2 module and the third CAFusion module are connected; wherein, the input of the second CAFusion module is the first feature output by the first C3k2-CA module, the input of the first CAFusion module is the second feature output by the second C3k2-CA module, and the input of the first Upsample module is the third feature output by the C2PSA module.
[0115] The Head part includes three Detect modules, which receive the features output by the second C3k2 module, the third C3k2 module, and the fourth C3k2 module respectively.
[0116] Input the test set into the trained CA-YOLO model to verify the test effect:
[0117] (1) Verification of recognition performance of network model
[0118] To verify the performance improvements brought by CA-YOLO's improved modules compared to YOLO11, we modified the original YOLO model in sequence: introducing the RFCAConv module to replace traditional convolution, proposing the C3k2-CA module, introducing the CAFusion module to replace the Concat module, and introducing the EMAM-MPDIoU loss function to replace the CIOU loss function. We primarily compared the changes in average mean average precision (mAP), precision, recall, and the number of model parameters.
[0119] Table 1 shows the object detection performance analysis. As shown in Table 1, compared to YOLO11, the introduction of RFCAConv increases the model's mAP@0.5 by 0.8% and mAP@0.5:0.95 by 3.1%, while only slightly increasing the model parameters. The simultaneous introduction of RFCAConv convolution and CAFusion further enhances the model's detection performance, with mAP@0.5 increasing by 1.2% and mAP@0.5:0.95 by 0.5%. Furthermore, the introduction of C3k2-CA further improves model performance, with mAP@0.5 increasing by 0.3% and mAP@0.5:0.95 by 0.6%. Furthermore, replacing the original CIOU loss function with the EMAM-MPDIoU loss function further enhances the model's detection capabilities and improves its performance. Compared with the original YOLO11 model, the improved model improves mAP@0.5 and mAP@0.5:0.95 by 3% and 7% respectively. Although there is a small increase in the number of parameters, it has almost no impact on the detection speed.
[0120] Table 1 Target detection performance analysis
[0121]
[0122] (2) Comprehensive performance verification of different detection methods
[0123] To further validate the comprehensive performance of the proposed CA-YOLO model for detecting abnormal behavior in power system personnel, we conducted a performance comparison test between CA-YOLO and currently mainstream object detection networks. All experiments used identical hardware and hyperparameters. Model performance was evaluated using mAP@0.5, mAP@0.5:0.95, precision, and accuracy. After training, we compared YOLOv5, YOLOv7, YOLOv8, YOLOv9, and YOLO11 networks on the test set. The test results are shown in Table 2.
[0124] Table 2 Comprehensive performance comparison with other networks
[0125]
[0126] Specifically, compared to the baseline model YOLO11, CA-YOLO improved the mAP indicator by 3% and the mAP@0.5:0.95 indicator by 7%. At the same time, the precision (Precision) increased by 3.2% and the recall rate (Recall) increased by 3%. In addition, compared with the widely used algorithms such as YOLOv7, YOLOv8 and YOLOv9, CA-YOLO also achieved a relatively obvious performance advantage. Combined with the mAP accuracy curve comparison of YOLO11 and CA-YOLO, as shown in the figure Figure 6 As shown in the figure, the effectiveness of the proposed improvement strategy is fully demonstrated.
[0127] In summary, through two sets of experiments, it can be concluded that the CA-YOLO abnormal behavior detection method proposed in this paper is superior to other mainstream target detection algorithms.
[0128] The beneficial effects of the present invention are as follows: a data set of abnormal behavior of the power system is constructed, and multi-strategy data enhancement is adopted to improve scenario adaptability; the RFCAConv module is proposed to replace the standard convolution, and through parameter sharing and coordinated attention mechanism, attention is focused on channels, space and receptive fields, and key feature areas are accurately focused; the coordinated attention mechanism is embedded in the backbone network C3k2 module to realize dynamic calibration of feature weights, enhance the efficiency of multi-scale feature extraction, and improve the model adaptability under complex working conditions; the CAFusion module is designed to replace the Contact fusion layer, and the collaborative representation of shallow details and deep semantics is optimized through cross-layer feature interaction guided by coordinated attention; the EMAM-MPDIoU loss function is designed to effectively solve the problem of insufficient sensitivity of CIoU when processing aspect ratio similarity, and significantly improve the detection performance of the model; the CA-YOLO model is evaluated using evaluation indicators; and the test set is input into the trained CA-YOLO model to detect whether there is any abnormal behavior.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting abnormal behavior of power system personnel based on CA-YOLO, characterized in that: include: S1. Collecting images of human behavior in power scenarios to form a dataset, preprocessing the dataset, and dividing the dataset into a training set, a test set, and a validation set; S2. Construct a CA-YOLO model. The CA-YOLO model is improved based on the YOLOv11 model. The CA-YOLO model includes a Backbone part, a Neck part, and a Head part. The CA-YOLO model uses the RFCAConv module to replace the traditional convolutional layer in the YOLOv11 model; the Backbone part uses the C3k2-CA module to replace the traditional C3k2 module in the YOLOv11 model; the Neck part uses the CAFusion module to replace the traditional splicing layer in the YOLOv11 model; the Detect module of the Head part uses the EMAM-MPDIoU loss function; S3. Train the CA-YOLO model using the training set and the validation set to obtain a trained CA-YOLO model; S4. Use the trained CA-YOLO model to perform personnel behavior detection in the power scenario on the test set to obtain personnel behavior detection results in the power scenario.
2. The method for detecting abnormal behavior of power system personnel based on CA-YOLO according to claim 1 is characterized in that: The RFCAConv module includes a connected receptive field attention convolution module and a coordinated attention module. The feature processing process in the receptive field attention convolution module is as follows: Use grouped convolution to operate on the input features, perform batch normalization and ReLU function operations on the features after operation, and obtain the output features of the receptive field attention convolution module; The feature processing process in the coordinated attention module is: First, the output features of the receptive field attention convolution module are average pooled along the height and width directions; Subsequently, the pooled features along the height direction and the features along the width direction are concatenated to generate concatenated features, which are then passed through a convolutional layer to fuse the feature information and generate a compact intermediate feature map. Secondly, the intermediate feature map is divided into two parts along the vertical and horizontal directions, and the feature map along the vertical direction and the feature map along the horizontal direction are convolved respectively. Then, the convolved feature map along the vertical direction and the convolved feature map along the horizontal direction are respectively subjected to the Sigmoid function to generate height attention weight and width attention weight; Finally, the output features of the receptive field attention convolution module are multiplied by the height attention weight and the width attention weight respectively to generate optimized features, and the optimized features are convolved to obtain the output features of the coordinated attention module.
3. The method for detecting abnormal behavior of power system personnel based on CA-YOLO according to claim 1, characterized in that: The C3k2-CA module is implemented in the following ways: The Bottleneck unit in the traditional C3k2 module is replaced by a Bottleneck-CA unit, which adds a coordinated attention mechanism after the convolutional layer in the traditional Bottleneck unit.
4. The method for detecting abnormal behavior of power system personnel based on CA-YOLO according to claim 1, characterized in that: The workflow of the CAFusion module is as follows: First, the shallow input features and the deep input features are fused, and the fused features are sent to the coordinated attention mechanism to calculate the horizontal attention weight and the vertical attention weight: Attention h =δ(K h GAP(concat(X,Y))), Attention w =δ(K w GAP(concat(X,Y))), F att =concat(X,Y)*Attention n h*Attention w , Among them, X is the shallow input feature, Y is the deep input feature, K w is the horizontal convolution kernel, K h is the vertical convolution kernel, δ is the Sigmoid activation function, GAP is the average pooling operation, Attention w is the horizontal attention weight, Attention h is the attention weight in the vertical direction, F att is the weighted feature after the coordinated attention mechanism; Secondly, the horizontal attention weight and the vertical attention weight are weighted by element-by-element multiplication with the shallow input features and the deep input features respectively, and the weighted features are added to the original features from the other branch to obtain the weighted features after the coordinated attention mechanism. Finally, the weighted features after the coordinated attention mechanism are fused by element-by-element addition to obtain the output features: F u =concat((Y+(X*F att )),(X+(Y*F att )), Among them, X is the shallow input feature, Y is the deep input feature, and F att is the weighted feature after the coordinated attention mechanism, F u is the output feature.
5. The method for detecting abnormal behavior of power system personnel based on CA-YOLO according to claim 1, characterized in that: The calculation steps of the EMAM-MPDIoU loss function are as follows: First, based on the upper left corner coordinates and lower right corner coordinates of the predicted box and the upper left corner coordinates and lower right corner coordinates of the real box, calculate the square of the Euclidean distance between the predicted box and the upper left corner and lower right corner of the real box: in, is the square of the Euclidean distance between the predicted box and the upper left corner of the true box, is the square of the Euclidean distance between the predicted box and the upper right corner of the true box, is the coordinate of the upper left corner of the prediction box, is the coordinate of the upper right corner of the prediction box, is the coordinate of the upper left corner of the real box, is the coordinate of the upper right corner of the real box, A is the predicted box, and B is the real box; Then, MPDIoU is calculated based on the intersection area of the predicted box and the true box, the union area of the predicted box and the true box, the width smoothing coefficient of the input image, the height smoothing coefficient of the input image, the coordinate difference of the upper left corner, and the coordinate difference of the upper right corner: Among them, A is the predicted box, B is the real box, is the square of the Euclidean distance between the predicted box and the upper left corner of the true box, is the square of the Euclidean distance between the predicted box and the upper right corner of the true box, w is the width smoothing coefficient of the input image, h is the height smoothing coefficient of the input image, and MPDIoU is the bounding box similarity comparison metric based on the minimum point distance; Finally, MPDIoU is converted into a bounding box regression loss value, and the bounding box regression loss value is averaged by the exponential moving average method to generate the EMAM-MPDIoU loss value: L MPDIoU =1-MPDIoU L EMAM-MPDIoU (t)=α*L MPDIoU (t)+(1-α)*L EMAM-MPDIoU (t-1) Among them, MPDIoU is the bounding box similarity comparison metric based on the minimum point distance, L MPDIoU is the bounding box regression loss value, L EMAM-MPDIoU is the EMAM-MPDIoU loss value, α is the preset smoothing coefficient, α∈(0,1).
6. The method for detecting abnormal behavior of power system personnel based on CA-YOLO according to claim 1, characterized in that: The step S1 comprises the following steps: S101, collecting, by crawling, images of human behavior in power scenarios, wherein the images of human behavior in power scenarios include images of illegal climbing over railings, climbing utility poles, and normal behavior; S102, using a labeling tool to label the target category and location information of the human behavior image in the power scene to generate a labeled image; S103: randomly crop, rotate, and enhance the noise of the image, and divide the enhanced image into a training set, a test set, and a validation set in a ratio of 7:2:
1.
7. The method for detecting abnormal behavior of power system personnel based on CA-YOLO according to claim 1, characterized in that: The Backbone part includes a first RFCAConv module, a second RFCAConv module, a first C3k2-CA module, a third RFCAConv module, a second C3k2-CA module, a fourth RFCAConv module, a third C3k2-CA module, an SPPF module and a C2PSA module connected in sequence; wherein, the first C3k2-CA module, the second C3k2-CA module and the C2PSA module output the first feature, the second feature and the third feature respectively.
8. The method for detecting abnormal behavior of power system personnel based on CA-YOLO according to claim 1, characterized in that: The Neck part includes a first Upsample module, a first CAFusion module, a first C3k2 module, a second Upsample module, a second CAFusion module, a second C3k2 module, a fifth RFCAConv module, a third CAFusion module, a third C3k2 module, a sixth RFCAConv module, a fourth CAFusion module and a fourth C3k2 module, which are connected in sequence, and the first C3k2 module and the third CAFusion module are connected; wherein, the input of the second CAFusion module is the first feature output by the first C3k2-CA module, the input of the first CAFusion module is the second feature output by the second C3k2-CA module, and the input of the first Upsample module is the third feature output by the C2PSA module.
9. The method for detecting abnormal behavior of power system personnel based on CA-YOLO according to claim 1, characterized in that: The Head part includes three Detect modules, which respectively receive features output by the second C3k2 module, the third C3k2 module, and the fourth C3k2 module.
Citation Information
Cited By
Muscle segmentation method based on state space model and boundary perception attention
CN121213594A
Steel surface defect detection method and system based on RDDW-YOLO
CN121236059A