Target detection method and system based on multi-scale fusion feature extraction

By employing multi-scale fusion feature extraction and a global attention mechanism, the problems of information dilution and feature confusion in feature pyramid networks are solved, resulting in more efficient feature extraction and improved target detection accuracy.

CN116740516BActive Publication Date: 2026-02-17SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310580498.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-19
Publication Date
2026-02-17
Estimated Expiration
2043-05-19

AI Technical Summary

Technical Problem

Existing feature pyramid networks suffer from information dilution and confusion between high-level location features and low-level semantic features during feature fusion, which affects target detection performance.

Method used

A multi-scale fusion feature extraction method is adopted, which combines a global attention mechanism. Feature extraction and fusion are performed through a backbone network, a SWFC network, and a LBiFN network. Cross-layer connections and self-attention modules are used for weighting to balance the information flow of features at different scales.

Benefits of technology

It improves the precision and accuracy of target detection, solves the problems of information dilution and feature confusion, and enhances the discriminative power and detection performance of features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116740516B_ABST
    Figure CN116740516B_ABST
Patent Text Reader

Abstract

The application discloses a target detection method and system based on multi-scale fusion feature extraction, which comprises the following steps: inputting a preprocessed original image into a target detection network, extracting a multi-scale fusion feature map, and outputting a target detection result; wherein the preprocessed original image is input into a backbone network to obtain three layers of feature maps with different scales, and then a SWFC network is used to obtain three layers of feature maps with different scales after the first fusion; the smallest scale feature map is subjected to three times of up-sampling, all the scale feature maps are input into an LBiFN network, are divided into two groups for feature fusion, two layers of fused feature maps are respectively restored to the size of the corresponding original input feature maps, two layers of feature maps with the smallest scale are discarded, and then four layers of multi-scale fusion feature maps with different scales after weighting are output through self-attention modules respectively. Through multi-scale fusion and attention mechanism, the application fuses multi-layer features with different scales, and improves the accuracy of target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision image technology, and in particular to a target detection method and system based on multi-scale fusion feature extraction. Background Technology

[0002] In recent years, object detection has played an increasingly important role in the field of computer vision and has received increasing research attention. In object detection tasks, feature extraction refers to extracting important features such as location and semantic information from the original image, providing strong support for subsequent location and bounding box identification of different objects in the image and their classification. With the continuous development of computer vision technology, deep learning algorithms based on feature extraction have been widely applied in many fields, such as autonomous driving, security monitoring, and medical image analysis.

[0003] In the current field, some deep learning-based feature extraction algorithms have achieved considerable success, such as Faster R-CNN, YOLO, and SSD. These algorithms have varying degrees of advantages in terms of accuracy, speed, and efficiency, and can be selected and adjusted according to specific application scenarios.

[0004] In existing technologies, Feature Pyramid Networks (FPNs) have been proposed for object detection. However, in traditional FPNs, the highest-level feature layer over-abstracts the original image, resulting in high-level features extracting sufficient semantic information but losing positional information. To address this issue, various feature fusion methods at different scales have been proposed. These methods fuse positional information from low-scale features with semantic information from high-scale features to form new feature layers, combining the advantages of all feature layers. These methods have received widespread acclaim. Subsequently, a series of improved FPN network models have emerged, such as PANet (Path Aggregation Network), ASFF (Adaptively Spatial Feature Fusion), NAS-FPN (Neural Architecture Search), and BiFPN (Bidirectional Feature Pyramid Network). In the field of object detection, the use of multi-scale feature fusion can significantly improve model accuracy.

[0005] In the backbone networks of the aforementioned network models, deep, high-level features possess more semantic information, while shallow, low-level features contain more content description information. Features are integrated through lateral connections in networks like FPN and PANet, thus driving the development of object detection. That is, low-level and high-level information are complementary for object detection; the method of integrating pyramid representations using high-level and low-level features determines detection performance. To ensure final detection performance, the integrated features should possess balanced information from each resolution. However, the integration order in the aforementioned methods or network models causes the integrated features to focus more on adjacent resolutions and less on other resolutions. During information flow, the semantic information contained in non-adjacent layers is diluted in each fusion, resulting in poor final detection performance. In fact, networks like FPN and PANet over-integrate features from different feature layers, confusing high-level location features with low-level semantic features, thus affecting subsequent tasks such as object regression and ultimately leading to poor detection performance.

