Ground target detection method based on adaptive layered gradient feature fusion strategy

By adopting an adaptive hierarchical gradient feature fusion strategy in the target detection of low-altitude flying cars, the accuracy and real-time problems of detecting small targets and occluding targets in complex urban environments in the prior art are solved, and the detection is improved Performance and information capture capabilities.

CN119206516AActive Publication Date: 2024-12-27NANJING TECH UNIV

Patent Information

Application Number
CN202411710456.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2024-12-27
Estimated Expiration
2044-11-27

AI Technical Summary

Technical Problem

The existing general target detection methods are difficult to meet the requirements of high accuracy and real-time in the complex urban environment of low-altitude flying cars, especially when detecting small targets and blocking targets, and there is a lot of information loss.

Method used

Using the ground object detection method based on the adaptive hierarchical gradient feature fusion strategy, the target detection network including the C2f-EIRM module and the spatial pyramid pooling module is constructed, and the edge information enhancement module and the adaptive adjustment mechanism are combined to enhance the model to image. The ability to capture and feature extraction of edge information.

Benefits of technology

It improves the detection accuracy and real-time of small targets and occluded targets, reduces information loss, enhances the generalization ability and detection performance of the model, and maintains high detection performance under different urban environments and lighting conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206516A_ABST
    Figure CN119206516A_ABST
Patent Text Reader

Abstract

The invention discloses a ground target detection method based on an adaptive hierarchical gradient feature fusion strategy, and the method comprises the steps: obtaining a ground obstacle target data set, constructing a ground target detection network, introducing a C2f-EIRM module into a backbone network of the constructed ground target detection network, employing a hierarchical feature fusion strategy for the C2f-EIRM module, and carrying out the feature fusion of the C2f-EIRM module, introducing a plurality of branches to perform global feature extraction; in the multi-branch structure, an EIRM module is adopted to perform local feature extraction, gradient operator convolution is introduced into the EIRM module to construct an edge information module, the edge information module is combined with common convolution in a self-adaptive adjustment mechanism mode, the receptive field and edge information of the feature extraction network are enhanced, and the model detection performance is improved. According to the method, the target detection accuracy is improved, the efficient identification of the shielded small target is realized, and the real-time performance and the accuracy of ground target detection of the low-altitude flying car are balanced at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to target detection technology, and in particular to a ground target detection method based on an adaptive hierarchical gradient feature fusion strategy. Background Art

[0002] With the acceleration of urbanization, urban traffic congestion has become an important factor affecting the quality of life of urban residents. As an innovative means of transportation, low-altitude flying cars can provide fast and efficient point-to-point transportation services in the low-altitude space of cities, which is expected to greatly alleviate the pressure of ground transportation. However, when low-altitude flying cars operate in complex urban environments, they face the challenge of how to effectively detect and track ground targets, which is a key technical issue to ensure their safe operation.

[0003] At present, the target detection technology widely used in ground monitoring systems is mainly based on traditional computer vision algorithms. These algorithms perform well in ground monitoring environments, but the performance of these traditional algorithms is limited in the specific application scenarios of low-altitude flying cars. In recent years, target detection methods based on deep learning have made significant progress. These methods can be roughly divided into two categories: one is the two-stage detection algorithm, such as Fast R-CNN, Faster R-CNN, etc. These algorithms improve the detection accuracy by generating candidate regions first and then classifying and regressing bounding boxes, but sacrifice a certain degree of real-time performance; the other is the single-stage detection algorithm, such as the YOLO series, which directly predicts categories and bounding boxes on images, which is faster, but may not be as accurate as the two-stage algorithm.

[0004] For low-altitude flying cars, their unique vertical take-off and landing capabilities, flight speed and altitude require that the target detection system not only has high accuracy and real-time performance, but also needs to be able to adapt to targets of different scales, especially small targets and occluded targets commonly found in urban environments.

