A lightweight target detection method and device for a power operation scene

By making lightweight improvements to the YOLOv8 model and distilling multi-level distributed perception knowledge, the real-time performance and accuracy issues of target detection models in power operation scenarios were resolved, enabling efficient and accurate detection under UAV high-altitude inspection.

CN122289664APending Publication Date: 2026-06-26SUYUAN GROUP HUAIAN +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUYUAN GROUP HUAIAN
Filing Date
2026-04-21
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In power line inspection and operation monitoring scenarios, existing deep learning-based target detection models are difficult to achieve real-time and accurate target detection of personnel and their safety equipment from the perspective of UAV high-altitude inspection due to their large parameter scale and high computational complexity. In particular, they are prone to false detection and missed detection in complex backgrounds.

Method used

A lightweight improved YOLOv8 model was adopted, introducing the SPD-Conv and C2f-PA modules, combined with the GhostConv detection head, and constructed through a multi-level distributed perception knowledge distillation strategy to enhance the detection capability of workers and their associated safety equipment.

Benefits of technology

While ensuring detection accuracy, the number of model parameters and computational complexity have been reduced, improving the stability and adaptability of detection, enabling real-time target detection on resource-constrained edge devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122289664A_ABST
    Figure CN122289664A_ABST
Patent Text Reader

Abstract

This invention discloses a lightweight target detection method and device for power operation scenarios, belonging to the field of computer vision and target detection technology. Addressing the challenges of small-scale targets, complex backgrounds, and limited computing power of edge devices in power inspection scenarios, this invention proposes a lightweight detection model based on YOLOv8. The method introduces an SPD-Conv module into the backbone network to reduce downsampling information loss, and a C2f-PA module (containing PConv and the dependency fusion module ARFM) into the neck network to enhance the expression of relationships between the main target (worker) and its associated fine-grained targets. GhostConv is also introduced into the detection head to reduce computational overhead. Simultaneously, a multi-level distributed perception knowledge distillation framework is constructed to distill and train the student model. This method improves the detection accuracy for small and fine-grained targets while reducing the number of model parameters and computational complexity, making it suitable for real-time detection of UAV-borne platforms and other resource-constrained edge devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision and target detection technology, specifically relating to a lightweight target detection method and device for power operation scenarios. Background Technology

[0002] In power line inspection and operation monitoring scenarios, using drones or edge computing devices to perform real-time and accurate target detection of workers and their safety equipment (such as safety belts, armbands, and gloves) is of great significance for ensuring operation safety and improving inspection efficiency.

[0003] In recent years, deep learning-based target detection algorithms, especially the YOLO series, have demonstrated excellent detection performance in unstructured environments. However, these high-performance models generally suffer from large parameter sizes, high computational complexity, and high inference resource consumption. From the perspective of UAV high-altitude inspections, personnel and their key safety markers are typically small in scale, scattered in distribution, have complex backgrounds, and are frequently obscured, making their effective features easily weakened during downsampling. The limited computing power of edge devices makes it difficult to directly deploy standard target detection models to meet the application requirements of real-time early warning and online detection.

[0004] Therefore, how to achieve model lightweighting while ensuring detection accuracy, so that it can be efficiently deployed on resource-constrained edge devices, has become a core problem that urgently needs to be solved in the target detection task of current power operation scenarios. Summary of the Invention

[0005] To overcome the shortcomings of existing technologies, this invention provides a lightweight target detection method and device for power operation scenarios. It involves lightweight reconstruction of the YOLOv8 model, introducing an SPD-Conv module into the backbone network, and introducing a C2f-PA module containing an attachment-relation fusion module (ARFM) in the neck feature fusion stage. Combined with a GhostConv detection head and a multi-level distributed perception knowledge distillation strategy, the method enhances the model's ability to detect personnel and their associated safety equipment, balancing model accuracy, real-time performance, and deployment applicability.

[0006] The technical solution adopted by this invention to solve its technical problem is as follows: This invention discloses a lightweight target detection method for power operation scenarios, comprising the following steps:

[0007] S1: Acquire image data of power operation scenarios, perform preprocessing and data augmentation, and construct a dataset;