[0006] Furthermore, attention mechanisms are becoming increasingly prevalent in feature extraction. Attention mechanisms refer to the dynamic assignment of different weights to different data points during data processing, focusing more on important information. This allows models to identify and process important information more efficiently and accurately, thereby improving model performance. In the field of deep learning, attention mechanisms have been widely applied to various tasks, such as natural language processing, image classification, and object detection. In natural language processing, attention mechanisms enable models to better understand keywords in sentences and associate them with questions or other sentences. In image classification, attention mechanisms allow models to better understand important regions in images, thereby improving classification accuracy. In object detection, attention mechanisms help models focus on features related to the target, thereby improving detection accuracy and speed. Common attention mechanism modules include SE (Squeeze-and-Excitation), SK (Selective Kernel), SA (Spatial Attention), CA (Channel Attention), Non-local, GC (Global Context), and MHA (Multi-head Attention). Summary of the Invention

[0007] To address the shortcomings of traditional feature pyramid networks in feature fusion, this invention provides a target detection method and system based on multi-scale fusion feature extraction. On the basis of existing feature extraction networks, the feature extraction layer of the network is further processed and combined with a global attention mechanism to achieve multi-scale fusion feature extraction, thereby improving the accuracy of target detection.

[0008] Firstly, this disclosure provides a target detection method and system based on multi-scale fusion feature extraction.

[0009] A target detection method based on multi-scale fusion feature extraction includes:

[0010] Obtain the original image to be detected and preprocess it.

[0011] The preprocessed original image is input into the object detection network to extract multi-scale fusion feature maps and output the object detection results;

[0012] The target detection network includes a backbone network, a SWFC network, and a LBiFN network. The preprocessed original image is input into the backbone network to obtain three layers of feature maps at different scales. The three layers of feature maps at different scales are then input into the SWFC network to obtain three layers of feature maps at different scales after the first fusion. The feature map with the smallest scale is upsampled three times, and all feature maps at all scales are then input into the LBiFN network. The input feature maps are divided into two groups according to their scale from large to small for feature fusion. The two fused feature maps are restored to the size of the corresponding original input feature maps. The two feature maps with the smallest scale are discarded. Then, they are passed through a parameter-shared self-attention module to output a weighted multi-scale fused feature map, resulting in a four-layer multi-scale fused feature map at different scales.

[0013] A further technical solution is that the preprocessing includes:

[0014] The input original image is cropped to a uniform size;

[0015] Randomly process the cropped original image, including flipping, occlusion, changing contrast, and changing image format.

[0016] A further technical solution is that the backbone network is built on the ResNet-50 network architecture, including a CNN module and a residual network module connected in sequence. The residual network module consists of 4 residual blocks, and the ratio of the 4 residual blocks from top to bottom is 1:1:4:1. The last 3 residual blocks output feature maps of three different scales respectively.

[0017] In a further technical solution, in each residual block, the input feature map is sequentially passed through a 1*1 convolution, a 3*3 convolution, and a 1*1 convolution, and then fused with the input feature map to output the fused feature map.

[0018] A further technical solution is provided in the SWFC network.

[0019] Three feature maps of different scales are input into the SWFC network, and the number of channels in each layer is adjusted by a 1*1 convolution to obtain feature map l3, feature map l4 and feature map l5.

[0020] Each feature map is upsampled and downsampled to generate three sets of feature maps with the same dimension as the input.

[0021] By fusing feature maps of the same dimension, we obtain feature maps M3, M4, and M5, which are the first multi-scale fused feature maps.

[0022] A further technical solution is provided in the LBiFN network,

[0023] The smallest feature map among the three different scales of the feature maps after the first fusion is subjected to three 3*3 convolution processes, and the three upsampled feature maps are output respectively.

[0024] The three feature maps and the three feature maps of different scales after the first fusion are input into the LBiFN network. The LBiFN network adopts cross-layer connection and divides the six feature maps into two groups according to the scale from large to small. In each group, multi-scale feature fusion is performed according to the largest feature map dimension to obtain two fused feature maps.

[0025] The two fused feature maps are restored to the size of the original input feature maps, and the two feature maps with the smallest scale are discarded to output four feature maps of different scales.

[0026] The output four-layer feature maps are input into the attention module for attention extraction, generating a weighted multi-scale fusion feature map, which is the final output multi-scale fusion feature map with a light fusion of four layers of semantic and positional information.

[0027] A further technical solution is that, in the attention module,

[0028] The input feature map is first processed by a 1*1 convolution and softmax regression, and then multiplied with the original input feature map. The result of the multiplication is then output.

