Aerial photography small target detection method based on regional clustering and feature attention mechanism

Through the combination of DBSCAN clustering and feature attention mechanism, the problem of difficulty in detecting small objects in aerial images is solved, and higher detection accuracy and robustness are achieved.

CN119741621AActive Publication Date: 2025-04-01CHONGQING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202411724591.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-04-01
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

It is difficult to detect small objects in medium-sized aerial images. The existing object detection methods are difficult to achieve high-precision detection under high resolution and complex backgrounds, and traditional data enhancement methods cannot effectively capture the spatial characteristics of small objects.

Method used

The area clustering algorithm based on DBSCAN is used to cluster small targets in aerial images, crop the target clustering area and expand the data set, and improve the detection head with the feature attention mechanism to enhance the model's detection ability of small targets.

Benefits of technology

By combining the expanded data set and feature attention mechanism, the detection accuracy and robustness of small targets in aerial images are improved, and the risk of model overfitting is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741621A_ABST
    Figure CN119741621A_ABST
Patent Text Reader

Abstract

The invention requests to protect an aerial photography small target detection method based on regional clustering and a feature attention mechanism. The method comprises the following steps: firstly, taking a central coordinate of a candidate target extracted from an input image as an input feature of a clustering algorithm; then clustering the targets by using a density-based DBSCAN clustering algorithm, cutting out the regions from the image according to a clustering result, performing center filling processing on the cut-out regions to keep the scale and the ratio in a reasonable range, and integrating the cut-out regions with original data to obtain a new expanded data set; and putting the expanded data set into the improved single-stage target detection network RetinaNet for training, and performing final target classification and positioning by using a detection head based on an attention mechanism. The method can achieve the effect of data enhancement. In addition, the detection head based on the attention mechanism can remove interference of useless information in classification and regression tasks, so that the network can adaptively pay attention to more appropriate information for classification and regression.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of image target detection, and in particular to a small target detection method in an aerial image. Background Art

[0002] With the continuous development of deep learning, visual object detection has achieved remarkable results. In recent years, more and more researchers have paid more attention to small object detection. Small object detection has important application value in the fields of intelligent medical care, intelligent transportation and satellite positioning. Therefore, research on small object detection has great practical value and application prospects. With the rapid development of drone technology, aerial images have been widely used in many fields such as urban monitoring, environmental monitoring, traffic management, and agricultural monitoring. However, the detection and recognition of objects in aerial images still face many challenges. First, aerial images usually have high resolution and complex backgrounds. The target objects may be occluded and deformed to varying degrees, and the contrast with the background is low. Second, small targets in aerial images usually occupy a small area of ​​the image and are densely distributed, while the sizes of small targets are inconsistent and the positions are widely distributed, which makes target detection more difficult.

[0003] Although some progress has been made in traditional object detection methods, especially deep learning methods based on convolutional neural networks (CNNs), it is still difficult to achieve high-precision detection in these challenging aerial images. Existing object detection methods often rely on image distribution and data annotation in training sets, but due to the diversity and complexity of aerial images, the models are easily affected by factors such as noise, blur and perspective changes, resulting in poor detection performance.

[0004] To solve this problem, data augmentation technology has become an important means to improve model performance. However, traditional data augmentation methods (such as rotation, translation, scaling, etc.) may not be able to effectively capture the spatial characteristics of local clustered areas or small targets in aerial images. Therefore, in recent years, many researchers have explored enhancement methods that are more adaptable to image structures. Kisantal et al. adopted an enhancement strategy by copying small objects and pasting them to different locations in the same image with random transformations. Zhang et al. and Wang et al. both adopted operations based on division and resizing functions to obtain more small target training samples. The density-based clustering method can better identify and enhance target clustering areas and effectively improve the accuracy of small target detection.

[0005] In addition, the targets in aerial images usually have rich spatial and semantic information, while existing target detection methods often ignore the relationship between features. In order to further improve the accuracy of target detection, the feature attention mechanism, as an effective feature selection and weighting method, can help the model focus more on the target area. It is used in the classification subnetwork and regression subnetwork of the detection head to enable it to adaptively select features that better match the task target according to different task requirements, thereby improving the detection ability and overall performance of small targets.

