A target detection model and detection method from the perspective of a drone

By using the feature fusion technology of the pyramid backbone network and Neck module in the UAV perspective target detection system, combined with data enhancement and self-confrontational training, the problems of complex, slow and low-precision detection systems are solved, achieving fast, real-time and accurate performance. target detection.

CN118447422BActive Publication Date: 2024-09-24杭州长望智创科技有限公司
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202410903059.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-09-24
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

The existing UAV perspective target detection system has a complex and slow detection process, cannot run in real time, has low accuracy, and lacks accuracy in detecting small objects. The power consumption and size of the algorithm limit its use in mobile and embedded systems.

Method used

The pyramid backbone network is combined with CSPDarknet53, Mish activation function and DropBlock structure for feature extraction. The Neck module uses improved SPP, PAN and SAM modules for feature fusion and enhancement. The Head output layer performs target prediction, combined with mosaic data enhancement and cross mini-batch. Standardization and self-adversarial training techniques, reconstructed into a single regression problem to improve detection speed and accuracy.

Benefits of technology

It achieves fast real-time processing of streaming videos, improves detection accuracy, reduces computing requirements, enhances the recognition accuracy of small targets, reduces the amount of calculation, and reduces the background error rate to half.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118447422B
    Figure CN118447422B
Patent Text Reader

Abstract

The invention belongs to the field of target detection technology, and specifically relates to a target detection model from the perspective of a drone, comprising: an input end for obtaining image input; a pyramid backbone network having a CSPDarknet53 network, a Mish activation function and a DropBlock structure, performing preliminary convolution and pooling operations through CSPDarknet53, extracting multi-scale feature maps, applying the Mish activation function after each convolution layer, and then randomly discarding continuous blocks of part of the feature maps through the DropBlock structure; a Neck module having an improved SPP module, an improved PAN module and an improved SAM module, for fusing and enhancing feature maps; a Head output layer for performing target prediction on the fused and enhanced feature maps, and outputting a bounding box and a category. The invention solves the problems of the current detection system having a complex and slow detection process, being unable to run in real time, and having low accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of target detection, and in particular relates to a target detection model and a detection method from the perspective of an unmanned aerial vehicle. Background Art

[0002] The increase in drone deployment has provided more precise spatial information to the remote sensing field. Drones act as intermediaries between satellite image data and static camera data, and the technological advancement of drones is growing rapidly. Upgrades in navigation systems, sensing payloads, multispectral cameras, positioning systems, laser scanners, and thermal imaging technologies have enabled drones to expand their applications in various fields. Among the various applications of drones, object detection based on deep learning occupies an important position.

[0003] Extensive surveys have shown that in the field of object detection, current detection systems use classifiers to perform detection. To detect an object, these systems take a classifier for that object and evaluate it at different locations and scales in a test image. Existing methods first generate potential bounding boxes in the image and then run a classifier on these proposed bounding boxes; post-classification processing is used to refine the bounding boxes, eliminate duplicate detections, and re-score the bounding boxes based on other objects in the scene. Because each component must be trained separately, these complex pipelines are slow and difficult to optimize, cannot run in real time, and require a large number of GPUs for large mini-batch training. The power consumption and size of the algorithms limit their use on mobile and embedded systems. In addition, even if the real-time requirements can be relaxed, memory limitations will hinder the direct deployment of the algorithms. In addition, existing faster detectors are not accurate enough for small objects, and the bounding boxes are not large enough to fully fit the size of the object.

[0004] Therefore, in response to the above problems, how to propose a target detection technology from the perspective of a drone is an issue that technical personnel in this field urgently need to solve. Summary of the invention

[0005] Purpose of the invention: The purpose of the present invention is to address the deficiencies in the prior art and provide a target detection model and detection method from a drone perspective, which solves the problems of the current detection system, such as the complex and slow detection process, the inability to run in real time, and the low accuracy.

[0006] Technical solution: The target detection model from the perspective of a drone of the present invention comprises:

[0007] The input end is used to obtain image input and pre-process the image;

[0008] A pyramid backbone network, comprising a CSPDarknet53 network, a Mish activation function and a DropBlock structure, wherein the CSPDarknet53 network performs preliminary convolution and pooling operations on the preprocessed image through a plurality of convolutional layers and a pooling layer structure to extract a feature map, and after each convolutional layer, the Mish activation function is applied to perform a smooth nonlinear transformation on the feature map, and then the continuous blocks of part of the feature map are randomly discarded through the DropBlock structure to output a multi-scale feature map;