[0008] S2: Build a lightweight object detection model YOLO-SPAG. The lightweight object detection model YOLO-SPAG is based on YOLOv8. In the feature fusion stage of the neck network, the C2f module is replaced with the C2f-PA module. The C2f-PA module uses PA Block as the basic unit.

[0009] S3: Construct a multi-level distributed perceptual knowledge distillation framework, using YOLOv8s as the teacher model and YOLO-SPAG as the student model, and use the dataset to perform distillation training to obtain a trained student model.

[0010] S4: Use the trained student model to perform real-time target detection on the input power operation image and output the detection results.

[0011] Furthermore, the construction of the YOLO-SPAG model in step S2 specifically includes:

[0012] The C2f-PA module replaces the traditional Bottleneck module with PA Block as the basic unit. The PABlock is composed of PConv, convolutional layers, and the dependency fusion module ARFM in series. PConv is used to reduce redundant computational overhead, and the ARFM module is used to model the spatial relationship between the operator and the fine-grained targets attached to it. The enhanced features output by the ARFM module are residually fused with the input features to obtain the final output of the PA Block.

[0013] Furthermore, the ARFM module includes a subject perception branch, a detail candidate branch, a relation guidance branch, and a relation fusion unit. The subject perception branch generates a response map of the worker subject to represent the main distribution area of ​​the worker subject in the feature map. The detail candidate branch extracts local texture, edge, and candidate response features of fine-grained subordinate targets. The relation guidance branch expands and maps the subject response area to construct a reasonable candidate distribution range of subordinate targets relative to the subject. The relation fusion unit fuses the subject response information with the relation guidance information to form dependency constraint weights, performs element-wise modulation enhancement on the detail candidate features, and finally performs residual fusion with the input features for output.

[0014] Furthermore, the subject perception branch through Convolution and Convolution generates the main response map This is used to characterize the main distribution area of ​​the workers in the current feature map; the detailed candidate branches are obtained through... Convolution, depthwise separable Convolution, depthwise separable Convolution, normalization, and activation operations are used to extract fine-grained target candidate features. The relationship-guided branch expands the region based on the main response map to obtain candidate regions of the main neighborhood, and then generates a relationship graph through convolutional mapping and sigmoid activation. This is used to characterize the reasonable distribution range of subordinate targets relative to the main body; the main body response map... Relationship diagram Input relationship fusion unit to generate dependency constraint weights ;Utilizing dependency constraint weights For detailed candidate features Element-by-element modulation enhancement is performed.

[0015] Furthermore, the lightweight target detection model Yolo-SPAG also introduces the SPD-Conv module at key downsampling locations in the backbone network to construct a lossless downsampling link; the SPD-Conv module rearranges spatial information to the channel dimension through spatial-to-channel transformation, and then connects to a convolutional layer with a stride of 1 for channel fusion.

[0016] Furthermore, the SPD-Conv module is specifically as follows:

[0017] Set the downsampling factor scale=2 for the input features Figure X Slicing yields four sub-feature maps:

[0018] ;

[0019] Each row contains all pixel information from the original feature map, including even rows and even columns, odd rows and even columns, even rows and odd columns, and odd rows and odd columns.

[0020] These four sub-feature maps are concatenated along the channel dimension to obtain the intermediate feature map. Its size becomes ; A standard convolutional layer with a stride of 1 is applied after the SPD layer to map the concatenated high-dimensional features and output the final feature map. Its size is .

[0021] Furthermore, the lightweight target detection model Yolo-SPAG replaces the standard convolution in the detection head with GhostConv modules to construct a lightweight, decoupled detection head based on GhostConv, utilizing the characteristic of GhostConv to generate redundant features through linear transformation.

[0022] Furthermore, the multi-level distributed perception knowledge distillation framework specifically includes:

[0023] Categorical distribution distillation: KL divergence is used to constrain the classification branch outputs for students and teachers. The loss function is defined as: ;

[0024] in, This represents the softmax function. express Divergence; This represents the logits output of the teacher model's classification branch. The logits represent the output of the student model's classification branch; a temperature coefficient T is introduced to smooth the probability distribution of the teacher's output appropriately.