[0005] Existing general object detection methods often have difficulty meeting these requirements because they may lose key information during multiple downsampling processes, and the loss functions usually have different sensitivities to objects of different scales, which may lead to missed detections and false detections of small objects. Summary of the invention

[0006] Purpose of the invention: The purpose of the present invention is to solve the deficiencies in the prior art and to provide a ground target detection method based on an adaptive hierarchical gradient feature fusion strategy; the present invention can improve the safety and reliability of low-altitude flying vehicles in complex urban environments, enhance the ability to capture small targets and occluded targets, reduce information loss, and improve the accuracy and real-time performance of detection.

[0007] Technical solution: A ground target detection method based on an adaptive hierarchical gradient feature fusion strategy of the present invention comprises the following steps:

[0008] Step S1, collecting and preprocessing image data, that is, capturing road target images under different environments, classifying the road target images, and screening out images of targets with different sparsity, distances, and occlusions; manually annotating the screened images, combining the public data sets to form a ground obstacle target data set, and dividing it into a training set, a validation set, and a test set;

[0009] Step S2: Construct a ground target detection network to transform the original road target image Input ground target detection network, the ground target detection network is based on adaptive hierarchical gradient feature fusion strategy, its backbone network includes one convolution layer and four C2f-EIRM modules with the same structure, the original road target image The initial feature map is first processed by the convolution layer, and then input into the first layer C2f-EIRM module. The feature map output by each C2f-EIRM module in the first three layers is then input into the next layer C2f-EIRM module. The feature map output by the last layer C2f-EIRM module is processed by the spatial pyramid pooling module SPPF and then input into the neck network and the detection head network in turn.

[0010] In each layer of C2f-EIRM module, the input feature map is first The convolutional layer performs preliminary feature extraction and adjusts the channel dimension to , The initial feature map output by the convolutional layer is split into n branch feature maps of the same size through the splitting module. , for the next n-1 branch feature maps, the previous layer feature With the current layer features To integrate, (The first branch does not undergo EIRM, while branches from 2 to n undergo EIRM after merging with the previous branch), and each branch feature map is extracted through an edge information enhancement module EIRM to obtain the feature , and finally the features of all branches connect, and through a The convolution layer adjusts the dimension and outputs the corresponding feature map of the current layer , ;

[0011] When extracting local features, each EIRM module introduces gradient operator convolution to construct edge information module and combines it with ordinary convolution in an adaptive adjustment mechanism to achieve feature aggregation;

[0012] Step S3, realizing feature fusion and final target detection and classification through the neck network and the detection head network;

[0013] Step S4: Use the training set in step 1 to train the constructed ground object detection network, update the weights, and obtain the weight with the highest mAP value as the optimal weight;

[0014] Step S5: Use the trained ground target detection network to detect ground obstacles of the flying car, that is, use the ground target detection network based on the optimal weight to detect the real ground target, determine whether there is an obstacle hazard, and if there is an obstacle hazard, output the detection result image and mark the obstacle type and confidence.

[0015] Furthermore, the detailed method of step S1 is:

[0016] Step S1.1, collecting road target images under different environments, screening the collected images, removing the low-quality images that are blurred and difficult for the human eye to distinguish, and screening out the images that are clear, easy to distinguish, and meet the requirements. The screened road target images contain road obstacle targets, and the screened road target images form a ground obstacle target dataset;

[0017] Step S1.2: Use the same target detection labeling method as the YOLO format dataset, and use the dataset labeling software Labelimg to label the ground obstacle target dataset obtained in step S1.1; use rectangular boxes for labeling, and label the obstacle target categories as "car", "truck", "van", "bus" and "pedestrian". After labeling, each jpg-format road target image corresponds to a labeled txt file, forming a YOLO format dataset;

[0018] Step S1.3, divide the labeled data set into training set, validation set and test set in a ratio of 7:2:1, and place the corresponding road target images and label files in the directories respectively, so that the flying car ground target detection model based on the adaptive hierarchical gradient feature fusion strategy can obtain the image path by reading these txt files for training.

