Lightweight electrical equipment multi-target detection method and system
By introducing Ghostnet lightweight network structure, CBAM attention mechanism and SPPFCSPC convolutional structure in the YOLOv8 model, and using Wise-IoU loss function and GELU activation function, the problem of model complexity and calculation amount in multi-object detection of electrical equipment is solved, and efficient detection accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202411643796.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-11
AI Technical Summary
The prior art is difficult to reduce model complexity and computational volume while ensuring detection accuracy, especially when deploying on hardware-constrained devices.
By introducing Ghostnet lightweight network structure, CBAM attention mechanism and SPPFCSPC convolutional structure, the YOLOv8 model is improved, the model complexity and calculation amount is reduced, and the Wise-IoU loss function and GELU activation function are used to improve the robustness and generalization ability of the model.
It realizes that while ensuring detection accuracy, it reduces the complexity and calculation amount of the model, adapts to the deployment needs of hardware-constrained devices, and improves the robustness and recognition accuracy of the model.
Smart Images

Figure CN119600606A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target detection, and in particular to a lightweight electrical equipment multi-target detection method and system based on an improved YOLOv8 model. Background Art
[0002] Electrical equipment is an important part of the power system, and its operating status determines the stability and reliability of the power supply of the power grid. Performance degradation and various faults will inevitably occur in the long-term operation of electrical equipment. Traditional electrical equipment status detection and fault diagnosis mainly rely on manual inspection and experience judgment, which is inefficient and easy to miss. In addition, the skills and experience of the staff are also key factors affecting the accuracy of detection, which is difficult to meet the detection needs of modern complex electrical equipment. Therefore, it is of great significance to realize the automatic processing, analysis and diagnosis of massive data and overcome the disadvantages of manual analysis for electrical equipment status detection and fault diagnosis.
[0003] In recent years, the extensive application of deep learning technology, especially convolutional neural network (CNN), in the field of target detection has improved the accuracy of traditional recognition tasks and demonstrated strong recognition and processing capabilities for complex tasks. Common deep learning CNN target detection algorithms include R-CNN, Faster R-CNN, SSD, YOLO, etc. Among them, the YOLO algorithm balances detection speed and accuracy, supports a variety of computer vision tasks, and has become the preferred basic algorithm for target detection tasks. It has now been updated to the Yolov8 version with more complete performance. Literature [Li Shu, Li Siyuan, Liu Guoqing. Research on small target detection algorithm based on YOLOv8 UAV aerial images [J]. Small Microcomputer Systems, 2024, 45(09): 2165-2174. DOI: 10.20009 / j.cnki.21-1106 / TP.2024-0329.] proposed an improved YOLOv8s algorithm LW-YOLO, which adopts strategies such as layered convolution, different depth feature extraction and multi-scale feature fusion to improve the accuracy of small target detection, but the detection speed is reduced compared with YOLOv8s, and the complexity also increases accordingly. Reference [Cheng Huanxin, Qiao Qingyuan, Luo Xiaoling, et al. Target detection algorithm for drone aerial images based on improved YOLOv8 [J]. Radio Engineering, 2024, 54(04): 871-881.] proposed a target detection algorithm for drone aerial images based on improved YOLOv8. The algorithm introduced EMA attention and C2f-Faster modules in the backbone network of the YOLOv8s network, adopted the Bi-YOLOv8 feature pyramid network structure, improved the loss function, and introduced a dynamic non-monotonic focusing mechanism. The example results show that the improved YOLOv8 model has strong feature extraction capabilities and good small target detection and recognition effects, but in terms of lightweight design, there is still room for optimization to improve the balance between detection speed and accuracy. Reference [Yang Zhenyu, Wang Xiaoyu, Qi Zihan, et al. Strawberry recognition and stalk picking key point detection based on improved YOLOv8 [J / OL]. Transactions of the Chinese Society of Agricultural Engineering, 1-9 [2024-10-03]. http: / / kns.cnki.net / kcms / detail / 11.2047.S.20240910.0938.010.html.] A strawberry recognition and positioning method combining an improved YOLOv8 algorithm and Pose key point detection technology is proposed. By introducing BiFPN and GAM modules to optimize YOLOv8, the bidirectional information flow and feature weight distribution of the model are strengthened, and the feature extraction of small targets and occluded areas is focused on, which improves the accuracy of strawberry recognition and stalk picking point positioning. However, the model complexity is increased, resulting in an increase in model training time, higher requirements on hardware resources, and limits the application of the model in limited hardware resource environments.The literature [Wang Yisong, Hua Hangbo, Kong Ming, et al. Rep-YOLOv8 vehicle and pedestrian detection and segmentation algorithm [Z]. Modern Electronic Technology, 2024, 47(9): 143-149.] proposed the Rep-YOLOv8 algorithm, which uses RepECA as the backbone network, uses the RepVGG module to replace the original convolutional layer, integrates the ECA attention mechanism for feature extraction, and adds the eSE self-attention module to the C2f module to reduce channel information loss. Compared with the YOLOv8 algorithm, the Rep-YOLOv8 algorithm improves the inference speed and detection and segmentation accuracy, but it still has high requirements for computing resources in actual deployment. On resource-constrained edge devices, the algorithm's demand for computing resources is more obvious. Reference [Xiaoting Guo, Xin-shu Xie, & Xun Lang (2023). Pruning feature maps for efficient convolutional neural networks. Optik, 281 (0), 170809-170809. https: / / doi.org / 10.1016 / j.ijleo.2023.170809] uses MDC and DC modules to construct a new network structure DC-YOLOv8, which can effectively perform downsampling, enhance the model learning ability, and retain more context information. Although the parallel structure of the DC module improves the efficiency of feature extraction, it increases the computational burden, and the MDC module further complicates the network and increases the demand for computing and training resources. The YOLOv8 lightweight multi-target detection algorithm has met the industry's high requirements in terms of accuracy and detection speed. However, deep network models are difficult to deploy on hardware-constrained devices due to their large number of parameters, high storage requirements and high computing costs. Summary of the invention
[0004] The object of the present invention is to provide a method and system for multi-target detection of lightweight electrical equipment, which can reduce model complexity and calculation amount while ensuring detection accuracy.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is: a multi-target detection method for lightweight electrical equipment, characterized in that it includes the following steps:
[0006] Step S1: acquiring multi-angle images of different types of electrical equipment through an image acquisition device to obtain an experimental data set;
[0007] Step S2: annotate the experimental data set, perform data augmentation on the annotated data to form a new data set, and divide the new data set into a training set, a test set, and a validation set;
[0008] Step S3: The YOLOv8 model is improved by constructing a Ghostnet lightweight network structure, introducing the CBAM attention mechanism and the SPPFCSPC convolution structure, and a multi-target detection model based on the improved YOLOv8 model is obtained;
[0009] Step S4: Use the training set to train the multi-target detection model based on the improved YOLOv8 model. After reaching the maximum number of iterations, obtain the trained detection model, and use the validation set to verify and determine the optimal model for multi-target detection;
[0010] Step S5: input the test set into the optimal model for multi-target detection to obtain the detection result of the electrical equipment target;
[0011] Step S6: Evaluate the detection results: Use the mean average precision, accuracy, recall rate and detection speed to comprehensively evaluate the optimal model for multi-target detection and output the detection results.
[0012] Furthermore, the different types of electrical equipment include low-voltage distribution cabinets, power transformers, insulators, transformer bushings, safety helmets, transformer heat sinks, transformer oil pillows and drop fuses.
[0013] Furthermore, the Ghostnet lightweight network structure adopts multiple convolution modules based on GhostConv, uses linear transformation to generate Ghost feature maps, and replaces the BottleNeck module in the original network with the GhostBottleNeck module to obtain the C3Ghost module; replaces the Conv and C2f modules of the YOLOv8 model with GhostConv and C3Ghost modules to obtain the Ghostnet lightweight network.
[0014] Furthermore, the CBAM attention mechanism includes a channel attention module and a spatial attention module. The channel attention module performs maximum pooling and average pooling operations on the input features, and then fully connects, adds and adds the two results to obtain channel attention features sensitive to the target position information in the image; after the spatial attention module concatenates the maximum pooling and average pooling, it obtains the spatial attention features of the target through convolution and Sigmoid activation function; finally, the spatial attention features and the channel attention features are multiplied, and the weighted attention enhancement features are output, so that the model can understand the input data more comprehensively and effectively, and improve the performance and accuracy of the model.
[0015] Further, the SPPFCSPC convolution structure includes convolution layer I, convolution layer II, convolution layer III, convolution layer IV, maximum pooling layer I, maximum pooling layer II, maximum pooling layer III, Concat layer I, convolution layer V, convolution layer VI, Concat layer II and convolution layer VII; the input of the SPPFCSPC convolution structure is connected to the input end of convolution layer I and convolution layer II respectively, the output end of convolution layer II is connected to the input end of convolution layer III, the output end of convolution layer III is connected to the input end of convolution layer IV, the output end of convolution layer IV is connected to the input end of maximum pooling layer I, and the output end of convolution layer IV is connected to the input end of maximum pooling layer I. The output of the large pooling layer I is connected to the input of the maximum pooling layer II, the output of the maximum pooling layer II is connected to the input of the maximum pooling layer III, the output of the maximum pooling layer III is connected to the input of the Concat layer I, the output of the Concat layer I is connected to the input of the convolution layer V, the output of the convolution layer V is connected to the input of the convolution layer VI, the output of the convolution layer VI is connected to the input of the Concat layer II, the output of the Concat layer II is connected to the input of the convolution layer VII, and the output of the convolution layer I and the convolution layer VII serve as the output of the SPPFCSPC convolution structure.
[0016] Furthermore, the network structure of the multi-target detection model based on the improved YOLOv8 model includes a Backbone module, a Neck module and a Head module;
[0017] The backbone module includes the first convolutional layer, GCG-I, CBAM-I, GC3-3, GCG-II, GC3-6, GCG-III, GC3-9, GCG-IV, GC3-3, SPPFCSPC, and CBAM-II;
[0018] The Neck module includes C2f+Upsample layer I, Concat-III, C2f+Upsample layer II, Concat-IV, Upsample layer, GCG-V, Concat-V, C2f-I, GCG-VI, Concat-VI, C2f-II;
[0019] The Head module includes Detect-I, Detect-II, and Detect-III;
[0020] The input image passes through the first convolutional layer, GCG-I, CBAM-I, GC3-3, and GCG-II in sequence to obtain the first output feature. The first output feature passes through GC3-6 and GCG-III in sequence to obtain the second output feature. The second output feature passes through GC3-9, GCG-IV, and GC3-3 in sequence to obtain the third output feature. The third output feature and the feature output by CBAM-II are input into SPPFCSPC to obtain the fourth output feature.
[0021] The fourth output feature and the third output feature are jointly input into the Upsample layer to obtain the third sampling feature, the feature obtained after the third sampling feature is input into Concat-IV and the second output feature are jointly input into the C2f+Upsample layer II to obtain the second sampling feature, the feature obtained after the second sampling feature is input into Concat-III and the first output feature are jointly input into the C2f+Upsample layer I to obtain the first sampling feature, the feature obtained after the first sampling feature is input into GCG-V is fused with the second sampling feature input into Concat-V to obtain the first fused feature, the feature obtained after the first fused feature passes through C2f-I and GCG-VI in sequence is fused with the third sampling feature input into Concat-VI to obtain the second fused feature;
[0022] The first sampling feature is input into Detect-I to obtain output I, the first fusion feature is passed through C2f-I and Detect-II to obtain output II, and the second fusion feature is passed through C2f-II and Detect-III to obtain output III.
[0023] Furthermore, the network structure of GCG includes GhostConv-I, BN and GeLU; the input end of GhostConv-I is used as the input end of GCG, the output end of GhostConv-I is connected to the input end of BN, the output end of BN is connected to the input end of GeLU, and the output end of GeLU is used as the output of GCG.
[0024] Furthermore, the network structure of GC3 includes GCG-VII, GCG-VIII, GhostBottleneck, GCG-IX, and Concat-VII; the input ends of GCG-VII and GCG-VIII serve as the input end of GC3, the output end of GCG-VIII is connected to the input end of GhostBottleneck, the output end of GhostBottleneck is connected to the input end of GCG-IX, the output end of GCG-IX and the output end of GCG-VII are both connected to the input end of Concat-VII, and the output end of Concat-VII serves as the output end of GC3;
[0025] GC3-3 means that there are 3 GhostBottleneck modules in the network of GC3, and the output of GCG-VIII passes through 3 GhostBottleneck modules in sequence as the input of GCG-IX; GC3-6 means that there are 6 GhostBottleneck modules in the network of GC3, and the output of GCG-VIII passes through 6 GhostBottleneck modules in sequence as the input of GCG-IX; GC3-9 means that there are 9 GhostBottleneck modules in the network of GC3, and the output of GCG-VIII passes through 9 GhostBottleneck modules in sequence as the input of GCG-IX;
[0026] The network structure of GhostBottleneck includes DWConv-I, CBS, GhostConv-II, DWConv-II, GhostConv-III, and Add; the input ends of DWConv-I and GhostConv-II are used as the input ends of GhostBottleneck, the output end of DWConv-I is connected to the input end of CBS, the output end of GhostConv-II is connected to the input end of DWConv-II, the output end of DWConv-II is connected to the input end of GhostConv-III, and the output of GhostConv-III and the output of CBS are superimposed through Add as the output of GhostBottleneck.
[0027] Furthermore, the Wise-IoU loss function and GELU activation function are introduced when training the multi-target detection model based on the improved YOLOv8 model using the training set;
[0028] The expression of the GELU activation function is:
[0029]
[0030] The Wise-IoU loss function uses dynamic outlier degree to evaluate the detection box. The calculation formula of dynamic outlier degree is:
[0031]
[0032] In the formula, is the monotonic focusing coefficient; is the sliding average;
[0033] The Wise-IoU loss function is defined as:
[0034]
[0035] In the formula, is the IoU bounding box loss function value; R WIoU is the distance between the predicted box and the true box; r is the non-monotonic focusing coefficient defined by the outlier degree β.
[0036] The present invention also provides a lightweight electrical equipment multi-target detection system, comprising a memory, a processor, and computer program instructions stored in the memory and executable by the processor. When the processor executes the computer program instructions, the above method can be implemented.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] 1) The present invention introduces the CBAM convolutional attention mechanism combining the channel attention module and the spatial attention module into the YOLOv8 model to realize the automatic extraction and focus of the model on important information of the target. When detecting and recognizing complex graphics, it can reduce the redundant information and the volume of the model in the image extraction process and improve the computational efficiency.
[0039] 2) The Ghostnet lightweight network structure is used to replace the original network structure. Compared with the traditional YOLOv8 model, the improved model calculation is simpler. When the detection data volume and calculation structure are very complex, it can effectively reduce the model complexity and calculation amount, and achieve high-precision identification of electrical equipment.
[0040] 3) The SPPF module in the traditional YOLOv8 model is improved to the SPPFCSPC module. The CSPC convolution structure can speed up the transmission speed of feature data and network efficiency by introducing cross-stage links. At the same time, spatial pyramid pooling operation is performed on the blocked images, and then the pooled results are spliced and convolved again. Compared with the traditional YOLOv8 model, it has stronger small target recognition ability.
[0041] 4) The original function in the YOLOv8 model is replaced by the WISE-IoU loss function and the GELU nonlinear activation function with Gaussian error units, solving problems such as neuron death, gradient truncation, and bounding box loss in the original function. When facing high, medium, and low quality data set samples, the WISE-IoU loss function can balance the advantages and disadvantages of various samples, ensure the model's learning ability for low-quality annotation boxes and the overall performance of the model, and improve the model's accuracy in target positioning. By modifying it to the GELU nonlinear activation function, the convergence speed of model training is also accelerated, overfitting is reduced, and the robustness and flexibility of the model are enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 The present invention is a flowchart of a method implementation according to an embodiment of the present invention.
[0043] Figure 2 Schematic diagram of the structure of the original YOLOv8 model.
[0044] Figure 3 It is a schematic diagram of the structure of the improved YOLOv8 model in an embodiment of the present invention.
[0045] Figure 4 This is a schematic diagram of the implementation principle of the CBAM attention mechanism in an embodiment of the present invention.
[0046] Figure 5 It is a comparison diagram of the RELU activation function and the GELU nonlinear activation function of the Gaussian error unit in an embodiment of the present invention.
[0047] Figure 6 1 is a diagram of the data set enhancement effect in an embodiment of the present invention; wherein (a) Gaussian noise is added, (b) brightness is reduced, (c) salt and pepper noise is added, (d) brightness is increased, and (e) the image is mirror-inverted.
[0048] Figure 7 The following are comparison diagrams of the detection results of transformer images in a natural environment using the improved YOLOv8 model and the original YOLOv8 model in an embodiment of the present invention; wherein, (a) Example 1: YOLOv8 model recognition result, (b) Example 1: improved YOLOv8 model recognition result, (c) Example 2: YOLOv8 model recognition result, (d) Example 2: improved YOLOv8 model recognition result. DETAILED DESCRIPTION
[0049] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0050] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0051] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0052] This embodiment provides a lightweight electrical equipment multi-target detection method based on an improved YOLOv8 model. The method integrates technologies such as Ghostnet lightweight network structure, CBAM attention mechanism, and SPPFCSPC convolution structure, reduces model complexity and computational complexity, and ensures high-precision recognition capability; introduces Wise-IoU loss function and GELU activation function to improve the robustness and generalization ability of the model. Figure 1 As shown, the specific implementation steps of this method are as follows:
[0053] Step S1: Capture multi-angle images of different types of electrical equipment through an image acquisition device to obtain an experimental data set.
[0054] In this embodiment, multi-angle image acquisition is performed on 8 types of targets to be detected, including low-voltage distribution cabinet (dypdg), power transformer (dlbyq), insulator (jyz), transformer bushing (byqtg), safety helmet (halmet), transformer heat sink (byqsr), transformer oil pillow (byqyz) and drop fuse (dlrdq), and a total of 800 pictures are obtained. The images contain background information such as farmland, buildings, walls and peripheral equipment, which ensures the accuracy of the model in predicting other targets with different complex backgrounds.
[0055] Step S2: Use Labelme image annotation software to annotate the experimental data set, and use the data enhancement algorithm to amplify the annotated data to form a new data set, and divide the new data set into a training set, a test set, and a validation set.
[0056] In this embodiment, after obtaining the experimental data set, the Labelme image annotation software is used to annotate the above 8 targets. Since most of the high-definition images of electrical equipment in the power system are confidential, the high-definition image data publicly available on the Internet is limited, and some images in the open source data set have simple background information, in order to avoid under-fitting of the data set, the data enhancement algorithm is used to amplify the original data set and reduce the imbalance of the data set samples. The data enhancement algorithm includes adding Gaussian noise, inversion, increasing saturation, etc. The data set enhancement effect is as follows: Figure 6 As shown. Figure 6 It can be seen that through the data augmentation algorithm, each picture is expanded into 5 enhanced pictures. After the original 800 pictures are enhanced, 4000 pictures are obtained as the data set, and the enhanced data set is divided into training set, validation set and test set according to the ratio of 7:1:2.
[0057] Step S3: Improve the YOLOv8 model, including building a Ghostnet lightweight network structure, introducing the CBAM attention mechanism and the SPPFCSPC convolution structure, and obtaining a multi-target detection model based on the improved YOLOv8 model.
[0058] YOLO is a real-time target detection model based on a deep convolutional neural network. Based on learning a large amount of image data, the model uses normalization, convolution, pooling, and activation operations to extract image features, and finally detects the target through the intersection of union (IoU) calculation. Compared with traditional target recognition models, the YOLO model has a faster detection speed, can handle more objects, and also has a higher detection accuracy.
[0059] The YOLOv8 model is a single-stage target detection model. Compared with previous generations, the number of parameters and the amount of calculation have been significantly reduced. It can adapt to a variety of target recognition tasks and ensure the stability of recognition. The YOLOv8 model is mainly composed of four network layers: input, backbone, fusion processing (Neck), and detection head (Head). At the same time, the YOLOv8 model has added C2F and fast spatial pyramid pooling fast (SPPF) optimization algorithms, which to a certain extent solves the accuracy and small target recognition problems. Its structure is as follows Figure 2 shown.
[0060] Directly using the YOLOv8 model for multi-target detection of electrical equipment still has problems such as the model training calculation is too complex, the training speed is slow, and it is not conducive to the operation of low-end equipment. At the same time, the application scenario of the improved YOLOv8 model is electrical equipment recognition, and there are many types of electrical equipment in the power system, and each type of equipment has many models. The background is complex in actual working conditions, and various equipment are arranged in an interlaced manner. After the image is taken, multiple types of target equipment overlap each other, and some equipment located at high places is far away, resulting in dark images of target equipment and small image areas.
[0061] Based on this, through a comprehensive comparison of the model size, average accuracy and training speed of different versions of YOLOv8, the YOLOv8 model with moderate model size and recognition accuracy is used as the basic model for multi-target recognition, and an improved YOLOv8 model is proposed. This model combines the advantages of the above models and structures, and improves the model size, computational complexity, small target detection, lightweight structure, low-quality data sets and recognition accuracy. The improved YOLOv8 model structure is as follows Figure 3 shown.
[0062] The network structure of the multi-target detection model based on the improved YOLOv8 model includes a Backbone module, a Neck module and a Head module; the Backbone module includes the first convolutional layer, GCG-I, CBAM-I, GC3-3, GCG-II, GC3-6, GCG-III, GC3-9, GCG-IV, GC3-3, SPPFCSPC, and CBAM-II; the Neck module includes C2f+Upsample layer I, Concat-III, C2f+Upsample layer II, Concat-IV, Upsample layer, GCG-V, Concat-V, C2f-I, GCG-VI, Concat-VI, and C2f-II; the Head module includes Detect-I, Detect-II, and Detect-III.
[0063] The input image passes through the first convolutional layer, GCG-I, CBAM-I, GC3-3, and GCG-II in sequence to obtain the first output feature. The first output feature passes through GC3-6 and GCG-III in sequence to obtain the second output feature. The second output feature passes through GC3-9, GCG-IV, and GC3-3 in sequence to obtain the third output feature. The third output feature and the feature output by CBAM-II are input into SPPFCSPC to obtain the fourth output feature.
[0064] The fourth output feature and the third output feature are jointly input into the Upsample layer to obtain the third sampling feature. The feature obtained after the third sampling feature is input into Concat-IV and the second output feature are jointly input into the C2f+Upsample layer II to obtain the second sampling feature. The feature obtained after the second sampling feature is input into Concat-III and the first output feature are jointly input into the C2f+Upsample layer I to obtain the first sampling feature. The feature obtained after the first sampling feature is input into GCG-V is fused with the second sampling feature input into Concat-V to obtain the first fused feature. The feature obtained after the first fused feature passes through C2f-I and GCG-VI in sequence is fused with the third sampling feature input into Concat-VI to obtain the second fused feature.
[0065] The first sampling feature is input into Detect-I to obtain output I, the first fusion feature is passed through C2f-I and Detect-II to obtain output II, and the second fusion feature is passed through C2f-II and Detect-III to obtain output III.
[0066] The network structure of GCG includes GhostConv-I, BN and GeLU; the input of GhostConv-I is used as the input of GCG, the output of GhostConv-I is connected to the input of BN, the output of BN is connected to the input of GeLU, and the output of GeLU is used as the output of GCG. The network structure of GC3 (i.e. C3Ghost) includes GCG-VII, GCG-VIII, GhostBottleneck, GCG-IX and Concat-VII; the input of GCG-VII and GCG-VIII is used as the input of GC3, the output of GCG-VIII is connected to the input of GhostBottleneck, the output of GhostBottleneck is connected to the input of GCG-IX, the output of GCG-IX and the output of GCG-VII are both connected to the input of Concat-VII, and the output of Concat-VII is used as the output of GC3; GC3-3 means that there are 3 GhostBottleneck modules in the network of GC3, and the output of GCG-VIII passes through The output after 3 GhostBottleneck modules is used as the input of GCG-IX; GC3-6 means that there are 6 GhostBottleneck modules in the GC3 network, and the output of GCG-VIII is used as the input of GCG-IX after passing through 6 GhostBottleneck modules in sequence; GC3-9 means that there are 9 GhostBottleneck modules in the GC3 network, and the output of GCG-VIII is used as the input of GCG-IX after passing through 9 GhostBottleneck modules in sequence; the ghostbottleneck module structures of the three modules GC3-3, GC3-6 and GC3-9 are the same, only the number of repetitions and the number of input / output channels are different, which are 32, 64 and 256 respectively. The network structure of GhostBottleneck includes DWConv-I, CBS, GhostConv-II, DWConv-II, GhostConv-III, and Add; the input ends of DWConv-I and GhostConv-II are used as the input ends of GhostBottleneck, the output end of DWConv-I is connected to the input end of CBS, the output end of GhostConv-II is connected to the input end of DWConv-II, the output end of DWConv-II is connected to the input end of GhostConv-III, and the output of GhostConv-III and the output of CBS are superimposed through Add as the output of GhostBottleneck.
[0067] Adding a convolutional block attention module (CBAM) to the YOLOv8 model gives the model an attention mechanism that can improve accuracy. CBAM is a lightweight attention module proposed by WOOS et al., which combines the channel attention module and the spatial attention module. By reasonably allocating data weights, the input image can be adaptively optimized for feature optimization and attention extraction, so that the model can automatically learn and focus on important information of the target, saving parameters and computing time, and can also be integrated into the existing network architecture. The CBAM module structure is as follows: Figure 4 shown.
[0068] Depend on Figure 4 It can be seen that the convolutional attention mechanism module CBAM workflow. First, CBAM performs maximum pooling and average pooling operations on the image in the channel attention module, and then fully connects, adds and adds the two results to obtain the channel attention features that are sensitive to the target position information in the image; secondly, the spatial attention module concatenates the maximum pooling and average pooling, and obtains the spatial attention features of the target through convolution and Sigmoid activation function; finally, the spatial attention and channel attention features are multiplied to obtain the feature optimization of the input image in both space and channel. The CBAM attention module can reduce the redundant information and model size in the image extraction process and improve computational efficiency.
[0069] The YOLO model has a large number of convolution operations, which results in high computing power requirements for hardware devices to train such models. In particular, the YOLOv8 module introduces a C2F convolution module with richer gradient flow. This structure improves the accuracy of the model, but it is difficult to achieve good inference speed and accuracy due to the inclusion of multiple convolution layers. In order to reduce the number of model parameters and computational complexity and ensure a balance between training accuracy and speed for low-end devices, the improved YOLOv8 model introduces the GhostNet lightweight network structure in the Backbone and Head networks of the model.
[0070] The GhostNet network uses multiple convolutional modules based on GhostConv, uses simple linear transformation to generate Ghost feature maps, increases parallel linear channels, and improves the width of network operation; at the same time, the BottleNeck module in the original network is replaced with the GhostBottleNeck module to obtain the C3Ghost module. The Conv and C2F modules of the YOLOv8 model are replaced with GhostConv and C3Ghost modules to improve the lightweight structure of the model Ghostnet and reduce the computational complexity of the model.
[0071] The SPPF module in the YOLOv8 model is improved to the SPPFCSPC module to improve the small target recognition capability of the model, so that the model has stronger small target recognition capability than the YOLOv8 model and is suitable for the application scenarios of the present invention.
[0072] The SPPFCSPC convolutional structure consists of two modules: fast spatial pyramid pooling (SPPF) and fully connected spatial pyramid convolution (Cross Stage Partial Channel, CSPC). The SPPF structure optimizes the SPP parallel pooling layer into a series structure, which improves the speed of the pooling layer, while the CSPC convolutional structure speeds up the transmission speed of feature data and network efficiency by introducing cross-stage links. The SPPFCSPC convolutional structure divides the original image into blocks through CSPC convolution, and performs spatial pyramid pooling on the divided images at the same time, and then splices and convolves the pooled results again, which improves the operational efficiency of the model, ensures the accuracy of small target recognition, and reduces the amount of calculation.
[0073] Specifically, the SPPFCSPC convolution structure includes convolution layer I, convolution layer II, convolution layer III, convolution layer IV, maximum pooling layer I, maximum pooling layer II, maximum pooling layer III, Concat layer I, convolution layer V, convolution layer VI, Concat layer II and convolution layer VII; the input of the SPPFCSPC convolution structure is connected to the input end of convolution layer I and convolution layer II respectively, the output end of convolution layer II is connected to the input end of convolution layer III, the output end of convolution layer III is connected to the input end of convolution layer IV, the output end of convolution layer IV is connected to the input end of maximum pooling layer I, and the maximum pooling layer V is connected to the maximum pooling layer V. The output of convolution layer I is connected to the input of max pooling layer II, the output of max pooling layer II is connected to the input of max pooling layer III, the output of max pooling layer III is connected to the input of Concat layer I, the output of Concat layer I is connected to the input of convolution layer V, the output of convolution layer V is connected to the input of convolution layer VI, the output of convolution layer VI is connected to the input of Concat layer II, the output of Concat layer II is connected to the input of convolution layer VII, and the output of convolution layer I and convolution layer VII serve as the output of the SPPFCSPC convolution structure.
[0074] Step S4: Use the training set to train the multi-target detection model based on the improved YOLOv8 model. After reaching the maximum number of iterations, the trained detection model is obtained, and the validation set is used for verification to determine the optimal model for multi-target detection.
[0075] The activation function commonly used in deep learning models is RELU, which is a linear activation function. Its essence is a maximum function. It is simple to calculate, converges quickly, and does not cause gradient vanishing and gradient explosion. However, linear activation functions can cause problems such as neuron death and gradient truncation. To solve this problem, the improved YOLOv8 model introduces the GELU nonlinear activation function using Gaussian error units. The two activation function graphs are shown in Figure 1. Figure 5 shown.
[0076] Depend on Figure 5 It can be seen that the output of the RELU activation function is 0 in the negative range, which will set some neurons in the negative range to zero, resulting in death. At the same time, it is discontinuous near 0, which will cause gradient truncation to a certain extent. Compared with the RELU activation function, the GELU activation function is smoother near 0 and has a certain gradient value in the negative area, which minimizes the problem of neuron death. Therefore, the GELU activation function speeds up the convergence of model training to a certain extent, improves the performance of the model in natural language processing, computer vision and other tasks, and the nonlinearity of the activation function can make the deep learning model produce more complex mapping.
[0077] The GELU activation function expression is:
[0078]
[0079] The CIOU loss function of the YOLOv8 model is replaced with the WiseIoU loss function to improve the model's learning ability for low-quality annotation boxes and the overall performance of the model, and to enhance the robustness and flexibility of the model.
[0080] When training a neural network model, the loss function has a significant impact on the training effect of the model and the performance of the target detection algorithm. When the data presents class imbalance or sample imbalance, choosing a suitable loss function can enhance the generalization ability of the model and reduce the negative impact of low-quality samples on the training results, such as bounding box loss and reduced accuracy. However, excessive reinforcement of low-quality data will also affect the improvement of model accuracy. In order to avoid the dataset containing unbalanced high- and low-quality training samples, the improved YOLOv8 model uses the non-monotonic loss function Wise-IoU based on the dynamic focusing mechanism to replace the CIoU loss function of the original model.
[0081] The Wise-IoU loss function uses dynamic outlier degree to evaluate the detection box. The dynamic outlier degree calculation formula is shown in formula (2).
[0082]
[0083] In the formula, is the monotonic focusing coefficient; It is a sliding average with dynamic change characteristics, so the gradient gain allocation strategy can be dynamically adjusted according to the quality of the training samples.
[0084] The loss function of Wise-IoU is defined as:
[0085]
[0086] In the formula, is the IoU bounding box loss function value; R WIoU is the distance between the predicted box and the true box; r is the non-monotonic focusing coefficient defined by the outlier degree β, which is dynamically adjusted according to the quality of the training samples.
[0087] After the loss function is replaced with Wise-IoU, high, medium, and low quality samples in the dataset can obtain balanced gradient gains, balancing the advantages and disadvantages of each type of sample and improving the overall performance of the model. At the same time, the problems of some neuron death and gradient truncation in the model are improved.
[0088] Step S5: Input the test set into the optimal model for multi-target detection to obtain the detection result of the electrical equipment target.
[0089] Step S6: Evaluate the detection results: Use the mean average precision, accuracy, recall rate and detection speed to comprehensively evaluate the optimal model for multi-target detection and output the detection results.
[0090] After model training, five parameters including confusion matrix, accuracy, recall, F1 curve and mean average precision (mAP) are used for evaluation. At the same time, the two parameters of parameter amount (Params) and Giga Floating-point Operations Per Second (GFLOPs) in the training results are used as evaluation indicators of model training performance. The performance and effect of the proposed model in electrical equipment detection are evaluated from these seven aspects.
[0091] (1) Confusion Matrix
[0092] The YOLO algorithm provides a normalized confusion matrix chart for multi-classification problems. Through this chart, we can intuitively understand the classification accuracy between categories and obtain the categories with high accuracy of the training model. The confusion matrix of the YOLO algorithm is shown in Table 1.
[0093] Table 1 Confusion matrix
[0094]
[0095] As can be seen from Table 1, the confusion matrix TN (True Negative) of the YOLO algorithm means that the predicted value and the true value are the same, and both are 0; TP (True Positive) means that the predicted value and the true value are the same, and both are 1; FN (False Negative) means that the true value is 1 and the predicted value is 0; FP (False Positive) means that the true value is 0 and the predicted value is 1.
[0096] (2) Accuracy
[0097] In the YOLO algorithm, accuracy reflects the proportion of all samples whose predicted values are 1 and whose true values are also 1. The calculation method is shown in formula (4).
[0098]
[0099] (3) Recall rate
[0100] The recall rate indicates the probability of a sample whose true value is 1 and whose predicted value is also 1. The calculation method is shown in formula (5).
[0101]
[0102] (4) F1 score curve
[0103] The horizontal axis of the F1 score curve is the confidence level, and the vertical axis is the F1 score. The F1 score is a balanced indicator that reflects the accuracy and recall rate of the model. The higher the score value, the better the model can detect objects, and the smaller the missed detection rate and false alarm rate. The calculation formula of the F1 score is shown in formula (6).
[0104]
[0105] (5) Average Precision
[0106] Average precision is the average of the precisions of each category. For binary classification problems, AP (Average Precision) is used to evaluate the average precision of each category; for multi-classification problems, mAP (meanAverage Precision) is used. The higher the mAP value, the better the model training effect. The calculation formulas of AP and mAP are shown in Equations (7) and (8).
[0107]
[0108] In the formula, R is the abbreviation of Recall index; P is the abbreviation of Precision index; n is the threshold size; nc is the number of categories; AP k is the AP value of the kth category.
[0109] (6) Parameters and GFLOPs
[0110] The parameter quantity is the spatial size of the model, representing the total number of parameters for network training; FLOPs refers to the number of floating-point operations performed by the hardware per second, so GFLOPs is 1 billion floating-point operations per second, reflecting the length of model training time.
[0111] Experimental verification and result analysis
[0112] Pycharm software is used as the development environment, based on Python 3.9.19 version, running in the Pytorch deep learning framework, and the improved YOLOv8 model is trained using NVIDIA graphics card and graphics accelerator CUDA. The specific experimental environment configuration is shown in Table 2.
[0113] Table 2 Experimental environment configuration
[0114]
[0115] The setting of training parameters has a great influence on the training results and effects. In the YOLOv8 file, the model is optimized by setting the parameters in the configuration file to meet the requirements of different application scenarios and performance. The number of training iterations is set to 500, the image input size is 640*640 pixels, the number of training images per batch is 16, the training regularization weight decay parameter is 0.0005, and the initial learning rate and final learning rate are both adjusted to 0.01. The specific parameter settings are shown in Table 3.
[0116] Table 3 Model training parameter settings
[0117]
[0118]
[0119] In order to verify the improvement of the proposed model on the performance of the YOLOv8 model, the accuracy P, callback rate R, average precision mAP with a threshold of 50%, average precision mAP with a threshold of 50%-95%, and F1 score of YOLOv8 and improved YOLOv8 are calculated and compared. The training results of YOLOv8 and improved YOLOv8 models under the same dataset are shown in Table 4.
[0120] Table 4 Analysis of evaluation indicators of model experiments
[0121]
[0122] As can be seen from Table 4, all evaluation indicators of the improved YOLOv8 model have been improved, among which the mAP of 50%-95% has increased by 5.2% and R has increased by 4.1%, indicating that the improvement of the original YOLOv8 model is effective.
[0123] We selected two transformer images in natural environments from the open source dataset for identification, which are close to the images with dataset labels taken by the patrol personnel’s mobile phone. We used the trained improved YOLOv8 model for prediction. The identification results are as follows: Figure 7 shown.
[0124] Depend on Figure 7 It can be seen that the improved YOLOv8 model can recognize low-resolution images taken by mobile phones or on the Internet with high accuracy. Figure 7 (a) The YOLOv8s recognition model only recognizes targets such as the helmet (halmet) and transformer bushing (byqttg) displayed in a large area, and the recognition accuracy is relatively low; Figure 7 (b) It can be seen that when the targets such as power transformer (dlbyq), safety helmet (halmet) and transformer heat dissipation (byqsr) are blocked, the recognition result of the improved YOLOv8 model reaches more than 90%.
[0125] Depend on Figure 7 (c) It can be seen that when the background target is relatively complex, the YOLOv8s model cannot effectively identify most targets. In addition, due to the high image resolution, some small targets cannot be identified, resulting in misidentification errors. Figure 7 (d) It can be seen that the improved YOLOv8 model can effectively identify most targets, and the recognition accuracy of small targets is above 75%. The recognition results of Example 1 and Example 2 show that the improved YOLOv8 model has a good recognition effect on lightweight electrical equipment multi-target, i.e. small targets, and has certain feasibility.
[0126] In order to verify the effectiveness of the improved YOLOv8 model, the same data set, experimental environment platform and training parameters are used to conduct ablation experiments on YOLOv8s, YOLOv8s+CBAM+Ghostnet, YOLOv8s+CBAM+Ghostnet+SPPFCSPC and improved YOLOv8 models to verify the improvement results of each type. The experimental results are shown in Table 5.
[0127] Table 5. Comparison of ablation experiments
[0128]
[0129] It can be seen from Table 5 that compared with the YOLOv8 model, the YOLOv8s+CBAM+Ghostnet model has a 5M parameter reduction due to the introduction of the Ghostnet lightweight network structure, and the mAP, F1 and R parameters do not change much, but the introduction of the CBAM attention mechanism increases the computational complexity of the model by 1.9GFLOPs; compared with the YOLOv8s model, the YOLOv8s+CBAM+SPPFCSPC+Ghostnet has a 1M parameter increase and a 3.2GF increase in computational complexity due to the addition of the SPPFCSPC convolutional structure. LOPs, but compared with the YOLOv8 model, Precision, F1 score and mAP increased by 5.5%, 5.7% and 2% respectively; using the improved YOLOv8 model, adding GELU activation function and Wise-IoU loss function, although Precision decreased by 3% compared with the previous level ablation algorithm, it increased by 3% compared with the original YOLOv8 model, and R, mAP and F1 scores increased. At the same time, the average accuracy and recognition effect of the improved YOLOv8 model were improved, while the model parameters and GFLOPs were not much different from YOLOv8s. Therefore, it can be seen from the ablation experiment analysis that the improved YOLOv8 model can effectively identify small targets and reduce the size of the YOLOv8s model, which meets the needs of lightweight electrical equipment multi-target recognition and detection models.
[0130] Based on the analysis of the YOLOv8 model, this paper makes improvements in five aspects: lightweight network structure, attention mechanism, convolution structure, loss function and activation function, and proposes a lightweight multi-target recognition model based on the improved YOLOv8 model. The enhanced data set is used for example recognition comparison and ablation experiment comparison, which verifies that the improved YOLOv8 model can achieve the expected accuracy while keeping the model size as small as possible.
[0131] This embodiment also proposes a lightweight electrical equipment multi-target detection system, including a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the above method can be implemented.
[0132] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0133] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0134] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0135] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0136] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.
Claims
1. A multi-target detection method for lightweight electrical equipment, characterized in that: The following steps are involved: Step S1: acquiring multi-angle images of different types of electrical equipment through an image acquisition device to obtain an experimental data set; Step S2: annotate the experimental data set, perform data augmentation on the annotated data to form a new data set, and divide the new data set into a training set, a test set, and a validation set; Step S3: The YOLOv8 model is improved by constructing a Ghostnet lightweight network structure, introducing the CBAM attention mechanism and the SPPFCSPC convolution structure, and a multi-target detection model based on the improved YOLOv8 model is obtained; Step S4: Use the training set to train the multi-target detection model based on the improved YOLOv8 model. After reaching the maximum number of iterations, obtain the trained detection model, and use the validation set to verify and determine the optimal model for multi-target detection; Step S5: input the test set into the optimal model for multi-target detection to obtain the detection result of the electrical equipment target; Step S6: Evaluate the detection results: Use the mean average precision, accuracy, recall rate and detection speed to comprehensively evaluate the optimal model for multi-target detection and output the detection results.
2. A lightweight electrical equipment multi-target detection method according to claim 1, characterized in that: The different types of electrical equipment include low voltage distribution cabinets, power transformers, insulators, transformer bushings, safety helmets, transformer heat sinks, transformer oil pillows and drop fuses.
3. A lightweight electrical equipment multi-target detection method according to claim 1, characterized in that: The Ghostnet lightweight network structure adopts multiple convolution modules based on GhostConv, uses linear transformation to generate Ghost feature maps, and replaces the BottleNeck module in the original network with the GhostBottleNeck module to obtain the C3Ghost module; replaces the Conv and C2f modules of the YOLOv8 model with GhostConv and C3Ghost modules to obtain the Ghostnet lightweight network.
4. A lightweight electrical equipment multi-target detection method according to claim 1, characterized in that: The CBAM attention mechanism includes a channel attention module and a spatial attention module. The channel attention module performs maximum pooling and average pooling operations on the input features, and then fully connects, adds and adds the two results to obtain channel attention features that are sensitive to the target position information in the image; after the spatial attention module concatenates the maximum pooling and average pooling, it obtains the spatial attention features of the target through convolution and Sigmoid activation function; finally, the spatial attention features and the channel attention features are multiplied, and the weighted attention enhancement features are output, so that the model can understand the input data more comprehensively and effectively, and improve the performance and accuracy of the model.
5. A lightweight electrical equipment multi-target detection method according to claim 1, characterized in that: The SPPFCSPC convolution structure includes convolution layer I, convolution layer II, convolution layer III, convolution layer IV, maximum pooling layer I, maximum pooling layer II, maximum pooling layer III, Concat layer I, convolution layer V, convolution layer VI, Concat layer II and convolution layer VII; the input of the SPPFCSPC convolution structure is respectively connected to the input end of convolution layer I and convolution layer II, the output end of convolution layer II is connected to the input end of convolution layer III, the output end of convolution layer III is connected to the input end of convolution layer IV, the output end of convolution layer IV is connected to the input end of maximum pooling layer I, and the maximum pooling layer V is connected to the maximum pooling layer II. The output of convolution layer I is connected to the input of max pooling layer II, the output of max pooling layer II is connected to the input of max pooling layer III, the output of max pooling layer III is connected to the input of Concat layer I, the output of Concat layer I is connected to the input of convolution layer V, the output of convolution layer V is connected to the input of convolution layer VI, the output of convolution layer VI is connected to the input of Concat layer II, the output of Concat layer II is connected to the input of convolution layer VII, and the output of convolution layer I and convolution layer VII serve as the output of the SPPFCSPC convolution structure.
6. A lightweight electrical equipment multi-target detection method according to claim 1, 3, 4 or 5, characterized in that: The network structure of the multi-target detection model based on the improved YOLOv8 model includes a Backbone module, a Neck module and a Head module; The backbone module includes the first convolutional layer, GCG-I, CBAM-I, GC3-3, GCG-II, GC3-6, GCG-III, GC3-9, GCG-IV, GC3-3, SPPFCSPC, and CBAM-II; The Neck module includes C2f+Upsample layer I, Concat-III, C2f+Upsample layer II, Concat-IV, Upsample layer, GCG-V, Concat-V, C2f-I, GCG-VI, Concat-VI, C2f-II; The Head module includes Detect-I, Detect-II, and Detect-III; The input image passes through the first convolutional layer, GCG-I, CBAM-I, GC3-3, and GCG-II in sequence to obtain the first output feature. The first output feature passes through GC3-6 and GCG-III in sequence to obtain the second output feature. The second output feature passes through GC3-9, GCG-IV, and GC3-3 in sequence to obtain the third output feature. The third output feature and the feature output by CBAM-II are input into SPPFCSPC to obtain the fourth output feature. The fourth output feature and the third output feature are jointly input into the Upsample layer to obtain the third sampling feature, the feature obtained after the third sampling feature is input into Concat-IV and the second output feature are jointly input into the C2f+Upsample layer II to obtain the second sampling feature, the feature obtained after the second sampling feature is input into Concat-III and the first output feature are jointly input into the C2f+Upsample layer I to obtain the first sampling feature, the feature obtained after the first sampling feature is input into GCG-V is fused with the second sampling feature input into Concat-V to obtain the first fused feature, the feature obtained after the first fused feature passes through C2f-I and GCG-VI in sequence is fused with the third sampling feature input into Concat-VI to obtain the second fused feature; The first sampling feature is input into Detect-I to obtain output I, the first fusion feature is passed through C2f-I and Detect-II to obtain output II, and the second fusion feature is passed through C2f-II and Detect-III to obtain output III.
7. A lightweight electrical equipment multi-target detection method according to claim 6, characterized in that: The network structure of GCG includes GhostConv-I, BN and GeLU; the input of GhostConv-I is used as the input of GCG, the output of GhostConv-I is connected to the input of BN, the output of BN is connected to the input of GeLU, and the output of GeLU is used as the output of GCG.
8. A lightweight electrical equipment multi-target detection method according to claim 6, characterized in that: The network structure of GC3 includes GCG-VII, GCG-VIII, GhostBottleneck, GCG-IX, and Concat-VII; the input ends of GCG-VII and GCG-VIII serve as the input end of GC3, the output end of GCG-VIII is connected to the input end of GhostBottleneck, the output end of GhostBottleneck is connected to the input end of GCG-IX, the output ends of GCG-IX and GCG-VII are both connected to the input end of Concat-VII, and the output end of Concat-VII serves as the output end of GC3; GC3-3 means that there are 3 GhostBottleneck modules in the network of GC3, and the output of GCG-VIII passes through 3 GhostBottleneck modules in sequence as the input of GCG-IX; GC3-6 means that there are 6 GhostBottleneck modules in the network of GC3, and the output of GCG-VIII passes through 6 GhostBottleneck modules in sequence as the input of GCG-IX; GC3-9 means that there are 9 GhostBottleneck modules in the network of GC3, and the output of GCG-VIII passes through 9 GhostBottleneck modules in sequence as the input of GCG-IX; The network structure of GhostBottleneck includes DWConv-I, CBS, GhostConv-II, DWConv-II, GhostConv-III, and Add; the input ends of DWConv-I and GhostConv-II are used as the input ends of GhostBottleneck, the output end of DWConv-I is connected to the input end of CBS, the output end of GhostConv-II is connected to the input end of DWConv-II, the output end of DWConv-II is connected to the input end of GhostConv-III, and the output of GhostConv-III and the output of CBS are superimposed through Add as the output of GhostBottleneck.
9. A lightweight electrical equipment multi-target detection method according to claim 1, characterized in that: The Wise-IoU loss function and GELU activation function are introduced when training the multi-target detection model based on the improved YOLOv8 model using the training set; The expression of the GELU activation function is: The Wise-IoU loss function uses dynamic outlier degree to evaluate the detection box. The calculation formula of dynamic outlier degree is: In the formula, is the monotonic focusing coefficient; is the sliding average; The Wise-IoU loss function is defined as: L WIoUv3 =rR WIoU L IoU ; Where, L IoU is the IoU bounding box loss function value; R WIoU is the distance between the predicted box and the true box; r is the non-monotonic focusing coefficient defined by the outlier degree β.
10. A lightweight electrical equipment multi-target detection system, characterized in that: The method comprises a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the method according to any one of claims 1 to 9 can be implemented.
Citation Information
Cited By
Method for detecting targets in car elevator based on improved YOLOv8 algorithm
CN120375278A
Density detection and intrusion early warning method for shallow sea biological model
CN120635687A
Document image classification method and system based on artificial intelligence
CN120689886A