[0006] Therefore, a new aerial image target detection method based on DBSCAN data enhancement and feature attention detection head is needed. Cluster analysis is used to identify target clustering areas in the image, and the feature attention mechanism is used to weight and optimize the detection head, thereby improving the detection accuracy and robustness of small targets in aerial images.

[0007] After searching, the application publication number CN117853959A, a method for detecting small targets in drone images based on a multi-attention fusion network, includes the following steps: S1, obtain aerial images and construct a drone aerial image data set; S2, use a clustering method to obtain areas where dense targets exist in the image and mark them; S3, construct a network model that integrates a multi-layer attention mechanism; S4, construct a target detection model; S5, train and verify the target detection model to obtain the optimal target detection model. The present invention solves the problems of target clustering distribution, large number of small targets and complex background in aerial images; improves the performance of the model in small target detection without increasing too many parameters and calculations; and solves the problem of its poor performance in small target detection, so that the model can detect targets more accurately and serve various tasks applied by drones.

[0008] In this patent, only the areas where dense targets exist in the image obtained after clustering are processed and used for network training, which will lead to insufficient data samples. The quality of training depends entirely on the quality of clustering. If the clustering parameters are not selected properly, it may lead to incorrect labeling of the target area or partial unlabeling of the target, which will affect the detection results and easily lead to overfitting of the model. The present invention merges the data obtained by clustering with the original data set, expanding the scale and diversity of the training data set. The original data may contain more detailed information, while the labeled data obtained by clustering focuses on the target dense area. The combination of the two can help the model better learn the characteristics of dense targets and the overall background information of the image, improve the adaptability of the model to different scenes, avoid the risk of overfitting, and alleviate the shortcomings of the clustering method to a certain extent. Secondly, this patent only focuses on strengthening the features of the backbone feature extraction network and ignores the impact of the detection head on the detection results. The present invention applies the attention mechanism to the detection head, so that the network can adaptively focus on more appropriate information for classification and regression. Summary of the invention

[0009] The present invention aims to solve the above problems of the prior art. A method for detecting small aerial targets based on regional clustering and feature attention mechanism is proposed. The technical solution of the present invention is as follows:

[0010] A method for detecting small aerial targets based on region clustering and feature attention mechanism, comprising the following steps:

[0011] Step 1: Obtain the input image from the public aerial image target detection dataset VisDrone, and input it into the retina detection network (RetinaNet) with the residual network as the backbone feature extraction network and the feature pyramid network (FPN) as the neck fusion network for feature extraction to obtain rough candidate target information;

[0012] Step 2: Use the density-based clustering algorithm (DBSCAN) to calculate the rough candidate target information extracted in step 1, cluster the dense targets, crop the target cluster area and perform center filling processing on it for scale scaling. The cropped image is used as a new input to expand the original dataset. The expanded dataset is named VisDrone-E.

[0013] Step 3: Based on the RetinaNet algorithm, the following improvements are used to build a new feature-enhanced retinal detection network (FS-RetinaNet) detection model: (1) Construct a cascade of dilated convolutional layers at the highest level of the feature pyramid network to extract sufficient context information; (2) Use a detection head based on the attention mechanism to replace the original detection head to make the classification and regression tasks more targeted;

[0014] Step 4: Use VisDrone-E in step 2 to train the improved FS-RetinaNet in step 3 for detecting small objects;

[0015] Step 5: Pass the model weights trained in step 4 into the test network, use VisDrone as the test input, and predict the bounding box and category information of the target;

[0016] Step 6: Use non-maximum suppression (NMS) for post-processing to remove redundant detection boxes to reduce false detection or duplicate detection.

[0017] Furthermore, the step 1: obtain the input image from the public aerial image target detection dataset VisDrone. Input it into RetinaNet for feature extraction to obtain rough candidate target information, specifically:

[0018] An end-to-end detection network RetinaNet, which can directly regress the category probability and position coordinate values ​​of objects, is used to extract candidate targets in the image, obtain the bounding box coordinate information of the target, and extract the center coordinates of each target from the detected bounding box as the input feature of the DBSCAN clustering algorithm.