[0019] Furthermore, in the backbone network of the ground target detection network in step S2, one convolution layer and four C2f-EIRM modules with the same structure are regarded as extraction layer E1, extraction layer E2, extraction layer E3, extraction layer E4 and extraction layer E5 in sequence, and high-dimensional features are extracted through these five extraction layers;

[0020] The original road target image input to the backbone network is a three-channel image. The feature maps extracted and output by the extraction layers E1, E2, E3, E4, and E5 are recorded as , , ; represents the channel dimension, , H and W represent the height and width of the image respectively.

[0021] Furthermore, the feature map output by each C2f-EIRM module of the backbone network The expression is as follows:

[0022] ;

[0023] In the above formula, Represents the feature map of the first branch among n branches, represents the j-th branch feature map, , represents the output features of the i-th layer C2f-EIRM module, where ;

[0024] Among the above It refers to the use of edge information enhancement module EIRM to perform EIRM operation, and each edge information enhancement module EIRM performs EIRM operation to obtain a feature map The process is as follows:

[0025] Step 1) Use gradient operator convolution to extract edge information of half of the features to obtain edge information feature map , the calculation process is as follows:

[0026] ; ;

[0027] ; ;

[0028]

[0029] in, is the corresponding branch feature map of the input edge information enhancement module EIRM, is the gradient operator direction matrix, represents different gradient operator directions, is the edge information feature map output by the edge information enhancement module EIRM;

[0030] Step 2), use a Convolution extracts half of the features to obtain a normal feature map , the calculation process is as follows:

[0031]

[0032] in, For one Convolution operation, is the obtained common feature map, It is the feature map of the input edge information enhancement module EIRM;

[0033] Step 3) Use the adaptive adjustment mechanism to adjust the edge information feature map Compared with ordinary feature maps Perform dynamic combination and output local feature map ;

[0034] ;

[0035] In the above formula, It is the feature map after the adaptive adjustment mechanism.

[0036] Furthermore, the edge information feature map is transformed into Compared with ordinary feature maps The specific method of dynamic combination is as follows:

[0037] First, the ELA attention mechanism is used to focus on the edge information feature map and common feature maps Enhance and generate deep features and , corresponding to the feature representation of edge information convolution and ordinary convolution respectively;

[0038] Then, by applying a series of convolution kernels on the feature map, each convolution kernel focuses on extracting a specific feature pattern, and converts the enhanced features into keys K and values ​​V through a projection function, including convolution operations and dimension reshaping. The former extracts local information and the latter converts the feature map into a form suitable for the attention mechanism.

[0039]

[0040]

[0041] When generating a query Q with unchanged features, the edge information and common convolution features are adaptively adjusted and fused, and the complementarity of the dual-branch features is used to splice and fuse them into a unified Q.

[0042]

[0043] Next, the attention map of the feature is calculated based on the key and query, usually implemented through the softmax function, and the attention weights are normalized so that their sum is 1. The attention map reveals the relationship and importance between different features and guides feature fusion. By multiplying the value with the attention map, the model obtains features containing global context information, which helps to capture a wider range of context information.

[0044]

[0045] Secondly, the obtained features are added to the original features of the other branch and merged through the connection operation of the channel dimension. The merged features are input into the convolution layer to generate fused features. ;

[0046] ;

[0047] Finally, we get the feature map : ;

[0048] In the above formula, is the feature map after the adaptive adjustment mechanism, Represents edge information feature map The key, Represents a common feature map The key, Represents edge information feature map The value of Represents edge information feature map The value of represents a query where two branch features are connected via a channel, and Represent the specific attention graphs for computing edge information branches and ordinary convolution branches, respectively. and They correspond to a 3x3 convolution layer and reconstruction operation respectively. represents addition at the element level, It means multiplication at the element level, and C means addition and merging according to the channel dimension.

