A vehicle target recognition method for UAV images based on anchor-free cascade detection
By adopting a method based on anchor-free cascade detection in the drone image and using Resnet50 for multi-scale feature extraction, the scale difference problem of vehicle target detection in the drone image is solved, and the accuracy and speed of detection are improved.
Patent Information
- Application Number
- CN202111654281.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2041-12-30
AI Technical Summary
In the drone image, vehicle target detection has a large difference in target scales, resulting in high missed detection rate; at the same time, due to the high shooting height, the vehicle target is small, the small target has low resolution and few features, resulting in high false detection rate.
Using a method based on anchor-free cascade detection, multi-scale feature extraction is performed through Resnet50, combined with anchor-free detection method, high-level feature maps are first detected to obtain rough detection results, and then further detection is performed on low-level feature maps, and a relatively accurate detection result is finally obtained.
It improves the missed detection and false detection rate of target detection, improves the accuracy and speed of detection, and is suitable for multi-scale object detection of vehicles in drone images.
Smart Images

Figure CN114419433B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of deep learning image processing, and specifically, relates to an airborne vehicle target detection method based on anchor-free cascade detection. Background Art
[0002] In recent years, with the continuous development of drone technology, civil drones have been widely used in the real world, including highway inspections, traffic violation capture, traffic flow monitoring, traffic emergency command, and traffic accident investigation and evidence collection. As an effective tool for obtaining image information, drone platforms have the advantages of wide field of view, flexibility, convenience, and diverse angles. Therefore, vehicle target detection in images taken by drones has gradually become a research hotspot in the field of target detection.
[0003] With the development of technology, deep learning-based methods are gradually being widely used. In the field of drone image target detection, more and more deep learning-based methods have been proposed. These methods can be divided into anchor-based methods and anchor-free methods. The anchor-based method generates multiple anchor boxes of different sizes and proportions on the feature map and classifies and regresses the anchor boxes. However, this method is computationally complex and requires manual design of the anchor box size. Different designs are also required for different data sets. In addition, the large number of anchor boxes leads to an imbalance of positive and negative samples, and the versatility is not high, making it unsuitable for drone images. The anchor-free method does not rely on pre-defined anchor boxes, and regresses the original image border corresponding to each position in the feature map, avoiding complex calculations and being more suitable for drone platforms.
[0004] However, there is a problem of large differences in the scale of the target in the detection of vehicle targets in drone images. Due to the non-fixed flight altitude, the scales of the same type of vehicles in different images are different. The size difference between vehicles of different categories is large, and the target coexists at multiple scales, resulting in a high missed detection rate. In addition, due to the high shooting altitude of drones, the vehicle targets in the captured images are small, the resolution of small targets is low, and there are few features, resulting in a high false detection rate. Summary of the invention
[0005] In view of the shortcomings in the prior art, the present invention provides a method for vehicle target recognition in drone images based on anchor-free cascade detection. The method first uses Resnet50 to extract multi-scale features of the input image to obtain multiple features from bottom to top; then upsamples the high-level features and fuses them with the low-level features to obtain the fused features; divides the output features of different scales into two categories: small feature maps and large feature maps, which are used to detect small targets and large targets respectively; in the detection process, the anchor-free method is combined to first detect the high-level feature maps to obtain a rough detection result, and then input this result to the low-level layer, and further detects on the high-level detection result, and finally obtains a more accurate detection result.
[0006] A method for identifying vehicle targets in drone images based on anchor-free cascade detection comprises the following steps:
[0007] S1: Select the dataset.
[0008] The existing UAVDT dataset is used as the dataset of this method to train the model.
[0009] S2: Use Resnet50 to extract features from the input original image and obtain multi-scale feature maps.
[0010] S3: The high-level feature maps output in S2 are upsampled twice in sequence and added to the low-level feature maps in S2 to obtain the fused feature maps. In order to enable the subsequent detection modules to have features of more scales, the top-level feature maps in the fused feature maps are downsampled twice continuously to obtain extended two-layer feature maps. Finally, a multi-scale fused feature map with a top-down pyramid structure is obtained.
[0011] S4: Perform cascade detection on the feature map processed by S3.
[0012] The feature maps processed by S3 are sorted from small to large in size and divided into two groups in half. The larger group of feature maps is used to detect small targets, and the smaller group of feature maps is used to detect large targets. For each type of feature map, calculate the probability that each point in the smallest feature map in each group is mapped to the original image and contains the target. A probability of 1 indicates that the point contains the target, and a probability of 0 indicates that the point does not contain the target. The area with a probability of 1 is mapped to the next layer of feature maps in the current group for detection. At the same time, the next layer will also calculate the probability that each point in the feature map contains the target for subsequent detection calculations.
[0013] S5: Divide positive and negative samples. For each layer of the feature map of the pyramid structure, based on the results obtained in S4, calculate the fitness of each point, and calculate the global threshold value by counting all fitness values. Samples above the threshold are positive samples, otherwise they are negative samples.
[0014] S6: Detect the category and position of the target, and select a suitable anchor-free detector as needed. Input the feature map into the classification and regression subnetworks respectively, and further adjust the detection results on the positive samples obtained in S5. Input the predicted box back into the network, adjust the position of the box, and calculate the category confidence of the predicted box. The category with a higher confidence is the category of the target. Finally, use non-maximum suppression to retain the one with the best detection result in a single category among many predicted boxes to obtain the final detection result.
[0015] Preferably, the detailed steps of S2 are:
[0016] Resnet50 is used as the backbone of the feature extraction module to extract the features of the original image. Resnet50 has five stages, each of which outputs a feature map, which is also the input of the next stage. The feature maps output at different stages have different scales. The higher the feature map, the smaller the scale and the more channels.
[0017] First, the input original image is processed. The specific process is as follows:
[0018] Out=Conv 7×7 (C,W,H,k,s)#(1)
[0019] Among them, Out represents the feature map output by the first stage, Conv 7×7 represents a convolutional layer of size 7×7, C represents the number of channels of the input image, the number of channels of RGB images is 3, W and H represent the width and height of the input image respectively, k represents the size of the convolution kernel, and s represents the step length of the convolution kernel movement. k = 64, s = 2.
[0020] Secondly, the output feature maps are extracted in turn. The specific process is as follows:
[0021] P i =Conv 3×3 (C i ,W,H,k i ,s i )#(2)
[0022] Among them, P i is the feature map output by the i-th stage, Conv 3×3 represents a convolutional layer of size 3×3, C i Indicates the number of channels of the feature map input at the i-th stage, W and H represent the width and height of the input feature map respectively. i Represents the size of the convolution kernel, where k i =256×2 i-1 .s i Represents the step size of the convolution kernel movement, si =2. Finally, four feature maps are output, from bottom to top, respectively: {P 2 ,P 3 ,P 4 ,P 5}, and the number of channels are {256,512,1024,2048} respectively.
[0023] Preferably, the detailed steps of S3 are:
[0024] The feature map {P 2 ,P 3 ,P 4 ,P 5} Perform top-down enhancement. First, normalize the channels of the feature map obtained in S1 and transform the top feature map P 5 Translate to get N 5 The translated feature map is deconvolved, the original feature map is enlarged by two times, and then horizontally connected with the low-level feature map in S1 to obtain a new feature map N 4 . N 4 Repeat the enlargement and lateral connection operations until all the low-level feature maps in S1 are laterally connected. At the same time, in order to make the subsequent detection modules have feature maps of more scales, N 5 The feature map is downsampled twice in a row. The specific performance is:
[0025] N i =P i ,i=5
[0026] N i =deconv(L(N i+1 ))+Conv 1×1 (P i ,k n ,s n ),i=2,3,4#(3)
[0027] N i =Conv 3×3 (N i-1 ,k d ,s d ),i=6,7
[0028] Where N i is the i-th layer feature map after feature fusion, Conv 1×1 is a convolution of size 1×1, devonv(·) represents the pixel shuffle function to upsample the features, L(·) represents the channel normalization operation, and N i+1 Relative to N i The previous feature map, k nis the number of convolution kernels, s is the step size of the convolution kernel movement, where k n =256,s n =1. i Compared with N i+1 The feature map of the lower layer. Conv 3×3 is a convolution kernel of size 3×3, N i-1 Compared to N i The lower layer feature map, k d is the number of convolution kernels, s d is the step length of the convolution kernel movement. d =256,s d =2. The final output feature map after preliminary fusion is {N 2 ,N 3 ,N 4 ,N 5 ,N 6 ,N 7}.
[0029] Preferably, the detailed steps of S4 are:
[0030] S4.1: First, sort the feature maps output in S3 from small to large in size and divide them into two groups, namely {N 2 ,N 3 ,N 4} and {N 5 ,N 6 ,N 7 {N 2 ,N 3 ,N 4} is used to detect large targets, {N 5 ,N 6 ,N 7} is used to detect small targets. Small targets are defined as targets with a box size less than or equal to 32×32 pixels. Target boxes larger than 32×32 pixels are large targets.
[0031] S4.2: First, calculate the possibility of the existence of an object on the feature map. Map the center point of the real box of any object in the original image to the feature map, that is, its theoretical center point. Calculate the distance between each point in the smallest feature map in each group and the theoretical center point. The point with the smallest distance to the theoretical center point represents the actual center point of the object represented by the point in this feature map. Calculate the size of the real box corresponding to the actual center point on this feature map, and calculate the area of 32×32 pixels projected to different feature maps, that is, the area threshold on each feature map. For the feature map {N 5 ,N 6 ,N 7}, if the size of the box on this feature map is greater than the area threshold, the actual center point is marked as 1, otherwise it is marked as 0. 2 ,N 3 ,N 4}, if the size of the box on this feature map is less than or equal to the area threshold, mark this point as 1, otherwise mark it as 0. Map the points marked as 1 to the next layer of feature maps in the corresponding feature group. The next layer of feature maps calculates the possibility of a large target at each point for all points marked as 1, and so on. The specific performance is:
[0032]
[0033]
[0034] area = 32 × 32 × 2 -l #(6)
[0035]
[0036]
[0037] Where D l N l The minimum distance between a point on the layer feature map and the center point of each real box projected onto the feature map; min(·) represents the minimum function; x, y represent any point on the feature map; Represents the mapping of the center point of the real box of target o on the l-layer feature map. l Indicates that the real box is in N l The size of the projection on the feature map, Indicates that the real box is in N l The length of the projection on the feature map, Indicates that the real box is in N l The height of the projection on the feature map. Area represents the area threshold represented on different feature maps. 32×32 represents the area threshold on the original image. 2 -l N l Scaling ratio of the area threshold in the feature layer. B l N l The set of points with large objects on the feature map, S l N l The set of points with small objects on the feature map.
[0038] Preferably, the detailed steps of S5 are:
[0039] Further detection is performed on the points with targets obtained in S4. First, candidate boxes are generated on each feature map by the candidate region generation method, and the intersection-and-union ratio between each true box and all candidate boxes on the feature map, as well as the Euclidean distance between the center point of the true box and the center point of all candidate boxes, are calculated. The 9 candidate boxes with the smallest Euclidean distance in each feature map are searched in turn. The mean and standard deviation of the intersection-and-union ratio of each candidate box are calculated, and the two are added to obtain the adaptive threshold of the true box. All candidate boxes in the feature map of this layer whose intersection-and-union ratio is greater than the adaptive threshold are set as positive samples, otherwise they are negative samples.
[0040]
[0041]
[0042] Among them, d(x,y) represents the Euclidean distance between the center point of the candidate box and the center point of the real box, x, y represent the coordinates of the center point of the candidate box, x 1 ,y 1 The coordinate p of the center point of the real box represents the number of candidate boxes in the feature map of this layer. θ represents the adaptive threshold, E(·) represents the averaging function, and bbox IoU It represents the intersection-over-union ratio between the candidate box and the real box, and N represents the number of intersections between the candidate box and the real box.
[0043] Preferably, the detailed steps of S6 are:
[0044] Based on S5, the positive samples are tested. According to the needs, a suitable anchor-free detector is selected, and the annotated feature maps are sent to the classification and regression sub-networks respectively. In the classification branch, the focal loss function (focalloss) is used to train and fine-tune the target category. In the regression branch, the intersection-over-union loss (IoU loss) is used for the positive samples to predict and fine-tune the position of the detection box. Finally, non-maximum suppression is used to retain the best detection result of a single category among many prediction boxes to obtain the final detection result. Finally, the specific position of the detection box and its corresponding target category are obtained.
[0045] The beneficial effects of the present invention are as follows:
[0046] 1. Aiming at the problem of large differences in target scales in drone images, the present invention divides multiple feature maps into two parts, which are used to detect targets of different scales respectively, thereby improving the missed detection rate and false detection rate of target detection.
[0047] 2. A cascade structure branch is added to the detection module. First, a global rough detection is performed on the feature map, and then the detection results are sent to further detection and the next layer of detection, which can improve the detection accuracy. Since only the rough detection results provided by the previous layer need to be detected on the large feature map, unnecessary calculations are reduced and the detection speed is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A schematic diagram of a method according to an embodiment of the present invention;
[0049] Figure 2 It is a schematic diagram of the cascade detection method of the present invention. DETAILED DESCRIPTION
[0050] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0051] like Figure 1 As shown, a method for drone image target recognition based on anchor-free cascade detection includes the following steps:
[0052] S1: Select the dataset.
[0053] In order to make the UAV image vehicle target recognition model have good adaptability and robustness, UAVDT is selected as the dataset of this method. The pictures in the UAVDT dataset have various weather conditions, multiple shooting angles and different flight altitudes. It can provide strong support for the vehicle target detection model.
[0054] S2: Use a convolutional neural network to extract features from the input original image and obtain a multi-scale feature map.
[0055] like Figure 1 As shown on the far left, Resnet50 is used as the backbone of the feature extraction module to extract the features of the original image. Resnet50 has five stages, each of which outputs a feature map, which is also the input of the next stage. The scale of the feature maps output at different stages is different. The higher the feature map, the smaller the scale and the more channels.
[0056] First, the input original image is processed. The specific process is as follows:
[0057] Out=Conv 7×7 (C,W,H,k,s)#(1)
[0058] Among them, Out represents the feature map output by the first stage, Conv 7×7represents a convolutional layer of size 7×7, C represents the number of channels of the input image, the number of channels of RGB images is 3, W and H represent the width and height of the input image respectively, k represents the size of the convolution kernel, and s represents the step length of the convolution kernel movement. k = 64, s = 2.
[0059] Secondly, the output feature maps are extracted in turn. The specific process is as follows:
[0060] P i =Conv 3×3 (C i ,W,H,k i ,s i )#(2)
[0061] Among them, P i is the feature map output by the i-th stage, Conv 3×3 represents a convolutional layer of size 3×3, C i Indicates the number of channels of the feature map input at the i-th stage, W and H represent the width and height of the input feature map respectively. i Represents the size of the convolution kernel, where k i =256×2 i-1 .s i Represents the step size of the convolution kernel movement, s i =2. Finally, four feature maps are output, from bottom to top, respectively: {P 2 ,P 3 ,P 4 ,P 5}, and the number of channels are {256,512,1024,2048} respectively.
[0062] S3: Upsample the high-level feature maps output in S2 by two times in sequence, and add them to the low-level feature maps in S2 to obtain the fused feature maps.
[0063] like Figure 1 As shown in the middle column of 2 ,P 3 ,P 4 ,P 5} Perform top-down enhancement. First, normalize the channels of the feature map obtained in S1 and transform the top feature map P 5 Translate to get N 5 The translated feature map is deconvolved, the original feature map is enlarged by two times, and then horizontally connected with the low-level feature map in S1 to obtain a new feature map N 4 . N 4 Repeat the enlargement and lateral connection operations until all the low-level feature maps in S1 are laterally connected. At the same time, in order to make the subsequent detection modules have feature maps of more scales, N 5The feature map is downsampled twice in a row. The specific performance is as follows:
[0064] N i =P i ,i=5
[0065] N i =deconv(L(N i+1 ))+Conv 1×1 (P i ,k n ,s n ),i=2,3,4#(3)
[0066] N i =Conv 3×3 (N i-1 ,k d ,s d ),i=6,7
[0067] Where N i is the i-th layer feature map after feature fusion, Conv 1×1 is a convolution of size 1×1, devonv(·) represents the pixel shuffle function to upsample the features, L(·) represents the channel normalization operation, and N i+1 Relative to N i The previous feature map, k n is the number of convolution kernels, s is the step size of the convolution kernel movement, where k n =256,s n =1. i Compared with N i+1 The feature map of the lower layer. Conv 3×3 is a convolution kernel of size 3×3, N i-1 Compared to N i The lower layer feature map, k d is the number of convolution kernels, s d is the step length of the convolution kernel movement. d =256,s d =2. The final output feature map after preliminary fusion is {N 2 ,N 3 ,N 4 ,N 5 ,N 6 ,N 7}.
[0068] S4: Figure 2 As shown, cascade detection is performed.
[0069] S4.1: First, sort the feature maps output in S3 from small to large in size and divide them into two groups, namely {N2 ,N 3 ,N 4} and {N 5 ,N 6 ,N 7 {N 2 ,N 3 ,N 4} is used to detect large targets, {N 5 ,N 6 ,N 7} is used to detect small targets. Small targets are defined as targets with a box size less than or equal to 32×32 pixels. Target boxes larger than 32×32 pixels are large targets.
[0070] S4.2: First, calculate the possibility of the existence of an object on the feature map. Map the center point of the real box of any object in the original image to the feature map, that is, its theoretical center point. Calculate the distance between each point in the smallest feature map in each group and the theoretical center point. The point with the smallest distance to the theoretical center point represents the actual center point of the object represented by the point in this feature map. Calculate the size of the real box corresponding to the actual center point on this feature map, and calculate the area of 32×32 pixels projected to different feature maps, that is, the area threshold on each feature map. For the feature map {N 5 ,N 6 ,N 7}, if the size of the box on this feature map is greater than the area threshold, the actual center point is marked as 1, otherwise it is marked as 0. 2 ,N 3 ,N 4}, if the size of the box on this feature map is less than or equal to the area threshold, mark this point as 1, otherwise mark it as 0. Map the points marked as 1 to the next layer of feature maps in the corresponding feature group. The next layer of feature maps calculates the possibility of a large target at each point for all points marked as 1, and so on. The specific performance is:
[0071]
[0072]
[0073] area = 32 × 32 × 2 -l #(6)
[0074]
[0075]
[0076] Where D l N lThe minimum distance between a point on the layer feature map and the center point of each real box projected onto the feature map; min(·) represents the minimum function; x, u represent any point on the feature map; Represents the mapping of the center point of the real box of target o on the l-layer feature map. l Indicates that the real box is in N l The size of the projection on the feature map, Indicates that the real box is in N l The length of the projection on the feature map, Indicates that the real box is in N l The height of the projection on the feature map. Area represents the area threshold represented on different feature maps. 32×32 represents the area threshold on the original image. 2 -l N l Scaling ratio of the area threshold in the feature layer. B l N l The set of points with large objects on the feature map, S l N l The set of points with small objects on the feature map.
[0077] S5: Further detection on the points with targets obtained in S4. First, a candidate box is generated on each feature map by the candidate region generation method, and the intersection-and-union ratio between each true box and all candidate boxes on the feature map, as well as the Euclidean distance between the center point of the true box and the center point of all candidate boxes, are calculated. The 9 candidate boxes with the smallest Euclidean distance in each feature map are searched in turn. The mean and standard deviation of the intersection-and-union ratio of each candidate box are calculated, and the two are added to obtain the adaptive threshold of the true box. All candidate boxes in the feature map of this layer whose intersection-and-union ratio is greater than the adaptive threshold are set as positive samples, otherwise they are negative samples.
[0078]
[0079]
[0080] Among them, d(x,y) represents the Euclidean distance between the center point of the candidate box and the center point of the real box, x, y represent the coordinates of the center point of the candidate box, x 1 ,y 1 The coordinate p of the center point of the real box represents the number of candidate boxes in the feature map of this layer. θ represents the adaptive threshold, E(·) represents the averaging function, and bbox IoU It represents the intersection-over-union ratio between the candidate box and the real box, and N represents the number of intersections between the candidate box and the real box.
[0081] S6: After S4, detection is performed on the points marked as 1 on the feature maps of each layer. Since the vehicle detection model in drone images requires high accuracy and speed, the FCOS detector with better overall effect is selected. The annotated feature maps are sent to the classification and regression subnetworks respectively. In the classification branch, the focal loss function is used to train and fine-tune the target category. In the regression branch, the intersection-over-union loss (IoU loss) is used for positive samples to predict and fine-tune the position of the detection box. Finally, the specific position of the detection box and its corresponding target category are obtained.
Claims
1. A vehicle target recognition method for UAV images based on anchor-free cascade detection, characterized in that: The following steps are involved: S1: Select the dataset; The existing UAVDT dataset is used as the dataset of this method to train the model; S2: Use Resnet50 to extract features from the input original image and obtain multi-scale feature maps; S3: The high-level feature maps output in S2 are upsampled twice in sequence and added to the low-level feature maps in S2 to obtain a fused feature map; in order to enable the subsequent detection module to have features of more scales, the top-level feature map in the fused feature map is continuously downsampled twice to obtain an extended two-layer feature map; finally, a multi-scale fused feature map with a top-down pyramid structure is obtained; S4: perform cascade detection on the feature map processed by S3; S5: Divide the positive and negative samples. For each layer of the feature map of the pyramid structure, based on the results obtained in S4, calculate the fitness of each point, and calculate the global threshold by counting all fitness values. Samples above the threshold are positive samples, otherwise they are negative samples. S6: Detect the category and location of the target; Select a suitable anchor-free detector as needed; input the feature map into the classification and regression subnetworks respectively, and further adjust the detection results on the positive samples obtained in S5; input the predicted box back into the regression network, adjust the position of the box, and calculate the category confidence of the predicted box. The category with a higher confidence is the category of the target; finally, use non-maximum suppression to retain the one with the best detection result in a single category among many predicted boxes to obtain the final detection result; The detailed steps of S2 are: Use Resnet50 as the backbone of the feature extraction module to extract the features of the original image; Resnet50 has five stages, each of which outputs a feature map, which is also the input of the next stage. The feature maps output at different stages have different scales. The higher the feature map, the smaller the scale and the more channels. First, the input original image is processed. The specific process is as follows: Out=Conv 7×7 (C,W,H,k,s) (1) Among them, Out represents the feature map output by the first stage, Conv 7×7 represents a convolutional layer of size 7×7, C represents the number of channels of the input image, the number of channels of the RGB image is 3, W and H represent the width and height of the input image respectively, k represents the size of the convolution kernel, and s represents the step size of the convolution kernel; where k=64 and s=2; Secondly, the output feature maps are extracted in turn. The specific process is as follows: P i =Conv 3×3 (C i ,W,H,k i ,s i ) (2) Among them, P i is the feature map output by the i-th stage, Conv 3×3 represents a convolutional layer of size 3×3, C i represents the number of channels of the feature map input at the i-th stage, W and H represent the width and height of the input feature map respectively; k i Represents the size of the convolution kernel, where k i =256×2 i-1 ;s i Represents the step size of the convolution kernel movement, s i =2; finally, four feature maps are output, from bottom to top, they are {P2, P3, P4, P5}, and the number of channels are {256, 512, 1024, 2048}; The detailed steps of S3 are: The feature maps {P2, P3, P4, P5} are enhanced from top to bottom. First, the channels of the feature maps obtained in S1 are normalized, and the top feature map P5 is translated to obtain N5. The translated feature map is deconvolved, the original feature map is enlarged by two times, and then horizontally connected with the low-level feature map in S1 to obtain a new feature map N4. N4 repeats the enlargement and horizontal connection operations until all the low-level feature maps in S1 are horizontally connected. At the same time, in order to enable the subsequent detection module to have feature maps of more scales, the N5 feature map is downsampled twice in a row. The specific performance is as follows: Where N i is the i-th layer feature map after feature fusion, Conv 1×1 is a convolution of size 1×1, devonv(·) represents the pixel shuffle function to upsample the features, L(·) represents the channel normalization operation, and N i+1 Relative to N i The previous feature map, k n is the number of convolution kernels, s is the step size of the convolution kernel movement, where k n =256,s n =1;P i Compared with N i+1 Feature map of the lower layer; Conv 3×3 is a convolution kernel of size 3×3, N i-1 Compared to N i The lower layer feature map, k d is the number of convolution kernels, s d is the step size of the convolution kernel; where k d =256,s d =2; the final output feature map after preliminary fusion is {N2, N3, N4, N5, N6, N7}.
2. The method for vehicle target recognition in drone images based on anchor-free cascade detection according to claim 1 is characterized in that: The feature maps processed by S3 are sorted from small to large in size and divided into two groups in half. The larger group of feature maps is used to detect small targets, and the smaller group of feature maps is used to detect large targets. For each type of feature map, the probability of each point in the smallest feature map in each group being mapped to the target in the original image is calculated. A probability of 1 indicates that the point contains the target, and a probability of 0 indicates that the point does not contain the target; The area with a probability of 1 is mapped to the next layer of feature maps in the current group for detection. At the same time, the next layer will also calculate the possibility of each point in the feature map containing the target for subsequent detection calculations.
3. The method for vehicle target recognition in drone images based on anchor-free cascade detection according to claim 2 is characterized in that: The detailed steps of S4 are: S4.1: First, sort the feature maps output in S3 from small to large in size and divide them into two groups, {N2, N3, N4} and {N5, N6, N7}; {N2, N3, N4} is used to detect large targets, and {N5, N6, N7} is used to detect small targets; small targets are defined as targets with a box size less than or equal to 32×32 pixels; targets with a box size larger than 32×32 pixels are large targets; S4.2: First, calculate the possibility of the existence of the target on the feature map; map the center point of the real box of any target in the original image to the feature map, that is, its theoretical center point; Calculate the distance between each point in the minimum feature map of each group and the theoretical center point. The point with the smallest distance to the theoretical center point represents the actual center point of the target represented by the point in this feature map. Calculate the size of the real box corresponding to the actual center point on this feature map, and calculate the area of 32×32 pixels projected into different feature maps, that is, the area threshold on each feature map; for feature maps {N5, N6, N7}, if the size of the box on this feature map is greater than the area threshold, mark the actual center point as 1, otherwise mark it as 0; for feature maps {N2, N3, N4}, if the size of the box on this feature map is less than or equal to the area threshold, mark this point as 1, otherwise mark it as 0; map the points marked as 1 to the next layer of feature maps in the corresponding feature group; the next layer of feature maps calculates the possibility of the existence of a large target at each point for all points marked as 1, and so on; specifically, it is as follows: area=32×32×2 -l (6) Where D l N l The minimum distance between the point on the layer feature map and the center point of each real box projected onto the feature map; min(·) represents the minimum function; x, y represent any point on the feature map; Represents the mapping of the center point of the real box of target o on the feature map of layer l; s l Indicates that the real box is in N l The size of the projection on the feature map, Indicates that the real box is in N l The length of the projection on the feature map, Indicates that the real box is in N l The height of the projection on the feature map; area represents the area threshold represented on different feature maps, 32×32 represents the area threshold on the original image, 2 -l N l Scaling ratio of area threshold in feature layer; B l N l The set of points with large objects on the feature map, S l N l The set of points with small objects on the feature map.
4. The method for vehicle target recognition in drone images based on anchor-free cascade detection according to claim 3 is characterized in that: The detailed steps of S5 are: Further detection is performed on the target points obtained in S4; first, a candidate box is generated on each feature map by using the candidate region generation method, and the intersection-over-union ratio between each true box and all candidate boxes on the feature map, as well as the Euclidean distance between the center point of the true box and the center points of all candidate boxes are calculated; nine candidate boxes with the smallest Euclidean distance are searched in each feature map in turn; Calculate the mean and standard deviation of the intersection-over-union ratio of each candidate box, and add the two together to get the adaptive threshold of the real box; All candidate boxes in the feature map of this layer whose intersection-over-union ratio is greater than the adaptive threshold are set as positive samples, otherwise they are negative samples; Among them, d(x,y) represents the Euclidean distance between the center point of the candidate box and the center point of the real box, x, y represent the coordinates of the center point of the candidate box, x1, y1 represent the coordinates of the center point of the real box, and p represents the number of candidate boxes in the feature map of this layer; θ represents the adaptive threshold, E(·) represents the averaging function, and bbox IoU It represents the intersection-over-union ratio between the candidate box and the real box, and N represents the number of intersections between the candidate box and the real box.
5. The method for vehicle target recognition in drone images based on anchor-free cascade detection according to claim 4 is characterized in that: The detailed steps of S6 are: Based on S5, positive samples are tested; a suitable anchor-free detector is selected according to the requirements, and the annotated feature maps are sent to the classification and regression sub-networks respectively; the focus loss function is used in the classification branch to train and fine-tune the target category, and in the regression branch, the intersection-over-union loss is used for the positive samples to predict and fine-tune the position of the detection box; Finally, non-maximum suppression is used to retain the best detection result in a single category among many prediction boxes to obtain the final detection result; finally, the specific position of the detection box and its corresponding target category are obtained.
Citation Information
Patent Citations
Automatic detection method for multi-scale polymorphic target in two-dimensional image
CN111027547A
Remote sensing image vehicle target detection method based on multi-scale attention mechanism
CN111738110A