[0019] Furthermore, step 2: using the DBSCAN clustering algorithm to calculate the rough candidate target information extracted in step 1, clustering the dense targets, cropping the target clustering area and performing center filling processing on it for scale scaling, the cropped image is used as a new input to expand the original data set, and the expanded data set is named VisDrone-E, specifically:

[0020] The DBSCAN clustering algorithm is used to identify target clustering areas; the input of the DBSCAN clustering algorithm is the location coordinates of the target, and it will determine which targets belong to the same clustering area based on distance and density; by setting the domain radius eps and the minimum number of points min_samples to determine whether the data points belong to the same cluster, starting from any point, if its domain contains at least min_samples points, it will be marked as a core point of a cluster; if a point is a core point, all points in its domain will be assigned to the cluster, and then these domains will continue to be expanded until no more points can be added; if a point does not have enough points in its neighborhood and it is not a point in the domain of any cluster, it will be marked as a noise point; by continuously expanding the cluster until all points are marked as part of the cluster or noise; after clustering is completed, a bounding box is calculated for each cluster, and the corresponding clustering area is cropped from the image according to the bounding box. The specific calculation process of the bounding box is as follows: for each cluster, the minimum enclosing rectangle containing all the objects in the cluster is calculated, and the bounding box is cropped based on the rectangle, and then the bounding box is expanded by 10 pixels; finally, the cropped target area is saved and merged with the original dataset to obtain a new extended dataset VisDrone-E.

[0021] Furthermore, step 3 constructs a cascaded dilated convolutional layer at the highest level of the feature pyramid network to extract sufficient context information, specifically:

[0022] Firstly, a contextual information enhancement module (CIEM) consisting of cascaded dilated convolutional layers is proposed, which is added to the lateral connection of the highest feature level of FPN to alleviate the problem of small object information loss; the output of the dilated convolutional layer is defined as D i =DilatedConv d_rate (Conv 1×1_512 (X i )), where X iIt represents the result of concatenating the output of the previous dilated convolutional layer with the output of all previous layers in the channel dimension, that is, X ori Represents the original input feature map at the highest level of the feature pyramid, Conv 1×1_512 Indicates X i Perform a 1×1 convolution to change the number of channels to 512, DilatedConv d_rate Indicates that the input feature map is expanded and convolved according to the expansion rate of d_rate and the number of channels is adjusted to 256; in addition, in order to make the output feature have better scale diversity, X ori Scaling to get X D , and then use bilinear interpolation to convert X D Upsample to the original input size to get the feature map X U , and use 1×1 convolution to compress its channel number to 256; finally, X U With D i (i=1,2,…5) are concatenated, and then the information between each layer is fused through 1×1 convolution to obtain the output X E , X E =Conv 1×1 (D1||D2||D3||D4||D5||D6||X U );In order to keep the effective information of the initial input, the feature map X output after CIEM is E Added to the original feature map after 1×1 convolution as the final output result At this point, we obtain the highest-level feature map that combines coarse-grained and fine-grained features and has rich contextual semantic information.

[0023] Furthermore, the step 3 uses a detection head based on the attention mechanism to replace the original detection head to make the classification task and regression task more targeted, specifically including:

[0024] Replace the original detection head with a detection head based on the attention mechanism; add an attention module before the classification subnetwork and the regression subnetwork respectively, so that it can adaptively select features that better match the task objectives according to different task requirements; the specific implementation of the attention module is as follows: A i =σ(φ(X in )), D i =A i ⊙X in +X in , where X in Represents the input feature map to be tested, φ(X in ) indicates that in X in Four layers of 3×3 convolution operations are performed on the sigmoid function, which converts φ(Xin ) is converted to a value between [0,1] so that it converges faster during training; then the output value A of the attention module is i and X in The result of multiplying the corresponding elements is added to X in In; multiplication can make X in The useful information value in the image increases, and the useless information value decreases. The addition operation uses the idea of ​​the residual network to make the network converge faster. This design allows the network to adaptively select features suitable for classification or regression. Finally, the enhanced output feature map D is obtained. i .

[0025] Furthermore, in step 5, the model weights trained in step 4 are passed into the test network, and VisDrone is used as the test input to predict the bounding box and category information of the target, specifically:

[0026] The expanded dataset VisDrone-E is only used to train the detection network, and the original dataset VisDrone is used in the testing phase, which helps to improve the generalization ability and robustness of the model.

[0027] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for detecting small aerial targets based on regional clustering and feature attention mechanism as described in any one of the items is implemented.

[0028] A non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements an aerial photography small target detection method based on region clustering and feature attention mechanism as described in any one of the items.

[0029] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the method for detecting small aerial targets based on region clustering and feature attention mechanism as described in any one of the items is implemented.

[0030] The advantages and beneficial effects of the present invention are as follows:

[0031] The innovation of the present invention is mainly the combination of steps 1-4: using the DBSCAN clustering algorithm to crop out the area where small targets are concentrated in the input image, and merging the cropped image with the original data set to form a new expanded data set for detection model training. In view of the problem that the feature pyramid network is difficult to fully capture the important contextual information around small targets when extracting high-level semantic features, a context information enhancement module composed of a cascade connection of convolutional layers with different expansion rates is used, and it is added to the horizontal connection of the highest layer of the feature pyramid network. In order to solve the problem that the conventional detection head cannot extract corresponding features specifically for a specific task, the detection head is improved and a feature attention mechanism is introduced, which can effectively select features that are more suitable for a specific task. Using the improved detection head in the classification subnetwork and the regression subnetwork can enable the network to adaptively select features suitable for classification or regression, thereby improving the detection performance.

[0032] By identifying target clustering areas in the input image through cluster analysis and using these areas to expand the training data set, and using the feature attention mechanism to weight and optimize the detection head, the detection accuracy and robustness of small targets in aerial images can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a flow chart of an aerial photography small target detection method based on regional clustering and feature attention mechanism provided by a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0034] The following will describe the technical solutions in the embodiments of the present invention in detail in conjunction with the accompanying drawings in the embodiments of the present invention. The described embodiments are only part of the embodiments of the present invention.

[0035] The technical solution of the present invention to solve the above technical problems is:

[0036] As shown in the figure, the aerial photography small target detection method based on regional clustering and feature attention mechanism provided in this embodiment includes the following steps:

[0037] Step 1: Get the input image from the public aerial image target detection dataset VisDrone. Input it into RetinaNet for feature extraction to obtain rough candidate target information;

[0038] Step 2: Use the DBSCAN clustering algorithm to calculate the rough candidate target information extracted in step 1, cluster the dense targets, crop the target cluster area and perform center filling processing on it for scale scaling. The cropped image is used as a new input to expand the original data set. The expanded data set is named VisDrone-E.

[0039] Step 3: Based on the RetinaNet algorithm, the following improvements are used to build a new FS-RetinaNet detection model. (1) Construct a cascade of dilated convolutional layers at the top level of the feature pyramid network to extract sufficient context information; (2) Use a detection head based on the attention mechanism to replace the original detection head to make the classification and regression tasks more targeted;

[0040] Step 4: Use VisDrone-E in step 2 to train the improved FS-RetinaNet in step 3 for detecting small objects;

[0041] Step 5: Pass the model weights trained in step 4 into the test network, use VisDrone as the test input, and predict the bounding box and category information of the target;

[0042] Step 6: Use NMS for post-processing to remove redundant detection frames, effectively reducing false detections or duplicate detections, and making the final detection results more accurate.

[0043] Furthermore, the step 1: obtains an input image from the public aerial image target detection dataset VisDrone. Inputs it into RetinaNet for feature extraction to obtain rough candidate target information, specifically: uses the classic single-stage target detection algorithm RetinaNet to extract candidate targets in the image, obtains the target's bounding box coordinate information, and extracts the center coordinates of each target from the detected bounding box as the input feature of DBSCAN clustering.