[0049] Furthermore, the formula for enhancing the original features extracted by the backbone network using the ELA attention mechanism is:

[0050]

[0051] In the above formula, Extract operations for the ELA attention mechanism, express and The input features of and express and Input Features The spatial position in the channel, represents group normalization, represents a nonlinear activation function, and Represents 1D convolution operations in the horizontal and vertical directions respectively.

[0052] Beneficial effects: Compared with the prior art solutions, the present invention has the following advantages:

[0053] 1. The present invention introduces an adaptive hierarchical gradient feature fusion strategy to enhance the model's ability to capture image edge information, especially the detection accuracy of small targets and occluded targets in complex environments. It can better capture image details and contours, and has the ability of dynamic adjustment, thereby improving the generalization ability of the model.

[0054] 2. The adaptive adjustment mechanism in the present invention can dynamically adjust the weights according to different parts of the feature map, making the model more flexible in processing targets of different directions and scales. Through the adaptive adjustment mechanism, the model can dynamically adjust the expressiveness of the feature map, so that high detection performance can be maintained in different urban environments and lighting conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 It is a flowchart of the overall process of the present invention;

[0056] Figure 2 It is a schematic diagram of the network structure of the present invention;

[0057] Figure 3 This is a schematic diagram of the structure of the C2f-EIRM module in an embodiment of the present invention;

[0058] Figure 4 This is a schematic diagram of the structure of the EIRM module in an embodiment of the present invention;

[0059] Figure 5 It is a schematic diagram of the structure of the ELA attention mechanism in an embodiment of the present invention;

[0060] Figure 6 It is a comparison diagram of the detection effect of the embodiment; Figure 7 For Figure 6 The corresponding detection effect shows a magnified image of a distant part. DETAILED DESCRIPTION

[0061] The technical solution of the present invention is described in detail below, but the protection scope of the present invention is not limited to the embodiments.

[0062] like Figure 1As shown, the ground target detection method based on the adaptive hierarchical gradient feature fusion strategy of the present invention comprises the following steps:

[0063] Step S1, collecting and preprocessing image data, that is, capturing road target images under different environments, and classifying and screening the road target images, manually annotating the screened images to form a ground obstacle target dataset, and dividing them into a training set, a validation set, and a test set;

[0064] Step S2: Construct a ground target detection network to transform the original road target image Input ground target detection network, the ground target detection network is based on adaptive hierarchical gradient feature fusion strategy, its backbone network includes one convolution layer and four C2f-EIRM modules with the same structure, the original road target image The initial feature map is first processed by the convolution layer, and then input into the first layer of C2f-EIRM module. The feature maps output by each C2f-EIRM module in the first three layers are then input into the next layer of C2f-EIRM module.

[0065] In each layer of C2f-EIRM module, the input feature map is first The convolutional layer performs preliminary feature extraction. The initial feature map output by the convolutional layer is split into n branch feature maps of the same size through the splitting module. , for the next n-1 branch feature maps, the previous layer feature With the current layer features To integrate, Each branch feature map is extracted through an edge information enhancement module EIRM to obtain the local feature , and finally the features of all branches connect, and through a The convolution layer adjusts the dimension and outputs the corresponding feature map of the current layer , ;

[0066] When extracting local features, each EIRM module introduces gradient operator convolution to construct edge information module and combines it with ordinary convolution in an adaptive adjustment mechanism to achieve feature aggregation;

[0067] Step S3: The feature map output by the last layer C2f-EIRM module is processed by the spatial pyramid pooling module SPPF and then input into the neck network and the detection head network in sequence, and feature fusion and final target detection and classification are realized through the neck network and the detection head network;

[0068] Step S4: Use the training set in step 1 to train the constructed ground object detection network, update the weights, and obtain the weight with the highest mAP value as the optimal weight;

