An intelligent detection and positioning method and system for small targets of unmanned aerial vehicles in complex scenes

By improving the YOLOv5 model and data enhancement technology, the problem of false detection and missed detection caused by complex background interference in UAV small target detection has been solved, and efficient UAV small target detection and positioning on resource-constrained platforms has been achieved, improving the Detection accuracy and applicability.

CN118692010BActive Publication Date: 2024-10-22GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411155147.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-10-22
Estimated Expiration
2044-08-22

AI Technical Summary

Technical Problem

Existing UAV small target detection algorithms are prone to false detections and missed detections in complex backgrounds, and are difficult to deploy and run on lightweight embedded platforms with limited resources.

Method used

An intelligent detection and positioning method for UAV small targets in complex scenes is proposed. By improving the YOLOv5 model, combining self-attention mechanism and data enhancement technology, visual perception video streams are used for preprocessing and area of ​​interest segmentation to obtain small target features. , and perform motion detection and positioning branch training through inter-frame difference to obtain the three-dimensional coordinates of the UAV.

Benefits of technology

It improves the detection accuracy and identification accuracy of small target UAVs, reduces the amount of model calculations, and can be quickly deployed and applied on embedded platforms with low computing power.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118692010B_ABST
    Figure CN118692010B_ABST
Patent Text Reader

Abstract

The present invention discloses an intelligent detection and positioning method and system for small targets of unmanned aerial vehicles in complex scenes, including: obtaining a visual perception video stream of a target unmanned aerial vehicle, segmenting a region of interest through preprocessing; constructing a target detection model based on an improved YOLOv5, using the constructed unmanned aerial vehicle small target data set for model training, taking the region of interest as input information, and obtaining small target features through a target detection head; the classification branch in the target detection head performs motion detection through inter-frame difference, screens the motion region according to the small target feature sequence, obtains the discrimination score of the small target as a unmanned aerial vehicle for identification, obtains the regression anchor frame of the unmanned aerial vehicle in the positioning branch, and obtains the three-dimensional coordinates of the unmanned aerial vehicle target through coordinate system conversion. The present invention efficiently and accurately screens out the area where the unmanned aerial vehicle is located through target detection and motion detection, and improves the detection accuracy of small target unmanned aerial vehicles under complex background interference.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of unmanned aerial vehicle visual detection and positioning, and more specifically, to an intelligent detection and positioning method and system for small targets of unmanned aerial vehicles in complex scenes. Background Art

[0002] In recent years, drones have been widely used in civil and military fields due to their small size, low cost, and intelligent controllability. In particular, in the military field, drones have become a normalized strike weapon, which has brought new challenges to low-altitude security control. Many neural network algorithm models have been proposed for the detection and tracking of small-target drones for low-altitude security control. However, most of these algorithms have problems such as large model parameters and high computational complexity, making them difficult to deploy and run on resource-constrained lightweight embedded platforms, which now limits the use of drone detection and tracking in actual scenarios.

[0003] At present, target detection algorithms based on deep learning are mainly divided into two categories: one-stage algorithms and two-stage algorithms. The one-stage algorithm can directly output the category and position of the target through neural network calculation. Representative algorithms include YOLO series algorithms, SSD algorithm, CornerNet algorithm and QueryDet algorithm. The two-stage algorithm divides target detection into two stages: candidate region generation, classification and bounding box adjustment. The representative algorithm is the RCNN series target detection algorithm. In recent years, the YOLOv5 algorithm has been widely used in the field of target detection due to its outstanding performance in accuracy and real-time performance. However, in the detection of small targets, it is easy to miss or misdetect targets due to the few available features, uneven distribution of target scales, and complex background interference. Therefore, how to solve the problems of misdetection and missed detection caused by the few available features, uneven distribution of target scales, and complex background interference in the detection of small targets in drones is an urgent problem to be solved. Summary of the invention

[0004] In order to solve the above technical problems, the present invention proposes an intelligent detection and positioning method and system for small targets of UAVs in complex scenes, which can solve the problem of accurate detection and positioning of low-altitude, slow-speed small target UAVs under complex background interference in real scenes, and improve the detection performance of small targets.