[0009] The Neck module has an improved SPP module, an improved PAN module and an improved SAM module, which are used to fuse and enhance feature maps; wherein the SPP module increases the receptive field of the feature map by performing maximum pooling operations at different scales; the PAN module enhances the expression ability of the feature map by aggregating feature maps from different levels; the SAM module processes the feature map by performing a point attention mechanism to generate a weight matrix, and uses the weight matrix to weight the feature map to enhance the expression of important areas in the feature map;

[0010] The head output layer performs target prediction on the fused and enhanced feature maps and outputs the bounding box and category.

[0011] To further improve the above technical solution, the image preprocessing includes mosaic data enhancement technology, cross mini-batch normalization and self-adversarial training, wherein the mosaic data enhancement technology mixes several images into a new image to increase the diversity of training samples; the cross mini-batch normalization divides the image after mosaic data enhancement processing into small batches, collects statistical information between each small batch, and performs normalization processing based on the statistical information; the self-adversarial training perturbs the standardized image to generate adversarial samples, and performs normal detection training on the adversarial samples.

[0012] Furthermore, the CSPDarknet53 network includes:

[0013] The input layer has Conv1 and Conv2, wherein Conv1 performs a convolution operation to generate 32 feature maps, and Conv2 performs a convolution operation with a step size of 2 to generate 64 feature maps, and performs downsampling;

[0014] Feature extraction layer, with Conv3 to Conv20 and Residual modules;

[0015] Feature pyramid, with Scale1, Scale2, Scale3, and Scale4, is used to detect objects of different sizes, and outputs feature maps of different scales through Convs28, Convs27, Convs26, and Convs25;

[0016] The detection layer aggregates and fuses the feature maps output by the feature pyramid.

[0017] The pyramid backbone network effectively combines DropBlock to achieve model lightweight processing, and uses the Mish activation function for smooth transformation to obtain efficient feature extraction effects.

[0018] Furthermore, the improved SSP module uses a kernel size of k*k for maximum pooling and mean pooling operations, where k={1, 5, 9, 13}, the step size is equal to 1, and the input feature map is processed in parallel through four branches with a convolution kernel size of k to extract features of different levels and scales. The feature maps output by the four branches are merged together at the branch end to achieve multi-scale feature fusion.

[0019] Furthermore, the improved PAN module has a three-layer path, wherein the starting features of the first layer path are introduced into the starting parts of the second layer and the third layer path to achieve the fusion of multiple layers of features by utilizing the low-layer feature information.

[0020] Furthermore, after the Head output layer outputs the feature map, the feature map is first divided into squares in the horizontal and vertical directions, and the width and height of each square are divided into and ,Then the dimension cluster is used as anchor point to predict the bounding box, the anchor point is obtained in the target grid, the predicted bounding box is drawn using the parameters output by the model, and an independent logistic classifier is used to perform binary cross entropy loss class prediction, and the classification prediction value of the detected target is obtained.

[0021] Furthermore, the predicted bounding box refers to outputting 4 parameters for each bounding box: , , , , , are the horizontal and vertical offsets of the bounding box relative to the grid it belongs to, , is the scaling factor of the bounding box relative to the height and width of the square to which it belongs. If the square is offset relative to the upper left corner of the image ( , ), then the final bounding box size interval corresponds to:

[0022] ,

[0023] ,

[0024] ,

[0025] ,

[0026] in, , , , Generate the center point x coordinate, center point y coordinate, width, and height of the bounding box after the upper left corner is offset. It is a normalization operation.

[0027] During training, if the ground truth value predicted for a certain coordinate is t, the predicted value is , then the gradient is the ground truth minus the predicted value: t- ,The ground truth value is obtained by inverting the bounding box calculation formula;

[0028] Use logistic regression to predict an objectness score for each bounding box, where the score should be 1 if the bounding box prior overlaps the ground truth object more than any other bounding box prior.

[0029] Confidence is used to represent the probability that the model detects the existence of an object in the bounding box, as well as the accuracy of the overlap between the predicted bounding box and the actual bounding box.

[0030] ,

[0031] If there is no target object in the square, the confidence is 0; otherwise, the confidence is equal to the intersection of the predicted box and the actual bounding box.