[0029] The output multiplication result is passed through a 1*1 convolution, then subjected to LayerNorm and ReLU regularization operations, and finally passed through another 1*1 convolution to output the feature map;

[0030] The output feature map is fused with the original input feature map to output an attention map of the same dimension.

[0031] Secondly, this disclosure provides a target detection system based on multi-scale fusion feature extraction.

[0032] A target detection system based on multi-scale fusion feature extraction includes:

[0033] The image acquisition module is used to acquire the original image to be detected;

[0034] The image preprocessing module is used to preprocess the original image to be detected;

[0035] The target detection module is used to input the preprocessed original image into the target detection network, extract multi-scale fusion feature maps, and output the target detection results;

[0036] The target detection network includes a backbone network, a SWFC network, and a LBiFN network. The preprocessed original image is input into the backbone network to obtain three layers of feature maps at different scales. The three layers of feature maps at different scales are then input into the SWFC network to obtain three layers of feature maps at different scales after the first fusion. The feature map with the smallest scale is upsampled three times, and all feature maps at all scales are then input into the LBiFN network. The input feature maps are divided into two groups according to their scale from large to small for feature fusion. The two fused feature maps are restored to the size of the corresponding original input feature maps. The two feature maps with the smallest scale are discarded. Then, they are passed through a parameter-shared self-attention module to output a weighted multi-scale fused feature map, resulting in a four-layer multi-scale fused feature map at different scales.

[0037] Thirdly, this disclosure also provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the steps of the method described in the first aspect.

[0038] Fourthly, this disclosure also provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the steps of the method described in the first aspect.

[0039] The above one or more technical solutions have the following beneficial effects:

[0040] 1. This invention provides a target detection method and system based on multi-scale fusion feature extraction, which strengthens the original features with comprehensive and balanced semantic features, so that each resolution in the pyramid can obtain the same information from other resolutions, thereby balancing the information flow and making the features more discriminative. This solves the problem of information dilution in existing feature pyramid networks during feature fusion and effectively improves detection performance.

[0041] 2. Based on the proposed feature extraction network, this invention fuses low-level and high-level features separately by grouping and fusing features. This solves the problem of existing networks such as FPN and PANet over-fusing features from different feature layers, confusing high-level positional features with low-level semantic features, and thus affecting subsequent target regression and other processing, ultimately leading to poor target detection performance.

[0042] 3. This invention integrates multi-scale features at different scales through multi-scale fusion and attention mechanisms, thereby fully integrating information such as the location and semantic information of the feature layer extracted by the network, thus improving the accuracy of target detection. Moreover, it also improves the accuracy and precision of target detection in different visual domains.

[0043] 4. This invention solves the gradient vanishing problem in deep neural networks by extracting multi-scale feature maps using a ResNet network based on residual modules; it addresses the problem caused by target scale variations in feature extraction tasks by fusing multi-scale features using a SWFC network; and it achieves efficient fusion, transmission, and optimization of feature information through cross-layer connections and feature adjustment by introducing an LBiFN network with an attention module. This allows feature information from different levels to be transmitted and shared, extracting information from feature maps of multiple convolutional levels and resolutions and fusing them together to generate more accurate and representative feature maps, laying the foundation for improving target detection accuracy.

[0044] 5. The target detection method described in this invention can be used in various image scenarios, such as road traffic scenarios, indoor and outdoor scenarios, and urban street scenes. Attached Figure Description

[0045] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0046] Figure 1 This is a flowchart of the target detection method based on multi-scale fusion feature extraction as described in an embodiment of the present invention;

[0047] Figure 2 This is a schematic diagram of the ResNet backbone network structure in the method described in the embodiments of the present invention;

[0048] Figure 3 This is a schematic diagram of the residual block structure in the method described in the embodiment of the present invention;

[0049] Figure 4 This is a schematic diagram of the SWFC network structure in the method described in the embodiment of the present invention;

[0050] Figure 5 This is a schematic diagram of the LBiFN network structure in the method described in the embodiment of the present invention;

[0051] Figure 6 This is a schematic diagram of the attention module in the method described in the embodiment of the present invention. Detailed Implementation

[0052] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0053] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0054] Example 1