[0005] The first aspect of the present invention provides an intelligent detection and positioning method for small targets of unmanned aerial vehicles in complex scenes, comprising:

[0006] Acquire a visual perception video stream of a target UAV, preprocess the visual perception video stream, extract key frame images, and segment a region of interest in the key frame images;

[0007] Retrieve and obtain drone small target samples, perform data enhancement on the samples to construct a drone small target dataset, and review the label information in the drone small target dataset;

[0008] A target detection model is constructed based on the improved YOLOv5, the UAV small target data set is used for model training, the region of interest is used as input information, and small target features are obtained through a target detection head;

[0009] In the classification branch of the target detection head, motion detection is performed through inter-frame difference, the motion area is screened according to the small target feature sequence, and the discrimination score of the small target as a drone is obtained for identification. The regression anchor frame of the drone is obtained in the positioning branch, and the three-dimensional coordinates of the drone target are obtained through coordinate system conversion.

[0010] In this solution, the visual perception video stream is preprocessed to extract key frame images, and the region of interest is segmented in the key frame images, specifically:

[0011] Obtain visual perception video stream based on the monocular camera of the target UAV, pre-process the video frame, divide the pre-processed video frame into cell units, and form image blocks according to a preset number of cell units;

[0012] Get the feature gradient of each cell unit, aggregate the HOG feature description of the image block, calculate the grayscale entropy of the image block, splice the HOG feature description and grayscale entropy of all image blocks, and get the HOG composite feature vector of the video frame;

[0013] Calculate the difference of HOG composite feature vectors between video frames in a visual perception video stream, mark video frames whose difference is greater than a preset difference threshold, and segment the visual perception video stream using the marked video frames to obtain a corresponding set of video frames;

[0014] Determine the number of clusters in the video frame set according to the average video frame spacing, obtain the information entropy of each video frame, set the initial cluster center according to the number of clusters based on the information entropy sorting, and calculate the frame spacing from each video frame to the initial cluster center;

[0015] The cluster center is determined when the minimum average video frame spacing is met, otherwise the cluster center continues to be moved until there are no adjacent video frames in the video frame set. After clustering is completed, the cluster center is used as the key frame image;

[0016] The drone contour information is used to perform a global search in the key frame image, and the region of interest in the key frame image is determined according to the contour similarity.

[0017] In this solution, we retrieved and obtained samples of small drone targets, and performed data enhancement on the samples to construct a dataset of small drone targets. Specifically:

[0018] Retrieve and obtain drone small target samples based on historical shooting data and open source drone small target datasets, cluster the retrieved drone small target samples according to weather conditions and background scenes, and generate drone small target sample subsets of different complex scene categories based on the clustering results;

[0019] A data enhancement model is constructed to perform data enhancement on the drone small target itself, deep feature extraction is performed on the drone small target sample subset through a convolutional autoencoder, and the output that conforms to the normal distribution is imported into a decoder. The decoder amplifies the low-dimensional latent variables layer by layer to obtain a picture with the same size as the original picture;

[0020] The generated images are compared with the real samples in the UAV small target sample subset for feature extraction and dimensionality reduction, and the authenticity labels of the images are output. The model parameters are updated by minimizing the sample error through adversarial training, and the images generated by the data enhancement model are used to enhance the UAV small target samples.

[0021] In the enhanced UAV small target sample subset, the convolution block is used to extract sample features, the Hadamard product of the point and the adjacent area is calculated and the number of channels is compressed. After activation and normalization, the inter-class feature representation of the feature map is obtained, and the class-enhanced feature map is added to the original feature map to achieve further enhancement of the UAV small target sample subset.

[0022] In this solution, the target detection model is built based on the improved YOLOv5, specifically:

[0023] The self-attention mechanism is introduced into the YOLOv5 network and combined with the original C3 module. The feature maps in the subset of small target samples of drones in different complex scene categories are used as input, and channel and spatial attention processing is performed on the feature maps.