[0032] The target detection method for the drone perspective using the target detection model includes the following steps:

[0033] Image acquisition and preprocessing: The drone acquires images and inputs them into the model. The images are preprocessed using mosaic data enhancement technology, CmBN technology, and SAT technology to meet the input requirements.

[0034] Feature extraction: The image is subjected to feature extraction through the CSPDarknet53 network to generate a multi-scale feature map. The Mish activation function is applied after each convolution layer to make the feature map undergo a smooth nonlinear transformation, thereby improving the effectiveness of feature representation. During the training process, the DropBlock structure is used to randomly discard some feature blocks to prevent overfitting and enhance the model's ability to recognize small targets.

[0035] Feature fusion and enhancement: The feature map is fused and enhanced through the Neck module including the improved SPP, PAN and SAM modules to improve the feature expression capability;

[0036] Target prediction: The enhanced feature map enters the Head output layer for target detection. The image is divided into 𝑁×𝑁 squares. For each square, its predicted bounding box is calculated, including the center point coordinates, width, height, and confidence score. If there is no target object in the square, the confidence is 0. If there is a target object, the target category probability is calculated and the confidence score is calculated.

[0037] Result output: The final output is the detection results of all target objects in the image, including location and category.

[0038] Beneficial effects: Compared with the prior art, the advantages of the present invention are:

[0039] 1. The present invention provides a target detection technology from the perspective of a drone, which reconstructs object detection as a single regression problem, directly from image pixels to bounding box coordinates and category probabilities. The algorithm only needs to run the neural network on a new image at test time to predict the detection result, so the algorithm is extremely fast and can process streaming video in real time with higher average accuracy.

[0040] 2. The object detection technology from the perspective of a drone provided by the present invention performs global reasoning on the image when making predictions. The algorithm sees the entire image during training and testing, which contains implicit contextual information about the category and its appearance, so the background error rate is less than half.

[0041] 3. The target detection technology from the perspective of a drone provided by the present invention adds a variety of data augmentation technologies at the input end, mixes the data in the data set together to generate new data, so as to obtain a richer data set, improve the detector's recognition accuracy for small targets, and reduce the computing requirements for large small batches.

[0042] 4. The object detection technology from the perspective of a drone provided by the present invention uses feature maps of the last four scales to predict the bounding box of the object, rather than feature maps of the last three scales, so that more texture and contour information can be obtained to detect small objects. At the same time, in order to reduce the amount of calculation, the size of the drone in the feature map of the four scales is automatically calculated according to the input data, and then the number of anchor boxes is adjusted. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a schematic diagram of the mosaic data expansion method;

[0044] Figure 2 Schematic diagram of CmBN network structure;

[0045] Figure 3 This is a schematic diagram of the improved path aggregation network;

[0046] Figure 4Schematic diagram of the improved SAM model;

[0047] Figure 5 Schematic diagram of the feature map detection structure for the last four scales;

[0048] Figure 6 This is a schematic diagram of model detection;

[0049] Figure 7 is a random frame image in the original video;

[0050] Figure 8 This is the test result diagram. DETAILED DESCRIPTION

[0051] The technical solution of the present invention is described in detail below with reference to the accompanying drawings, but the protection scope of the present invention is not limited to the embodiments.

[0052] Example 1: Please refer to Figure 1-8 The target detection technology from the perspective of a drone provided by the present invention includes an input end, a pyramid backbone network, a Neck module and a Head output layer.

[0053] The input side uses mosaic data augmentation technology, cross mini-batch normalization (CmBN) technology and self-adversarial training (SAT) technology.

[0054] Mosaic data augmentation technology mixes 4 images together to form a new image, such as Figure 1 As shown in Figure 1, this technique is able to mix the different contexts of 4 images to detect objects outside the normal context of the image, allowing the target detector to automatically increase the training cost without increasing the inference cost, thereby achieving higher accuracy. Batch normalization significantly reduces the computational requirements for large mini-batches by calculating the number of activation statistics for 4 different images on each layer.