[0055] In the field of computer vision, object detection requires extracting features from visual images. These images are then input into a feature extraction neural network. As the neural network deepens, the information expressed by the final output feature layer becomes increasingly abstract, leading to a significant loss of positional information and resulting in low detection accuracy with traditional feature map processing methods. Therefore, this embodiment addresses this issue by fusing multi-scale feature layers to integrate semantic and positional information, thereby significantly improving model accuracy and achieving effective feature extraction. Specifically, existing networks like FPN and PANet excessively fuse features from different feature layers, confusing high-level positional features with low-level semantic features, which affects subsequent tasks such as object regression. To address this problem, the feature extraction network proposed in this embodiment uses a grouped feature fusion method to fuse low-level and high-level features separately, thus resolving the aforementioned issue.

[0056] This embodiment provides a target detection method based on multi-scale fusion feature extraction, such as... Figure 1 As shown, it includes the following steps:

[0057] Step S1: Obtain the original image to be detected and preprocess the original image to be detected;

[0058] Step S2: Input the preprocessed original image into the target detection network, extract the multi-scale fusion feature map, and output the target detection result;

[0059] The target detection network includes a backbone network, a SWFC network, and a LBiFN network. The preprocessed original image is input into the backbone network to obtain three layers of feature maps at different scales. The three layers of feature maps at different scales are then input into the SWFC network to obtain three layers of feature maps at different scales after the first fusion. The feature map with the smallest scale is upsampled three times, and all feature maps at all scales are then input into the LBiFN network. The input feature maps are divided into two groups according to their scale from large to small for feature fusion. The two fused feature maps are restored to the size of the corresponding original input feature maps. The two feature maps with the smallest scale are discarded. Then, they are passed through a parameter-shared self-attention module to output a weighted multi-scale fused feature map, resulting in a four-layer multi-scale fused feature map at different scales.

[0060] Specifically, in the target detection method based on multi-scale fusion feature extraction disclosed in this embodiment, step S1 first acquires the original image to be detected and preprocesses the original image to be detected, which includes:

[0061] (1) Crop the original input image to unify its size;

[0062] (2) Randomly process images, such as flipping, occluding, changing contrast, changing image format, etc.

[0063] In this embodiment, the input original image is preprocessed. First, the input original image is scaled to a fixed size (in this embodiment, the fixed size is a height of 1333 or a width of 800) while maintaining the aspect ratio. Then, the image is randomly horizontally flipped and the image format is changed, i.e., BGR format is converted to RGB format. By processing the input original image in this way to form a random dataset, the generalization performance of the network can be increased, and overfitting of the network can be avoided.

[0064] In step S2, the preprocessed original image is input into the object detection network to extract multi-scale fusion feature maps and output the object detection results. The key to this step is the constructed object detection network, which extracts multi-scale fusion feature maps, performs object detection based on these extracted feature maps, and outputs the object detection results.

[0065] The target detection network constructed in this embodiment includes a backbone network, a SWFC network, and a LBiFN network. Specifically, the preprocessed original image is input into the target detection network. First, the ResNet backbone network is used to obtain three layers of feature maps at different scales. Then, the three layers of feature maps at different scales are input into the SWFC network to obtain three layers of feature maps at different scales after the first fusion. After that, the feature map with the smallest scale is upsampled three times, and the feature maps of all scales are input into the LBiFN network. The feature maps of adjacent scales are fused. The fused feature maps are then passed through parameter-shared self-attention modules to output a weighted multi-scale fused feature map. The smallest scale feature map is discarded to obtain a five-layer multi-scale fused feature map at different scales.

[0066] The aforementioned ResNet backbone network is as follows: Figure 2 As shown, the backbone network is built on the existing ResNet-50 network architecture, including a CNN module and a residual network module connected in sequence. The residual network module consists of four residual blocks: Block2, Block3, Block4, and Block5. After the preprocessed original image is input into the backbone network, it undergoes feature extraction through the CNN module and the four residual blocks. The last three residual blocks output three layers of feature maps at different scales: Feature3, Feature4, and Feature5. These three multi-scale feature maps serve as input to subsequent networks or modules.

[0067] After feature maps are extracted from the original image using a CNN module, these feature maps are input into the residual block of the residual network module. In this residual block, the feature map first undergoes a 1x1 convolution to organize the information from the previous module; then, it passes through a Rectified Linear Unit (ReLU) function, followed by a 3x3 convolution to further process the feature map; finally, it undergoes another 1x1 convolution to transform the number of channels, as detailed below. Figure 3 As shown.

[0068] This embodiment employs residual connections, which effectively solves problems such as vanishing gradients in deep neural networks. Residual connections connect the residuals of the module's input and output, avoiding gradient vanishing and improving network training efficiency. Unlike traditional neural networks, residual modules use the difference between input and output data as the module's output, allowing the network to learn residual transformations rather than directly learning transformations of the original input data. This approach helps the network better adapt to complex data distributions, improving its expressive power and generalization ability.