[0025] Multi-scale feature distillation: Feature distillation is performed on the P3, P4, and P5 feature maps output by Neck, and additional features are added after the student features. Convolutional alignment layer, let the first... Teacher characteristics at each scale Student characteristics are Channel alignment mapping is The multi-scale feature distillation loss is expressed as mapping student features to the same channel dimension as teacher features, and the loss function is defined as:

[0026] ;

[0027] Joint training: The total loss function is ,in The original detection loss for the student model consists of bounding box regression loss, classification loss, and DFL loss. and This represents the weights of categorical distribution distillation and multi-scale feature distillation.

[0028] Furthermore, the distillation training of the multi-level distributed perceptual knowledge distillation framework is divided into three stages:

[0029] First, train the teacher model YOLOv8s separately to obtain high-precision teacher weights;

[0030] Secondly, the teacher model parameters were frozen, and the student model YOLO-SPEG was trained using real label supervision and distillation loss.

[0031] Finally, during the later stages of training, the distillation term was turned off, and only the original detection loss was retained to fine-tune the student model for several rounds.

[0032] The present invention also discloses a lightweight target detection device for power operation scenarios, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed, it causes the processor to implement the steps in the lightweight target detection method for power operation scenarios as described above.

[0033] The beneficial effects of this invention are as follows:

[0034] 1. This invention achieves a good balance between lightweight design and detection performance. By making lightweight improvements to the backbone network, neck network, and detection head of YOLOv8, and introducing structures such as SPD-Conv, C2f-PA, and GhostConv into the network, the number of model parameters and computational complexity are reduced. At the same time, a multi-level distributed perceptual knowledge distillation strategy is combined to compensate for the decrease in feature representation ability caused by lightweighting, thereby maintaining good detection accuracy while ensuring the model's lightweight design.

[0035] 2. This invention enhances the stability and reliability of detection results under complex background conditions. Addressing the problem of complex background textures and numerous spurious responses in power operation scenarios involving tower components, conductors, vegetation, etc., ARFM can leverage the spatial attachment relationship between the worker and surrounding targets to enhance the response to the real target and suppress irrelevant background areas, thereby reducing false detections and missed detections and improving the model's adaptability in complex environments. Attached Figure Description

[0036] Figure 1 This is a schematic diagram of the overall process of the method of the present invention.

[0037] Figure 2 This is a network structure diagram of the Yolo-SPEG model in this invention.

[0038] Figure 3 This is a schematic diagram of the SPD-Conv module in this invention.

[0039] Figure 4 This is a comparison diagram of the principles of conventional Conv(a) and PConv(b) in this invention.

[0040] Figure 5 This is a schematic diagram of the ARFM module and C2f-PA module in this invention.

[0041] Figure 6 This is a schematic diagram of the Ghost convolution structure in this invention.

[0042] Figure 7 This is a schematic diagram of the lightweight detection head structure based on GhostConv in this invention.

[0043] Figure 8 A schematic diagram illustrating the principle of knowledge distillation in the invention.

[0044] Figure 9 Example diagram of dataset labels in an embodiment of the invention.

[0045] Figure 10 Comparison chart of accuracy indicators of different models in the embodiments of the invention.

[0046] Figure 11 Radar chart comparing the lightweight performance of different models in the embodiments of the invention.

[0047] Figure 12 A visualization comparison of the detection results of the Yolo-SPEG-D model with other models in the embodiments of the invention.

[0048] Figure 13 The detection results of the Yolo-SPEG-D model deployed on an edge device in an embodiment of the invention are shown in the figure. Detailed Implementation

[0049] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.

[0050] like Figure 1 As shown in the figure, this invention discloses a lightweight target detection method for power operation scenarios, including the following steps:

[0051] S1: Acquire image data of power operation scenarios and construct a dataset.

[0052] In this embodiment, the dataset was partly obtained from web crawling and partly from publicly available data from the Tianchi Lake of Guangdong Southern Power Grid. More than 6,000 images were collected. After manual screening to remove blurry, duplicate, and poorly labeled samples, approximately 4,000 high-quality images were ultimately retained as experimental data.