[0055] The Cross Mini-Batch Normalization (CmBN) technique is used to collect statistical information between mini-batches within a single batch, such as Figure 2 As shown in the figure, four small batches (t-3, t-2, t-1, t) within a batch are shown. The standardization of each small batch is normalized by collecting the statistical information of the previous small batches. Specifically, for each small batch, the mean and variance of the previous small batches are collected as the standardization reference of the current small batch. The normalization process of each small batch uses the statistical information collected from the previous small batches for weighted calculation. By collecting statistical information between small batches for standardization, the volatility of statistical information within a single small batch is reduced, making the processing of large batches more efficient, able to effectively adapt to changes in batch size, maintain consistent normalization effects, and enhance the stability of the training process.

[0056] Self-adversarial training is run in two forward-backward phases. In the first phase, the neural network changes the original image instead of the network weights. In this way, the neural network performs an adversarial attack on itself, changing the original image to create deceptive data where the desired object is not present on the image. In the second phase, the neural network is trained to detect objects on the modified images in a normal way.

[0057] The pyramid backbone network consists of CSPDarknet53, Mish activation function and DropBlock structure. CSPDarknet53 realizes multi-level feature extraction of input images through complex convolutional layers and residual module structures; through feature pyramid and feature fusion, the network can detect targets at different scales. Mish activation function is a continuously differentiable activation function, which is used to solve the gradient vanishing problem. In terms of regularization methods, experiments have shown that DropBlock has a very obvious advantage over other methods. Therefore, DropBlock is used as the regularization method.

[0058] like Figure 5 As shown in the figure, CSPDarknet53 consists of 29 3x3 convolutional layers, a 725x725 receptive field and 27.6M parameters. The network is mainly divided into the following modules.

[0059] Input layer: Conv1: convolution kernel size is 3x3, number of filters is 32; Conv2: convolution kernel size is 3x3, stride is 2, number of filters is 64. The input image is processed by the first convolution layer (Conv1) to generate a preliminary feature map; the feature map is processed by the second convolution layer (Conv2) and downsampled by convolution with a stride of 2.

[0060] Residual modules: including Residual5, Residual9, Residual13, Residual17, and Residual21. Each Residual module consists of two convolutional layers and one direct connection.

[0061] Feature extraction layer: multi-layer convolution operations (including Conv3 to Conv20) and residual connections. The convolution kernel size used in each module is 3x3, and the number of filters increases gradually. The feature map enters a series of convolution layers (such as Conv3, Conv4) and residual modules (such as Residual5). These layers and modules help to extract features at different levels. Each residual module consists of two convolution layers and a direct connection, which helps to alleviate the gradient vanishing problem and promote feature reuse.

[0062] Feature pyramid: Feature maps of different scales (including Scale1, Scale2, Scale3, and Scale4) are used to detect objects of different sizes, where Scale4 is output from Convs25, Scale3 is output from Convs26, Scale2 is output from Convs27, and Scale1 is output from Convs28; feature maps are further processed at different scales to form feature maps of different resolutions, and feature maps of each scale are used to detect objects of different sizes.

[0063] Detection layer: Feature maps extracted from different scales are brought together for feature fusion. The final detection layer uses these feature maps for target detection, identification, and location of different objects in the image.

[0064] The network structure design improves the detection accuracy and generalization ability of the model, making it perform well in object detection tasks. CSPDarknet53 supports higher input network size and can detect multiple small objects; more convolutional layers give the network a higher receptive field and can cover a larger input network scale; 27.6M parameters give the model a larger capacity and can detect multiple objects of different sizes in one image.

[0065] The Neck module is a target detector that inserts some layers between the pyramid backbone network and the final Head output layer, including an improved spatial pyramid matching (SPP) module, an improved path aggregation network (PAN) module, and an improved SAM module. It uses multi-scale feature maps to predict bounding boxes. These structures can significantly improve the accuracy of target detection while only increasing a small amount of reasoning cost.

[0066] The improved SPP module is used to increase the receptive field. The SPP module integrates SPM into CNN and performs maximum pooling. The SPP module is a cascade of maximum merged outputs with a kernel size of k*k, where k={1, 5, 9, 13} and the step size is 1. Under this design, the relatively large k*k maximum pooling effectively increases the acceptance range of the backbone features. For the existing SPP, the improved SPP module uses more scale branches, a total of four, to obtain a more detailed feature extraction effect. Among them, the smallest branch uses 1*1 convolution for feature dimensionality reduction to reduce computational complexity; the largest branch uses 13*13 mean pooling to significantly increase the receptive field and capture global information; the middle branches 5*5 and 9*9 perform maximum pooling to extract medium-scale and larger-scale features, while ensuring pooling efficiency and significantly reducing computational costs. Using pooling kernels of different sizes can extract features of different levels and scales, thereby capturing detailed information of more levels and scales; in particular, using a larger 13x13 mean pooling can significantly increase the receptive field of the feature map, allowing the model to better understand global information; using 1x1 convolution to achieve feature dimensionality reduction and reduce the amount of calculation, the middle branch extracts features of different scales, and the largest 13x13 mean pooling ensures the effect and balances the computational complexity.