[0069] Furthermore, the proportions of the modules in each stage are adjusted in the overall ResNet-50 network architecture, with the ratio of the four residual blocks from bottom to top adjusted to 1:1:4:1. In this embodiment, 4, 4, 16, 4 are used, and a corresponding scale feature map is output after each residual block.

[0070] In this embodiment, the backbone network adopts a variant framework of the existing ResNet-r50 network. The depth of the neural network is increased during feature extraction, which also increases the discriminative power between feature layers of different scales. Furthermore, convolutional layers are used to modify the feature channel size of each layer, reducing computational cost with fewer channels.

[0071] The ResNet backbone proposed in this embodiment consists of multiple residual blocks. Therefore, compared to other deep networks, the ResNet backbone has better stability and can effectively solve problems such as gradient vanishing in deep neural networks. Simultaneously, it improves the network's adaptability by learning residual transformations, avoiding overfitting during training. Furthermore, the structure of the ResNet backbone can be selected and adjusted according to task requirements and computational resources. For example, additional convolutional and pooling layers can be added to increase network depth and receptive field size to better adapt to different application scenarios. The aforementioned ResNet backbone mainly performs feature extraction and dimensionality reduction operations on the input image, transforming the image into feature vectors. These feature vectors can be used to represent features of different regions and scales of the image, such as texture, color, and shape. These features provide important basis for subsequent regression and classification operations. The backbone network described in this embodiment is an improvement on the ResNet-r50 network, and its network structure can be selected and adjusted according to task requirements and computational resources.

[0072] The three layers of feature maps at different scales output by the backbone network—Feature Map 3, Feature Map 4, and Feature Map 5—serve as input to the SWFC network. The SWFC (Scale-Wise Feature Concatenation) network, also known as a feature concatenation network, is as follows: Figure 4 As shown, features of different scales are extracted from feature maps at different levels, and then these features are fused to obtain a more representative set of features. Specifically, three layers of feature maps at different scales (in...) Figure 5The inputs (C3, C4, and C5) are fed into the SWFC network. Through quick lateral connections, i.e., by passing each layer through a 1*1 convolution, the number of channels in each layer is adjusted to 256, resulting in feature maps l3, l4, and l5. Then, each feature map is upsampled and downsampled to generate three sets of feature maps with the same dimension as the input, i.e., for each feature map, feature map P3, feature map P4, and feature map P5 are obtained respectively. Finally, the feature maps with the same dimension are fused to obtain the first multi-scale fused feature maps M3, M4, and M5.

[0073] By using the upsampling and downsampling process in the SWFC network and then fusing them, the feature representations of the original feature layers at different scales are integrated, making the extracted features more representative.

[0074] This embodiment addresses the problem of target scale variation in feature extraction tasks by using the aforementioned SWFC network. In computer vision, due to differences in size, shape, and other characteristics of different targets, targets of the same category may have different scales. Therefore, it is necessary to extract and process features of targets at different scales.

[0075] The aforementioned SWFC network is an improvement on the FPN (Feature Pyramid Network) network. It consists of multiple branches, each containing a feature extraction network and a feature pyramid network. The feature extraction network is used to extract features from the input image, while the feature pyramid network is used to fuse the feature maps at multiple scales to enhance the original features with comprehensive and balanced semantic features. This ensures that each resolution in the pyramid can obtain the same information from other resolutions, thereby balancing the information flow and making the features more discriminative, overcoming the shortcomings of existing FPN networks.

[0076] The aforementioned SWFC network uses a parallel structure and connects the feature maps of all branches, which can make fuller use of multi-scale information and effectively improve the accuracy of segmentation. Specifically, it employs a pyramid structure to extract features of different scales from feature maps at different levels, and then fuses these features to obtain a set of more representative features. These features not only improve the detection rate of small targets, but also enhance the accuracy of target localization and semantic segmentation.

[0077] After obtaining the initial multi-scale fused feature maps M3, M4, and M5, the resulting feature maps are input into the LBiFN (Light-Balanced Feature Net) network. The structure of the LBiFN network is as follows: Figure 5As shown, the feature layer with the smallest input size is upsampled three times to increase the number of feature layers and highlight the differences between each group of feature layers. The resulting 6 feature maps are divided into two groups according to their scale from large to small for feature fusion, producing more accurate and representative feature maps, and further improving the feature fusion effect at different scales. Moreover, through the above group fusion method, the excessive fusion of positional and semantic information can be avoided, and the final output is a feature with a light fusion of semantic and positional information.