[0053] The dataset mainly includes categories such as ground operations, high-altitude operations, workers, safety belts, armbands, and gloves. It is characterized by large changes in perspective, significant differences in target scale, and complex backgrounds, and can well reflect the detection challenges in real power line inspection scenarios. Figure 9 Examples of labels from the dataset are shown.

[0054] S2: Build a lightweight object detection model, YOLO-SPAG, based on YOLOv8.

[0055] Reference Figure 2 The YOLO-SPAG model is a lightweight reconstruction based on YOLOv8, mainly including the following improvements:

[0056] A1: Introducing a lossless downsampling network using SPD-Conv;

[0057] To address the issue of small target information loss during downsampling caused by traditional stride convolution, this embodiment introduces an SPD-Conv module at key downsampling locations in the backbone network.

[0058] Reference Figure 3 Its operation includes:

[0059] B1: Set the downsampling factor scale=2 for the input features. Figure X Slicing yields four sub-feature maps:

[0060]

[0061] Each row contains all pixel information from the original feature map, including even rows and even columns, odd rows and even columns, even rows and odd columns, and odd rows and odd columns.

[0062] B2: Concatenate these four sub-feature maps along the channel dimension to obtain the intermediate feature map. Its size becomes .

[0063] B3: After the SPD layer, a standard convolutional layer with a stride of 1 is added to map the concatenated high-dimensional features and output the final feature map. Its size is This convolutional layer integrates information only in the channel dimension and does not perform stride downsampling, thus completing feature fusion while preserving as much discriminative information as possible.

[0064] A2: Design a lightweight feature enhancement module C2f-PA based on PConv and ARFM;

[0065] To enhance the representation of workers and their associated safety equipment while reducing computational overhead in the feature fusion stage, this embodiment introduces a C2f-PA module based on PConv and ARFM at certain locations in the neck network. The C2f-PA module uses PA Blocks as its basic units, each consisting of PConv, convolutional layers, and ARFM modules. PConv reduces redundant computational overhead, while ARFM models the spatial relationships between the worker and the fine-grained targets attached to them, thereby enhancing the model's ability to recognize associated targets such as safety belts, armbands, and gloves.

[0066] The FasterNet network employs a hierarchical pyramid structure, and its efficiency primarily stems from partial convolutions (PConv). (See reference...) Figure 4PConv performs spatial convolution only on the first 1 / 4 (or a specific proportion) of the continuous channels of the input feature map, keeping the remaining channels unchanged, which significantly reduces computational cost and memory access latency; assuming the number of input channels is... The number of channels participating in the convolution is The convolution kernel size is k, and the computational cost of PConv is... , and These represent the height and width of the input feature map, respectively. Indicates the kernel size. This indicates the number of channels involved in the convolution calculation. This can be obtained when... At that time, the computational cost of PConv is only 1 / 16 of that of regular convolution.

[0067] Reference Figure 5 The operation of the C2f-PA module and its internal ARFM module includes:

[0068] C1: After the input feature map enters the PA Block, local spatial features are first extracted through the PConv layer to complete the initial feature selection with low computational cost.

[0069] C2: The features output from the PConv layer are sequentially convolved and integrated to obtain intermediate features that are fed into the ARFM module.

[0070] C3: The ARFM module performs relation enhancement processing on the intermediate features, and the specific process is as follows:

[0071] D1: Divide the input feature map into the subject perception branch, the detail candidate branch, and the relation guidance branch.

[0072] D2: Subjective perception branch passes through Convolution and Convolution generates the main response map This is used to characterize the main distribution area of ​​the workers in the current feature map.

[0073] D3: Detailed candidate branches passed Convolution, depthwise separable Convolution, depthwise separable Convolution, normalization, and activation operations are used to extract fine-grained target candidate features. .

[0074] D4: The relation-guided branch expands the region based on the main response map to obtain candidate regions of the main neighborhood, and then generates a relation graph through convolutional mapping and sigmoid activation. It is used to characterize the reasonable distribution range of subordinate targets relative to the main body.

[0075] D5: Main Response Diagram Relationship diagram Input relationship fusion unit to generate dependency constraint weights .

