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

By improving the RetinaNet model through DBSCAN clustering and feature attention mechanisms, the problem of low accuracy in detecting small targets in aerial images is solved, and the detection performance, robustness, and adaptability are improved.

CN119741621BActive Publication Date: 2025-11-28CHONGQING UNIV OF POSTS & TELECOMM
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing aerial image small target detection methods have low detection accuracy in complex backgrounds and diverse images, and are easily affected by noise and viewpoint changes. Traditional data augmentation methods cannot effectively capture local clustered areas, and feature attention mechanisms ignore the relationships between features.

Method used

The DBSCAN clustering algorithm is used to identify target clustering regions, expand the dataset, and add dilated convolutional layers at the highest layer of the feature pyramid network to extract contextual information. An attention-based detection head is used to adaptively select features, thus improving the RetinaNet model.

Benefits of technology

It improves the detection accuracy and robustness of small targets in aerial images, avoids overfitting, and enhances the model's adaptability and detection performance in different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741621B_ABST
    Figure CN119741621B_ABST
Patent Text Reader

Abstract

The application claims a kind of aerial small target detection method based on region clustering and feature attention mechanism.First, the center coordinates of candidate target extracted from input image are used as the input features of clustering algorithm.Then, the DBSCAN clustering algorithm based on density is used to cluster these targets, and then the regions are cropped from the image according to the clustering results, and the center padding processing is performed on the cropped regions to keep the scale and ratio within a reasonable range and to obtain a new expanded dataset by merging the original data set.The expanded dataset is put into the improved single-stage target detection network RetinaNet for training, and the detection head based on attention mechanism is used for final target classification and positioning.This method can achieve the effect of data enhancement.In addition, the detection head based on attention mechanism can remove the interference of useless information in classification and regression tasks, so that the network can adaptively focus on more appropriate information for classification and regression.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of image target detection, and in particular to a small target detection method in aerial images. BACKGROUND

[0002] With the continuous development of deep learning, visual target detection has made significant progress. In recent years, more and more researchers have paid more attention to small target detection. Small target detection has important application value in intelligent medical treatment, intelligent transportation and satellite positioning fields. Therefore, it has great practical value and application prospect to study small target detection. With the rapid development of unmanned aerial vehicles, aerial images have been widely used in city monitoring, environmental monitoring, traffic management, agricultural monitoring and other fields. However, the detection and recognition of targets in aerial images still face many challenges. First, aerial images usually have high resolution and complex background, and target objects may be partially occluded, deformed, and have low contrast with the background. Second, small targets in aerial images usually occupy a small area of the image and are densely distributed, and the sizes of small targets are inconsistent and the positions are widely distributed, which makes target detection more difficult.

[0003] In traditional target detection methods, especially deep learning methods based on convolutional neural networks (CNN), although some progress has been made, it is still difficult to achieve high-precision detection in these challenging aerial images. Existing target detection methods often rely on the distribution of images in the training set and data labeling, but due to the diversity and complexity of aerial images, the model is easily affected by noise, blur and perspective changes, etc., resulting in poor detection performance.

[0004] To solve this problem, data augmentation techniques have become an important means to improve model performance. However, traditional data augmentation methods (such as rotation, translation, scaling, etc.) may not effectively capture the local clustering regions or spatial features of small targets in aerial images. Therefore, in recent years, many researchers have explored more image structure-adaptive enhancement methods. Kisantal et al. adopted an enhancement strategy by duplicating small objects and randomly transforming and pasting them to different positions in the same image. Zhang et al. and Wang et al. both adopted operations based on partitioning and resizing functions to obtain more small target training samples. Using a density-based clustering method can better identify and enhance target clustering regions, effectively improving the accuracy of small target detection.

[0005] In addition, the target in the aerial image usually has rich spatial and semantic information, and the existing target detection method often ignores 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 pay more attention to the target area, and is used in the classification subnetwork and the regression subnetwork of the detection head, so that it can adaptively select features that match the task target according to different task requirements, thereby improving the detection ability of small targets and the overall performance.

[0006] Therefore, a new aerial image target detection method based on DBSCAN data enhancement and feature attention detection head is needed, which can identify the target aggregation area in the image through clustering analysis, and use the feature attention mechanism to weight and optimize the detection head, so as to improve the detection accuracy and robustness of small targets in aerial images.