[0078] Specifically, for the obtained feature maps M3, M4, and M5, feature map M3 has the smallest scale. This last feature map (i.e., the smallest scale feature map) undergoes three 3x3 convolutions, outputting three upsampled feature maps. These three feature maps, along with the three feature maps of different scales obtained in the previous step, are input into the LBiFN network. This network uses cross-layer connections, dividing the six feature maps into two groups according to scale from largest to smallest. In each group, multi-scale feature fusion is performed based on the largest feature map dimension, resulting in two fused feature maps. The two fused feature maps are then restored to the size of their corresponding original input feature maps. This yields six feature maps with scales corresponding one-to-one with the original input feature maps and undergoing slight feature fusion. The two smallest scale feature maps are discarded, resulting in four feature layer outputs. These output feature maps are then input into the attention module for attention extraction, outputting a weighted multi-scale fused feature map, which is the final output of a four-layer multi-scale fused feature map with slight fusion of semantic and positional information.

[0079] In the LBiFN network described above, feature representations from different scale feature layers are further integrated through cross-layer connections, thereby enhancing the feature representation capability.

[0080] Based on the aforementioned LBiFN network, the scheme described in this embodiment introduces cross-layer connections and dynamically adjusted feature maps to achieve efficient fusion and optimization of feature information. Information is extracted from convolutional feature maps at different levels through lateral connections and fused together. The preliminary fused feature map generated in the previous step is fused, and the feature maps from the two stages interact with each other through iterative processes to generate more accurate and representative feature maps, further improving the feature fusion effect at different scales. Efficient feature transfer is achieved through cross-layer connections and feature adjustment, allowing feature information from different levels to be transferred and shared. Information is extracted from feature maps at multiple convolutional levels and resolutions and fused together to generate more accurate and representative feature maps. Furthermore, because it employs a bidirectional feature transfer mechanism, it avoids information loss and distortion during the transfer process, enabling rapid adaptation to targets of different scales in tasks such as object detection, thus improving efficiency and accuracy.

[0081] The structure of the attention module (i.e., the Global Context module) described above is as follows: Figure 6 As shown, the network includes a Context Modeling unit and a Bottleneck Transform unit. The attention module effectively extracts global attention through lightweight computation. In the Context Modeling unit, the input feature map is first processed by a 1x1 convolution and softmax regression, and then multiplied with the original input feature map to achieve context modeling. In the Bottleneck Transform unit, the output of the Context Modeling unit is first processed by a 1x1 convolution to reduce the channel dimensionality, then processed by LayerNorm and ReLU regularization, and then processed by a 1x1 convolution to adjust back to the original number of channels. This unit can capture inter-channel dependencies while reducing network parameters. Finally, the output of the Bottleneck Transform unit is fused with the original input feature map to output an attention map of the same dimension. In the above process, by inputting the global feature vector into the fully connected layer, the weights at each position are calculated using weight parameters to generate an attention map of the same size as the input feature map.

[0082] Furthermore, all convolutional layers in the GC module (i.e., the attention module) share parameters, which can improve the generalization ability of the feature layer, reduce the number of parameters, reduce computational cost with fewer channels, and reduce feature redundancy.

[0083] In this embodiment, a global context vector is introduced into the feature map. The similarity between each feature map location and the global context vector is calculated, and then the similarity is used as a weight to perform a weighted summation of the feature maps, resulting in a feature map processed by the global context attention mechanism module. This approach allows the model to better utilize information from the entire image, not just local regions, thereby improving the model's performance and generalization ability. It helps the model better understand the entire image and extract more meaningful features, thus improving the model's performance and accuracy.

[0084] Based on the obtained random dataset, the preprocessed images in the random dataset are labeled, and the labeled random dataset is used to train the object detection network. The original image to be detected is preprocessed and then input into the trained object detection network. Based on the multi-scale fusion feature map extracted by the object detection network, the object detection result is output, achieving object detection with better accuracy.

[0085] The target detection method based on multi-scale fusion feature extraction proposed in this embodiment can be applied to the following practical application scenarios:

[0086] (1) Autonomous driving

[0087] This method can be applied to the field of autonomous driving. In the process of achieving autonomous driving, vehicles need to use perception systems to detect various obstacles in the surrounding environment, such as vehicles, pedestrians, road signs, and roadblocks, and make timely decisions to ensure driving safety and stability. This method can detect and identify targets in road traffic scenarios in real time, providing crucial data support for autonomous driving. Real-time detection of surrounding vehicles, pedestrians, road signs, and obstacles allows for better autonomous driving and improved driving safety through real-time monitoring of road traffic scenarios.