[0076] D6: Utilizing Dependency Constraint Weights For detailed candidate features Element-wise modulation enhancement is performed to highlight the true, fine-grained target response that is dependent on the operator and to suppress spurious responses in complex backgrounds.

[0077] C4: Residual fusion is performed between the enhanced features output by the ARFM module and the input features of the module to obtain the final output of the PA Block.

[0078] With the above structure, the C2f-PA module no longer uses the original general attention reweighting method. Instead, it strengthens the constraints on fine-grained targets, which is a characteristic of the obvious relationship between the main body and the auxiliary targets in power operation scenarios, thereby improving the detection stability and accuracy in complex backgrounds.

[0079] To balance accuracy and speed, this embodiment adopts a collaborative deployment strategy of "low-loss downsampling of the backbone and enhanced fusion of neck relationships": SPD-Conv modules are introduced at key downsampling positions in the backbone network to reduce information loss of small and fine-grained targets during resolution reduction; C2f-PA modules are deployed in the neck feature fusion stage to use ARFM to model the spatial dependency relationship between the main body and the subordinate targets, thereby compensating for the loss of feature expression caused by lightweighting.

[0080] A3: Construct a lightweight decoupled detection head based on GhostConv;

[0081] To further reduce the complexity of the detection head, this embodiment introduces GhostConv to reconstruct the decoupling head of YOLOv8.

[0082] Reference Figure 6 GhostConv first generates a small number of intrinsic feature maps using regular convolution. Then, it performs a simple linear transformation (such as depthwise convolution) on each intrinsic feature map to generate multiple Ghost feature maps. Finally, it concatenates the intrinsic feature maps and Ghost feature maps for output. Theoretically, the Ghost module can reduce the computational cost and parameter count to 1 / s of the original convolution (where s is the number of segmentations for the output features). (Refer to...) Figure 7 In this embodiment, for the feature maps of the three scales P3, P4 and P5 output by Neck, the original two convolutional layers are replaced with GhostConv modules in the classification and regression branches of each scale, thus constructing a lightweight detection head.

[0083] S3: Construct a multi-level distributed perceptual knowledge distillation framework, using YOLOv8s as the teacher model and YOLO-SPAG as the student model, and perform distillation training.

[0084] To recover the accuracy loss caused by lightweight design, this embodiment constructs a multi-level distributed perceptual knowledge distillation framework using YOLOv8s as the teacher model and YOLO-SPEG as the student model. (Refer to...) Figure 8 The distillation frame includes:

[0085] E1: Classification Distribution Distillation: KL divergence is used to constrain the classification branch outputs for students and teachers. The loss function is defined as follows: .in, This represents the softmax function. express Divergence. A temperature coefficient T is introduced to smooth the probability distribution of the teacher's output, allowing students to learn the similarity information between categories. In this embodiment, the temperature coefficient T is set to 3 (see Table 5 for temperature coefficient comparison experiments; T=3 yields the best results).

[0086] E2: Multi-scale Feature Distillation: Feature distillation is performed on the P3, P4, and P5 scale feature maps output by Neck. Since the number of channels in the teacher model and student model may not be consistent at the corresponding scales, an additional feature map needs to be added after the student features. Convolutional alignment layer, let the first... Teacher characteristics at each scale Student characteristics are Channel alignment mapping is The multi-scale feature distillation loss can be expressed as mapping student features to the same channel dimension as teacher features, and the loss function is defined as follows: .

[0087] E3: Joint Training: The total loss function is .in The original detection loss for the student model consists of bounding box regression loss, classification loss, and DFL loss; in this embodiment, it is set as follows: The distillation training consists of three stages: First, the teacher model YOLOv8s is trained separately to obtain high-precision teacher weights; second, the teacher model parameters are frozen, and the student model YOLO-SPEG is trained in conjunction with real label supervision and distillation loss; finally, in the later stage of training, the distillation term is turned off, and only the original detection loss is retained to perform several rounds of fine-tuning on the student model to further improve the generalization performance of the student model.

[0088] S4: Evaluate the performance of the trained student model and deploy it at the edge to perform object detection on the input power operation images.

[0089] Positioning experiment:

[0090] To verify the synergistic effect of the C2f-Faster and C2f-PA modules at different network locations, experiments were conducted using YOLOv8n as the baseline model. The results are shown in Table 1.

[0091] Table 1 Results of experiments with different models

[0092] Model mAP@50 mAP@95 FLOPs / G Params / M Size / MB FPS Model 0 0.873 0.649 8.20 3.01 5.97 137.52 Model 1 0.837 0.587 6.39 2.24 4.52 139.47 Model 2 0.845 0.608 7.20 2.64 5.27 144.08 Model 3 0.859 0.620 7.30 2.64 5.30 96.26 Model 4 0.874 0.638 7.50 2.67 5.32 145.20 Model 5 0.876 0.640 7.45 2.62 5.24 126.35

[0093] Model 0: YOLOv8n baseline model;

[0094] Model 1: Replace all C2f modules in the backbone and head sections with C2f-faster modules;

[0095] Model 2: Replace all C2f modules in the backbone with C2f-faster modules, while keeping the head unchanged;

[0096] Model 3: Replace all C2f modules in the backbone with C2f-PA modules, while keeping the head unchanged;

[0097] Model 4: Replace all C2f modules in the head section with C2f-faster modules, while keeping the backbone unchanged;

[0098] Model 5: Replace all C2f modules in the head section with C2f-PA modules, while leaving the backbone unchanged.

[0099] The placement experiments (see Table 1) show that replacing all C2f modules in the Head section with C2f-PA modules (Model 5) achieved the best synthesis performance, with mAP@50 reaching 0.876, mAP@95 reaching 0.640, the number of parameters reduced to 2.62M, and FLOPs reduced to 7.45G. The experiments demonstrate that Model 5 achieved the best synthesis performance.

[0100] Ablation experiment:

[0101] Ablation experiments were conducted on the three improved modules SPD-Conv and C2f-PA, and the results are shown in Table 2.

[0102] Table 2 Ablation Experiment Results

[0103]

[0104] Experiments show that after combining the three improvements, the number of model parameters is reduced to 1.92M and FLOPs are reduced to 5.23G, but the accuracy is reduced (mAP@50=0.831). Therefore, distillation needs to be introduced to restore the accuracy.

[0105] Distillation experiment:

[0106] Using YOLOv8s as the teacher and Yolo-SPAG as the student, different distillation strategies were compared, and the results are shown in Table 3.

[0107] Table 3. Experimental results for different distillation strategies

[0108] Experiments show that the combined classification and feature distillation method yields the best results, increasing mAP@50 to 0.872.

[0109] The comparative experiments with different temperature coefficients are shown in Table 4. The best results were achieved when T=3.

[0110] Table 4 Experimental results at different distillation temperatures

[0111] T P R mAP@50 mAP@95 2 0.864 0.821 0.859 0.611 3 0.883 0.844 0.872 0.624 4 0.877 0.841 0.863 0.619 5 0.872 0.835 0.866 0.618

[0112] The model accuracy evaluation metrics used are precision (P), recall (R), and mean average precision (mAP).

[0113]

[0114] Where TP represents the number of true positives predicted as positive, FN represents the number of false negatives predicted as negative, and FP represents the number of false positives predicted as positive. C represents the number of target categories to be detected.

[0115] The lightweight model evaluation metrics use FPS to represent the number of images the model can process per second, and FLOPs to represent the total number of floating-point operations performed by the model during inference. Model size represents the storage space occupied by the model file, directly affecting the model's transmission efficiency and deployment ease; the number of parameters reflects the model's complexity and determines the model's basic requirements for storage and computing resources.

[0116]

[0117] Where N represents the number of test images, and Total Time represents the total time spent processing N images. and These represent the height and width of the output feature map of the convolutional layer, respectively. Indicates the number of input channels. Indicates the kernel size. Indicates the number of output channels.

[0118] Comparative experiment:

[0119] The distilled model was denoted as Yolo-SPAG-D and compared with the mainstream YOLO series models. The accuracy comparison is shown in Table 5, and the weight reduction comparison is shown in Table 6.

[0120] Table 5. Experimental Results Comparing Accuracy of Different Models

