Lightweight target detection method and system based on unmanned aerial vehicle platform
By embedding a lightweight target detection model on the UAV platform, combined with the backbone network, path aggregation network and detection head, the problem of target detection technology under the UAV platform being difficult to balance accuracy and efficiency is solved, and the detection of small targets is achieved. Efficient detection and real-time performance.
Patent Information
- Application Number
- CN202411073757.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-08-07
AI Technical Summary
It is difficult for target detection technology under existing UAV platforms to take into account detection accuracy and efficiency at the same time, especially when load and energy are limited, and cannot meet real-time detection requirements.
A lightweight target detection method based on the UAV platform is adopted, using a lightweight target detection model that has been trained and embedded in the UAV platform. The model includes a backbone network, a path aggregation network and a detection head. The backbone network is used to extract spatial information and semantic information at different scales. The path aggregation network performs feature map fusion through 1*1 convolutional layer and bidirectional connection layer. The detection head is used to detect target categories and locations, and performs non-maximum suppression through Method processing results.
It improves the ability to extract small targets, reduces the amount of calculation, integrates the adaptability of variable convolution to the shape and size of objects, solves the problems of complex background interference and large changes in object size, and achieves detection accuracy and real-time performance. balance.
Smart Images

Figure CN118587622A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of target detection, and in particular relates to a lightweight target detection method and system based on an unmanned aerial vehicle platform. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Due to the wide field of view and strong real-time performance of drones, they have gradually become an important tool for remote sensing scenes and are widely used in various fields such as emergency rescue, disaster monitoring, and urban traffic management. In the field of drone-based target detection, on the one hand, due to the large changes in the aircraft's flight altitude and fast speed, the scene often has blurred objects and a high proportion of small objects, which increases the difficulty of the object detection task; on the other hand, the drone platform has limited load and energy resources, and it is difficult to carry high-power, high-performance computing devices for object detection. Current applications usually transmit the original image to the ground processing end through the network for processing, which is difficult to meet the requirements of real-time detection. The two-stage detection method in the existing drone platform target detection technology first generates candidate boxes through end-to-end learning of Region Proposal Networks (RPN), then uses deep neural networks (such as ResNet, VGG, etc.) to extract features for each candidate box, and finally uses classifiers and regressors to classify the candidate boxes, and fine-tune the position of the bounding box for accurate fitting. Representative algorithms include Faster R-CNN and SPPNet. Although this type of method has good detection performance, the duplication of candidate areas will lead to a large amount of calculation, which makes it difficult to meet the real-time requirements of detection on low-computing power platforms.
[0004] The single-stage detection method in the existing target detection technology under the UAV platform does not rely on the explicit candidate box generation stage, and directly densely predicts the location and category of the target on the input image, such as the YOLO series, SSD, RetinaNet, etc. Although this type of method has an advantage in speed compared to the two-stage algorithm, it is difficult to achieve high accuracy due to factors such as target diversity and complex background, resulting in frequent false detection and missed detection in existing methods. Summary of the invention
[0005] In order to solve the technical problem that the current target detection technology under the UAV platform in the above background technology cannot take into account both the target detection accuracy and efficiency at the same time, the present invention provides a lightweight target detection method and system based on the UAV platform, which can effectively balance the detection accuracy and speed.
[0006] In order to achieve the above object, the present invention adopts the following technical solution: A first aspect of the present invention provides a lightweight target detection method based on an unmanned aerial vehicle platform.
[0007] A lightweight target detection method based on an unmanned aerial vehicle platform, comprising: Obtain drone inspection images; Using a lightweight target detection model that has been trained and embedded in the UAV platform, the UAV inspection image is processed to obtain a target detection result; Wherein, the lightweight target detection model includes a backbone network, a path aggregation network and a detection head; The backbone network is used to extract spatial information and semantic information of several layers at different scales of the drone inspection image to obtain feature maps of several layers; The path aggregation network includes a 1*1 convolution layer and a bidirectional connection layer; the 1*1 convolution layer is used to reduce the number of channels of the corresponding layer feature map extracted by the backbone network, and then transmit it to the bidirectional connection layer; the bidirectional connection layer is used to connect the feature map output by the 1*1 convolution layer and the corresponding feature map directly output by the backbone network, and on this basis, add a bottom-up cross-scale connection path to obtain a number of fused feature maps; The detection head is used to detect each fused feature map to obtain a corresponding result map containing the target category and position, and then these result maps are processed by a non-maximum suppression method to obtain the final target category and position coordinates.
[0008] As an implementation mode, the path aggregation network is used to fuse the third layer feature map extracted by the backbone network and the feature maps thereafter.
[0009] As an implementation mode, the backbone network includes a plurality of feature extraction layers and spatial pyramid pooling layers; the feature extraction layers are connected in series, and the spatial pyramid pooling layers are connected in series to the rear end of the feature extraction layers connected in series.
[0010] A graph deep convolutional network is introduced into the feature extraction layer, and the graph deep convolutional network processes the input original feature map to obtain a feature map containing global information and local spatial information; The graph deep convolutional network includes two branches, one of which includes a local feature extraction network and a hybrid local channel attention mechanism module. The local feature extraction network is used to extract local features of the original feature map, and then generate a local feature map through the hybrid local channel attention mechanism module; the other branch directly transmits the original feature map to the sum calculation module, and the sum calculation module adds the original feature map and its corresponding local feature map to obtain a feature map containing global information and local spatial information.
[0011] As an implementation method, the spatial pyramid pooling layer includes a first lightweight depth-separable convolutional network, a plurality of pooling convolution kernels connected in series, a splicing layer and a second lightweight depth-separable convolutional network; the first lightweight depth-separable convolutional network is used to extract features from the input feature map, and the extracted features are divided into two paths, one path is pooled step by step through a plurality of pooling convolution kernels connected in series and transmitted to the splicing layer, and the other path is directly transmitted to the splicing layer; the splicing layer is used to splice all received features, and then transmit them to the second lightweight depth-separable convolutional network for further feature extraction.
[0012] As an implementation mode, the detection head includes a decoupling head structure, and an input end of the decoupling head structure is further connected in series with a partial convolution module having an inverted residual structure; The partial convolution module of the inverted residual structure is used to: use point multiplication convolution to expand the number of channels of the feature map, use the partial convolution network to calculate in the high-dimensional space after normalization and activation function processing, and finally restore the number of channels through the inverse process of dimensionality increase, and send the obtained feature map to the decoupling head structure for processing.
[0013] As an implementation mode, the partial convolutional network is used to: perform a convolution operation on some channels of the feature map, and concatenate the calculated convolution result with the remaining channels of the feature map.
[0014] As an implementation method, the activation function is an H-Swish function.
[0015] A second aspect of the present invention provides a lightweight target detection system based on an unmanned aerial vehicle platform.
[0016] In one or more embodiments, a lightweight target detection system based on an unmanned aerial vehicle platform includes: An image acquisition module, which is used to acquire UAV inspection images; A target detection module, which is used to process the UAV inspection image using a lightweight target detection model that has been trained and embedded in the UAV platform to obtain a target detection result; Wherein, the lightweight target detection model includes a backbone network, a path aggregation network and a detection head; The backbone network is used to extract spatial information and semantic information of several layers at different scales of the drone inspection image to obtain feature maps of several layers; The path aggregation network includes a 1*1 convolution layer and a bidirectional connection layer; the 1*1 convolution layer is used to reduce the number of channels of the corresponding layer feature map extracted by the backbone network, and then transmit it to the bidirectional connection layer; the bidirectional connection layer is used to connect the feature map output by the 1*1 convolution layer and the corresponding feature map directly output by the backbone network, and on this basis, add a bottom-up cross-scale connection path to obtain a number of fused feature maps; The detection head is used to detect each fused feature map to obtain a corresponding result map containing the target category and position, and then these result maps are processed by a non-maximum suppression method to obtain the final target category and position coordinates.
[0017] In one or more embodiments, a lightweight target detection system based on an unmanned aerial vehicle platform includes: Image acquisition module and image processing module; The image acquisition module is mounted on the UAV platform; the image processing module is embedded in the UAV platform; The image acquisition module is used to collect the inspection images of the UAV and transmit them to the image processing module; The image processing module is deployed with a lightweight target detection model, and the lightweight target detection model is used to process the UAV inspection image to obtain a target detection result; Wherein, the lightweight target detection model includes a backbone network, a path aggregation network and a detection head; The backbone network is used to extract spatial information and semantic information of several layers at different scales of the drone inspection image to obtain feature maps of several layers; The path aggregation network includes a 1*1 convolution layer and a bidirectional connection layer; the 1*1 convolution layer is used to reduce the number of channels of the corresponding layer feature map extracted by the backbone network, and then transmit it to the bidirectional connection layer; the bidirectional connection layer is used to connect the feature map output by the 1*1 convolution layer and the corresponding feature map directly output by the backbone network, and on this basis, add a bottom-up cross-scale connection path to obtain a number of fused feature maps; The detection head is used to detect each fused feature map to obtain a corresponding result map containing the target category and position, and then these result maps are processed by a non-maximum suppression method to obtain the final target category and position coordinates.
[0018] Compared with the prior art, the present invention has the following beneficial effects: (1) The path aggregation network of the present invention uses a 1*1 convolutional layer to reduce the number of channels of the corresponding layer feature map extracted by the backbone network, and then uses a bidirectional connection layer to connect the feature map output by the 1*1 convolutional layer and the corresponding feature map directly output by the backbone network. On this basis, a bottom-up cross-scale connection path is added to fuse the feature maps, thereby realizing the fusion of spatial information in the shallow feature extraction map of the backbone network, improving the ability to extract small targets, and reducing the amount of calculation. The bottom-up cross-scale connection path introduced realizes the fusion of feature maps extracted by hole convolution kernels of different sizes, reducing the impact of size differences.
[0019] (2) A graph deep convolutional network is introduced into the feature extraction layer of the present invention. The graph deep convolutional network includes two branches, one of which includes a local feature extraction network and a hybrid local channel attention mechanism module, and the other branch directly transmits the original feature map to the sum calculation module. The graph deep convolutional network integrates the adaptability of variable convolution to the shape and size of objects, and utilizes the hybrid local channel attention mechanism to extract important information, effectively solving the problems of interference from complex backgrounds and large changes in object size.
[0020] (3) The input end of the decoupling head structure of the detection head of the present invention is also connected in series with a partial convolution module with an inverted residual structure. This ensures that while ensuring the detection accuracy brought by the decoupling head, the number of parameters and the amount of calculation are reduced, thereby ensuring the real-time performance of the entire lightweight target detection model.
[0021] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0023] Figure 1 is a flow chart of a lightweight target detection method based on an unmanned aerial vehicle platform according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the YOLOv8s model structure; Figure 3 is a schematic diagram of the structure of a DGLFG module according to an embodiment of the present invention; Figure 4 It is a schematic diagram of the structure of the MLCA attention mechanism module of an embodiment of the present invention; Figure 5 is a schematic diagram of the structure of a spatial pyramid pooling layer according to an embodiment of the present invention; Figure 6is a schematic diagram of a path aggregation network structure according to an embodiment of the present invention; Figure 7 A schematic diagram of the structure of a detection head according to an embodiment of the present invention; Figure 8 It is a comparison chart of the detection effects of different target detection models; Fig. 9 It is a schematic diagram of the structure of a lightweight target detection system based on an unmanned aerial vehicle platform according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0025] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. 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 invention belongs.
[0026] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. 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 "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0027] Figure 1 : is a flow chart of a lightweight target detection method based on an unmanned aerial vehicle platform according to an embodiment of the present invention. Figure 1 , the lightweight target detection method based on the UAV platform of the embodiment of the present invention includes: S101: Acquire UAV inspection images; S102: Using the lightweight target detection model that has been trained and embedded in the UAV platform, the UAV inspection image is processed to obtain a target detection result.
[0028] In the specific implementation process, the lightweight target detection model includes a backbone network, a path aggregation network and a detection head; The backbone network is used to extract spatial information and semantic information of several layers at different scales of the drone inspection image to obtain feature maps of several layers; The path aggregation network includes a 1*1 convolution layer and a bidirectional connection layer; the 1*1 convolution layer is used to reduce the number of channels of the corresponding layer feature map extracted by the backbone network, and then transmit it to the bidirectional connection layer; the bidirectional connection layer is used to connect the feature map output by the 1*1 convolution layer and the corresponding feature map directly output by the backbone network, and on this basis, add a bottom-up cross-scale connection path to obtain several fused feature maps, such as Figure 6 As shown; The detection head is used to detect each fused feature map to obtain a corresponding result map containing the target category and position, and then these result maps are processed by a non-maximum suppression method to obtain the final target category and position coordinates.
[0029] exist Figure 6 middle: SiLU: Sigmoid Linear Unit, activation function; P is the abbreviation of Pyramid. Feature maps are usually named in layers, which represent different resolutions or scales. Among them, P3-P7 are feature maps from the third to the seventh layer in the feature pyramid.
[0030] This embodiment achieves cross-scale connection by adding features in the backbone feature extraction network and the bottom-up path, retains shallow spatial information, and enhances the ability to extract small targets.
[0031] It should be noted here that the backbone network can be implemented using an existing neural network structure, such as the target detection model of the YOLO system, and those skilled in the art can make a specific selection based on actual conditions.
[0032] Let's take YOLOv8s as an example. Figure 2 As shown in the figure, YOLOv8s consists of a backbone network, a neck network and a detection head; the backbone network is used to extract features from the input drone inspection images to obtain spatial information and semantic information of different scales.
[0033] in, Figure 2 The English abbreviations in the meaning are: C2f: Channel to pixel, channel to pixel; CBS: C stands for Conv (convolution); B stands for BatchNorm2d (BatchNormalization); S stands for SiLU (Sigmoid Linear Unit, activation function); SPPF: Spatial Pyramid Pooling Fast, spatial pyramid fast pooling.
[0034] Among them, spatial information refers to the pixel value information at different locations in the image, including geometric features such as edges, textures, and simple shapes; Semantic information refers to the category and attribute information of each area of the image, which is represented by each pixel in the feature map, including: Category probability: the category distribution of the predicted target at each position; Target confidence: predict whether there is a target at each position; Bounding box regression: predict the position, width and height of the object at each location.
[0035] In this embodiment, the path aggregation network is used to fuse the third-layer feature map extracted by the backbone network and the feature maps thereafter, which can enhance the semantic expression and positioning capabilities at multiple scales and reduce the amount of data calculation.
[0036] In this embodiment, the backbone network includes a plurality of feature extraction layers and spatial pyramid pooling layers; the feature extraction layers are connected in series, and the spatial pyramid pooling layers are connected in series to the rear end of the feature extraction layers connected in series.
[0037] A graph deep convolutional network is introduced into the feature extraction layer, and the graph deep convolutional network processes the input original feature map to obtain a feature map containing global information and local spatial information; The graph deep convolutional network includes two branches, one of which includes a local feature extraction network and a hybrid local channel attention mechanism module. The local feature extraction network is used to extract local features of the original feature map, and then generate a local feature map through the hybrid local channel attention mechanism module; the other branch directly transmits the original feature map to the sum calculation module, and the sum calculation module adds the original feature map and its corresponding local feature map to obtain a feature map containing global information and local spatial information.
[0038] In this embodiment, the graph deep convolutional network is defined as a DGLFG (Deformable Global-Local Feature Guidance) module, such as Figure 3 As shown in Figure 1, it is used to replace the C2f module in the backbone network. The DGLFG module can meet the shape and multi-scale differences of the detected target.
[0039] exist Figure 3 middle: CBS: C stands for Conv (i.e. Convolution); B stands for BatchNorm2d function, normalization function; S stands for SiLU function (Sigmoid Linear Unit, activation function); DCBS is the abbreviation of a network consisting of DCNv3 function, batch normalization function and SiLU function connected in series; DCNv3: Deformable Convolutional Networks Version 3, deformable convolutional network; SiLU: Sigmoid Linear Unit, activation function; MLCA: Mixed Local Channel Attention, mixed local channel attention.
[0040] The 3×3 convolutional network in the DarknetBottleneck (deep learning bottleneck) part of the original C2f module is replaced with a deformable convolutional network. Compared with the original network, this convolutional network expands the shallow feature receptive field, allowing the network to adapt to the problem of large differences in target size. Then the feature map processed by the convolutional network is input into the MLCA attention mechanism module. The module structure is as follows Figure 4 As shown in the figure, the feature map is first converted into C×d×d through local average pooling, where C is the number of channels and d is the length and width. This step can quickly reduce the amount of calculation while extracting local spatial features. The feature map is further restored to the original feature map size through global average pooling and 1×1 convolution. The processed feature map is added to the original feature, so that the resulting feature map contains global information and local spatial information.
[0041] In this embodiment, if Figure 5 As shown in the figure, the spatial pyramid pooling layer (SPPF, Spatial PyramidPooling Fast) includes a first lightweight depth-separable convolutional network, a number of pooling convolution kernels connected in series (such as 3×3, 5×5 and 9×9 three pooling convolution kernels), a splicing layer and a second lightweight depth-separable convolutional network; wherein the output after each pooling is used as the input of the next pooling, expanding the receptive field of shallow features, so that the network can adapt to the problem of large differences in target size.
[0042] The first lightweight deep separable convolutional network of this embodiment is used to extract features from the input feature map, and divides the extracted features into two paths, one path is pooled step by step through several pooling convolution kernels connected in series and transmitted to the splicing layer, and the other path is directly transmitted to the splicing layer; the splicing layer is used to splice all received features, and then transmit them to the second lightweight deep separable convolutional network for further feature extraction.
[0043] Specifically, Figure 7 As shown, the detection head includes a decoupling head structure, and the input end of the decoupling head structure is also serially connected to a partial convolution module with an inverted residual structure; The partial convolution module of the inverted residual structure is used to: use point multiplication convolution to expand the number of channels of the feature map, use the partial convolution network to calculate in the high-dimensional space after normalization and activation function processing, and finally restore the number of channels through the inverse process of dimensionality increase, and send the obtained feature map to the decoupling head structure for processing.
[0044] The English abbreviation of the partial convolution module of the inverted residual structure is: ISPP module, which is the Inverse-residualShared Parameter based on Partial convolution module.
[0045] The partial convolutional network is used to perform a convolution operation on some channels of the feature map (for example, 1 / 3 of the channels), and concatenate the calculated convolution results with the remaining channels of the feature map (for example, 2 / 3 of the channels).
[0046] The activation function is the H-Swish (Hard Swish) function. The expression of the H-Swish function is: ; in represents the input factor, The ReLU activation function represents a value range of [0,6], which is designed to adapt to the low-precision design of mobile terminals.
[0047] exist Figure 7 In , BN_HSwish is a combination of Batch Normalization (BN) and H-Swish activation function. h is the height of the input feature map; w is the width of the input feature map; Cp is the number of partial channels; k is the height and width of the feature map processed by the filter.
[0048] The following is a detailed description of the training process of the lightweight target detection model: Step 1: Make a dataset.
[0049] Step 1.1: Data collection. Typical data sets from two drone platforms, VisDrone2019 and UAVDT, are collected as sample data. The main scenes involved are low brightness, occlusion, and small targets. The VisDrone2019 data set includes ten types of data, including people, bicycles, and cars.
[0050] Step 1.2: Data division. In order to prove the effectiveness of the present invention, the data in this embodiment is randomly divided into a training set, a validation set, and a test set according to a ratio of 6:2:2. The training set and the validation set are used to train the model parameters, and the test set is used to test the model performance, ensuring that the three data do not overlap.
[0051] Step 1.3: Data preprocessing. In order to improve the detection efficiency, the model input data is resampled to 640×640. At the same time, random cropping, flipping, Mixup, and Mosaic techniques are used to expand the training data set, reduce the category imbalance problem, and improve the robustness of the lightweight object detection model.
[0052] Step 2: Training and validating the model. The training data set in step 1 is input into the constructed lightweight object detection model for training. The training parameters are set as follows: input image size is 640×640, batch size is 16, optimizer is SGD, initial learning rate is 0.01, iteration number is 300, and the trained lightweight object detection model is obtained.
[0053] Step 3: Model export. Export the trained lightweight target detection model’s pt format weight file as a lightweight target detection model in ONNX format, and convert it into a lightweight target detection model in rknn format suitable for NPU devices after toolchain compilation.
[0054] Step 4: Deploy the trained lightweight target detection model to the UAV platform. The UAV platform is equipped with a rk3588 chip, that is, deploy the trained lightweight target detection model to the board equipped with the rk3588 chip, perform inference by accessing multiple video streams, and return the target coordinates and category confidence after executing the non-maximum suppression algorithm.
[0055] Table 1 is the performance comparison result between the lightweight target detection model of the present invention and YOLOv8s. As shown in Table 1, the lightweight target detection method based on the UAV platform is simple in principle and easy to implement. The lightweight target detection model of the present invention is compared with YOLOv8s: the target detection result accuracy increases from 37.4% to 40.6%, the number of parameters decreases from 11.1M to 5.8M, the amount of calculation decreases from 28.5GFLOPS to 20.6GFLOPS, and the reasoning speed increases from 131FPS to 147FPS.
[0056] Table 1 Performance comparison between the lightweight object detection model of the present invention and YOLOv8s.
[0057]
[0058] Figure 8 It is a comparison chart of the detection effects of different target detection models, where the target detection models include YOLOv5s, YOLOv8s and the lightweight target detection model of the present invention. Figure 8 It can be seen that the detection accuracy and precision of the lightweight target detection model of the present invention are higher than those of YOLOv5s and YOLOv8s.
[0059] Fig. 9 FIG. 1 is a schematic diagram of the structure of a lightweight target detection system based on an unmanned aerial vehicle platform according to an embodiment of the present invention. Fig. 9 As shown, a lightweight target detection system based on an unmanned aerial vehicle platform according to an embodiment of the present invention includes: An image acquisition module 201 is used to acquire drone inspection images; A target detection module 202 is used to process the UAV inspection image using a lightweight target detection model that has been trained and embedded in the UAV platform to obtain a target detection result; Wherein, the lightweight target detection model includes a backbone network, a path aggregation network and a detection head; The backbone network is used to extract spatial information and semantic information of several layers at different scales of the drone inspection image to obtain feature maps of several layers; The path aggregation network includes a 1*1 convolution layer and a bidirectional connection layer; the 1*1 convolution layer is used to reduce the number of channels of the corresponding layer feature map extracted by the backbone network, and then transmit it to the bidirectional connection layer; the bidirectional connection layer is used to connect the feature map output by the 1*1 convolution layer and the corresponding feature map directly output by the backbone network, and on this basis, add a bottom-up cross-scale connection path to obtain a number of fused feature maps; The detection head is used to detect each fused feature map to obtain a corresponding result map containing the target category and position, and then these result maps are processed by a non-maximum suppression method to obtain the final target category and position coordinates.
[0060] It should be noted here that the various modules in the lightweight target detection system based on the UAV platform in this embodiment correspond one-to-one to the various steps in the above-mentioned lightweight target detection method based on the UAV platform, and the specific implementation process is the same, which will not be described in detail here.
[0061] Moreover, the specific structure of the lightweight target detection model is the same as that in the above-mentioned lightweight target detection method based on the UAV platform, and will not be repeated here.
[0062] In one or more embodiments, a lightweight target detection system based on a UAV platform is also provided, which includes: an image acquisition module and an image processing module; The image acquisition module is mounted on the UAV platform; the image processing module is embedded in the UAV platform; The image acquisition module is used to collect the inspection images of the UAV and transmit them to the image processing module; The image processing module is deployed with a lightweight target detection model, and the lightweight target detection model is used to process the UAV inspection image to obtain a target detection result; Wherein, the lightweight target detection model includes a backbone network, a path aggregation network and a detection head; The backbone network is used to extract spatial information and semantic information of several layers at different scales of the drone inspection image to obtain feature maps of several layers; The path aggregation network includes a 1*1 convolution layer and a bidirectional connection layer; the 1*1 convolution layer is used to reduce the number of channels of the corresponding layer feature map extracted by the backbone network, and then transmit it to the bidirectional connection layer; the bidirectional connection layer is used to connect the feature map output by the 1*1 convolution layer and the corresponding feature map directly output by the backbone network, and on this basis, add a bottom-up cross-scale connection path to obtain a number of fused feature maps; The detection head is used to detect each fused feature map to obtain a corresponding result map containing the target category and position, and then these result maps are processed by a non-maximum suppression method to obtain the final target category and position coordinates.
[0063] It should be noted here that the specific structure of the lightweight target detection model is the same as that in the above-mentioned lightweight target detection method based on the UAV platform, and will not be repeated here.
[0064] In one or more embodiments, a computer-readable storage medium is further provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned Figure 1 The steps in the lightweight target detection method based on UAV platform are shown.
[0065] In one or more embodiments, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the above-mentioned Figure 1 The steps in the lightweight target detection method based on UAV platform are shown.
[0066] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products of the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of the processes and / or blocks 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 produce 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.
[0067] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A lightweight target detection method based on UAV platform, It is characterized in that include: Obtain drone inspection images; Using a lightweight target detection model that has been trained and embedded in the UAV platform, the UAV inspection image is processed to obtain a target detection result; Wherein, the lightweight target detection model includes a backbone network, a path aggregation network and a detection head; The backbone network is used to extract spatial information and semantic information of several layers at different scales of the drone inspection image to obtain feature maps of several layers; The path aggregation network includes a 1*1 convolution layer and a bidirectional connection layer; the 1*1 convolution layer is used to reduce the number of channels of the corresponding layer feature map extracted by the backbone network, and then transmit it to the bidirectional connection layer; the bidirectional connection layer is used to connect the feature map output by the 1*1 convolution layer and the corresponding feature map directly output by the backbone network, and on this basis, add a bottom-up cross-scale connection path to obtain a number of fused feature maps; The detection head is used to detect each fused feature map to obtain a corresponding result map containing the target category and position, and then these result maps are processed by a non-maximum suppression method to obtain the final target category and position coordinates.
2. The lightweight target detection method based on an unmanned aerial vehicle platform as claimed in claim 1, It is characterized in that The path aggregation network is used to fuse the third-layer feature map extracted by the backbone network and the feature maps thereafter.
3. The lightweight target detection method based on an unmanned aerial vehicle platform as claimed in claim 1, It is characterized in that The backbone network includes a plurality of feature extraction layers and a spatial pyramid pooling layer; the feature extraction layers are connected in series, and the spatial pyramid pooling layer is connected in series to the rear end of the feature extraction layers connected in series.
4. The lightweight target detection method based on an unmanned aerial vehicle platform as claimed in claim 3, It is characterized in that A graph deep convolutional network is introduced into the feature extraction layer, and the graph deep convolutional network processes the input original feature map to obtain a feature map containing global information and local spatial information; The graph deep convolutional network includes two branches, one of which includes a local feature extraction network and a hybrid local channel attention mechanism module. The local feature extraction network is used to extract local features of the original feature map, and then generate a local feature map through the hybrid local channel attention mechanism module; the other branch directly transmits the original feature map to the sum calculation module, and the sum calculation module adds the original feature map and its corresponding local feature map to obtain a feature map containing global information and local spatial information.
5. The lightweight target detection method based on an unmanned aerial vehicle platform as claimed in claim 3, It is characterized in that The spatial pyramid pooling layer includes a first lightweight depth-wise separable convolutional network, a plurality of pooling convolution kernels connected in series, a splicing layer and a second lightweight depth-wise separable convolutional network; the first lightweight depth-wise separable convolutional network is used to extract features from an input feature map, and the extracted features are divided into two paths, one path is pooled step by step through a plurality of pooling convolution kernels connected in series and transmitted to the splicing layer, and the other path is directly transmitted to the splicing layer; the splicing layer is used to splice all received features, and then transmit them to the second lightweight depth-wise separable convolutional network for further feature extraction.
6. The lightweight target detection method based on an unmanned aerial vehicle platform as claimed in claim 1, It is characterized in that The detection head comprises a decoupling head structure, and an input end of the decoupling head structure is further connected in series with a partial convolution module having an inverted residual structure; The partial convolution module of the inverted residual structure is used to: use point multiplication convolution to expand the number of channels of the feature map, use the partial convolution network to calculate in the high-dimensional space after normalization and activation function processing, and finally restore the number of channels through the inverse process of dimensionality increase, and send the obtained feature map to the decoupling head structure for processing.
7. The lightweight target detection method based on an unmanned aerial vehicle platform as claimed in claim 6, It is characterized in that The partial convolutional network is used to perform a convolution operation on some channels of the feature map, and concatenate the calculated convolution results with the remaining channels of the feature map.
8. The lightweight target detection method based on an unmanned aerial vehicle platform as claimed in claim 6, It is characterized in that The activation function is the H-Swish function.
9. A lightweight target detection system based on UAV platform, It is characterized in that include: An image acquisition module, which is used to acquire UAV inspection images; A target detection module, which is used to process the UAV inspection image using a lightweight target detection model that has been trained and embedded in the UAV platform to obtain a target detection result; Wherein, the lightweight target detection model includes a backbone network, a path aggregation network and a detection head; The backbone network is used to extract spatial information and semantic information of several layers at different scales of the drone inspection image to obtain feature maps of several layers; The path aggregation network includes a 1*1 convolution layer and a bidirectional connection layer; the 1*1 convolution layer is used to reduce the number of channels of the corresponding layer feature map extracted by the backbone network, and then transmit it to the bidirectional connection layer; the bidirectional connection layer is used to connect the feature map output by the 1*1 convolution layer and the corresponding feature map directly output by the backbone network, and on this basis, add a bottom-up cross-scale connection path to obtain a number of fused feature maps; The detection head is used to detect each fused feature map to obtain a corresponding result map containing the target category and position, and then these result maps are processed by a non-maximum suppression method to obtain the final target category and position coordinates.
10. A lightweight target detection system based on UAV platform, It is characterized in that include: Image acquisition module and image processing module; The image acquisition module is mounted on the UAV platform; the image processing module is embedded in the UAV platform; The image acquisition module is used to collect the inspection images of the UAV and transmit them to the image processing module; The image processing module is deployed with a lightweight target detection model, and the lightweight target detection model is used to process the UAV inspection image to obtain a target detection result; Wherein, the lightweight target detection model includes a backbone network, a path aggregation network and a detection head; The backbone network is used to extract spatial information and semantic information of several layers at different scales of the drone inspection image to obtain feature maps of several layers; The path aggregation network includes a 1*1 convolution layer and a bidirectional connection layer; the 1*1 convolution layer is used to reduce the number of channels of the corresponding layer feature map extracted by the backbone network, and then transmit it to the bidirectional connection layer; the bidirectional connection layer is used to connect the feature map output by the 1*1 convolution layer and the corresponding feature map directly output by the backbone network, and on this basis, add a bottom-up cross-scale connection path to obtain a number of fused feature maps; The detection head is used to detect each fused feature map to obtain a corresponding result map containing the target category and position, and then these result maps are processed by a non-maximum suppression method to obtain the final target category and position coordinates.
Citation Information
Patent Citations
Target detection method and system based on improved feature pyramid network
CN116342955A
YOLOv7-based unmanned aerial vehicle aerial image small target detection method
CN117315509A
Lightweight unmanned aerial vehicle intrusion detection method
CN118196426A
Corn canopy organ recognition method and canopy phenotype detection method based on improved Mask2YOLO network
CN118230166A
Lightweight open set remote sensing target detection method based on LMSFA-YOLO
CN118262090A
Cited By
End-to-end lightweight underwater target detection method and system
CN120913050A
Unmanned aerial vehicle control method and system for real-time operation
CN121115829A
Aerial photography real-time small target detection method based on model compression and hardware acceleration
CN121545067A