[0088] (2) Security monitoring

[0089] This method can be applied to security monitoring, enabling real-time monitoring and identification of people, vehicles, and other objects in the monitored environment. Through real-time monitoring of the security environment, it can better identify dangerous situations and protect personal and property safety. It helps security monitoring systems achieve rapid and accurate target identification and alarm functions.

[0090] (3) Medical image analysis

[0091] This method can be applied to various tasks in medical image analysis, including but not limited to lesion identification, organ detection, and disease classification. Medical images contain a wealth of information, but also suffer from noise, interference, and complexity, making medical image analysis extremely challenging. This method can extract more meaningful features from medical images, helping doctors to more accurately detect and diagnose diseases.

[0092] Furthermore, this method can also be applied to the automated analysis of medical images and case screening. By automatically processing and analyzing large amounts of medical images, it helps doctors analyze and diagnose conditions more quickly, shortening consultation time and improving medical efficiency. Simultaneously, this method also facilitates the sharing and transmission of medical image information, providing doctors with more accurate and comprehensive case information, thereby better guiding medical decisions and the formulation of treatment plans.

[0093] (4) Industrial manufacturing

[0094] This method can be applied to fields such as object detection and defect detection in industrial manufacturing. By quickly identifying objects on the production line, it can help manufacturers improve production efficiency and quality, and enhance the controllability and safety of the production process.

[0095] (5) Application of drones

[0096] This method can be applied to the field of UAV target tracking and detection, effectively solving some problems encountered by UAVs in practical applications, such as complex and changing environments and varying target sizes. It enables autonomous flight and intelligent control of UAVs, improving their efficiency and accuracy. It can be used in agriculture, geological exploration, environmental monitoring, rescue, and other fields, helping UAVs achieve autonomous flight and intelligent control, thus improving their efficiency and accuracy.

[0097] Example 2

[0098] This embodiment provides a target detection system based on multi-scale fusion feature extraction, including:

[0099] The image acquisition module is used to acquire the original image to be detected;

[0100] The image preprocessing module is used to preprocess the original image to be detected;

[0101] The target detection module is used to input the preprocessed original image into the target detection network, extract multi-scale fusion feature maps, and output the target detection results;

[0102] The target detection network includes a backbone network, a SWFC network, and a LBiFN network. The preprocessed original image is input into the backbone network to obtain three layers of feature maps at different scales. The three layers of feature maps at different scales are then input into the SWFC network to obtain three layers of feature maps at different scales after the first fusion. The feature map with the smallest scale is upsampled three times, and all feature maps at all scales are then input into the LBiFN network. The input feature maps are divided into two groups according to their scale from large to small for feature fusion. The two fused feature maps are restored to the size of the corresponding original input feature maps. The two feature maps with the smallest scale are discarded. Then, they are passed through a parameter-shared self-attention module to output a weighted multi-scale fused feature map, resulting in a four-layer multi-scale fused feature map at different scales.

[0103] Example 3

[0104] This embodiment provides an electronic device, including a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When the computer instructions are executed by the processor, they complete the steps in the target detection method based on multi-scale fusion feature extraction as described above.

[0105] Example 4

[0106] This embodiment also provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the steps in the target detection method based on multi-scale fusion feature extraction as described above.

[0107] The steps and methods involved in Embodiments 2 to 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.

[0108] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.

[0109] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0110] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A target detection method based on multi-scale fusion feature extraction, characterized in that, The method comprises the following steps: obtaining an original image to be detected, and preprocessing the original image to be detected; inputting the preprocessed original image into a target detection network, extracting multi-scale fusion feature maps, and outputting a target detection result; the target detection network comprises a backbone network, an SWFC network and an LBiFN network; the preprocessed original image is input into the backbone network to obtain three layers of feature maps of different scales; the three layers of feature maps of different scales are input into the SWFC network to obtain three layers of feature maps of different scales after first fusion; the smallest scale feature map is up-sampled three times, and all the scale feature maps are input into the LBiFN network; the input feature maps are divided into two groups according to the scale from large to small for feature fusion; the two layers of fused feature maps are restored to the size of the corresponding original input feature maps respectively, and the two layers of feature maps of the smallest scale are discarded; the four layers of multi-scale fusion feature maps of different scales are output through the parameter-shared self-attention module respectively. in the SWFC network, The three layers of feature maps of different scales are input into the SWFC network, and each layer is adjusted by a 1*1 convolution to obtain feature maps l 3, feature map l 4 and feature map l 5; each feature map is up-sampled and down-sampled to generate three groups of feature maps with the same input dimension; the feature maps with the same dimension are fused to obtain the first multi-scale fused feature maps M3, M4 and M5.

