Object detection method and system based on feature enhancement and parallel channel attention
By combining frequency domain feature decomposition and channel cascading with a parallel channel attention module, the problem of low detection accuracy for small-sized contraband items is solved, achieving efficient feature enhancement and feature representation, and improving the accuracy and real-time performance of target detection in millimeter-wave images.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING INST OF RADIO METROLOGY & MEASUREMENT
- Filing Date
- 2026-04-22
- Publication Date
- 2026-05-26
AI Technical Summary
Existing millimeter-wave image target detection algorithms are not very accurate in detecting small-sized contraband items. They are difficult to separate background noise from target features in the early stages of feature extraction, resulting in a high false alarm rate and a low detection rate.
The high-frequency edge features of small-sized objects are preserved by frequency domain feature decomposition, spatial domain reconstruction is performed and introduced into the network through channel cascading, combined with dense residual blocks and skip connections, and decoupled feature enhancement of spatial and channel dimensions is performed using a parallel channel separation attention module. Finally, feature aggregation and detection are performed through a feature pyramid network.
It improves the detection accuracy of small-sized prohibited items, reduces the false alarm rate, enhances the integrity and robustness of feature representation, and can effectively detect multi-scale features.
Smart Images

Figure CN122090180A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image detection, specifically to an object detection method and system based on feature enhancement and parallel channel attention. Background Technology
[0002] In millimeter-wave body security checks, the accuracy of detecting concealed contraband directly impacts public safety. Current mainstream CNN-based millimeter-wave image target detection frameworks fall into two-stage and single-stage categories. Two-stage algorithms, due to the additional region generation step, have high computational complexity, making them unsuitable for the real-time requirements of security checks. While single-stage algorithms offer faster detection speeds, they still face challenges in practical applications, such as background interference and target features being confused. They cannot effectively separate background noise from target features in the early stages of feature extraction, requiring the network to process a large amount of redundant information during learning, potentially leading to false alarms. Furthermore, contraband is diverse in type and size, especially small contraband whose feature signals constitute a very small percentage of the image. Their shallow texture features are easily covered by deep semantic features, and existing network feature extraction processes lack differentiated enhancement mechanisms for targets of different scales. Additionally, the coupling of channel and spatial dimensions makes it difficult to accurately capture and enhance the features of small targets, ultimately resulting in a low detection rate for small contraband. Summary of the Invention
[0003] To address the problem of low detection accuracy for small-sized items in practical applications of existing technologies, this application provides a method for detecting items of specific sizes based on feature enhancement and parallel channel attention.
[0004] The first aspect of this application provides an item detection method based on feature enhancement and parallel channel attention, the method comprising: Acquire the millimeter-wave image to be detected; The millimeter-wave image is fed into a filtering module for regional feature enhancement and channel adjustment to obtain a feature-enhanced image. The enhanced image is fed into the backbone network, where feature extraction is performed through dense residual blocks and skip connections to obtain a feature map. A parallel channel separation attention module is introduced between the backbone network and the feature pyramid network to perform decoupled feature enhancement of the feature map in terms of spatial and channel dimensions, resulting in an optimized fused feature map. The optimized fused feature map is fed into a feature pyramid network for feature aggregation to obtain aggregated feature information. By utilizing the aggregated feature information through the detection output head, items of a specific size are classified and their bounding boxes are located to obtain detection results.
[0005] Optionally, sending the millimeter-wave image into the filtering module for region feature enhancement and channel adjustment includes: The millimeter-wave image is subjected to frequency domain feature decomposition to retain the high-frequency components that characterize the target edge; The signal after frequency domain feature decomposition is reconstructed in the spatial domain to obtain a high-frequency feature enhanced image; The original preserved channel of the millimeter-wave image is concatenated with the high-frequency feature-enhanced image to obtain the feature-enhanced image.
[0006] Optionally, performing frequency domain feature decomposition on the millimeter-wave image to retain high-frequency components characterizing the target edge includes: Extract a single channel image from the millimeter-wave image, convert the single channel image to the frequency domain, and center the spectrum of the frequency domain. Set a cutoff frequency and calculate the distance from each frequency domain coordinate in the frequency domain space to the center point of the spectrum; The centered spectrum is high-pass filtered using the Hanning window function to suppress low-frequency background noise and retain high-frequency components.
[0007] Optionally, the high-pass filtering of the centered spectrum using the Hanning window function includes: When the distance from the frequency domain coordinate to the center point of the spectrum is less than the cutoff frequency, the corresponding spectral component is smoothly transitioned to 0 by the Hanning window function. When the distance is greater than or equal to the cutoff frequency, the corresponding spectral component is retained as 1 to achieve high-pass filtering.
[0008] Optionally, the step of introducing a parallel channel separation attention module between the backbone network and the feature pyramid network to perform decoupled feature enhancement of the feature map in terms of spatial and channel dimensions includes: The feature map is subjected to channel attention processing to obtain features with channel attention. Spatial attention processing is performed on the feature map to obtain features with spatial attention. The features with channel attention and the features with spatial attention are multiplied element-wise to obtain the optimized fused feature map.
[0009] Optionally, performing channel attention processing on the feature map to obtain features with channel attention includes: The feature map is compressed in the spatial dimension, and average pooling is used to obtain a one-dimensional vector; After performing a convolution operation on the one-dimensional vector, the channel weight vector is obtained by processing it through an activation function; The channel weight vector is multiplied element-wise with the corresponding channel of the feature map to obtain the feature with channel attention.
[0010] Optionally, performing spatial attention processing on the feature map to obtain features with spatial attention includes: Max pooling and average pooling are performed on each channel of the feature map to obtain two matrices; The two matrices are concatenated to obtain a concatenated feature map; a convolution operation is performed on the concatenated feature map, and the output channel is adjusted to be consistent with the input channel of the original feature map. By processing with activation functions, features with spatial attention are obtained.
[0011] Optionally, the step of feeding the feature-enhanced image into the backbone network and performing feature extraction through dense residual blocks and skip connections includes: The dense residual blocks are used to extract features layer by layer from the enhanced image. By fusing features from different levels through the skip connections, feature diversity is enhanced, resulting in the feature map.
[0012] Optionally, utilizing the aggregated feature information by detecting the output head includes: The classification branch of the detection output head uses the aggregated feature information to predict the category of an item of a specific size; The regression branch of the detection output head uses the aggregated feature information to locate the bounding box and estimate the detection confidence, and combines the category prediction results to obtain the detection result.
[0013] A second aspect of this application provides an item detection system based on feature enhancement and parallel channel attention, the system comprising: Image acquisition module, used to acquire millimeter-wave images to be detected; The filter feature enhancement module is used to receive the millimeter-wave image, perform regional feature enhancement and channel adjustment, and obtain a feature-enhanced image. The backbone network feature extraction module is used to receive the feature-enhanced image, extract features through dense residual blocks and skip connections, and obtain a feature map. A parallel channel separation attention module is set between the backbone network feature extraction module and the feature pyramid aggregation module. It is used to perform decoupled feature enhancement of the feature map in terms of spatial and channel dimensions to obtain an optimized fused feature map. The feature pyramid aggregation module is used to receive the optimized fused feature map, perform feature aggregation, and obtain aggregated feature information. The detection output module is used to classify and locate bounding boxes of items of a specific size using the aggregated feature information, and obtain detection results.
[0014] As can be seen from the above technical solution, this application retains the high-frequency edge features corresponding to small-sized objects through frequency domain feature decomposition, enhances their edge response through spatial domain reconstruction, and then introduces the enhanced features into the network input through channel cascading, so that the key features of small-sized targets are highlighted in the early stage of feature extraction. Subsequently, dense residual blocks realize the layer-by-layer transfer and reuse of features, avoiding the gradient vanishing of deep networks. Skip connections fuse the core discriminative features and deep semantic features of small-sized targets, preventing the shallow features of small-sized targets from being covered by deep features. Channel attention branches enhance the effective channel features corresponding to small-sized targets, and spatial attention branches accurately locate their spatial regions. After element-by-element fusion, the features of small-sized targets are specifically enhanced. Finally, multi-scale features are fused, allowing the enhanced features of small-sized targets and the features of large-sized targets to participate in detection together, improving the completeness of their feature representation. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating the object detection method based on feature enhancement and parallel channel attention in the embodiments of this application.
[0017] Figure 2 This is a schematic diagram of the overall process of the target detection model in the embodiments of this application.
[0018] Figure 3 This is a schematic diagram of the parallel channel separation attention module in the embodiments of this application. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] Based on this, this application provides an implementation method for an item detection method based on feature enhancement and parallel channel attention, such as... Figure 1 As shown, the method includes: S101, acquire the millimeter-wave image to be detected; S102, The millimeter-wave image is sent to the filtering module for regional feature enhancement and channel adjustment to obtain a feature-enhanced image; S103, The enhanced image is fed into the backbone network, and feature extraction is performed through dense residual blocks and skip connections to obtain a feature map; S104, a parallel channel separation attention module is introduced between the backbone network and the feature pyramid network to perform decoupled feature enhancement of the feature map in terms of spatial and channel dimensions, thereby obtaining an optimized fused feature map. S105, The optimized fused feature map is fed into the feature pyramid network for feature aggregation to obtain aggregated feature information; S106, using the aggregated feature information through the detection output head, classify and locate the bounding box of the item of a specific size to obtain the detection result.
[0021] It should be noted that the millimeter-wave image to be detected is an image containing a specific-sized object concealed by a human body, which can reflect the electromagnetic scattering characteristics of the target. The millimeter-wave image is acquired using existing conventional millimeter-wave security inspection equipment, and this application is not limited to this. The filtering module is a functional module corresponding to the image prior feature enhancement method based on filtering. The electromagnetic scattering characteristics of the specific-sized object are manifested in the spatial domain as phase abrupt changes and high-intensity gradient changes in the target edge region, and in the frequency domain as the concentrated distribution characteristics of high-frequency signals. The region feature enhancement strengthens the activation response of the target edge, and the channel adjustment optimizes the feature dimension by adding a high-frequency channel, thereby guiding the subsequent network to prioritize the potential region of the specific-sized object, while suppressing false alarm interference caused by complex backgrounds. The backbone network is a deep network structure used to extract multi-level features of the image, in which dense residual blocks can realize the layer-by-layer transfer and enhancement of features. To avoid the gradient vanishing problem during deep network training, the skip connections directly fuse features from different levels, effectively improving feature diversity and ensuring that the network can extract both shallow texture features and deep semantic features of the target. The parallel channel separation attention module (PCSA) is a plug-and-play attention module designed through a collaborative approach of spatial and channel dual-domain parallel computing framework and channel grouping dynamic recombination mechanism. Decoupled feature enhancement refers to separating and independently performing channel-dimensional attention enhancement and spatial-dimensional attention enhancement of the feature map before fusing them, thereby reducing the mutual influence between layers and making feature enhancement more targeted. This module is set between the backbone network and the feature pyramid network, and can optimize the spatial weight information of the fused feature map passed from the top-down feature pyramid branches, thereby enhancing the feature representation ability of objects of specific sizes and improving the robustness of the detection model.
[0022] It should be noted that the feature pyramid network aggregates feature maps at different scales. By combining top-down upsampling with bottom-up feature transfer, it achieves the fusion of multi-scale features. The generated feature aggregation compensates for the limitations of single-scale features in detecting objects of different sizes. In particular, for objects of specific sizes, it improves the detection effect by fusing deep semantic features and shallow texture features.
[0023] It should be noted that the detection output head includes a classification branch and a regression branch. The classification branch focuses on determining whether the target is an item of a specific size and the specific type of item of that size based on aggregated feature information. The regression branch focuses on determining the position of the item of a specific size in the image, i.e., bounding box localization, and also performs detection confidence estimation to evaluate the reliability of the detection results.
[0024] For example, such as Figure 2As shown, firstly, the millimeter-wave image containing the human body and potentially concealed objects of a specific size is subjected to region feature enhancement and channel adjustment to strengthen the edge features of objects of a specific size and optimize the feature dimension. The backbone network extracts multi-scale features of the millimeter-wave image layer by layer through dense residual blocks and blue jump connections between layers, resulting in five feature layers of different depths: P1, P2, P3, P4, and P5. In the attention feature enhancement stage, the features corresponding to P3, P4, and P5 in the backbone network are first passed through the green feature transition module in the middle of the figure, and then sent to the corresponding red PCSA modules. Each PCSA module performs decoupled enhancement of the spatial and channel dimensions of the corresponding features, improving the feature representation capability of the region of objects of a specific size. In the feature aggregation stage, the features processed by PCSA enter the feature aggregation network in the red area. Simultaneously, the P5 feature of the backbone network is directly passed to the S5 layer of the feature aggregation network, the P4 feature is passed to the S4 layer, and the P3 feature is passed to the S3 layer. The yellow plus sign in the figure represents the feature fusion operation, which fuses the PCSA-enhanced features with the features of the corresponding layers of the backbone network to obtain the aggregated feature layers S3, S4, and S5. In the detection output stage, the S3, S4, and S5 output by the feature aggregation network locate the bounding boxes of objects of specific sizes, completing the determination of the type of object of specific size. Finally, the human image with the red detection box is output, completing the entire process of detecting objects of specific sizes.
[0025] This application preserves the high-frequency edge features corresponding to small-sized objects through frequency domain feature decomposition, enhances their edge response through spatial domain reconstruction, and then introduces the enhanced features into the network input through channel cascading, so that the key features of small-sized targets are highlighted in the early stage of feature extraction. Subsequently, dense residual blocks realize the layer-by-layer transfer and reuse of features, avoiding the gradient vanishing of deep networks. Skip connections fuse the core discriminative features and deep semantic features of small-sized targets, preventing the shallow features of small-sized targets from being covered by deep features. Channel attention branches enhance the effective channel features corresponding to small-sized targets, and spatial attention branches accurately locate their spatial regions. After element-by-element fusion, the features of small-sized targets are specifically enhanced. Finally, multi-scale features are fused, allowing the enhanced features of small-sized targets and the features of large-sized targets to participate in detection together, improving the completeness of their feature representation.
[0026] In one embodiment of this application, sending the millimeter-wave image into a filtering module for region feature enhancement and channel adjustment includes: S201, Perform frequency domain feature decomposition on the millimeter-wave image to retain the high-frequency components that characterize the target edge; S202, Spatial domain reconstruction is performed on the signal after frequency domain feature decomposition to obtain a high-frequency feature enhanced image; S203, the original preserved channel of the millimeter-wave image is concatenated with the high-frequency feature-enhanced image to obtain the feature-enhanced image.
[0027] It should be noted that spatial domain reconstruction refers to performing an inverse Fourier transform on the filtered frequency domain signal to reconstruct an image with enhanced high-frequency features.
[0028] For example, for a millimeter-wave image containing a background of clothing folds, after frequency domain feature decomposition, the low-frequency noise corresponding to the clothing folds is separated, and the high-frequency components corresponding to the specific size of the item are preserved. After spatial reconstruction, a high-frequency feature-enhanced image is obtained, which clearly presents the edge contour of the specific size of the item. After being cascaded with the original preserved channel, the network can quickly focus on the area where the specific size of the item is located, avoiding interference from clothing folds.
[0029] Because the electromagnetic scattering characteristics of objects of a certain size manifest as a concentrated distribution of high-frequency signals in the frequency domain, corresponding to the phase abrupt changes and high-intensity gradient changes at the target edge in the spatial domain, frequency domain feature decomposition can accurately separate the high-frequency components carrying key information such as target contours and texture edges from the low-frequency components containing background noise. Spatial domain reconstruction restores the high-frequency components into a visualized feature image, highlighting the target edge features. Channel cascading integrates the basic features of the original channels with the enhanced features of the high-frequency channels, making the newly added high-frequency channels equivalent to a physical prior-guided attention mechanism, guiding the network to prioritize the potential area of contraband items. Therefore, it can effectively enhance target features, suppress background interference, and reduce the learning difficulty of subsequent networks.
[0030] In one embodiment of this application, performing frequency domain feature decomposition on the millimeter-wave image and retaining the high-frequency components characterizing the target edge includes: S301, extract a single channel image from the millimeter-wave image, convert the single channel image to the frequency domain space, and center the spectrum of the frequency domain space; S302, Set the cutoff frequency and calculate the distance from each frequency domain coordinate in the frequency domain space to the center point of the spectrum; S303 uses the Hanning window function to perform high-pass filtering on the centered spectrum, suppressing low-frequency background noise and retaining high-frequency components.
[0031] For example, the original millimeter-wave image is a three-channel PNG file. One channel is extracted and transformed into the frequency domain using a two-dimensional fast Fourier transform. Then, frequency centering is applied to shift the low-frequency components to the center of the spectrum. High-pass filtering is implemented using the Hanning window function, whose expression is:
[0032] in, For frequency domain coordinates, Represents the cutoff frequency, used to control the range of high-frequency components retained, for each point in the frequency domain. Calculate its Euclidean distance to the center point of the spectrum (M / 2, N / 2):
[0033] Window function In the low frequency region The transition is smooth to 0, while the high-frequency region remains at 1, forming a high-pass characteristic. The transfer function is then multiplied point by point with the centered Fourier spectrum to suppress low-frequency background noise while retaining the high-frequency components that characterize the edge of the target.
[0034] Since at least one channel in a millimeter-wave image can effectively reflect the electromagnetic scattering characteristics of the target, extracting a single channel image can simplify the calculation process while ensuring the effectiveness of the features. Frequency domain transformation clearly separates high and low frequency features that are difficult to distinguish in the spatial domain in the frequency domain. Spectrum centering makes the distribution of high and low frequency components more regular, which is convenient for subsequent determination of frequency domain attributes based on distance. The cutoff frequency provides a clear standard for high and low frequency division, and distance calculation can accurately locate the signal type corresponding to each frequency domain coordinate. The smooth transition characteristics of the Hanning window function avoid spectral distortion caused by directly truncating low-frequency signals and ensure the integrity of high-frequency features. Therefore, it can achieve accurate separation of high and low frequency components and effectively preserve the high-frequency features of the target.
[0035] In one embodiment of this application, the high-pass filtering of the centered spectrum using the Hanning window function includes: S401, when the distance from the frequency domain coordinate to the center point of the spectrum is less than the cutoff frequency, the corresponding spectral component is smoothly transitioned to 0 by the Hanning window function; S402, when the distance is greater than or equal to the cutoff frequency, the corresponding spectral component is retained as 1 to achieve high-pass filtering.
[0036] For example, if a millimeter-wave image has a lot of background noise, after setting an appropriate cutoff frequency, the frequency domain components with a distance less than the cutoff frequency will gradually decay to 0 through the Hanning window function, and there will be no signal distortion caused by sudden truncation. The frequency domain components with a distance greater than or equal to the cutoff frequency will be completely preserved, ensuring that the target outline can be clearly presented after subsequent spatial reconstruction.
[0037] Since the frequency domain components with a distance less than the cutoff frequency correspond to low-frequency signals in the image and mainly contain background noise, the Hanning window function smoothly transitions the noise components to 0, which can avoid spectral distortion caused by direct truncation and effectively suppress background noise. The frequency domain components with a distance greater than or equal to the cutoff frequency correspond to high-frequency signals in the image and carry key features such as the edges and contours of contraband items. Keeping them as 1 can maximize the preservation of the original intensity of high-frequency features and ensure the integrity of target features. Therefore, it can achieve the accuracy and smoothness of high-pass filtering, taking into account both noise suppression and feature preservation.
[0038] In one embodiment of this application, the introduction of a parallel channel separation attention module between the backbone network and the feature pyramid network to perform decoupled feature enhancement of the feature map in terms of spatial and channel dimensions includes: S501, Perform channel attention processing on the feature map to obtain features with channel attention; S502, Perform spatial attention processing on the feature map to obtain features with spatial attention; S503, the features with channel attention and the features with spatial attention are multiplied element-wise to obtain the optimized fused feature map.
[0039] It should be noted that, as Figure 3 As shown, the internal workflow of the parallel channel separation attention module is as follows: the input feature map is a multi-dimensional feature map output by the backbone network feature extraction module. This application simultaneously performs average pooling and max pooling on the input feature map. Average pooling extracts the global distribution features of the spatial location, while max pooling extracts the strongest response features of the spatial location, such as the potential area of contraband. The two matrices obtained from the double pooling are merged along the channel dimension. A convolution operation is then performed on the concatenated feature map, and the output channels are adjusted to match the original features. Figure 1 Simultaneously, spatial dimension correlation features are extracted and integrated with two types of spatial information. The convolution result is mapped to the 0-1 interval to generate a spatial attention map. Each position of the dark matrix in the map corresponds to a weight value, representing the probability that the spatial position contains an item of a specific size. Finally, the channel attention map and the spatial attention map are multiplied element-wise to achieve the fusion of channel information and spatial information, and finally the output feature map is obtained. The parallel channel separation attention module described in this application adopts a dual-path parallel architecture to achieve decoupled feature enhancement, dividing the input feature map into two independent branches for channel attention processing and spatial attention processing, respectively.
[0040] For example, the core innovation of the parallel channel separation attention mechanism proposed in this application lies in the collaborative design of the spatial-channel dual-domain parallel computing framework and the channel grouping dynamic reorganization mechanism. As a plug-and-play attention module, this module is placed between the top-down and bottom-up pyramid networks. The detailed computation steps are as follows: Given a feature map... This attention module receives the input information. Then, it performs two operations. First, for the upper half-process, a channel attention mechanism is used. The channel attention module first generates a feature vector in the channel dimension, which serves as the feature weight for each channel. Each value of the feature vector is correlated with the feature map. The corresponding two-dimensional slices of the channel are multiplied element-wise, and a feature weight is applied to each channel to obtain features with channel attention. Then comes the lower half-information branch, which employs a spatial attention mechanism. Based on the original input feature map, spatial attention generates a spatial attention map for each channel, resulting in features with spatial attention. Then, element-wise multiplication is performed with the spatial attention map to obtain a refined attention map. The overall process can be described by the following formula:
[0041] in, This represents the element-wise multiplication operation; This indicates the input feature map Perform channel attention operations and output a feature map with channel weights; This indicates the input feature map Perform spatial attention operations and output an attention feature map with spatial weights.
[0042] First, the feature map is compressed in spatial dimension by average pooling to obtain a one-dimensional vector, and then the weight vector is obtained by passing it through the sigmoid activation function. , where is the feature weight for each channel. Feature vector Each value and feature map The corresponding two-dimensional slices of the channel are multiplied element-wise, and a feature weight is applied to each channel to represent the relevance of that channel to the key information. This results in features with channel attention. The entire process can be described by the following formula:
[0043]
[0044] in, This represents the activation function. This represents the convolution operation. Indicates average pooling. This indicates an element-wise multiplication operation.
[0045] The lower half of the information branch focuses on which part of the information is meaningful. To make the generated spatial attention feature maps more consistent and independent in spatial distribution, a parallel processing architecture is adopted. Spatial attention is calculated directly from the original input feature maps, rather than generated from the channel attention maps, avoiding the influence of channel attention calculation on spatial attention. This parallel computing architecture also helps to improve the computation speed. At the same time, a spatial attention map is generated for each channel separately, instead of all channels sharing a single spatial attention map, so that the information within each channel can be more refined. When calculating attention, firstly, max pooling and average pooling are performed on each channel to obtain two matrices, which are then concatenated to obtain the feature map. Then, a convolution operation is performed to adjust the output channels to be the same as the input channels of the original feature map, followed by a sigmoid activation function to obtain the spatial attention map. This spatial attention map includes each channel matrix and channel attention map. The corresponding channel matrices are multiplied element-wise, and then concatenated to obtain the integrated channel and spatial attention output of the entire module. The calculation process of spatial attention can be described by the following formula:
[0046]
[0047] in, This indicates a feature map concatenation operation. This indicates max pooling. Indicates average pooling. This represents the activation function. This indicates a convolution operation.
[0048] Finally, the output of the entire parallel channel separation attention module can be defined by the following formula:
[0049] in, This indicates an element-wise multiplication operation.
[0050] Output feature map The spatial weight information of the fused feature map passed from the top-down feature pyramid branch is optimized, thereby enhancing the shallow texture information and deep semantic features of objects of specific sizes, improving the robustness of the detection model, and enabling the model to still have good detection performance in complex millimeter-wave images.
[0051] By assigning weights to highlight channel features relevant to items of a specific size and suppressing interference from redundant channels, spatial attention processing focuses on effective information. Weight assignment also highlights the spatial region where prohibited items are located, suppressing background interference. A parallel architecture is adopted to allow the two attention processes to run independently, avoiding the impact of channel attention calculation on spatial attention and improving computational efficiency. Element-wise multiplication achieves the matching of effective channel information with effective spatial information, further strengthening the feature representation of items of a specific size and weakening background interference. Therefore, it can significantly improve the targeting and effectiveness of features and optimize feature representation capabilities.
[0052] In one embodiment of this application, performing channel attention processing on the feature map to obtain features with channel attention includes: S601, the feature map is compressed in the spatial dimension, and average pooling is used to obtain a one-dimensional vector; S602, After performing a convolution operation on the one-dimensional vector, the channel weight vector is obtained by processing it through an activation function; S603, the channel weight vector is multiplied element-wise with the corresponding channel of the feature map to obtain a feature with channel attention.
[0053] It should be noted that spatial dimension compression refers to aggregating the spatial information of the feature map into global information at the channel level, eliminating the interference of local spatial information on channel weight calculation; average pooling refers to averaging the spatial dimensions of each channel of the feature map to extract the global statistical features of each channel; a one-dimensional vector refers to the vector obtained after average pooling that reflects the global features of each channel; convolution operation refers to the operation of feature transformation and dimension adjustment on the one-dimensional vector, so that the vector can adapt to the needs of weight calculation; activation function refers to the function that maps the result of convolution to the 0-1 interval, forming a channel weight vector that can be directly used for weighting; the channel weight vector refers to the feature corresponding to each element. Figure 1 A vector of channels, where each element's value represents the importance of a channel.
[0054] For example, if a channel in the feature map carries the key semantic features of an item of a specific size, the global statistical features of the channel are more prominent after average pooling. After convolution and activation processing, the weight value corresponding to the channel is assigned a higher value. After element-wise multiplication with the corresponding channel in the feature map, the features of the channel are significantly enhanced, while the weight value of the channel containing only background information is lower and the features are suppressed, thus highlighting the role of the effective channel.
[0055] In one embodiment of this application, performing spatial attention processing on the feature map to obtain features with spatial attention includes: S701, perform max pooling and average pooling on each channel of the feature map to obtain two matrices; S702, the two matrices are concatenated to obtain a concatenated feature map; a convolution operation is performed on the concatenated feature map to adjust the output channel to be consistent with the input channel of the original feature map; S703, through activation function processing, yields features with spatial attention.
[0056] For a feature map containing an object of a specific size, max pooling is performed on each channel individually to extract strong response features of the location of the object of that specific size. Average pooling extracts the global spatial distribution features of the channel. After concatenation and activation processing, the spatial location of the object of that specific size is given a higher weight and the background region is given a lower weight. The resulting spatial attention map can guide subsequent feature fusion and focus on the target region.
[0057] In one embodiment of this application, the step of feeding the feature-enhanced image into the backbone network and performing feature extraction through dense residual blocks and skip connections includes: S801, use the dense residual blocks to perform layer-by-layer feature extraction on the feature-enhanced image; S802, by fusing features from different levels through the skip connections, the feature diversity is improved, and the feature map is obtained.
[0058] It should be noted that dense residual blocks refer to a network structure composed of multiple densely connected residual units, where the output of each residual unit is connected to the input of all subsequent residual units, thus achieving full reuse and transfer of features; skip connections refer to connection methods that span multiple network layers, enabling the direct transfer of features from shallow networks to deep networks, achieving the fusion of features from different levels; feature diversity refers to the richness of feature types contained in the feature map, including shallow texture features, mid-level structural features, and deep semantic features.
[0059] For example, when detecting items of a specific size hidden inside clothing, dense residual blocks extract the shallow texture features of the items of that specific size, while deep networks extract their semantic features. Skip connections fuse these two types of features, so that the feature map contains both the texture and semantic information of the contraband, making it easier for the subsequent attention module to accurately identify and enhance the target features.
[0060] Because deep networks are prone to the vanishing gradient problem during training, dense residual blocks can effectively alleviate this problem through residual connections, ensuring the layer-by-layer propagation and enhancement of features. At the same time, dense connections enable full reuse of features and improve feature extraction efficiency. Skip connections can break the layer limitation and directly fuse low-level features such as target edges and textures extracted by shallow networks with high-level features such as target categories and semantics extracted by deep networks. This avoids deep features covering shallow features, thereby improving feature diversity and ensuring that the network can capture both shallow texture features of small targets and deep semantic features of large targets. Therefore, it can comprehensively improve the effect of feature extraction.
[0061] In one embodiment that can be implemented in this application, utilizing the aggregated feature information by detecting the output head includes: S901, the classification branch of the detection output head uses the aggregated feature information to predict the category of an item of a specific size; S902, the regression branch of the detection output head uses the aggregated feature information to locate the bounding box and estimate the detection confidence, and combines the category prediction results to obtain the detection result.
[0062] For example, if the aggregated feature information includes the texture, semantic and spatial features of a small knife, the classification branch can accurately determine that the target is a knife of a specific size, the regression branch can predict the bounding box position of the knife in the image, and output a high detection confidence score; the final detection result clearly shows the knife category, the corresponding bounding box and confidence score, and security personnel can quickly take action based on this.
[0063] Because aggregated feature information integrates multi-scale and multi-level target features, it has rich representation capabilities. The classification branch can distinguish different categories of specific-sized items based on features, solving the classification problem caused by the large variety of specific-sized items. The regression branch can locate the position of prohibited items based on aggregated feature information, and at the same time evaluate the reliability of the detection results through confidence estimation, avoiding false detections or false negatives, and improving the accuracy and practicality of the detection results.
[0064] A second aspect of this application proposes an item detection method based on feature enhancement and parallel channel attention, the system comprising: Image acquisition module 1001 is used to acquire the millimeter-wave image to be detected; The filter feature enhancement module 1002 is used to receive the millimeter-wave image, perform regional feature enhancement and channel adjustment, and obtain a feature-enhanced image. The backbone network feature extraction module 1003 is used to receive the feature-enhanced image, extract features through dense residual blocks and skip connections, and obtain a feature map. The parallel channel separation attention module 1004 is located between the backbone network feature extraction module and the feature pyramid aggregation module. It is used to perform decoupled feature enhancement of the feature map in terms of spatial and channel dimensions to obtain an optimized fused feature map. The feature pyramid aggregation module 1005 is used to receive the optimized fused feature map, perform feature aggregation, and obtain aggregated feature information. The detection output module 1006 is used to classify and locate bounding boxes of items of a specific size using the aggregated feature information to obtain detection results.
[0065] It is understood that the technical effect of the item detection system based on feature enhancement and parallel channel attention provided in this disclosure is the same as the technical effect of the method embodiment in the foregoing embodiments, and this disclosure will not elaborate on this.
[0066] Specific embodiments have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. An item detection method based on feature enhancement and parallel channel attention, characterized in that, The method includes: Acquire the millimeter-wave image to be detected; The millimeter-wave image is fed into a filtering module for regional feature enhancement and channel adjustment to obtain a feature-enhanced image. The enhanced image is fed into the backbone network, where feature extraction is performed through dense residual blocks and skip connections to obtain a feature map. A parallel channel separation attention module is introduced between the backbone network and the feature pyramid network to perform decoupled feature enhancement of the feature map in terms of spatial and channel dimensions, resulting in an optimized fused feature map. The optimized fused feature map is fed into a feature pyramid network for feature aggregation to obtain aggregated feature information. By utilizing the aggregated feature information through the detection output head, items of a specific size are classified and their bounding boxes are located to obtain detection results.
2. The item detection method based on feature enhancement and parallel channel attention according to claim 1, characterized in that, The step of sending the millimeter-wave image into the filtering module for region feature enhancement and channel adjustment includes: The millimeter-wave image is subjected to frequency domain feature decomposition to retain the high-frequency components that characterize the target edge; The signal after frequency domain feature decomposition is reconstructed in the spatial domain to obtain a high-frequency feature enhanced image; The original preserved channel of the millimeter-wave image is concatenated with the high-frequency feature-enhanced image to obtain the feature-enhanced image.
3. The item detection method based on feature enhancement and parallel channel attention according to claim 2, characterized in that, The step of performing frequency domain feature decomposition on the millimeter-wave image to retain high-frequency components representing target edges includes: Extract a single channel image from the millimeter-wave image, convert the single channel image to the frequency domain, and center the spectrum of the frequency domain. Set a cutoff frequency and calculate the distance from each frequency domain coordinate in the frequency domain space to the center point of the spectrum; The centered spectrum is high-pass filtered using the Hanning window function to suppress low-frequency background noise and retain high-frequency components.
4. The item detection method based on feature enhancement and parallel channel attention according to claim 3, characterized in that, The high-pass filtering of the centered spectrum using the Hanning window function includes: When the distance from the frequency domain coordinate to the center point of the spectrum is less than the cutoff frequency, the corresponding spectral component is smoothly transitioned to 0 by the Hanning window function. When the distance is greater than or equal to the cutoff frequency, the corresponding spectral component is retained as 1 to achieve high-pass filtering.
5. The object detection method based on feature enhancement and parallel channel attention according to claim 1, characterized in that, The step of introducing a parallel channel separation attention module between the backbone network and the feature pyramid network to perform decoupled feature enhancement of the feature map in terms of spatial and channel dimensions includes: The feature map is subjected to channel attention processing to obtain features with channel attention. Spatial attention processing is performed on the feature map to obtain features with spatial attention. The features with channel attention and the features with spatial attention are multiplied element-wise to obtain the optimized fused feature map.
6. The item detection method based on feature enhancement and parallel channel attention according to claim 5, characterized in that, The process of performing channel attention processing on the feature map to obtain features with channel attention includes: The feature map is compressed in the spatial dimension, and average pooling is used to obtain a one-dimensional vector; After performing a convolution operation on the one-dimensional vector, the channel weight vector is obtained by processing it through an activation function; The channel weight vector is multiplied element-wise with the corresponding channel of the feature map to obtain the feature with channel attention.
7. The item detection method based on feature enhancement and parallel channel attention according to claim 5, characterized in that, The spatial attention processing of the feature map to obtain features with spatial attention includes: Max pooling and average pooling are performed on each channel of the feature map to obtain two matrices; The two matrices are concatenated to obtain a concatenated feature map; a convolution operation is performed on the concatenated feature map, and the output channel is adjusted to be consistent with the input channel of the original feature map. By processing with activation functions, features with spatial attention are obtained.
8. The item detection method based on feature enhancement and parallel channel attention according to claim 1, characterized in that, The step of feeding the enhanced image into the backbone network and extracting features through dense residual blocks and skip connections includes: The dense residual blocks are used to extract features layer by layer from the enhanced image. By fusing features from different levels through the skip connections, feature diversity is enhanced, resulting in the feature map.
9. The object detection method based on feature enhancement and parallel channel attention according to claim 1, characterized in that, The process of utilizing the aggregated feature information through the detection output head includes: The classification branch of the detection output head uses the aggregated feature information to predict the category of an item of a specific size; The regression branch of the detection output head uses the aggregated feature information to locate the bounding box and estimate the detection confidence, and combines the category prediction results to obtain the detection result.
10. An object detection system based on feature enhancement and parallel channel attention, characterized in that, include: Image acquisition module, used to acquire millimeter-wave images to be detected; The filter feature enhancement module is used to receive the millimeter-wave image, perform regional feature enhancement and channel adjustment, and obtain a feature-enhanced image. The backbone network feature extraction module is used to receive the feature-enhanced image, extract features through dense residual blocks and skip connections, and obtain a feature map. A parallel channel separation attention module is set between the backbone network feature extraction module and the feature pyramid aggregation module. It is used to perform decoupled feature enhancement of the feature map in terms of spatial and channel dimensions to obtain an optimized fused feature map. The feature pyramid aggregation module is used to receive the optimized fused feature map, perform feature aggregation, and obtain aggregated feature information. The detection output module is used to classify and locate bounding boxes of items of a specific size using the aggregated feature information, and obtain detection results.