[0024] The processed feature map is fused with the input feature map to obtain two output feature maps, the two output feature maps are fused again by pooling splicing to obtain a fused output feature map, the fused output feature map is input into a large separable convolutional attention module for feature extraction again, and the final output feature map is output after convolution fusion;

[0025] The drone classification task and positioning task of the target detection model are decoupled, and the classification branch and the positioning branch are trained respectively using the final output feature map after adaptive weighting to obtain the category of the predicted target and the position and confidence of the predicted anchor box. The target detection model is then optimized through error back propagation.

[0026] In this solution, the region of interest is used as input information, and the small target features are obtained through the target detection head, specifically:

[0027] Importing the region of interest corresponding to the visual perception video stream of the target drone into the target detection model, obtaining the corresponding feature map, and performing task adaptation and space adaptation on the feature map using different attentions;

[0028] Task adaptive attention and space adaptive attention are obtained to perform attention weighting on the feature map, and the adaptively weighted feature map is output and sent to the target detection head, in which one-dimensional convolution is used to perform dimensionality reduction to obtain small target features.

[0029] In this solution, the classification branch of the target detection head performs motion detection through inter-frame difference, selects the motion area according to the small target feature sequence, obtains the discrimination score of the small target as a drone for identification, specifically:

[0030] Introducing inter-frame differences in the classification branch of the target detection head, obtaining inter-frame difference changes based on small target feature sequences of different key frame images, and further screening out motion areas through the inter-frame difference changes;

[0031] A 1*1 convolution is used to perform a classification operation on the motion area to obtain a discrimination score of the small target being a drone. When the discrimination score is greater than a preset score threshold, the target is judged to be a drone.

[0032] In this solution, the regression anchor frame of the drone is obtained in the positioning branch, and the three-dimensional coordinates of the drone target are obtained through coordinate system transformation, specifically:

[0033] In the positioning branch, 1*1 convolution is used to perform positioning and confidence operations respectively, to obtain the anchor frame and confidence of the small target frame of the drone, to complete the positioning of the drone, and to align the pixels of the depth image and color image after calibration;

[0034] The position coordinates of the vertices and center points of the anchor frame corresponding to the drone target in the pixel coordinate system are obtained, and the coordinates in the pixel coordinate system are converted and multiplied by the intrinsic parameters of the camera to obtain the camera coordinate system of the drone target. The final three-dimensional coordinates are obtained through the relative relationship between the camera coordinate system and the world coordinate system.

[0035] The second aspect of the present invention provides an intelligent detection and positioning system for small targets of unmanned aerial vehicles in complex scenes, the system comprising: a unmanned aerial vehicle visual perception module, a visual preprocessing module, a unmanned aerial vehicle target detection module and a target detection and positioning output module;

[0036] The drone visual perception module obtains a visual perception video stream based on a monocular camera and segments the visual perception video stream;

[0037] The visual preprocessing module uses a sparse optical flow method to supplement the UAV visual perception module, extracts key frame images through image preprocessing, and segments the region of interest in the key frame images;

[0038] The drone target detection module builds a target detection model based on the improved YOLOv5, uses the classification branch to perform motion detection through inter-frame difference, obtains the discrimination score of the detected target for identification, and uses the positioning branch to obtain the detected regression anchor frame for positioning;

[0039] The target detection and positioning output module visually marks the detected drone targets and drone target positions in the complex scene.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] The present invention can better realize the rapid search of the global area where the small target UAV is located, reduce the amount of model calculation, thereby improving the accuracy of small target recognition, efficiently and accurately screen out the area where the UAV is located, and improve the detection accuracy.

[0042] The present invention adopts a lightweight YOLOv5s model for training. The overall framework requires less computation and parameters, and can be quantitatively deployed on embedded Al chips with lower computing power, thereby quickly realizing the practical application of small-target UAV detection and positioning. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A flow chart showing the intelligent detection and positioning method of small targets of unmanned aerial vehicles in complex scenes of the present invention is shown;