[0067] The improved PAN module is used as a parameter aggregation method at different backbone levels for different detector levels. Figure 3 First, the improved PAN increases the number of path layers to three. Second, the starting features of the first-layer path are introduced into the beginning of the second and third-layer paths, which significantly alleviates the gradient explosion and gradient vanishing problems caused by too many model layers.

[0068] The improved SAM module is modified from spatial attention to point attention, and its structure is as follows Figure 4 In addition, considering that the objects under the drone’s perspective are small, the small receptive field is not enough to detect the objects under the drone’s perspective. Therefore, in order to obtain more texture and contour information, the feature maps of the last four scales are used to predict the bounding box of the object, as shown in Figure 5 As shown, instead of the feature maps of the last three scales.

[0069] The head output layer uses the dimension clusters as anchors to predict bounding boxes and uses an independent logistic classifier with binary cross entropy loss to predict the category.

[0070] The model predicts multiple bounding boxes, and the model outputs a set of parameters for each bounding box: , , , , if the cell is offset relative to the top left corner of the image ( ), and the bounding box has a priori width and height , then the coordinates of the predicted bounding box correspond to:

[0071]

[0072]

[0073]

[0074]

[0075] in, , , , is the coordinate and size of the image after offset, σ is the normalization operation, , Convert to the offset image size range.

[0076] During the training process, the error squared sum loss method is used to calculate the prediction error of the bounding box. The predicted box parameters are subtracted from the parameters of the real labeled target detection box, and the squared sum of the difference is taken as the loss function. During training, the partial derivatives of the four parameters are calculated and the gradients are calculated, and then the network parameters are updated by back propagation. For example, the predicted value of a coordinate is , then the loss function is the ground truth value (calculated from the ground truth box) minus the sum of squares of the predicted value, For example, the loss function is ,in, is the ground truth position.

[0077] The ground truth value can be obtained by inverting the bounding box calculation formula:

[0078]

[0079]

[0080]

[0081]

[0082] Logistic regression is used to predict an objectness score for each bounding box. Binary cross entropy loss is used to calculate the error of class prediction. For each bounding box: if the bounding box prior has a greater overlap (IoU) with the ground truth object than any other bounding box prior, the score should be 1, otherwise 0.

[0083] Example 2: The target detection model from the drone perspective provided in Example 1 regards the target detection task as a regression problem of separating the detection box and the related category probabilities from the image space. The target detection model can directly derive the predicted bounding box and the corresponding category probability from the original image in one evaluation. The entire detection process is a single network, so it can be directly optimized end-to-end based on performance, improving the speed of training and implementation while maintaining high accuracy. All features in the input image are used to predict the bounding box, that is, the target detection model performs global reasoning on the entire image and all objects in the image, and can make full use of all information in the image, including potential contextual information.

[0084] The image acquired by the drone is input into the target detection model provided by the present invention to obtain the result after algorithm processing. Taking a random frame of image in the public data set as an example, Figure 7 As shown in the figure. The input image is processed by the target detection model and divided into N*N squares. If the center point of the target object falls in a square, then the square is responsible for the detection of the target object. For each square, the model predicts B bounding boxes and the confidence of the corresponding bounding boxes.

[0085] Each predicted bounding box contains five pieces of information: the predicted coordinate offset value , scale width and height , and the detection confidence which represents the intersection of the predicted bounding box and the actual bounding box. Each grid cell also predicts the probability that the target belongs to C target categories, assuming that the grid cell contains the target object, and only predicts a set of target category probabilities for each grid cell, rather than giving a category probability for each detection box. These confidences represent the probability that the model gives to the bounding box as the target object, and how accurate the model believes the bounding box prediction is. The confidence is defined as

[0086]