[0069] Step S5: Use the trained ground target detection network to detect ground obstacles of the flying car, that is, use the ground target detection network based on the optimal weight to detect the real ground target, determine whether there is an obstacle hazard, and if there is an obstacle hazard, output the detection result image and mark the obstacle type and confidence.

[0070] The detailed method of step S1 in this embodiment is:

[0071] Step S1.1, collecting road target images under different environments, screening the collected images, removing low-quality images, the screened road target images contain road obstacle targets, and the screened road target images form a ground obstacle target dataset;

[0072] Step S1.2: Use the same target detection and marking method as the YOLO format dataset, and use the dataset marking software to mark the ground obstacle target dataset obtained in step S1.1; use a rectangular box to mark, and after the marking is completed, each jpg format road target image corresponds to a marked txt file, forming a YOLO format dataset;

[0073] Step S1.3: Divide the labeled data set into a training set, a validation set, and a test set in a ratio of 7:2:1, and place the corresponding road target images and label files in separate directories.

[0074] In the backbone network of the ground target detection network in step S2 of this embodiment, one convolution layer and four C2f-EIRM modules with the same structure are regarded as extraction layers E1, E2, E3, E4 and E5 in sequence, and high-dimensional features are extracted through these five extraction layers;

[0075] The original road target image input to the backbone network is a three-channel image. The feature maps extracted and output by the extraction layers E1, E2, E3, E4, and E5 are recorded as , , ; represents the channel dimension, , H and W represent the height and width of the image respectively.

[0076] Figure 2 In the figure, backbone, neck, and head refer to the backbone network, neck network, and detection head network, respectively.

[0077] like Figure 3As shown, the characteristic graph output by each C2f-EIRM module of the backbone network of this embodiment is The expression is as follows:

[0078] ;

[0079] In the above formula, Represents the feature map of the first branch among n branches, represents the j-th branch feature map, , represents the output features of the i-th layer C2f-EIRM module, where ;

[0080] Among the above It refers to the use of edge information enhancement module EIRM to perform EIRM operation, and each edge information enhancement module EIRM performs EIRM operation to obtain a feature map The process is as follows:

[0081] Step 1) Use gradient operator convolution to extract edge information of half of the features to obtain edge information feature map , the calculation process is as follows:

[0082] ; ;

[0083] ; ;

[0084]

[0085] in, is the corresponding branch feature map of the input edge information enhancement module EIRM, is the gradient operator direction matrix, represents different gradient operator directions, is the edge information feature map output by the edge information enhancement module EIRM;

[0086] Step 2), use a Convolution extracts half of the features to obtain a normal feature map , the calculation process is as follows:

[0087]

[0088] in, For one Convolution operation, is the obtained common feature map, It is the feature map of the input edge information enhancement module EIRM;

[0089] Step 3) Use the adaptive adjustment mechanism to adjust the edge information feature map Compared with ordinary feature maps Perform dynamic combination and output local feature map ;

[0090] ;

[0091] In the above formula, It is the feature map after the adaptive adjustment mechanism.

[0092] Figure 3 In the split operation, the initial feature map is split into n Branch feature map. Figure 3 In , the concat operation refers to connecting the features of all branches.

[0093] like Figure 4 As shown, this embodiment uses an adaptive adjustment mechanism to adjust the edge information feature map Compared with ordinary feature maps The specific method of dynamic combination is as follows:

[0094] First, the ELA attention mechanism is used to focus on the edge information feature map and common feature maps Enhance and generate deep features and ;

[0095] Then, by applying a series of convolution kernels on the feature map, the enhanced features are converted into keys K and values ​​V through a projection function, including convolution operations and dimension reshaping. The former extracts local information and the latter converts the feature map into a form suitable for the attention mechanism.

[0096]

[0097]

[0098] When generating a query Q with unchanged features, the edge information and ordinary convolution features are adaptively adjusted and fused, and the complementarity of the dual-branch features is used to perform splicing and fusion to obtain ;

[0099]

[0100] The attention map of the features is calculated based on the key and query, usually implemented through a softmax function, which normalizes the attention weights so that they sum to 1.