[0044] Figure 2 The flowchart of the present invention for enhancing the construction of a small target data set for unmanned aerial vehicles is shown;

[0045] Figure 3 The flowchart of the present invention for constructing a target detection model based on the improved YOLOv5 is shown;

[0046] Figure 4 A flow chart showing the conversion of the target space coordinate system of the unmanned aerial vehicle of the present invention is shown;

[0047] Figure 5 A block diagram of the intelligent detection and positioning system for small targets of unmanned aerial vehicles in complex scenarios of the present invention is shown. DETAILED DESCRIPTION

[0048] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0049] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0050] Figure 1 The flowchart of the intelligent detection and positioning method of small targets of unmanned aerial vehicles in complex scenes of the present invention is shown.

[0051] like Figure 1 As shown, the first aspect of the present invention provides an intelligent detection and positioning method for small targets of drones in complex scenes, comprising:

[0052] S102, obtaining a visual perception video stream of the target UAV, preprocessing the visual perception video stream, extracting key frame images, and segmenting a region of interest in the key frame images;

[0053] S104, retrieve and obtain drone small target samples, perform data enhancement on the samples to construct a drone small target dataset, and review the label information in the drone small target dataset;

[0054] S106, building a target detection model based on the improved YOLOv5, using the UAV small target data set to perform model training, taking the region of interest as input information, and acquiring small target features through a target detection head;

[0055] S108, in the classification branch of the target detection head, motion detection is performed by frame difference, the motion area is screened according to the small target feature sequence, the discrimination score of the small target as a drone is obtained for identification, the regression anchor frame of the drone is obtained in the positioning branch, and the three-dimensional coordinates of the drone target are obtained through coordinate system conversion.

[0056] It should be noted that the visual perception video stream is obtained based on the monocular camera of the target drone, and the sparse optical flow method is used to supplement the drone visual perception module, and the video frames are pre-processed by graying, dimension reduction, correction, normalization, etc., to reduce the impact of light and shadow changes in the picture, suppress noise interference, and obtain key frames. The key frames are one or more frame images that can reflect the most important and representative information in the lens. The pre-processed video frames are divided into cell units, and image blocks are formed according to a preset number of cell units; the characteristic gradient of each cell unit is obtained according to the gradient amplitude and direction of the pixel, and the HOG feature description of the image block is aggregated, the grayscale entropy of the image block is calculated, and the HOG feature description and grayscale entropy of all image blocks are spliced ​​to obtain the HOG composite feature vector of the video frame; the difference between the HOG composite feature vectors between the video frames in the visual perception video stream is calculated, and the video frames with a difference greater than the preset difference threshold are marked, and the visual perception video stream is segmented using the marked video frames to obtain the corresponding video frame set.

[0057] In the video frame set, the number of clusters is determined according to the average video frame spacing, and the video frame spacing is measured using the Euclidean distance. When the average video frame spacing difference is small, the video stream changes slowly, and the number of clusters is reduced, otherwise the number of clusters is increased. The information entropy of each video frame is obtained, and the initial cluster center is set based on the information entropy sorting according to the number of clusters, and the frame spacing from each video frame to the initial cluster center is calculated; when the average video frame spacing is minimum, the cluster center is determined, and the adjacent redundant frames are verified and deleted. If the adjacent video frame is selected as the initial cluster center, the video frame with a smaller information entropy value is deleted, and the cluster center is replaced based on the video frame with a larger entropy value, and the movement continues. Otherwise, the cluster center continues to be moved until there are no adjacent video frames in the video frame set. After clustering is completed, the cluster center is used as the key frame image; the contour information of drones such as quadcopters and fixed-wing drones is used to perform a global search in the key frame image, and the area of ​​interest in the key frame image is determined based on the contour similarity.

[0058] Figure 2 The flowchart of the present invention for enhancing the construction of a small target data set for unmanned aerial vehicles is shown;

[0059] According to an embodiment of the present invention, a drone small target sample is retrieved and acquired, and data enhancement is performed on the sample to construct a drone small target data set, specifically:

[0060] S202, retrieve and obtain drone small target samples based on historical shooting data and open source drone small target data sets, cluster the retrieved drone small target samples according to weather conditions and background scenes, and generate drone small target sample subsets of different complex scene categories based on the clustering results;

[0061] S204, constructing a data enhancement model to perform data enhancement on the drone small target itself, performing deep feature extraction on the drone small target sample subset through a convolutional autoencoder, and importing the output that conforms to the normal distribution into a decoder, and the decoder amplifies the low-dimensional latent variables layer by layer to obtain a picture with the same size as the original picture;

[0062] S206, extracting features and reducing dimensions of the generated image and the real samples in the UAV small target sample subset, outputting the authenticity label of the image, updating the model parameters by minimizing the sample error through adversarial training, and enhancing the UAV small target sample through the image generated by the data enhancement model;

[0063] S208, in the enhanced UAV small target sample subset, use the convolution block to extract sample features, calculate the Hadamard product of the point and the adjacent area and compress the number of channels, obtain the inter-class feature representation of the feature map after activation and normalization, and add it to the original feature map to obtain the class-enhanced feature map, so as to further enhance the UAV small target sample subset.

[0064] It should be noted that in order to solve the problem of small proportion of small targets and incomplete scenes in the small target sample set of drones, a sample set of slow and low-speed drones was established. In order to ensure the diversity and high quality of the sample set, the sample set considered a variety of weather conditions, such as sunny, cloudy, overcast and dusk. In addition, the small target sample set of drones contains a variety of background scenes such as sky, trees, and near the ground. In different complex scene categories, the subset of small target samples of drones is enhanced by using convolutional autoencoders combined with generative adversarial networks. The samples are converted into the mean and variance of the latent variables of the hidden layer by using autoencoders, and the latent variables are generated by combining random vectors that obey the standard normal distribution. According to the variational probability distribution of the latent variables, the approximate original samples are restored by the decoder. The decoder is regarded as a generator. The discriminator of the generative adversarial network is used to extract features and reduce the dimension of the input real samples and the output pictures of the generator. After passing through the Sigmoid layer, the true and false labels are output. The discriminator is used to generate constraints on the generator to minimize the difference between the generated image and the original sample, improve the quality of the generated image, and make the generated image conform to the feature distribution of the original sample.

[0065] In the enhanced subset of UAV small target samples, convolution blocks are used to extract sample features. After feature extraction, the Hadamard product of the point and the adjacent area is calculated and the number of channels is compressed to achieve class feature enhancement. After the Hadamard product processing, the feature tensor size becomes H×W×U×V×C. The obtained class representation is compressed to H×W×C after two layers of convolution operations and residually connected with the original feature map to obtain the class enhanced feature map, where H represents the matrix length, W represents the matrix width, C represents the number of channels of the matrix, and U and V represent the neighborhood sizes.

[0066] Figure 3 A flow chart of the present invention for constructing a target detection model based on the improved YOLOv5 is shown.

[0067] According to an embodiment of the present invention, a target detection model is constructed based on the improved YOLOv5, specifically:

[0068] S302, introduces the self-attention mechanism into the YOLOv5 network and combines it with the original C3 module, takes the feature maps in the subset of small target samples of drones in different complex scene categories as input, and performs channel and spatial attention processing on the feature maps;

[0069] S304, fusing the processed feature map with the input feature map to obtain two output feature maps, fusing the two output feature maps again by pooling splicing to obtain a fused output feature map, inputting the fused output feature map into a large separable convolutional attention module for feature extraction again, and outputting a final output feature map after convolution fusion;

[0070] S306, decouple the drone classification task and positioning task of the target detection model, use the final output feature map after adaptive weighting to train the classification branch and the positioning branch respectively, obtain the category of the predicted target and the position and confidence of the predicted anchor box, and optimize the target detection model through error back propagation.

