Method and system for carrying out target detection on cable channel image of unmanned aerial vehicle
By improving the YOLOv8 network structure, a chain lightweight attention C2f module, a double-layer fusion module and a deep space convolution module were introduced, and the YOLO-SGdrone network was obtained, which solved the problems of large image size, small size detection objects, and dense distribution in image object detection in drone cable channel image target detection, and achieved high-precision and low computing resource consumption target detection effect.
Patent Information
- Application Number
- CN202411654979.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-14
AI Technical Summary
In the prior art, the image object detection algorithm for the drone cable channel has problems such as large image size, small size detection objects, and dense distribution, resulting in greater room for improvement in lightweight and accuracy.
Based on YOLOv8, the YOLOv8 network structure is improved by introducing chain lightweight attention C2f module, double-layer fusion module and deep space convolution module to obtain the YOLO-SGdrone network, which is used to object detection of the image of the drone cable channel.
It realizes the reduction of computing resource consumption while maintaining high accuracy, and is suitable for object detection of drone cable channel images, and can analyze and identify hidden danger targets in real time and provide effective alarms.
Smart Images

Figure CN119625568A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of cable channel inspection, and relates to a method and system for performing target detection on a cable channel image of a drone. Background Art
[0002] One of the main tasks of power system inspection is to inspect cable channels, timely discover hidden dangers in channels, and prevent external machinery from damaging cable channels, so as to achieve the goal of power safety. With the maturity of drone technology and products, drones are increasingly used in cable channel inspection scenarios to replace manual field inspections, which can improve inspection efficiency and the timeliness of discovering hidden dangers.
[0003] However, drone inspections are currently mainly used as a means of data collection. The collected images still need to be manually reviewed, which increases labor costs in the process. On the other hand, the existing target detection algorithms are general-purpose and cannot be well adapted to the cable channel images collected by drones for detection. Problems such as large image size, small-sized detection objects, and dense distribution need to be overcome. There is a lot of room for improvement in terms of lightweight and accuracy.
[0004] YOLOv8 introduces Figure 2 The C2F module shown, namely "Cross Stage Partialconnections2.0with Fusion", optimizes residual connections and improves multi-scale feature detection capabilities through cross-stage partial connections and feature fusion. It also focuses on lightweight design, which enables the model to reduce computing resource consumption while maintaining high accuracy. Summary of the invention
[0005] In order to solve the shortcomings of the prior art, the present invention provides a method and system for target detection in UAV cable channel images. The method and system are improved based on YOLOv8 to obtain a target detection model for UAV cable channel images, so as to effectively detect the targets that need to be identified during the inspection process and issue an alarm when a specific target is identified.
[0006] The present invention adopts the following technical solution.
[0007] The first aspect of the present invention provides a method for detecting a target in a UAV cable channel image, comprising:
[0008] A chained lightweight attention module is established based on the lightweight attention module and the point-by-point convolutional layer, and a chained lightweight attention C2f module is constructed using multi-layer chained lightweight attention modules;
[0009] Construct a two-layer fusion module based on the depth-wise separable convolutional layer;
[0010] Construct a deep spatial convolution module based on deep spatial layers and non-strided convolution layers;
[0011] The YOLOv8 network structure is improved by using the chained lightweight attention C2f module, the double-layer fusion module, and the deep spatial convolution module to obtain the YOLO-SGdrone network;
[0012] The YOLO-SGdrone network is used to build a target detection model to perform target detection on drone cable channel images.
[0013] Preferably, the structure of the lightweight attention module includes an input layer, a global average pooling layer, a two-dimensional convolution and an activation function.
[0014] Preferably, the chain lightweight attention module established based on the lightweight attention module and the point-by-point convolution layer has a structure comprising a point-by-point convolution layer, a depth convolution layer, a lightweight attention module, a convolution layer, a Dropout layer, and an Add layer connected in sequence; wherein the point-by-point convolution layer is also connected to the Add layer.
[0015] Preferably, a chained lightweight attention C2f module constructed using a multi-layer chained lightweight attention module has a structure comprising an input layer, a convolutional layer, a segmentation layer, a multi-layer chained lightweight attention module, a splicing layer and a convolutional layer connected in sequence; wherein the convolutional layer, the segmentation layer, and the multi-layer chained lightweight attention module are also connected to the splicing layer.
[0016] Preferably, the double-layer fusion module constructed based on the depthwise separable convolution layer comprises a depthwise separable convolution layer and a concatenation layer; wherein the downsampled feature map is input into the depthwise separable convolution layer, and the output of the depthwise separable convolution layer is connected to the corresponding high-level feature map. Figure 1 The concatenation layer is input and the fused feature map is output from the concatenation layer.
[0017] Preferably, the chained lightweight attention C2f module, the double-layer fusion module, and the deep spatial convolution module are used to improve the YOLOv8 network structure, including:
[0018] Use chained lightweight attention C2f module to replace the C2f module in the YOLOv8 network structure;
[0019] And in the backbone network part of the YOLOv8 network structure, a deep spatial convolution module is used to replace the convolution layer;
[0020] A double-layer fusion module is introduced in the neck part of the YOLOv8 network structure.
[0021] Preferably, in the YOLO-SGdrone network obtained by improving the YOLOv8 network structure by using the chained lightweight attention C2f module, the double-layer fusion module, and the deep spatial convolution module, the backbone network part includes an input layer, a convolution layer, a deep spatial convolution module, a chained lightweight attention C2f module, a deep spatial convolution module, a chained lightweight attention C2f module, a deep spatial convolution module, a chained lightweight attention C2f module, a deep spatial convolution module, a chained lightweight attention C2f module, and a fast spatial pyramid pooling layer connected in sequence;
[0022] The neck part includes two branches, wherein the first branch includes a chained lightweight attention C2f module, a two-layer fusion module, an upsampling layer, a chained lightweight attention C2f module, a two-layer fusion module, and an upsampling layer connected in sequence;
[0023] The second branch includes a convolutional layer, a concatenated layer, a chained lightweight attention C2f module, a convolutional layer, a concatenated layer, and a chained lightweight attention C2f module connected in sequence;
[0024] The head part includes three detection layers.
[0025] Preferably, the second and third chained lightweight attention C2f modules of the backbone network part are respectively connected to the first and second chained lightweight attention C2f modules of the first branch;
[0026] The third chained lightweight attention C2f module of the backbone network part is connected to the upsampling layer of the first branch and the second chained lightweight attention C2f module of the second branch;
[0027] The first and second chained lightweight attention C2f modules of the first branch are respectively connected to the first convolutional layer and the first concatenation layer of the second branch;
[0028] The fast spatial pyramid pooling layer is connected to the second upsampling layer of the first branch and the second splicing layer of the second branch respectively;
[0029] The first, second and third detection layers of the head part are respectively connected to the first convolution layer of the second branch, the first chained lightweight attention C2f module and the second chained lightweight attention C2f module.
[0030] Preferably, the YOLO-SGdrone network is used to build a target detection model to perform target detection on the UAV cable channel image, including the following steps:
[0031] Use drones to batch collect cable channel images;
[0032] Perform data annotation and enhancement processing on the images collected by the drone to obtain a data set;
[0033] Use the dataset to train the YOLO-SGdrone network to obtain the target detection model;
[0034] Optimize the version and format of the target detection model and embed it into mobile devices;
[0035] The mobile device uses the embedded target detection model to perform target detection on the cable channel images collected by the drone in real time.
[0036] The second aspect of the present invention provides a system for performing target detection on a UAV cable channel image, comprising:
[0037] The network improvement module is used to establish a chained lightweight attention module based on the lightweight attention module and the point-by-point convolution layer, and to construct a chained lightweight attention C2f module using a multi-layer chained lightweight attention module; to construct a double-layer fusion module based on the deep separable convolution layer; to construct a deep spatial convolution module based on the deep spatial layer and the non-stepped convolution layer; to improve the YOLOv8 network structure using the chained lightweight attention C2f module, the double-layer fusion module, and the deep spatial convolution module to obtain the YOLO-SGdrone network;
[0038] The target detection module is used to build a target detection model using the YOLO-SGdrone network and perform target detection on the drone cable channel image.
[0039] A third aspect of the present invention provides a terminal, comprising a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method.
[0040] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method when executed by a processor.
[0041] Compared with the prior art, the beneficial effects of the present invention include at least:
[0042] The present invention proposes two new modules - a chained lightweight attention C2f module and a double-layer fusion module to replace the original modules of the YOLOv8 network. Specifically, the chained lightweight attention C2f module is used to replace the C2f module of YOLOv8; the double-layer fusion module is introduced in the neck part, which realizes the lightweight of the model while ensuring the accuracy of target detection in drone images.
[0043] The present invention adopts multi-layer chain lightweight attention modules to construct a chain lightweight attention C2f module. The original bottleneck layer (Bottleneck) structure is changed through the chain lightweight attention module, and a point-by-point convolution layer is introduced to reduce the amount of calculation. At the same time, a newly designed lightweight attention module is introduced to realize the lightweight model without negatively affecting the accuracy.
[0044] The double-layer fusion module of the present invention adopts a depth-separable convolution layer, and its separable convolution is a two-level convolution, in which the depth convolution is only for the feature map of a single channel, and the point convolution is only for the feature map channel. Compared with the convolution layer with the same kernel size, the parameters of the depth-separable convolution are relatively small. The receptive field is expanded without adding a large number of parameters.
[0045] At the same time, the present invention introduces a deep spatial convolution module into the backbone network part of YOLOv8 to replace the original convolution layer, further optimizes YOLOv8, and can solve the problems of low-resolution images and small objects. While effectively inspecting the cable channel scene, the trained model can be more easily deployed on mobile devices.
[0046] The present invention realizes that when the UAV is inspecting along the route, YOLO-SGdrone is used to analyze and identify potential danger targets in real time and issue effective warnings. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 is a flow chart of the method of the present invention;
[0048] Figure 2 The structure diagram of the C2F module introduced for YOLOv8;
[0049] Figure 3 This is the structural diagram of the chained lightweight attention C2f module of the present invention;
[0050] Figure 4 This is a structural diagram of a double-layer fusion module of the present invention;
[0051] Figure 5 This is a structural diagram of the deep spatial convolution module of the present invention;
[0052] Figure 6 This is the YOLO-SGdrone network structure diagram of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.
[0054] like Figure 1 As shown, Embodiment 1 of the present invention provides a method for performing target detection on a UAV cable channel image, comprising:
[0055] Step 1: Based on the lightweight attention module (Efficient Squeeze Excitation, ESE) and the pointwise convolution (Pointwise Conv, Pw_Conv) layer, a chain-like lightweight attention module (Chain-like EfficientSqueeze Excitation, CESE) is established, and a chain-like lightweight attention C2f module (C2f_CESE) is constructed using multi-layer chain-like lightweight attention modules, where C2f is spelled as Faster Implementation of CSP Bottleneck with 2convolutions;
[0056] Further preferably, the present invention proposes a new module-chain lightweight attention C2f module, whose structure is as follows Figure 3 As shown;
[0057] 1) The chained lightweight attention C2f module includes an input layer, a convolutional layer, a segmentation layer, a multi-layer chained lightweight attention module, a splicing layer, and a convolutional layer connected in sequence; wherein the convolutional layer, the segmentation layer, and the multi-layer chained lightweight attention module are also connected to the splicing layer. Specifically, the input feature map passes through a convolutional layer, and the output result is a feature map with half the number of channels. The features are then divided through a segmentation operation, and then stacked through a multi-layer chained lightweight attention module and spliced with the previous gradient flow.
[0058] 2) Chain lightweight attention module Compared with the original bottleneck layer structure, the chain lightweight attention module structure includes a point-by-point convolution layer, a depthwise convolution layer (Depthwise Conv, Dw_Conv), a lightweight attention module, a convolution layer, a Dropout layer, and an Add layer connected in sequence; the point-by-point convolution layer is also connected to the Add layer.
[0059] 3) Introducing the attention mechanism, the present invention designs a new lightweight attention module, the structure of which only uses the input layer, global average pooling (GAP, Golbal Average Pooling), two-dimensional convolution (Conv2d) and activation function HardSigmod.
[0060] The present invention adopts multi-layer chained lightweight attention modules to construct a chained lightweight attention C2f module. The original bottleneck layer structure is changed through the chained lightweight attention module, and a point-by-point convolution layer is introduced to reduce the amount of calculation. At the same time, a newly designed lightweight attention module is introduced to realize the lightweight model without negatively affecting the accuracy.
[0061] Step 2: Construct a double-layer fusion module (Double-Fusion) based on the depthwise separable convolution layer (DSConv);
[0062] Further preferably, the present invention proposes Figure 4 The double-layer fusion module shown in the figure has a structure including a depth-separable convolution layer and a splicing layer. The depth-separable convolution layer is used to extract feature maps from the lower layer containing the most detailed and accurate location information of the target. The module connects the downsampled feature map (Lower stage layer feature) and the corresponding high-level feature map (Corresponding stage layer feature) through the splicing layer as its output, namely the fusion feature map (fusion feature).
[0063] The subsequent top-down chained lightweight attention C2f modules extract this combined information, which contains rich details about object classification and spatial localization.
[0064] In the two-layer fusion module, depthwise separable convolution is also adopted because depthwise separable convolution is a two-level convolution, which consists of depthwise convolution and pointwise convolution. In the depthwise separable convolution layer, the depthwise convolution is only for the feature map of a single channel, and the pointwise convolution is only for the feature map channel. Compared with the convolution layer with the same kernel size, the parameters of depthwise separable convolution are relatively small. The receptive field is expanded without adding a large number of parameters.
[0065] Step 3: Construct a deep spatial convolution module (SPD-Conv) based on the deep spatial (SPD, space-to-depth) layer and the non-step convolution layer (non-stepConvolution);
[0066] For targets with high image resolution and moderate object size, object detection models use designs such as strided convolution and pooling layers to skip redundant pixel information while effectively learning object features. In the challenging task of detecting small and blurry objects, the assumption of redundant information becomes invalid, resulting in the loss of fine-grained image details and insufficient learning of object features, leading to degraded detection performance. To address this issue, a deep spatial convolution module is introduced to address the problem of low-resolution images and small objects.
[0067] The structure of the deep spatial convolution module is as follows Figure 5 As shown in the figure, it consists of a deep spatial layer and a non-stride convolution layer. The deep spatial layer avoids the information loss in traditional stride convolution and pooling operations by converting the information of the spatial dimension into the depth dimension. After each deep spatial layer, a non-stride convolution layer is added. The non-stride convolution layer is applied after the deep spatial layer because the non-stride convolution can extract features without reducing the size of the feature map, further maintaining the fine-grained information of the image, which is crucial for improving the recognition performance of low-resolution images and small objects. By adding this module to the model, the feature extraction capability of the target can be enhanced, further improving the detection accuracy of the model.
[0068] Step 4: Improve the YOLOv8 network structure using the chained lightweight attention C2f module, the double-layer fusion module, and the deep spatial convolution module to obtain the YOLO-SGdrone network, where SGdrone is the State Grid (SG) drone.
[0069] Further preferably, the YOLOv8 network structure is improved by using a chained lightweight attention C2f module, a double-layer fusion module, and a deep spatial convolution module, including:
[0070] Use chained lightweight attention C2f module to replace the C2f module in the YOLOv8 network structure;
[0071] In the backbone network of the YOLOv8 network structure, a deep spatial convolution module is used to replace the convolution layer.
[0072] A double-layer fusion module is introduced in the neck part of the YOLOv8 network structure.
[0073] The network structure of the improved YOLOv8 algorithm is as follows Figure 6As shown in the figure, named YOLO-Sgdrone, in the YOLO-SGdrone network, the backbone network part includes the input layer, Conv layer, deep spatial convolution module, chained lightweight attention C2f module, deep spatial convolution module, chained lightweight attention C2f module, deep spatial convolution module, chained lightweight attention C2f module, deep spatial convolution module, chained lightweight attention C2f module and fast spatial pyramid pooling (SPPF, Spatial Pyramid Pooling-Fast) layer connected in sequence;
[0074] The neck part includes two branches, wherein the first branch includes a chained lightweight attention C2f module, a two-layer fusion module, an upsampling layer, a chained lightweight attention C2f module, a two-layer fusion module, and an upsampling layer connected in sequence;
[0075] The second branch includes a convolutional layer, a concatenated layer, a chained lightweight attention C2f module, a convolutional layer, a concatenated layer, and a chained lightweight attention C2f module connected in sequence;
[0076] The head part includes three detection layers.
[0077] The second and third chained lightweight attention C2f modules of the backbone network part are respectively connected to the first and second chained lightweight attention C2f modules of the first branch;
[0078] The third chained lightweight attention C2f module of the backbone network part is connected to the upsampling layer of the first branch and the second chained lightweight attention C2f module of the second branch;
[0079] The first and second chained lightweight attention C2f modules of the first branch are respectively connected to the first convolutional layer and the first concatenation layer of the second branch;
[0080] The fast spatial pyramid pooling layer is connected to the second upsampling layer of the first branch and the second splicing layer of the second branch respectively;
[0081] The first, second and third detection layers of the head part are respectively connected to the first convolution layer of the second branch, the first chained lightweight attention C2f module and the second chained lightweight attention C2f module.
[0082] Step 5: Use the YOLO-SGdrone network to build a target detection model, perform target detection on the drone cable channel image, and realize automatic drone inspection. The following steps are required:
[0083] Step 5.1: Use drones to collect cable channel images;
[0084] Further preferably, the image acquisition scheme is as follows:
[0085] Plan drone flight paths to cover every angle and detail of the cable channel.
[0086] Set the drone's flight altitude and speed to ensure image clarity and continuity.
[0087] Utilize the automatic shooting function of the drone to capture images of the cable channel at regular intervals or fixed points to ensure image coverage and quality.
[0088] Step 5.2: Annotate and enhance the collected images to obtain a data set;
[0089] Further preferably, the data annotation and processing scheme is as follows:
[0090] Use professional image annotation tools (such as Labelme) to annotate the collected images.
[0091] The annotation content includes excavators, pile drivers and other external breaking machines that may cause harm to the cable channel. Then the annotation file is generated.
[0092] First, the annotated images and label files are divided into training sets and validation sets, and then the images are subjected to data augmentation to increase the diversity of the data set and improve the robustness of the model.
[0093] Data augmentation methods include geometric transformations such as image flipping, rotation, scaling, cropping, and translation to increase the diversity of images. At the same time, the model's robustness to different lighting and color changes is enhanced by adjusting brightness, contrast, saturation, and color jitter. Adding noise, blur, shearing, and channel perturbations can improve the performance of the model under suboptimal conditions. In addition, gamma correction, random erasing, and hybrid enhancement techniques such as MixUp and CutMix are used to further enrich the complexity of training data and enhance the model's ability to recognize and generalize targets. These methods can be flexibly combined according to specific task requirements to optimize model performance.
[0094] Step 5.3: Use the dataset to train the YOLO-SGdrone network to obtain the target detection model;
[0095] Further preferably, the model training scheme is as follows:
[0096] The prepared dataset is trained using the invented YOLO-SGdrone. The loss value and accuracy during training are monitored, and the model parameters are adjusted to optimize performance. After the training is completed, the final model weight file is saved.
[0097] Step 5.4: Optimize the version and format of the target detection model and embed it into the mobile device
[0098] 1) Model optimization and conversion
[0099] Use tools such as TensorFlow Lite, ONNX Runtime, Core ML, or NCNN to optimize the trained YOLO model into a version suitable for running on mobile devices. And convert the optimized model into a format compatible with mobile devices
[0100] 2) Object detection models are embedded in mobile devices;
[0101] Mobile Application Development
[0102] Develop mobile applications using development tools for the Android platform (such as Android Studio).
[0103] Integrated camera function to collect images transmitted by drones in real time.
[0104] Embed the YOLO-SGdrone model into mobile applications for real-time image detection.
[0105] Step 5.5: The mobile device uses the embedded object detection model to perform object detection on the images collected by the drone in real time.
[0106] Further preferably, the real-time inspection scheme is as follows:
[0107] The drone cruises over the cable channel, collecting images in real time and transmitting them to mobile devices.
[0108] The mobile device uses the embedded YOLO-SGdrone model to perform real-time detection on the image and identify anomalies in the cable channel.
[0109] The inspection results and images are displayed on mobile devices, and inspection reports are generated.
[0110] Embodiment 2 of the present invention provides a system for performing target detection on a UAV cable channel image, comprising:
[0111] The network improvement module is used to establish a chained lightweight attention module based on the lightweight attention module and the point-by-point convolution layer, and to construct a chained lightweight attention C2f module using a multi-layer chained lightweight attention module; to construct a double-layer fusion module based on the deep separable convolution layer; to construct a deep spatial convolution module based on the deep spatial layer and the non-stepped convolution layer; to improve the YOLOv8 network structure using the chained lightweight attention C2f module, the double-layer fusion module, and the deep spatial convolution module to obtain the YOLO-SGdrone network;
[0112] The target detection module is used to build a target detection model using the YOLO-SGdrone network and perform target detection on the drone cable channel image.
[0113] Embodiment 3 of the present invention provides a terminal, including a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method.
[0114] Embodiment 4 of the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method when executed by a processor.
[0115] The beneficial effects of the present invention are as follows:
[0116] The present invention proposes two new modules - a chained lightweight attention C2f module and a double-layer fusion module to replace the original modules of the YOLOv8 network. Specifically, the chained lightweight attention C2f module is used to replace the C2f module of YOLOv8; the double-layer fusion module is introduced in the neck part, which realizes the lightweight of the model while ensuring the accuracy of target detection in drone images.
[0117] The present invention adopts multi-layer chain lightweight attention modules to construct a chain lightweight attention C2f module. The original bottleneck layer (Bottleneck) structure is changed through the chain lightweight attention module, and a point-by-point convolution layer is introduced to reduce the amount of calculation. At the same time, a newly designed lightweight attention module is introduced to realize the lightweight model without negatively affecting the accuracy.
[0118] The double-layer fusion module of the present invention adopts a depth-separable convolution layer, and its separable convolution is a two-level convolution, in which the depth convolution is only for the feature map of a single channel, and the point convolution is only for the feature map channel. Compared with the convolution layer with the same kernel size, the parameters of the depth-separable convolution are relatively small. The receptive field is expanded without adding a large number of parameters.
[0119] At the same time, the present invention introduces a deep spatial convolution module into the backbone network part of YOLOv8 to replace the original convolution layer, further optimizes YOLOv8, and can solve the problems of low-resolution images and small objects. While effectively inspecting the cable channel scene, the trained model can be more easily deployed on mobile devices.
[0120] The present invention realizes that when the UAV is inspecting along the route, YOLO-SGdrone is used to analyze and identify potential danger targets in real time and issue effective warnings.
[0121] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0122] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0123] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0124] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for target detection on a UAV cable channel image, characterized in that: include: A chained lightweight attention module is established based on the lightweight attention module and the point-by-point convolutional layer, and a chained lightweight attention C2f module is constructed using multi-layer chained lightweight attention modules; Construct a two-layer fusion module based on the depth-wise separable convolutional layer; Construct a deep spatial convolution module based on deep spatial layers and non-strided convolution layers; The YOLOv8 network structure is improved by using the chained lightweight attention C2f module, the double-layer fusion module, and the deep spatial convolution module to obtain the YOLO-SGdrone network; The YOLO-SGdrone network is used to build a target detection model to perform target detection on drone cable channel images.
2. The method for target detection on a UAV cable channel image according to claim 1, characterized in that: The structure of the lightweight attention module includes an input layer, a global average pooling layer, a two-dimensional convolution and an activation function.
3. The method for target detection on a UAV cable channel image according to claim 1, characterized in that: The chain lightweight attention module is established based on the lightweight attention module and the point-by-point convolution layer. Its structure includes a point-by-point convolution layer, a depth convolution layer, a lightweight attention module, a convolution layer, a Dropout layer, and an Add layer connected in sequence; wherein the point-by-point convolution layer is also connected to the Add layer.
4. The method for target detection on a UAV cable channel image according to claim 1, characterized in that: The chained lightweight attention C2f module is constructed using multi-layer chained lightweight attention modules, and its structure includes an input layer, a convolutional layer, a segmentation layer, a multi-layer chained lightweight attention module, a splicing layer and a convolutional layer connected in sequence; wherein the convolutional layer, the segmentation layer, and the multi-layer chained lightweight attention module are also connected to the splicing layer.
5. The method for target detection on a UAV cable channel image according to claim 1, characterized in that: The two-layer fusion module built based on the depthwise separable convolutional layer includes a depthwise separable convolutional layer and a splicing layer. The downsampled feature map is input into the depthwise separable convolutional layer, and the output of the depthwise separable convolutional layer and the corresponding high-level feature map are input into the splicing layer together, and the splicing layer outputs the fused feature map.
6. The method for target detection on a UAV cable channel image according to claim 1, characterized in that: The YOLOv8 network structure is improved by using a chained lightweight attention C2f module, a double-layer fusion module, and a deep spatial convolution module, including: Use chained lightweight attention C2f module to replace the C2f module in the YOLOv8 network structure; And in the backbone network part of the YOLOv8 network structure, a deep spatial convolution module is used to replace the convolution layer; A double-layer fusion module is introduced in the neck part of the YOLOv8 network structure.
7. The method for target detection on a UAV cable channel image according to claim 6, characterized in that: In the YOLO-SGdrone network obtained by improving the YOLOv8 network structure by using the chained lightweight attention C2f module, the double-layer fusion module, and the deep spatial convolution module, the backbone network part includes the input layer, the convolution layer, the deep spatial convolution module, the chained lightweight attention C2f module, the deep spatial convolution module, the chained lightweight attention C2f module, the deep spatial convolution module, the chained lightweight attention C2f module, the deep spatial convolution module, the chained lightweight attention C2f module, and the fast spatial pyramid pooling layer connected in sequence; The neck part includes two branches, wherein the first branch includes a chained lightweight attention C2f module, a two-layer fusion module, an upsampling layer, a chained lightweight attention C2f module, a two-layer fusion module, and an upsampling layer connected in sequence; The second branch includes a convolutional layer, a concatenated layer, a chained lightweight attention C2f module, a convolutional layer, a concatenated layer, and a chained lightweight attention C2f module connected in sequence; The head part includes three detection layers.
8. The method for target detection on a UAV cable channel image according to claim 7, characterized in that: The second and third chained lightweight attention C2f modules of the backbone network part are respectively connected to the first and second chained lightweight attention C2f modules of the first branch; The third chained lightweight attention C2f module of the backbone network part is connected to the upsampling layer of the first branch and the second chained lightweight attention C2f module of the second branch; The first and second chained lightweight attention C2f modules of the first branch are respectively connected to the first convolutional layer and the first concatenation layer of the second branch; The fast spatial pyramid pooling layer is connected to the second upsampling layer of the first branch and the second splicing layer of the second branch respectively; The first, second and third detection layers of the head part are respectively connected to the first convolution layer of the second branch, the first chained lightweight attention C2f module and the second chained lightweight attention C2f module.
9. The method for target detection on a UAV cable channel image according to claim 1, characterized in that: The YOLO-SGdrone network is used to build a target detection model to perform target detection on the UAV cable channel image, including the following steps: Use drones to batch collect cable channel images; Perform data annotation and enhancement processing on the images collected by the drone to obtain a data set; Use the dataset to train the YOLO-SGdrone network to obtain the target detection model; Optimize the version and format of the target detection model and embed it into mobile devices; The mobile device uses the embedded target detection model to perform target detection on the cable channel images collected by the drone in real time.
10. A system for detecting targets in UAV cable channel images, using the method according to any one of claims 1 to 9, characterized in that: include: A network improvement module is used to establish a chained lightweight attention module based on a lightweight attention module and a point-by-point convolutional layer, and to construct a chained lightweight attention C2f module using a multi-layer chained lightweight attention module; A double-layer fusion module is built based on the deep separable convolution layer; a deep spatial convolution module is built based on the deep spatial layer and the non-stride convolution layer; the YOLOv8 network structure is improved by using the chained lightweight attention C2f module, the double-layer fusion module, and the deep spatial convolution module to obtain the YOLO-SGdrone network; The target detection module is used to build a target detection model using the YOLO-SGdrone network and perform target detection on the drone cable channel image.
11. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1-9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Cited By
Lightweight target detection method and unmanned aerial vehicle image target detection method
CN120107572A