[0121] Model P R mAP@50 mAP@95 Yolov5n 0.915 0.809 0.876 0.646 Yolov8n 0.906 0.818 0.873 0.649 Yolov8s 0.937 0.863 0.902 0.694 Yolov10n 0.857 0.813 0.856 0.654 Yolov11n 0.914 0.795 0.867 0.652 Yolov26n 0.881 0.825 0.871 0.667 Yolo-SPAG 0.864 0.778 0.831 0.592 Yolo-SPAG-D 0.883 0.844 0.872 0.624

[0122] Table 6. Comparison of Lightweighting Effects of Different Models: Experimental Results

[0123] Model FLOPs / G Params / M Size / MB FPS Yolov5n 7.18 2.51 5.03 131.55 Yolov8n 8.20 3.01 5.97 147.52 Yolov8s 28.66 11.14 21.48 146.68 Yolov10n 8.40 2.71 5.49 94.83 Yolov11n 6.44 2.59 5.23 112.20 Yolov26n 5.32 2.51 5.15 93.13 Yolo-SPAG 5.23 1.92 3.90 145.54 Yolo-SPAG-D 5.23 1.92 3.90 145.54

[0124] The comparison shows that YOLO-SPAG-D has significant advantages in terms of parameter count, computational cost, model size, and inference speed, while its detection accuracy is close to that of mainstream lightweight models. Figure 10 and Figure 11 The comparison results are also shown.

[0125] Visualization results:

[0126] Figure 12 The presentation shows a visual comparison of the detection results of Yolo-SPAG-D with YOLOv5n, YOLOv8n, YOLOv11n, and YOLOv26n on selected test images. It can be seen that Yolo-SPAG-D performs excellently in recall and localization accuracy, and has better detection capabilities for distant small targets and occluded targets.

[0127] The distilled Yolo-SPAG-D model was deployed on edge devices. Since the distillation process does not alter the network structure of the student model, its parameter count (1.92M), computational cost (5.23G FLOPs), and inference speed (145.54 FPS) remain consistent with the undistilled Yolo-SPAG-D model. This enables real-time and accurate target detection of power operation scene images on resource-constrained devices. Figure 13 The test results deployed on Nvidia Jetson Orin NX are shown.

[0128] In summary, the lightweight improved structure and distillation enhancement strategy proposed in this invention are effective, ultimately enabling Yolo-SPAG-D to achieve a better balance between accuracy, complexity, and real-time performance, providing a feasible solution for applications oriented towards edge deployment and real-time detection.

[0129] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A lightweight target detection method for power operation scenarios, characterized in that, Includes the following steps: S1: Acquire image data of power operation scenarios, perform preprocessing and data augmentation, and construct a dataset; S2: Build a lightweight object detection model YOLO-SPAG. The lightweight object detection model YOLO-SPAG is based on YOLOv8. In the feature fusion stage of the neck network, the C2f module is replaced with the C2f-PA module. The C2f-PA module uses PA Block as the basic unit. S3: Construct a multi-level distributed perceptual knowledge distillation framework, using YOLOv8s as the teacher model and YOLO-SPAG as the student model, and use the dataset to perform distillation training to obtain a trained student model. S4: Use the trained student model to perform real-time target detection on the input power operation image and output the detection results.

2. The lightweight target detection method for power operation scenarios according to claim 1, characterized in that, The construction of the Yolo-SPAG model in step S2 specifically includes: The C2f-PA module replaces the traditional Bottleneck module with PA Block as the basic unit. The PABlock is composed of PConv, convolutional layers, and the dependency fusion module ARFM in series. PConv is used to reduce redundant computational overhead, and the ARFM module is used to model the spatial relationship between the operator and the fine-grained targets attached to it. The enhanced features output by the ARFM module are residually fused with the input features to obtain the final output of the PA Block.

3. The lightweight target detection method for power operation scenarios according to claim 2, characterized in that, The ARFM module includes a subject perception branch, a detail candidate branch, a relation guidance branch, and a relation fusion unit. The subject perception branch is used to generate a response map of the worker subject to represent the main distribution area of ​​the worker subject in the feature map. The detail candidate branch is used to extract the local texture, edge, and candidate response features of fine-grained auxiliary targets. The relation guidance branch expands and maps the main response region to construct a reasonable candidate distribution range of subordinate targets relative to the main body; the relation fusion unit fuses the main response information with the relation guidance information to form dependency constraint weights, and modulates and enhances the detailed candidate features element by element, and finally performs residual fusion with the input features to output the result.