[0071] It should be noted that the lightweight yolov5s model in YOLOv5 is used as a pre-training model, which can be quickly quantized and deployed to embedded boards. The C3 module in the YOLOv5 network combines multiple bottleneck structures and residual connections to construct a feature extraction module. The C3 module consists of an initial 1*1 convolution layer, multiple bottleneck structures, a residual connection, and a final 1*1 convolution layer. In the C3 module, the feature map will be extracted through multiple bottleneck structures, and the initial features and extracted features will be added through the residual connection to form the final output. The self-attention mechanism is introduced to combine the C3 module to maintain high resolution in the channel and spatial dimensions, weight the feature map according to the importance of the pixel points, and supplement the small target feature extraction capability according to the feature correlation. In addition, the output feature map is further extracted through large separable convolution attention to obtain the long-distance dependency of the output feature map, which increases the receptive field of feature extraction and helps better feature fusion. The classification and positioning branches in the detection head are decoupled, and the model parameters are adjusted more quickly to adapt to the characteristics of small drone targets, thereby improving the recognition and positioning accuracy. The similarity between the predicted anchor box and the real bounding box in the anchor box regression process is compared, and matching is performed by minimizing the similarity to obtain accurate drone target detection, recognition and positioning results.

[0072] It should be noted that the region of interest corresponding to the visual perception video stream of the target drone is imported into the target detection model to obtain the corresponding feature map, and the feature map is task-adapted and spatially-adapted using different attentions; the task-adaptive attention is composed of a fully connected layer and a normalization layer, and the selection of feature channels is dynamically controlled according to different tasks. The spatially-adaptive attention is composed of a convolutional layer and an activation function, and different levels of aggregation are aggregated at the same spatial position. The task-adaptive attention and the spatially-adaptive attention are obtained to perform attention weighting on the feature map, and the output adaptively weighted feature map is sent to the target detection head, and one-dimensional convolution is used in the target detection head to reduce the dimension and obtain small target features, thereby improving the representation and target adaptation capabilities of the target detection head.

[0073] Inter-frame differences are introduced into the classification branch of the target detection head, and the inter-frame difference changes are obtained according to the small target feature sequences of different key frame images. The motion area is further screened out through the inter-frame difference changes. A 1*1 convolution is used to perform a classification operation on the motion area to obtain a discrimination score for the small target being a drone. When the discrimination score is greater than a preset score threshold, the target is judged to be a drone.

[0074] In the positioning branch, 1*1 convolution is used to perform positioning and confidence operations respectively, to obtain the anchor frame and confidence of the small target frame of the drone, to complete the positioning of the drone, and after completing the calibration, the camera intrinsic parameter and distortion parameter are obtained to perform pixel alignment of the depth image and color image; after obtaining the intrinsic parameter and distortion parameter, the world coordinates of the drone target are calculated to obtain the position coordinates of the vertices and center points of the anchor frame corresponding to the drone target in the pixel coordinate system, and the coordinates in the pixel coordinate system are transformed and multiplied with the intrinsic parameter of the camera to obtain the camera coordinate system of the drone target. The final three-dimensional coordinates are obtained through the relative relationship between the camera coordinate system and the world coordinate system, and the positioning performance is verified using indicators such as accuracy, recall rate and average precision, and the detection and positioning of small targets of drones are verified and evaluated. The schematic diagram of the coordinate transformation is shown in the figure. Figure 4 As shown, the pixel coordinate system is expressed as ; Indicates the drone target in the image coordinate system The projection point in the camera, the focal length for and The distance between. Indicates that the drone target is in the world standard system The coordinate points in ; is the camera coordinate system.

[0075] Figure 5 A block diagram of an intelligent detection and positioning system for small targets of unmanned aerial vehicles in complex scenarios according to the present invention is shown.

[0076] The second aspect of the present invention provides an intelligent detection and positioning system 5 for small targets of drones in complex scenes, the system comprising: a drone visual perception module 51, a visual preprocessing module 52, a drone target detection module 53 and a target detection and positioning output module 54;

[0077] The drone visual perception module 51 obtains a visual perception video stream based on a monocular camera and segments the visual perception video stream;