[0101] Next, the value is multiplied by the attention map, and the model obtains features containing global context information;

[0102]

[0103] Secondly, the obtained features are added to the original features of the other branch and merged through the connection operation of the channel dimension. The merged features are input to the convolution layer conv (such as Figure 4 The fusion features are generated in ;

[0104] ;

[0105] Finally, we get the feature map : ;

[0106] In the above formula, is the feature map after the adaptive adjustment mechanism, Represents edge information feature map The key, Represents a common feature map The key, Represents edge information feature map The value of Represents edge information feature map The value of represents a query where two branch features are connected via a channel, and Represent the specific attention graphs for computing edge information branches and ordinary convolution branches, respectively. and They correspond to a 3x3 convolution layer and reconstruction operation respectively. represents addition at the element level, It means multiplication at the element level, and C means addition and merging according to the channel dimension.

[0107] like Figure 5 As shown in Figure 2, the formula for enhancing the original features extracted by the backbone network using the ELA attention mechanism is:

[0108]

[0109] In the above formula, Extract operations for the ELA attention mechanism, express and The input features of and express and Input Features The spatial position in the channel, represents group normalization, represents a nonlinear activation function, and Represents 1D convolution operations in the horizontal and vertical directions respectively.

[0110] In this embodiment, the corresponding deep learning model is selected, and the stochastic gradient descent method is used for training. The learning rate is 0.01, the batch size is set to 8, the epoch is set to 200, and the weight decay is set to 0.0005. The model training is completed to obtain the detection model index. The optimal detection model is selected based on performance evaluation indicators such as accuracy, recall, mAP0.5, mAP0.5:0.95 and FPS. Then, the optimal detection model is selected based on the performance evaluation indicators, and the target detection head is used to detect targets in urban scenes.

[0111] Accuracy The expression is: .

[0112] Recall The expression is: .

[0113] In the formula, TP is the number of positive samples correctly identified as positive samples, FN is the number of positive samples incorrectly identified as negative samples, and FP is the number of negative samples incorrectly identified as positive samples.

[0114] The expressions of average precision AP, mean average precision mAP and FPS are respectively:

[0115] ; ; .

[0116] Where AP is the area under the PR curve; mAP is the average value of AP after AP is calculated for each category, and N is the total number of each category. represents the image preprocessing time, represents the image inference time, Indicates the post-processing time.

[0117] The experimental environment of this embodiment is based on the PyTorch deep learning framework and runs under the Windows operating system. The NVIDIA GeForce RTX 3060 GPU is used for computational acceleration to complete model training and obtain detection model indicators. Experimental environment parameters: initial learning rate 0.01, number of training rounds 200, optimizer SGD, momentum coefficient 0.937, weight decay 0.0005, and input image resolution 640x640. In one embodiment of the present invention, in order to verify the effectiveness of this method, the public dataset VisDrone2021 is used for experimental verification. The experimental data of the two schemes are shown in Table 1.

[0118] Table 1 Comparison data of the effects of the present invention and the existing models

[0119] Method Accuracy (%) Recall rate (%) mAP0.5(%) mAP0.5:0.95(%) APsmall APmedium APlarge FPS YOLOv8s 44 33.9 31.9 18.2 8.7 29.5 40.6 111 Technical solution of the present invention 48.9 38.7 37.9 21.6 11.1 32.3 43.5 53.5

[0120] The detection results in the VisDrone2021 dataset are as follows Figure 6 As shown, Figure 6 The left picture in the figure shows the detection effect of the existing YOLOv8s model. The detection effect of small target vehicles at a long distance is obviously poor. Figure 7 As shown in the left figure; Figure 6 The right figure in the figure shows the detection effect of the technical solution of the present invention, which has excellent detection performance at a long distance and also has good attention at a close distance. Figure 7 As shown in the right figure in . From the above detection results, it can be seen that the present invention can still effectively distinguish pedestrians and vehicles in scenes with obstruction and low visibility, and the classification and position determination of complex road conditions are relatively accurate.

Claims

1. A ground target detection method based on an adaptive hierarchical gradient feature fusion strategy, characterized in that: The following steps are involved: Step S1, collecting and preprocessing image data, that is, capturing road target images under different environments, and classifying and screening the road target images, manually annotating the screened images to form a ground obstacle target dataset, and dividing them into a training set, a validation set, and a test set; Step S2: Construct a ground target detection network to transform the original road target image Input ground target detection network, the ground target detection network is based on adaptive hierarchical gradient feature fusion strategy, its backbone network includes one convolution layer and four C2f-EIRM modules with the same structure, the original road target image The initial feature map is first processed by the convolution layer, and then input into the first layer of C2f-EIRM module. The feature maps output by each C2f-EIRM module in the first three layers are then input into the next layer of C2f-EIRM module. In each layer of C2f-EIRM module, the input feature map is first The convolutional layer performs preliminary feature extraction. The initial feature map output by the convolutional layer is split into layers of the same size by the splitting module. n Branch feature map , for the later n -1 branch feature map respectively converts the previous layer features With the current layer features To integrate, Each branch feature map is extracted through an edge information enhancement module EIRM to obtain the local feature , and finally the features of all branches connect, and through a The convolution layer adjusts the dimension and outputs the corresponding feature map of the current layer , ; When extracting local features, each EIRM module introduces gradient operator convolution to construct edge information module and combines it with ordinary convolution in an adaptive adjustment mechanism to achieve feature aggregation; Step S3: The feature map output by the last layer C2f-EIRM module is processed by the spatial pyramid pooling module SPPF and then input into the neck network and the detection head network in sequence, and feature fusion and final target detection and classification are realized through the neck network and the detection head network; Step S4: Use the training set in step 1 to train the constructed ground object detection network, update the weights, and obtain the weight with the highest mAP value as the optimal weight; Step S5: Use the trained ground target detection network to detect ground obstacles of the flying car, that is, use the ground target detection network based on the optimal weight to detect the real ground target, determine whether there is an obstacle hazard, and if there is an obstacle hazard, output the detection result image and mark the obstacle type and confidence.

2. The method for ground target detection based on the adaptive hierarchical gradient feature fusion strategy according to claim 1 is characterized in that: The detailed method of step S1 is: Step S1.1, collecting road target images under different environments, screening the collected images, removing low-quality images, the screened road target images contain road obstacle targets, and the screened road target images form a ground obstacle target dataset; Step S1.2: Use the same target detection and marking method as the YOLO format dataset, and use the dataset marking software to mark the ground obstacle target dataset obtained in step S1.1; use a rectangular box to mark, and after the marking is completed, each jpg format road target image corresponds to a marked txt file, forming a YOLO format dataset; Step S1.3: Divide the labeled data set into a training set, a validation set, and a test set in a ratio of 7:2:1, and place the corresponding road target images and label files in separate directories.

3. The ground target detection method based on the adaptive hierarchical gradient feature fusion strategy according to claim 1 is characterized in that: In the step S2, in the backbone network of the ground target detection network, one convolution layer and four C2f-EIRM modules with the same structure are regarded as extraction layers E1, E2, E3, E4 and E5 in sequence, and high-dimensional features are extracted through these five extraction layers; The original road target image input to the backbone network is a three-channel image. The feature maps extracted and output by the extraction layers E1, E2, E3, E4, and E5 are recorded as , , ; represents the channel dimension, , H and W represent the height and width of the image respectively.

4. The method for ground target detection based on the adaptive hierarchical gradient feature fusion strategy according to claim 1 or 3, characterized in that: Feature maps output by each C2f-EIRM module in the backbone network The expression is as follows: ; In the above formula, Represents the feature map of the first branch among n branches, represents the j-th branch feature map, , represents the output features of the i-th layer C2f-EIRM module, where ; Among the above It refers to the use of edge information enhancement module EIRM to perform EIRM operation, and each edge information enhancement module EIRM performs EIRM operation to obtain a feature map The process is as follows: Step 1) Use gradient operator convolution to extract edge information of half of the features to obtain edge information feature map , the calculation process is as follows: ; ; ; ; ; in, is the corresponding branch feature map of the input edge information enhancement module EIRM, is the gradient operator direction matrix, represents different gradient operator directions, is the edge information feature map output by the edge information enhancement module EIRM; Step 2), use a Convolution extracts half of the features to obtain a normal feature map , the calculation process is as follows: ; in, For one Convolution operation, is the obtained common feature map, It is the feature map of the input edge information enhancement module EIRM; Step 3) Use the adaptive adjustment mechanism to adjust the edge information feature map Compared with ordinary feature maps Perform dynamic combination and output local feature map ; ; In the above formula, It is the feature map after the adaptive adjustment mechanism.