[0007] After searching, the application publication number CN117853959A, a small target detection method for unmanned aerial vehicle images based on a multi-attention fusion network, includes the following steps: S1, obtaining an aerial image and constructing an unmanned aerial vehicle aerial image dataset; S2, using a clustering method to obtain the area where dense targets exist in the image and labeling; S3, constructing a network model that fuses a multi-layer attention mechanism; S4, constructing a target detection model; S5, training and verifying the target detection model to obtain the optimal target detection model. The present application solves the problems of target aggregation distribution, many small targets and complex background in aerial images; improves the performance of the model in small target detection without increasing too many parameters and computational complexity; and solves the problem of poor performance in small target detection, so that the model can more accurately detect targets and serve various tasks applied by unmanned aerial vehicles.

[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 may lead to insufficient data samples, and the quality of training depends entirely on the quality of clustering. If the clustering parameters are not properly selected, it may cause incorrect labeling of target areas or some targets not being labeled, which will affect the detection results and easily lead to model overfitting. However, the present application combines the data obtained by clustering with the original data, expands the size and diversity of the training data set, and 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 to some extent alleviate the shortcomings of the clustering method. Secondly, this patent only pays attention to strengthening the features of the backbone feature extraction network and ignores the influence of the detection head on the detection results. The present application applies the attention mechanism to the detection head, so that the network can adaptively pay attention to more appropriate information for classification and regression. SUMMARY

[0009] The present application aims to solve the above problems of the prior art. A small target detection method for aerial photography based on region clustering and feature attention mechanism is proposed. The technical solution of the present application is as follows:

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

[0011] Step 1: Obtain an input image from the public aerial image target detection dataset VisDrone and input it into a RetinaNet network with a residual network as the backbone feature extraction network and a 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 aggregation area and perform center padding processing for scale scaling, and crop the image as a new input to expand the original dataset to obtain an expanded dataset named VisDrone-E;

[0013] Step 3: On the basis of the RetinaNet algorithm, use the following improvements to build a new feature-enhanced RetinaNet (FS-RetinaNet) detection model; (1) build a cascaded dilated convolution layer at the highest layer of the feature pyramid network to extract sufficient context information; (2) use an attention mechanism-based detection head to replace the original detection head to make the classification task and the regression task more targeted;

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

[0015] Step 5: Transfer the model weight trained in step 4 into the test network, use VisDrone as the test input, and predict the target bounding box and class information;

[0016] Step 6: Use non-maximum suppression (NMS) for post-processing to remove redundant detection boxes, which is used to reduce false positives or repeated detections.

[0017] Further, the step 1: obtains an input image from the public aerial image target detection dataset VisDrone. The input image is input into the RetinaNet for feature extraction to obtain rough candidate target information, specifically:

[0018] RetinaNet, an end-to-end detection network that can directly regress the class probability and location coordinates of objects, is used to extract candidate targets in the image, obtain the bounding box coordinates of the targets, and extract the center coordinates of each target from the detected bounding boxes as the input features of the DBSCAN clustering algorithm.

[0019] Furthermore, in step 2: the DBSCAN clustering algorithm is used to calculate the coarse candidate target information extracted in step 1, clustering dense targets, cropping the target clustering region, and performing center padding and scaling. The cropped image is used as new input to expand the original dataset, resulting in an expanded dataset named VisDrone-E.

[0020] The DBSCAN clustering algorithm is used to identify target clusters. The DBSCAN algorithm takes the target's location coordinates as input and determines which targets belong to the same cluster based on distance and density. The algorithm determines whether data points belong to the same cluster by setting the neighborhood radius (eps) and the minimum number of points (min_samples). Starting from any point, if its neighborhood contains at least min_samples points, it is marked as the core point of a cluster. If a point is a core point, all points in its neighborhood are assigned to that cluster, and this process continues until no more points can be added. If a point does not have enough points in its neighborhood and is not in the neighborhood of any cluster, it is marked as a noise point. This process continues by expanding the clusters until all points are marked as part of a cluster or noise. After clustering, a bounding box is calculated for each cluster, and the corresponding clustered region is cropped from the image based on this bounding box. The specific calculation process of the bounding box is as follows: For each cluster, calculate the minimum bounding rectangle that contains all targets in the cluster, and perform clipping based on this rectangle to expand the bounding box by 10 pixels; finally, save the clipped target region and merge it with the original dataset to obtain a new expanded dataset VisDrone-E.

[0021] Furthermore, step 3 involves constructing cascaded dilated convolutional layers at the highest layer of the feature pyramid network to extract sufficient contextual information, specifically as follows:

[0022] First, a context information enhancement module (CIEM) consisting of cascaded dilated convolutional layers is proposed and added to the lateral connections of the highest feature level of the FPN to alleviate the problem of information loss in small objects; the output of the dilated convolutional layer is defined as D. i =DilatedConv d_rate (Conv 1×1_512 (X i ), where X idenotes the output of the previous layer of dilated convolution layer and the result of splicing the outputs of all previous layers in the channel dimension, i.e. X ori denotes the original input feature map of the highest layer of the feature pyramid, Conv 1×1_512 denotes the 1x1 convolution of X i to change its channel number to 512, DilatedConv d_rate denotes the dilated convolution of the input feature map according to the dilated rate d_rate and adjusts its channel number to 256; in addition, in order to make the output feature have better scale diversity, X ori is up-sampled to the original input size to obtain the feature map X D , and then X D is up-sampled to the original input size to obtain the feature map X U , and a 1x1 convolution is used to compress its channel number to 256; finally, X U is spliced with D i (i = 1, 2, … 5), and then a 1x1 convolution is used to fuse the information between the layers to obtain the output X E , X E = Conv 1×1 (D1||D2||D3||D4||D5||X U ); in order to maintain the effective information of the initial input, the feature map X E output after CIEM is added to the original feature map after 1x1 convolution as the final output result Thus, the highest layer feature map that integrates coarse-grained and fine-grained features and has rich context semantic information is obtained.

[0023] Further, the step 3 uses a detection head based on an attention mechanism to replace the original detection head, so that the classification task and the regression task are more targeted, and specifically includes:

[0024] The original detection head is replaced with a detection head based on an attention mechanism; an attention module is added before the classification subnetwork and the regression subnetwork, respectively, so that it can adaptively select features that are more matched to the task target according to different task requirements; the specific implementation of the attention module is as follows: A i = σ(φ(X in )), F i = A i ⊙X in +X in , where X in denotes the input feature map to be tested, φ(X in ) denotes the execution of a four-layer 3x3 convolution operation on X in , σ is a sigmoid function, which maps φ(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 multiplied by the output value of the feature extraction module i and X in The result of multiplying the corresponding elements is added to X in ; the multiplication operation can increase the value of useful information in X in , and decrease the value of useless information, and the addition operation is to use the idea of residual network to make the network converge faster, and this design can make the network adaptively select the features suitable for classification or regression. Finally, the enhanced output feature map F i .

[0025] Further, the step 5: the model weight trained in step 4 is transmitted into the test network, and VisDrone is used as the test input to predict the bounding box and class information of the target, specifically:

[0026] The expanded data set VisDrone-E is only used for training the detection network, and the original data set VisDrone is used in the test stage, which helps to improve the generalization ability and robustness of the model.

[0027] An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the aerial small target detection method based on region clustering and feature attention mechanism according to any one of the embodiments.

[0028] A non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the aerial small target detection method based on region clustering and feature attention mechanism according to any one of the embodiments.

[0029] A computer program product comprising a computer program, wherein the computer program is executed by a processor to implement the aerial small target detection method based on region clustering and feature attention mechanism according to any one of the embodiments.

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

[0031] The innovation of the present application mainly is the combination of steps 1-4: the DBSCAN clustering algorithm is used to clip the small target gathering area in the input image, and the clipped image is combined 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 has difficulty in fully capturing important context information around the small target when extracting high-level semantic features, a context information enhancement module composed of convolution layers with different expansion rates is used, which is added at the transverse 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 for specific tasks, the detection head is improved, and a feature attention mechanism is introduced, which can effectively select features more suitable for specific tasks. The improved detection head is used in the classification subnetwork and the regression subnetwork, which can make the network adaptively select features suitable for classification or regression, thereby improving the detection performance.

[0032] By clustering analysis to identify the target gathering area in the input image 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 DRAWINGS

[0033] Figure 1 The present application provides a preferred embodiment of a small target detection method based on region clustering and feature attention mechanism. DETAILED DESCRIPTION

[0034] The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings in the embodiments of the present application. The described embodiments are only a part of the embodiments of the present application.

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

[0036] As shown in the figure, the small target detection method based on region clustering and feature attention mechanism provided by the present embodiment includes the following steps:

[0037] Step 1: Obtain the input image from the public aerial image target detection data set 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, clip the target gathering area and perform center padding processing for scale scaling. The clipped image is used as a new input to expand the original data set, and the expanded data set is named VisDrone-E;

[0039] Step 3: On the basis of the RetinaNet algorithm, the following improvements are used to build a new FS-RetinaNet detection model. (1) Build a cascade of dilated convolution layers at the highest layer of the feature pyramid network to extract sufficient context information; (2) use an attention mechanism-based detection head to replace the original detection head to make the classification task and the regression task more targeted;

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

[0041] Step 5: Transfer the model weight trained in Step 4 into the test network, use VisDrone as the test input, and predict the target's bounding box and class information;

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

[0043] Further, the step 1: input images are obtained from the public aerial image target detection dataset VisDrone. The input images are input into RetinaNet for feature extraction to obtain rough candidate target information, specifically: a classical single-stage target detection algorithm RetinaNet is used to extract candidate targets in the image, and the center coordinates of each target are extracted from the detected bounding box as the input features of DBSCAN clustering.

[0044] Further, the step 2: using DBSCAN clustering algorithm to calculate the rough candidate target information extracted in step 1, clustering the dense targets, cropping the target aggregation area and performing center padding processing for scale scaling, the cropped image is used as a new input to expand the original data set, and an expanded data set named VisDrone-E is obtained, specifically: in view of the characteristics of the target scale change, target density unevenness and multi-target scene complexity in the aerial image data set, the DBSCAN clustering method is used to identify the target aggregation area. The input of the DBSCAN clustering algorithm is the position coordinates of the target, which will judge which targets belong to the same aggregation area according to the distance and density. By setting the field radius (eps) and the minimum point number (min_samples), it is determined 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 field will be assigned to the cluster, and then continue to expand these fields until no more points can be added; if a point has not enough points in its neighborhood, and it is not a point in the field of any cluster, then it is marked as a noise point. By continuously expanding the cluster, all points are marked as part of the cluster or noise. After completing the clustering, a bounding box is calculated for each cluster, and the corresponding aggregation area is cropped from the image according to the bounding box. The specific calculation process of the bounding box is: for each cluster, calculate the minimum circumscribed rectangle containing all targets in the cluster, and expand the bounding box by 10 pixels based on the rectangle to avoid cropping the edge of the target. Finally, save the cropped target area and combine it with the original data set to obtain a new expanded data set VisDrone-E.

[0045] Further, the step 3: on the basis of the RetinaNet algorithm, the following improvements are used to build a new FS-RetinaNet detection model. (1) Constructing a cascaded dilated convolution layer at the highest layer of the feature pyramid network to extract sufficient context information; (2) using an attention mechanism-based detection head to replace the original detection head to make the classification task and the regression task more targeted, specifically:

[0046] Firstly, a context information enhancement module (CIEM) is proposed, which is added at the transverse connection of the highest feature layer of FPN. The module uses convolution layers with different expansion rates to enrich the context information around the target from multiple receptive fields to alleviate the small target information loss problem. The inputs and outputs of each dilated convolution layer are spliced in the channel dimension and used as the input of the next convolution layer in a dense connection manner, so as to realize the information interaction between different layers. The output of the dilated convolution layer is defined as Di = DilatedConv d_rate (Conv 1×1_512 (X i )), wherein X i represents the output of the previous dilated convolution layer and the result of splicing the outputs of all previous layers in the channel dimension, i.e. X ori represents the original input feature map of the highest layer of the feature pyramid, Conv 1×1_512 represents the 1x1 convolution of X i to change its channel number to 512, DilatedConv d_rate represents the dilated convolution of the input feature map according to the dilated rate d_rate and adjusts its channel number to 256. In addition, in order to make the output feature have better scale diversity, X ori is scaled to obtain X D , and then X D is upsampled to the original input size by bilinear interpolation to obtain the feature map X U , and the channel number is compressed to 256 by 1x1 convolution. Finally, X U is spliced with D i (i = 1, 2, … 5), and then the information between layers is fused by 1x1 convolution to obtain the output X E , X E = Conv 1×1 (D1||D2||D3||D4||D5||X U ). In order to keep the effective information of the initial input, the feature map X E output after CIEM is added to the original feature map after 1x1 convolution as the final output result Thus, the highest layer feature map that integrates coarse-grained and fine-grained features and has rich context semantic information is obtained.

[0047] Secondly, the original detection head is replaced with a detection head based on attention mechanism. Generally, the single-stage target detection algorithm directly outputs the features of each layer of the feature pyramid network as the input of the classification subnet and the regression subnet. However, it is not appropriate to use the same feature map to perform classification and regression tasks at the same time. An attention module is added before the classification subnet and the regression subnet respectively, so that it can adaptively select the features that match the task target according to different task requirements. The specific implementation of the attention module is as follows: A i = σ(φ(X in )), F i = A i ⊙X in +X in , wherein X inX represents the input feature map to be tested, φ(X in ) represents the four-layer 3x3 convolution operation performed on X in , and σ is a sigmoid function that converts the value of φ(X in ) to a value between 0 and 1 so that it converges faster during training. The result of multiplying A i and the corresponding elements of X in is then added to X in . The multiplication operation can increase the value of useful information in X in and reduce the value of useless information, and the addition operation is to use the idea of a residual network to make the network converge faster. This design can enable the network to adaptively select features suitable for classification or regression.

[0048] Further, the step 5: the model weight trained in step 4 is transmitted into the test network, and VisDrone is used as the test input to predict the bounding box and class information of the target. Specifically, the expanded data set VisDrone-E is only used for training the detection network, and the original data set VisDrone is used in the test stage. This helps to improve the generalization ability and robustness of the model.

[0049] An electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the aerial small target detection method based on region clustering and feature attention mechanism according to any one of the embodiments when executing the program.

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

[0051] A computer program product comprising a computer program, and the computer program implements the aerial small target detection method based on region clustering and feature attention mechanism according to any one of the embodiments when executed by a processor.

[0052] The system, device, module or unit illustrated in the above embodiments can be specifically implemented by a computer chip or entity, or by a product with certain functions.

[0053] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can implement information storage by any method or technology. The 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 technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.

[0054] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusions, so that a process, method, article or apparatus that includes a list of elements not only includes those elements, but also includes other elements not explicitly listed, or inherent to such a process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0055] The above embodiments should be understood as merely illustrative of the present application and not restrictive of the scope of protection of the present application. After reading the description of the present application, those skilled in the art can make various modifications or changes to the present application, and these equivalent changes and modifications also fall within the scope defined by the claims of the present application.

Claims

1. A method for detecting small targets in aerial photography based on region clustering and feature attention mechanisms, characterized in that, Includes the following steps: Step 1: Obtain the input image from the publicly available aerial image target detection dataset VisDrone, and input it into the RetinaNet retina detection network, which uses a residual network as the backbone feature extraction network and a feature pyramid network FPN as the neck fusion network, to extract features and obtain rough candidate target information; Step 2: Calculate the coarse candidate target information extracted in Step 1 using the density-based clustering algorithm DBSCAN, cluster the dense targets, crop out the target clustering region and perform center filling and scale scaling. Use the cropped image as 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 construct a new feature-enhanced retinal detection network FS-RetinaNet detection model; (1) Construct cascaded dilated convolutional layers at the highest layer of the feature pyramid network to extract sufficient contextual information; (2) Replace the original detection head with an attention-based detection head to make classification and regression tasks more targeted. Step 4: Train the improved FS-RetinaNet from Step 3 using VisDrone-E from Step 2 for detecting small targets; Step 5: Input the model weights trained in Step 4 into the test network, using VisDrone as the test input, to 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, in order to reduce false detections or duplicate detections; Step 3 involves constructing cascaded dilated convolutional layers at the highest level of the feature pyramid network to extract sufficient contextual information. Specifically: First, a context information enhancement module (CIEM) consisting of cascaded dilated convolutional layers is proposed and added to the lateral connections of the highest feature level of the FPN to alleviate the problem of information loss in small objects; the output of the dilated convolutional layer is defined as D. i =DilatedConv d_rate (Conv 1×1_512 (X i ), where X i This represents the result of concatenating the output of the previous dilated convolutional layer with the outputs of all previous layers along the channel dimension. X ori Conv represents the original input feature map at the highest level of the feature pyramid. 1×1_512 Indicates X i Perform a 1×1 convolution to change its channel count to 512, DilatedConv d_rate This indicates that the input feature map is dilated and convolved according to the dilation rate d_rate, and the number of channels is adjusted to 256; furthermore, to improve the scale diversity of the output features, X is... ori Scaling to obtain X D Then, X is interpolated using bilinear interpolation. D Upsampling to the original input size yields the feature map X. U Furthermore, it uses 1×1 convolution to compress its channel count to 256; finally, X... U With D i (i = 1, 2, ..., 5) are concatenated, and then the information between each layer is fused through a 1×1 convolution to obtain the output X. E X E =Conv 1×1 (D1||D2||D3||D4||D5||X U To preserve the valid information of the initial input, the feature map X output after CIEM is... E The final output is obtained by adding the original feature map after a 1×1 convolution. Thus, we obtain the highest-level feature map, which integrates coarse-grained and fine-grained features and has rich contextual semantic information; Step 3 replaces the original detection head with an attention-based detection head, making the classification and regression tasks more targeted. Specifically, this includes: Replace the original detection head with an attention-based detection head; add an attention module before the classification sub-network and the regression sub-network respectively, so that it adaptively selects 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 )), F i =A i ⊙X in +X in , where X in The input feature map to be tested, φ(X) in ) indicates that in X in Perform four 3×3 convolution operations, where σ is the sigmoid function, which will transform φ(X) into σ. in The value of ) 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 Add the result of multiplying the corresponding elements to X in In the middle; multiplication operation can make X in The useful information value in the feature map is increased, while the useless information value is decreased. The addition operation utilizes the idea of ​​residual networks 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 F is obtained. i .