[0078] The visual preprocessing module 52 uses a sparse optical flow method to supplement the drone visual perception module, extracts key frame images through image preprocessing, and segments the region of interest in the key frame images;

[0079] The drone target detection module 53 constructs a target detection model based on the improved YOLOv5, uses the classification branch to perform motion detection through inter-frame difference, obtains the discrimination score of the detected target for identification, and uses the positioning branch to obtain the detected regression anchor frame for positioning;

[0080] The target detection and positioning output module 54 visually marks the detected drone targets and drone target positions in the complex scene.

[0081] The third aspect of the present invention also provides a computer-readable storage medium, which includes a program for an intelligent detection and positioning method for small targets of drones in complex scenes. When the program for the intelligent detection and positioning method for small targets of drones in complex scenes is executed by a processor, the steps of the intelligent detection and positioning method for small targets of drones in complex scenes as described in any one of the above items are implemented.

[0082] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0083] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0084] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0085] Those skilled in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, and other media that can store program codes.

[0086] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

[0087] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. An intelligent detection and positioning method for small targets of drones in complex scenes, characterized in that: The following steps are involved: Acquire a visual perception video stream of a target UAV, preprocess the visual perception video stream, extract key frame images, and segment a region of interest in the key frame images; Retrieve and obtain drone small target samples, perform data enhancement on the samples to construct a drone small target dataset, and review the label information in the drone small target dataset; A target detection model is constructed based on the improved YOLOv5, the UAV small target data set is used for model training, the region of interest is used as input information, and small target features are obtained through a target detection head; In the classification branch of the target detection head, motion detection is performed by inter-frame difference, the motion area is screened according to the small target feature sequence, the discrimination score of the small target as a drone is obtained for identification, the regression anchor frame of the drone is obtained in the positioning branch, and the three-dimensional coordinates of the drone target are obtained by coordinate system conversion; Retrieve and obtain drone small target samples, perform data enhancement on the samples to build a drone small target dataset, specifically: Retrieve and obtain drone small target samples based on historical shooting data and open source drone small target datasets, cluster the retrieved drone small target samples according to weather conditions and background scenes, and generate drone small target sample subsets of different complex scene categories based on the clustering results; A data enhancement model is constructed to perform data enhancement on the drone small target itself, deep feature extraction is performed on the drone small target sample subset through a convolutional autoencoder, and the output that conforms to the normal distribution is imported into a decoder. The decoder amplifies the low-dimensional latent variables layer by layer to obtain a picture with the same size as the original picture; The generated images are compared with the real samples in the UAV small target sample subset for feature extraction and dimensionality reduction, and the authenticity labels of the images are output. The model parameters are updated by minimizing the sample error through adversarial training, and the images generated by the data enhancement model are used to enhance the UAV small target samples. In the enhanced UAV small target sample subset, the convolution block is used to extract sample features, the Hadamard product of the point and the adjacent area is calculated and the number of channels is compressed. After activation and normalization, the inter-class feature representation of the feature map is obtained, and the class-enhanced feature map is added to the original feature map to achieve further enhancement of the UAV small target sample subset; The target detection model is built based on the improved YOLOv5, specifically: The self-attention mechanism is introduced into the YOLOv5 network and combined with the original C3 module. The feature maps in the subset of small target samples of drones in different complex scene categories are used as input, and channel and spatial attention processing is performed on the feature maps. The processed feature map is fused with the input feature map to obtain two output feature maps, the two output feature maps are fused again by pooling splicing to obtain a fused output feature map, the fused output feature map is input into a large separable convolutional attention module for feature extraction again, and the final output feature map is output after convolution fusion; The drone classification task and positioning task of the target detection model are decoupled, and the classification branch and the positioning branch are trained respectively using the final output feature map after adaptive weighting to obtain the category of the predicted target and the position and confidence of the predicted anchor box, and the target detection model is optimized through error back propagation; The region of interest is used as input information, and the small target features are obtained through the target detection head, specifically: Importing the region of interest corresponding to the visual perception video stream of the target drone into the target detection model, obtaining the corresponding feature map, and performing task adaptation and space adaptation on the feature map using different attentions; Acquire task adaptive attention and space adaptive attention to perform attention weighting on the feature map, output the adaptively weighted feature map and send it to the target detection head, and use one-dimensional convolution in the target detection head to perform dimensionality reduction to obtain small target features; The classification branch of the target detection head performs motion detection by inter-frame difference, selects the motion area according to the small target feature sequence, obtains the discrimination score of the small target as a drone for identification, specifically: Introducing inter-frame differences in the classification branch of the target detection head, obtaining inter-frame difference changes based on small target feature sequences of different key frame images, and further screening out motion areas through the inter-frame difference changes; A 1*1 convolution is used to perform a classification operation on the motion area to obtain a discrimination score of the small target being a drone. When the discrimination score is greater than a preset score threshold, the target is judged to be a drone.