[0044] Furthermore, step 2: using the DBSCAN clustering algorithm to calculate the rough candidate target information extracted in step 1, clustering the dense targets, cutting out the target clustering area and performing center filling processing on it for scale scaling, the cut image is used as a new input to expand the original data set, and the expanded data set is named VisDrone-E. Specifically, in view of the large scale variation of targets in the aerial image data set, the uneven density of targets, and the complexity of the scene of multiple targets, the DBSCAN clustering method is used to identify the target clustering area. The input of the DBSCAN clustering algorithm is the location coordinates of the target, which will determine which targets belong to the same clustering area based on distance and density. The field radius (eps) and the minimum number of points (min_samples) are set to determine whether the data points belong to the same cluster. Starting from any point, if its field contains at least min_samples points, it is marked as a core point of a cluster; if a point is a core point. Then all points in its domain will be assigned to the cluster, and then continue to expand these domains until no more points can be added; if a point does not have enough points in its neighborhood and it is not a point in the domain of any cluster, then it is marked as a noise point. By continuously expanding the cluster until all points are marked as part of the cluster or noise. After clustering is completed, a bounding box is calculated for each cluster, and the corresponding clustered area is cropped from the image based on the bounding box. The specific calculation process of the bounding box is: for each cluster, the minimum enclosing rectangle containing all the targets in the cluster is calculated, and the rectangle is used as the basis for cropping. To avoid cropping to the edge of the target, the bounding box is appropriately expanded by 10 pixels. Finally, the cropped target area is saved and merged with the original dataset to obtain the new expanded dataset VisDrone-E.

[0045] Furthermore, step 3: Based on the RetinaNet algorithm, the following improvements are used to construct a new FS-RetinaNet detection model. (1) A cascaded dilated convolution layer is constructed at the highest level of the feature pyramid network to extract sufficient context information; (2) The original detection head is replaced by a detection head based on the attention mechanism to make the classification and regression tasks more targeted, specifically:

[0046] First, a contextual information enhancement module (CIEM) is proposed and added to the lateral connection of the highest feature level of FPN. This module uses convolutional layers with different expansion rates to enrich the contextual information around the target from multiple receptive fields to alleviate the problem of information loss of small targets. Different dilated convolutional layers are densely connected, and the input and output of each dilated convolutional layer are concatenated according to the channel dimension as the input of the next convolutional layer, achieving the effect of information exchange between different layers. The output of the dilated convolutional layer is defined as Di =DilatedConv d_rate (Conv 1×1_512 (X i )), where X i It represents the result of concatenating the output of the previous dilated convolutional layer with the output of all previous layers in the channel dimension, that is, X ori Represents the original input feature map at the highest level of the feature pyramid, Conv 1×1_512 Indicates X i Perform a 1×1 convolution to change the number of channels to 512, DilatedConv d_rate Indicates that the input feature map is dilated and convolved according to the dilation rate of d_rate and the number of channels is adjusted to 256. In addition, in order to make the output features have better scale diversity, X ori Scaling to get X D , and then use bilinear interpolation to convert X D Upsample to the original input size to get the feature map X U , and use 1×1 convolution to compress its channel number to 256. Finally, X U With D i (i=1,2,…5) are concatenated, and then the information between each layer is fused through 1×1 convolution to obtain the output X E , X E =Conv 1×1 (D1||D2||D3||D4||D5||D6||X U ). In order to keep the valid information of the initial input, the feature map X output after CIEM is E Added to the original feature map after 1×1 convolution as the final output result At this point, we obtain the highest-level feature map that combines coarse-grained and fine-grained features and has rich contextual semantic information.

[0047] Secondly, replace the original detection head with a detection head based on the attention mechanism. The general single-stage target detection algorithm directly uses the feature output of each layer of the feature pyramid network as the input of the classification subnet and the regression subnet. However, it is inappropriate to use the same feature map to perform classification and regression tasks at the same time. Add an attention module before the classification subnet and the regression subnet respectively, so that they can adaptively select features that better match the task objectives according to different task requirements. The specific implementation of the attention module is as follows: A i =σ(φ(X in )), D i =A i ⊙X in +X in , where X inRepresents the input feature map to be tested, φ(X in ) indicates that in X in Four layers of 3×3 convolution operations are performed on the sigmoid function, which converts φ(X in ) is converted to values ​​between [0,1] so that it converges faster during training. Then A i and X in The result of multiplying the corresponding elements is added to X in In. Multiplication can make X in The useful information value in increases, and the useless information value decreases. The addition operation uses the idea of ​​residual network to make the network converge faster. This design can make the network adaptively select features suitable for classification or regression.