4. A lightweight target detection method for power operation scenarios according to claim 3, characterized in that, The subject perception branch passes through Convolution and Convolution generates the main response map This is used to characterize the main distribution area of ​​the workers in the current feature map; the detailed candidate branches are obtained through... Convolution, depthwise separable Convolution, depthwise separable Convolution, normalization, and activation operations are used to extract fine-grained target candidate features. ; The relationship-guided branch expands the region based on the main response map to obtain candidate regions of the main neighborhood, and then generates a relationship graph through convolutional mapping and sigmoid activation. This is used to characterize the reasonable distribution range of subordinate targets relative to the main body; the main body response map... Relationship diagram Input relationship fusion unit to generate dependency constraint weights ;Utilizing dependency constraint weights For detailed candidate features Element-by-element modulation enhancement is performed.

5. A lightweight target detection method for power operation scenarios according to claim 1, characterized in that, The lightweight target detection model Yolo-SPAG also introduces the SPD-Conv module at key downsampling locations in the backbone network to construct a lossless downsampling link. The SPD-Conv module rearranges spatial information to the channel dimension through spatial-to-channel transformation, and then connects to a convolutional layer with a stride of 1 for channel fusion.

6. A lightweight target detection method for power operation scenarios according to claim 5, characterized in that, The SPD-Conv module is specifically as follows: By setting the downsampling factor to scale=2, the input feature map X is sliced ​​to obtain 4 sub-feature maps: ; Each row contains all pixel information from the original feature map, including even rows and even columns, odd rows and even columns, even rows and odd columns, and odd rows and odd columns. These four sub-feature maps are concatenated along the channel dimension to obtain the intermediate feature map. Its size becomes ; A standard convolutional layer with a stride of 1 is applied after the SPD layer to map the concatenated high-dimensional features and output the final feature map. Its size is .

7. A lightweight target detection method for power operation scenarios according to claim 1, characterized in that, The lightweight target detection model YOLO-SPAG replaces the standard convolution in the detection head with GhostConv modules, constructing a lightweight decoupled detection head based on GhostConv, and utilizing the characteristic of GhostConv to generate redundant features through linear transformation.

8. A lightweight target detection method for power operation scenarios according to claim 1, characterized in that, The multi-level distributed perception knowledge distillation framework specifically includes: Categorical distribution distillation: KL divergence is used to constrain the classification branch outputs for students and teachers. The loss function is defined as: ; in, This represents the softmax function. express Divergence; This represents the logits output of the teacher model's classification branch. The logits represent the output of the student model's classification branch; a temperature coefficient T is introduced to smooth the probability distribution of the teacher's output appropriately. Multi-scale feature distillation: Feature distillation is performed on the P3, P4, and P5 feature maps output by Neck, and additional features are added after the student features. Convolutional alignment layer, let the first... Teacher characteristics at each scale Student characteristics are Channel alignment mapping is The multi-scale feature distillation loss is expressed as mapping student features to the same channel dimension as teacher features, and the loss function is defined as: ; Joint training: The total loss function is ,in The original detection loss for the student model consists of bounding box regression loss, classification loss, and DFL loss. and This represents the weights of categorical distribution distillation and multi-scale feature distillation.

9. A lightweight target detection method for power operation scenarios according to claim 1, characterized in that, The distillation training of the multi-level distributed perceptual knowledge distillation framework is divided into three stages: First, train the teacher model YOLOv8s separately to obtain high-precision teacher weights; Secondly, the teacher model parameters were frozen, and the student model YOLO-SPEG was trained using real label supervision and distillation loss. Finally, during the later stages of training, the distillation term was turned off, and only the original detection loss was retained to fine-tune the student model for several rounds.

10. A lightweight target detection device for power operation scenarios, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed, it causes the processor to implement the steps in the lightweight target detection method for power operation scenarios as described in any one of claims 1 to 9.