2. The aerial small target detection method based on region clustering and feature attention mechanism according to claim 1, characterized in that, Step 1: Obtain the input image from the publicly available aerial image target detection dataset VisDrone; input it into RetinaNet for feature extraction to obtain coarse candidate target information, specifically: RetinaNet, an end-to-end detection network that can directly regress the class probability and location coordinates of objects, is used to extract candidate targets in the image, obtain the bounding box coordinates of the targets, and extract the center coordinates of each target from the detected bounding boxes as the input features of the DBSCAN clustering algorithm.

3. The aerial small target detection method based on region clustering and feature attention mechanism according to claim 1, characterized in that, Step 2: The DBSCAN clustering algorithm is used to calculate the coarse candidate target information extracted in Step 1, clustering dense targets, cropping the target clustering regions, and performing center padding and scaling. The cropped images are used as new input to expand the original dataset, resulting in an expanded dataset named VisDrone-E. The DBSCAN clustering algorithm is used to identify target clusters. The input to the DBSCAN clustering algorithm is the location coordinates of the target. It determines which targets belong to the same cluster based on distance and density. The clustering process determines whether data points belong to the same cluster by setting the neighborhood radius eps and the minimum number of points min_samples. Starting from any point, if its neighborhood contains at least min_samples points, it is marked as the core point of a cluster. If a point is a core point, all points in its neighborhood are assigned to that cluster, and these neighborhoods are expanded until no more points can be added. If a point does not have enough points in its neighborhood and is not in the neighborhood of any cluster, it is marked as a noise point. This process continues by expanding the clusters until all points are marked as part of a cluster or noise. After clustering, a bounding box is calculated for each cluster, and the corresponding clustered region is cropped from the image based on the bounding box. The specific calculation process for the bounding box is as follows: for each cluster, the minimum bounding rectangle containing all targets in the cluster is calculated, and the bounding box is expanded by 10 pixels based on this rectangle. Finally, the cropped target regions are saved and merged with the original dataset to obtain a new augmented dataset, VisDrone-E.

4. The aerial small target detection method based on region clustering and feature attention mechanism according to claim 1, characterized in that, Step 5: Input the model weights trained in Step 4 into the test network, using VisDrone as the test input, to predict the bounding box and category information of the target. Specifically: The expanded dataset VisDrone-E is used only for training the detection network, while the original dataset VisDrone is used for testing. This helps improve the model's generalization ability and robustness.

5. 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, it implements the aerial small target detection method based on region clustering and feature attention mechanism as described in any one of claims 1 to 4.

6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the aerial small target detection method based on region clustering and feature attention mechanism as described in any one of claims 1 to 4.

7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the aerial small target detection method based on region clustering and feature attention mechanism as described in any one of claims 1 to 4.

Citation Information

Patent Citations

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

    CN117853959A

  • Small target detection method based on attention mechanism

    CN114202672A

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

    WO2023185243A1