[0048] Furthermore, in step 5, the model weights trained in step 4 are passed into the test network, and VisDrone is used as the test input to predict the bounding box and category information of the target. Specifically, the expanded dataset VisDrone-E is only used to train the detection network, and the original dataset VisDrone is used in the test phase. This helps to improve the generalization ability and robustness of the model.

[0049] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for detecting small aerial targets based on regional clustering and feature attention mechanism as described in any one of the items is implemented.

[0050] A non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements an aerial photography small target detection method based on region clustering and feature attention mechanism as described in any one of the items.

[0051] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the method for detecting small aerial targets based on region clustering and feature attention mechanism as described in any one of the items is implemented.

[0052] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions.

[0053] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0054] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0055] The above embodiments should be understood to be only used to illustrate the present invention and not to limit the protection scope of the present invention. After reading the contents of the present invention, technicians can make various changes or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.

Claims

1. A method for detecting small aerial targets based on regional clustering and feature attention mechanism, characterized in that: The following steps are involved: Step 1: Obtain the input image from the public aerial image target detection dataset VisDrone, and input it into the retina detection network (RetinaNet) with the residual network as the backbone feature extraction network and the feature pyramid network (FPN) as the neck fusion network for feature extraction to obtain rough candidate target information; Step 2: Use the density-based clustering algorithm (DBSCAN) to calculate the rough candidate target information extracted in step 1, cluster the dense targets, crop the target cluster area and perform center filling processing on it for scale scaling. The cropped image is used as a new input to expand the original dataset. The expanded dataset is named VisDrone-E. Step 3: Based on the RetinaNet algorithm, the following improvements are used to build a new feature-enhanced retinal detection network (FS-RetinaNet) detection model: (1) Construct a cascade of dilated convolutional layers at the highest level of the feature pyramid network to extract sufficient context information; (2) Use a detection head based on the attention mechanism to replace the original detection head to make the classification and regression tasks more targeted; Step 4: Use VisDrone-E in step 2 to train the improved FS-RetinaNet in step 3 for detecting small objects; Step 5: Pass the model weights trained in step 4 into the test network, use VisDrone as the test input, and predict the bounding box and category information of the target; Step 6: Use non-maximum suppression (NMS) for post-processing to remove redundant detection boxes to reduce false detection or duplicate detection.

2. The method for detecting small aerial targets based on regional clustering and feature attention mechanism according to claim 1, characterized in that: Step 1: Obtain an input image from the public aerial image target detection dataset VisDrone. Input it into RetinaNet for feature extraction to obtain rough candidate target information, specifically: An end-to-end detection network RetinaNet, which can directly regress the category probability and position coordinate values ​​of objects, is used to extract candidate targets in the image, obtain the bounding box coordinate information of the target, and extract the center coordinates of each target from the detected bounding box as the input feature of the DBSCAN clustering algorithm.

3. The method for detecting small aerial targets based on regional clustering and feature attention mechanism according to claim 1, characterized in that: Step 2: Use the DBSCAN clustering algorithm to calculate the rough candidate target information extracted in step 1, cluster the dense targets, crop the target cluster area and perform center filling processing on it for scale scaling, and use the cropped image as a new input to expand the original data set. The expanded data set is named VisDrone-E, specifically: The DBSCAN clustering algorithm is used to identify the target clustering area; the input of the DBSCAN clustering algorithm is the location coordinates of the target, and it will determine which targets belong to the same clustering area based on distance and density; By setting the domain radius eps and the minimum number of points min_samples, we determine whether the data points belong to the same cluster. Starting from any point, if its domain contains at least min_samples points, it will be marked as a core point of a cluster. If a point is a core point, all points in its domain will be assigned to the cluster, and then continue to expand these domains until no more points can be added. If there are not enough points in the neighborhood of a point and it is not a point in the domain of any cluster, it will be marked as a noise point. By continuously expanding the cluster until all points are marked as part of the cluster or noise, after clustering is completed, a bounding box is calculated for each cluster, and the corresponding cluster area is cropped from the image according to the bounding box. The specific calculation process of the bounding box is as follows: for each cluster, the minimum enclosing rectangle containing all the objects in the cluster is calculated, and the bounding box is cropped based on the rectangle, and the bounding box is expanded by 10 pixels. Finally, the cropped target area is saved and merged with the original data set to obtain the new augmented data set VisDrone-E.