[0087] If there is no target object in the square, the confidence score is 0; otherwise, the confidence score is equal to the intersection-over-union (IOU) of the predicted box and the actual bounding box.

[0088] During the detection process, the probability of the target category and the confidence of the detection box are multiplied, and the result of the operation indicates the confidence score of each detection box. The confidence score not only indicates the probability of the detection box containing this category, but also indicates the degree of overlap between the predicted box and the actual bounding box. The whole process is shown in the figure below. Figure 6 shown.

[0089] Confidence score The calculation formula is as follows:

[0090]

[0091] in, It is the conditional probability of the category, which indicates the probability of belonging to a certain category when the target object exists. The confidence score not only indicates the probability of containing this category in the detection box, but also indicates the degree of overlap between the predicted box and the actual bounding box.

[0092] After being processed by the target detection algorithm, the target location and category can be identified in the image. The detection results are as follows: Figure 8 shown.

[0093] As described above, although the present invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the present invention itself. Various changes in form and details may be made without departing from the spirit and scope of the present invention as defined in the appended claims.

Claims

1. A target detection model from the perspective of a drone, It is characterized in that include: The input end is used to obtain image input and pre-process the image; A pyramid backbone network, comprising a CSPDarknet53 network, a Mish activation function and a DropBlock structure, wherein the CSPDarknet53 network performs preliminary convolution and pooling operations on the preprocessed image through a plurality of convolutional layers and a pooling layer structure to extract a feature map, and after each convolutional layer, the Mish activation function is applied to perform a smooth nonlinear transformation on the feature map, and then the continuous blocks of part of the feature map are randomly discarded through the DropBlock structure to output a multi-scale feature map; The Neck module has an improved SPP module, an improved PAN module and an improved SAM module, and is used to fuse and enhance feature maps; wherein the improved SPP module increases the receptive field of the feature map by performing maximum pooling operations at different scales; the improved PAN module enhances the expression capability of the feature map by aggregating feature maps from different levels; the improved SAM module processes the feature map by a point attention mechanism to generate a weight matrix, and uses the weight matrix to weight the feature map to enhance the expression of important areas in the feature map; The head output layer predicts the target of the fused and enhanced feature map and outputs the bounding box and category; After the Head output layer outputs the feature map, the feature map is first divided into squares in the horizontal and vertical directions. The width and height of each square are divided into and ,Then use the dimension cluster as an anchor point to predict the bounding box, obtain the anchor point in the target grid, draw the predicted bounding box using the parameters output by the model, and use an independent logistic classifier to perform binary cross entropy loss class prediction to obtain the classification prediction value of the detected target; The predicted bounding box refers to outputting 4 parameters for each bounding box: , , , , , are the horizontal and vertical offsets of the bounding box relative to the grid it belongs to, , is the scaling factor of the bounding box relative to the height and width of the square to which it belongs. If the square is offset relative to the upper left corner of the image , then the final bounding box size interval corresponds to: , , , , in, , , , Generate the center point x coordinate, center point y coordinate, width, and height of the bounding box after the upper left corner is offset. It is a normalization operation; During training, if the ground truth value predicted for a certain coordinate is t, the predicted value is , then the gradient is the ground truth minus the predicted value: t- ,The ground truth value is obtained by inverting the bounding box calculation formula; Use logistic regression to predict an objectness score for each bounding box, where the score should be 1 if the bounding box prior overlaps the ground truth object more than any other bounding box prior. Confidence is used to represent the probability that the model detects the existence of an object in the bounding box, as well as the accuracy of the overlap between the predicted bounding box and the actual bounding box. , If there is no target object in the square, the confidence is 0; otherwise, the confidence is equal to the intersection of the predicted box and the actual bounding box.

2. The target detection model from the perspective of a drone according to claim 1, It is characterized in that The image preprocessing includes mosaic data enhancement processing, cross-small batch normalization processing and self-adversarial training processing, wherein the mosaic data enhancement processing mixes several images into a new image to increase the diversity of training samples; the cross-small batch normalization processing refers to dividing the image after the mosaic data enhancement processing into small batches, collecting statistical information between each small batch, and performing normalization processing based on the statistical information; the self-adversarial training processing refers to perturbing the image after the cross-small batch normalization processing to generate adversarial samples, and performing normal detection training on the adversarial samples.