2. The target detection method based on multi-scale fusion feature extraction according to claim 1, characterized in that, the preprocessing comprises: cropping the input original image to unify the image size; randomly processing the cropped original image, including flipping, occlusion, changing contrast and changing image format.

3. The target detection method based on multi-scale fusion feature extraction of claim 1, characterized in that, the backbone network is based on the Resnet-50 network architecture, comprising a CNN module and a residual network module connected in sequence; the residual network module is composed of four residual blocks, and the proportions of the four residual blocks from top to bottom are 1:1:4:1; the last three residual blocks output three layers of feature maps of different scales respectively.

4. The target detection method based on multi-scale fusion feature extraction according to claim 3, characterized in that, in each residual block, the input feature map is sequentially subjected to a 1*1 convolution, a 3*3 convolution and a 1*1 convolution, and then fused with the input feature map to output the fused feature map.

5. The method of claim 1, wherein the multi-scale fusion feature extraction based object detection method is characterized by, in the LBiFN network, the smallest scale feature map in the three layers of feature maps after first fusion is subjected to three times of 3*3 convolution processing to output three up-sampled feature maps; the three feature maps and the three layers of feature maps after first fusion are input into the LBiFN network; the LBiFN network adopts cross-layer connection, and the six layers of feature maps are divided into two groups according to the scale from large to small; multi-scale feature fusion is performed according to the maximum feature map dimension in each group to obtain two layers of fused feature maps; the two layers of fused feature maps are restored to the size of the corresponding original input feature maps respectively, and the two layers of feature maps of the smallest scale are discarded to output four layers of feature maps of different scales; the four layers of output feature maps are input into the attention module for attention extraction to generate weighted multi-scale fusion feature maps, that is, the final output is four layers of multi-scale fusion feature maps of light fusion of semantic information and position information.

6. The target detection method based on multi-scale fusion feature extraction according to claim 5, characterized in that, in the attention module, the input feature map is first subjected to a 1*1 convolution and a softmax regression, and then multiplied by the original input feature map; and then the multiplication result is output. The multiplication result of the output is passed through a 1*1 convolution, then through LayerNorm and ReLU regularization operations, and then output through a 1*1 convolution to obtain a feature map; The output feature map is fused with the original input feature map to output an attention map of the same dimension.

7. A target detection system based on multi-scale fusion feature extraction, characterized in that, The method comprises the steps of: An image acquisition module is configured to acquire an original image to be detected; An image preprocessing module is configured to preprocess the original image to be detected; A target detection module is configured to input the preprocessed original image into a target detection network, extract multi-scale fusion feature maps, and output a target detection result. The target detection network comprises a backbone network, an SWFC network, and an LBiFN network. The preprocessed original image is input into the backbone network to obtain three layers of feature maps of different scales. The smallest scale feature map is upsampled three times, and all the scale feature maps are input into the LBiFN network. The input feature maps are divided into two groups according to the scale from large to small for feature fusion. The three layers of feature maps of different scales are input into the SWFC network, and each layer is adjusted by a 1*1 convolution to obtain feature maps l 3, feature map l 4 and feature map l 5; The two fused feature maps are restored to the size of the corresponding original input feature maps, and the two smallest scale feature maps are discarded. The parameter-shared self-attention module is used to output weighted multi-scale fusion feature maps to obtain four layers of multi-scale fusion feature maps of different scales.

8. An electronic device, characterized by comprising: In the SWFC network, 9. A computer readable storage medium characterized by, Each feature map is respectively upsampled and downsampled to generate three groups of feature maps of the same dimension as the input. The feature maps of the same dimension are fused to obtain the first multi-scale fusion feature maps M3, M4, and M5. The computer instructions are run by the processor to complete the steps of the target detection method based on multi-scale fusion feature extraction according to any one of claims 1-6. The computer instructions are run by the processor to complete the steps of the target detection method based on multi-scale fusion feature extraction according to any one of claims 1-6.

Citation Information

Patent Citations

  • Pulmonary nodule detection method based on NAS-FPN

    CN112419306A

  • Dense crowd counting method based on multi-scale feature pyramid network

    CN113011329A