4. The method for detecting small aerial targets based on regional clustering and feature attention mechanism according to claim 1, characterized in that: The step 3 constructs a cascaded dilated convolutional layer at the highest level of the feature pyramid network to extract sufficient context information, specifically: Firstly, a contextual information enhancement module (CIEM) consisting of cascaded dilated convolutional layers is proposed, which is added to the lateral connection of the highest feature level of FPN to alleviate the problem of small object information loss; the output of the dilated convolutional layer is defined as D i =DilatedConv d_rate (Conv 1×1_512 (X i )), where X i It represents the result of concatenating the output of the previous dilated convolutional layer with the output of all previous layers in the channel dimension, that is, X ori Represents the original input feature map at the highest level of the feature pyramid, Conv 1×1_512 Indicates X i Perform a 1×1 convolution to change the number of channels to 512, DilatedConv d_rate Indicates that the input feature map is expanded and convolved according to the expansion rate of d_rate and the number of channels is adjusted to 256; in addition, in order to make the output feature have better scale diversity, X ori Scaling to get X D , and then use bilinear interpolation to convert X D Upsample to the original input size to get the feature map X U , and use 1×1 convolution to compress its channel number to 256; finally, X U With D i (i=1,2,…5) are concatenated, and then the information between each layer is fused through 1×1 convolution to obtain the output X E , X E =Conv 1×1 (D1||D2||D3||D4||D5||D6||X U );In order to keep the effective information of the initial input, the feature map X output after CIEM is E Added to the original feature map after 1×1 convolution as the final output result At this point, we obtain the highest-level feature map that combines coarse-grained and fine-grained features and has rich contextual semantic information.

5. The method for detecting small aerial targets based on regional clustering and feature attention mechanism according to claim 4, characterized in that: In step 3, the detection head based on the attention mechanism is used to replace the original detection head, so that the classification task and regression task are more targeted, including: Replace the original detection head with a detection head based on the attention mechanism; add an attention module before the classification subnetwork and the regression subnetwork respectively, so that it can adaptively select features that better match the task objectives according to different task requirements; the specific implementation of the attention module is as follows: A i =σ(φ(X in )), D i =A i ⊙X in +X in , where X in Represents the input feature map to be tested, φ(X in ) indicates that in X in Four layers of 3×3 convolution operations are performed on the sigmoid function, which converts φ(X in ) is converted to a value between [0,1] so that it converges faster during training; then the output value A of the attention module is i and X in The result of multiplying the corresponding elements is added to X in In; multiplication can make X in The useful information value in the image increases, and the useless information value decreases. The addition operation uses the idea of ​​the residual network to make the network converge faster. This design allows the network to adaptively select features suitable for classification or regression. Finally, the enhanced output feature map D is obtained. i .

6. The method for detecting small aerial targets based on regional clustering and feature attention mechanism according to claim 1, characterized in that: Step 5: The model weights trained in step 4 are passed into the test network, and VisDrone is used as the test input to predict the bounding box and category information of the target, specifically: The expanded dataset VisDrone-E is only used to train the detection network, and the original dataset VisDrone is used in the testing phase, which helps to improve the generalization ability and robustness of the model.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the aerial photography small target detection method based on regional clustering and feature attention mechanism as described in any one of claims 1 to 6 is implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for detecting small aerial targets based on regional clustering and feature attention mechanism as described in any one of claims 1 to 6 is implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for detecting small aerial targets based on regional clustering and feature attention mechanism as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Aerial image multi-scale target detection method based on spatial pyramid attention driving

    CN111401201A

  • Small target detection method based on attention mechanism

    CN114202672A

  • Unmanned aerial vehicle aerial image target detection method based on YOLOv5

    CN116091946A

  • Unmanned aerial vehicle image small target detection method based on multiple attention fusion network

    CN117853959A

  • Expression recognition method based on attention-modulated contextual spatial information

    WO2023185243A1

Cited By

  • Object processing method and device, computer equipment and readable storage medium

    CN120912925A

  • An object processing method, device, computer equipment and readable storage medium

    CN120912925B

  • Archive image anomaly detection method and system

    CN122737959A