3. The target detection model from the perspective of a drone according to claim 1, It is characterized in that The CSPDarknet53 network includes: The input layer has Conv1 and Conv2, wherein Conv1 performs a convolution operation to generate 32 feature maps, and Conv2 performs a convolution operation with a step size of 2 to generate 64 feature maps, and performs downsampling; The feature extraction layer has a deep convolutional network and a residual module. The deep convolutional network includes convolutional layers Conv3~Conv20, and the residual module includes residuals Residual5, Residual9, Residual13, Residual17, and Residual21. Every two convolutional layers are directly connected to a residual to extract rich feature representations; Feature pyramid, outputs feature maps of different scales Scale1, Scale2, Scale3, and Scale4 through Convs28, Convs27, Convs26, and Convs25 to detect objects of different sizes; The detection layer fuses the feature maps of different scales output by the feature pyramid and uses the fused feature maps to identify and locate different objects in the image.

4. The target detection model from the perspective of a drone according to claim 3, It is characterized in that The improved SPP module adopts a branch with a kernel size of k*k for pooling operation, where k={1, 5, 9, 13} and the step size is 1. The input feature map is processed in parallel by four branches to extract features of different levels and scales. The feature maps output by the four branches are merged together at the branch end to achieve multi-scale feature fusion.

5. The target detection model from the perspective of a drone according to claim 4, It is characterized in that The improved PAN module has a three-layer path, wherein the starting features of the first layer path are introduced into the starting parts of the second layer and the third layer path, so as to realize the fusion of multi-layer features by utilizing the low-layer feature information.

6. A target detection method from the perspective of a drone, It is characterized in that The following steps are involved: Image acquisition and preprocessing: The images collected by the drone are input into the target detection model. The images are preprocessed including mosaic data enhancement processing, CmBN processing and SAT processing to meet the input requirements; Feature extraction: The preprocessed image is subjected to feature extraction through the CSPDarknet53 network to generate a multi-scale feature map. The Mish activation function is applied after each convolution layer to make the feature map undergo a smooth nonlinear transformation, thereby improving the effectiveness of feature representation. During the training process, the DropBlock structure is used to randomly discard some feature blocks to prevent overfitting and enhance the model's ability to recognize small targets. Feature fusion and enhancement: The feature map is fused and enhanced through the Neck module including the improved SPP, PAN and SAM modules to improve the feature expression capability; Target prediction: The enhanced feature map enters the Head output layer. After the Head output layer outputs the feature map, the feature map is first divided into squares in the horizontal and vertical directions. The width and height of each square are divided into and ,Then use the dimension cluster as an anchor point to predict the bounding box, obtain the anchor point in the target grid, draw the predicted bounding box using the parameters output by the model, and use an independent logistic classifier to perform binary cross entropy loss class prediction to obtain the classification prediction value of the detected target; The predicted bounding box refers to outputting 4 parameters for each bounding box: , , , , , are the horizontal and vertical offsets of the bounding box relative to the grid it belongs to, , is the scaling factor of the bounding box relative to the height and width of the square to which it belongs. If the square is offset relative to the upper left corner of the image , then the final bounding box size interval corresponds to: , , , , in, , , , Generate the center point x coordinate, center point y coordinate, width, and height of the bounding box after the upper left corner is offset. It is a normalization operation; During training, if the ground truth value predicted for a certain coordinate is t, the predicted value is , then the gradient is the ground truth minus the predicted value: t- ,The ground truth value is obtained by inverting the bounding box calculation formula; Use logistic regression to predict an objectness score for each bounding box, where the score should be 1 if the bounding box prior overlaps the ground truth object more than any other bounding box prior. Confidence is used to represent the probability that the model detects the existence of an object in the bounding box, as well as the accuracy of the overlap between the predicted bounding box and the actual bounding box. , If there is no target object in the square, the confidence is 0; otherwise, the confidence is equal to the intersection of the predicted box and the actual bounding box; Result output: Output the detection results of all target objects in the image, including location and category.

Citation Information

Patent Citations

  • An image target detection method based on DC-SPP-YOLO

    CN109685152A

  • Remote sensing image target detection method based on new frame regression loss function

    CN111091105A

  • Floating object target detection method and system fusing attention mechanism

    CN114781514A

  • Method for carrying out target detection in combination with multi-characterization features and target prediction method

    CN115565043A

  • Target detection model training method and device, target detection method and device, equipment and medium

    CN115797736A