5. The method for ground target detection based on the adaptive hierarchical gradient feature fusion strategy according to claim 4 is characterized in that: Using the adaptive adjustment mechanism to transform the edge information feature map Compared with ordinary feature maps The specific method of dynamic combination is as follows: First, the ELA attention mechanism is used to focus on the edge information feature map and ordinary feature maps Enhance and generate deep features and ; Then, by applying a series of convolution kernels on the feature map, the enhanced features are converted into keys K and values ​​V through a projection function, including convolution operations and dimension reshaping. The former extracts local information and the latter converts the feature map into a form suitable for the attention mechanism. ; ; When generating a query Q with unchanged features, the edge information and ordinary convolution features are adaptively adjusted and fused, and the complementarity of the dual-branch features is used to perform splicing and fusion to obtain ; ; The attention map of the features is calculated based on the key and query, usually implemented through a softmax function, which normalizes the attention weights so that they sum to 1. Next, the value is multiplied by the attention map, and the model obtains features containing global context information; ; Secondly, the obtained features are added to the original features of the other branch and merged through the connection operation of the channel dimension. The merged features are input into the convolution layer to generate fused features. ; ; Finally, we get the feature map : ; In the above formula, is the feature map after the adaptive adjustment mechanism, Represents edge information feature map The key, Represents a common feature map The key, Represents edge information feature map The value of Represents edge information feature map The value of represents a query where two branch features are connected via a channel, and Represent the specific attention graphs for computing edge information branches and ordinary convolution branches, respectively. and They correspond to a 3x3 convolution layer and reconstruction operation respectively. represents addition at the element level, It means multiplication at the element level, and C means addition and merging according to the channel dimension.

6. The method for ground target detection based on adaptive hierarchical gradient feature fusion strategy according to claim 5, characterized in that: The formula for enhancing the original features extracted by the backbone network using the ELA attention mechanism is: ; In the above formula, Extract operations for the ELA attention mechanism, express and The input features of and express and Input Features The spatial position in the channel, represents group normalization, represents a nonlinear activation function, and Represents 1D convolution operations in the horizontal and vertical directions respectively.

Citation Information

Patent Citations

  • Underwater target detection method based on detail enhancement

    CN116486244A

  • Complex road target detection method based on multi-modal fusion aerial view

    CN117058646A

  • Traffic target identification method based on improved YOLOv8 model

    CN117237915A

  • Underwater sonar image target detection method and system based on neural network

    CN118628898A

  • Underwater target detection method based on edge prior

    CN118864270A

Cited By

  • Visual positioning method for UHPC highway guardrail center hole

    CN120726126A

  • PCB defect detection method based on multi-branch feature extraction and adaptive enhancement strategy

    CN121010597A

  • Printed circuit board defect detection method and system

    CN121190470A

  • A printed circuit board defect detection method and system

    CN121190470B

  • Concrete apparent defect detection method based on image recognition

    CN121236589A