2. According to the method for intelligent detection and positioning of small targets of unmanned aerial vehicles in complex scenes in claim 1, it is characterized in that: The visual perception video stream is preprocessed to extract key frame images, and the region of interest is segmented in the key frame images, specifically: Obtain visual perception video stream based on the monocular camera of the target UAV, pre-process the video frame, divide the pre-processed video frame into cell units, and form image blocks according to a preset number of cell units; Get the feature gradient of each cell unit, aggregate the HOG feature description of the image block, calculate the grayscale entropy of the image block, splice the HOG feature description and grayscale entropy of all image blocks, and get the HOG composite feature vector of the video frame; Calculate the difference of HOG composite feature vectors between video frames in a visual perception video stream, mark video frames whose difference is greater than a preset difference threshold, and segment the visual perception video stream using the marked video frames to obtain a corresponding set of video frames; Determine the number of clusters in the video frame set according to the average video frame spacing, obtain the information entropy of each video frame, set the initial cluster center according to the number of clusters based on the information entropy sorting, and calculate the frame spacing from each video frame to the initial cluster center; The cluster center is determined when the minimum average video frame spacing is met, otherwise the cluster center continues to be moved until there are no adjacent video frames in the video frame set. After clustering is completed, the cluster center is used as the key frame image; The drone contour information is used to perform a global search in the key frame image, and the region of interest in the key frame image is determined according to the contour similarity.

3. According to the method for intelligent detection and positioning of small targets of unmanned aerial vehicles in complex scenes in claim 1, it is characterized in that: In the positioning branch, the regression anchor frame of the drone is obtained, and the three-dimensional coordinates of the drone target are obtained through coordinate system transformation, specifically: In the positioning branch, 1*1 convolution is used to perform positioning and confidence operations respectively, to obtain the anchor frame and confidence of the small target frame of the drone, to complete the positioning of the drone, and to align the pixels of the depth image and color image after calibration; The position coordinates of the vertices and center points of the anchor frame corresponding to the drone target in the pixel coordinate system are obtained, and the coordinates in the pixel coordinate system are converted and multiplied by the intrinsic parameters of the camera to obtain the camera coordinate system of the drone target. The final three-dimensional coordinates are obtained through the relative relationship between the camera coordinate system and the world coordinate system.

4. An intelligent detection and positioning system for small drone targets in complex scenarios, characterized in that: Implementing the intelligent detection and positioning method of small drone targets in complex scenes as described in any one of claims 1 to 3, the system comprises: a drone visual perception module, a visual preprocessing module, a drone target detection module and a target detection and positioning output module; The drone visual perception module obtains a visual perception video stream based on a monocular camera and segments the visual perception video stream; The visual preprocessing module supplements the UAV visual perception module with a sparse optical flow method, extracts key frame images through image preprocessing, and segments the region of interest in the key frame images; The drone target detection module builds a target detection model based on the improved YOLOv5, uses the classification branch to perform motion detection through inter-frame difference, obtains the discrimination score of the detected target for identification, and uses the positioning branch to obtain the detected regression anchor frame for positioning; The target detection and positioning output module visually marks the detected drone targets and drone target positions in the complex scene.