Lightweight X-ray security check image contraband detection method
Through CSC modules and enhanced StarNet backbone network, the Light-YOLO framework solves the real-time detection efficiency and accuracy of X-ray security inspection systems in resource-constrained environments, and realizes efficient contraband detection, which is suitable for a variety of hardware platforms.
Patent Information
- Application Number
- CN202511094189.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-09-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to realize real-time and efficient contraband detection in resource-constrained environments in X-ray security inspection systems, especially due to the excessive computational overhead and insufficient feature extraction capabilities of the calculation-intensive detection model.
Using the Light-YOLO framework, the channel separation convolution module (CSC) and enhanced StarNet backbone network are combined with lightweight shared CSC convolution detection heads to achieve efficient feature learning and redundancy elimination, enhance feature discrimination capabilities, and optimize the calculation load through cross-scale parameter sharing.
While reducing the amount of model parameters and calculations, it maintains high competitiveness detection accuracy, is suitable for real-time contraband detection in resource-constrained environments, and provides flexible hardware deployment options.
Smart Images

Figure CN120580652A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer vision and deep learning, and relates to a lightweight contraband detection method for X-ray security inspection images, aiming to solve the problem of balancing the efficiency and accuracy of target detection in a resource-constrained environment. Background Art
[0002] X-ray security systems play a critical role in modern public safety infrastructure, primarily detecting concealed contraband through X-ray imaging. Despite continuous technological advancements, effective contraband detection faces three major challenges: first, significant variations in object orientation due to random placement of items; second, the multi-scale appearance of objects, ranging from compact folding knives to elongated scissors; and finally, frequent occlusions caused by overlapping items in luggage. These challenges are compounded by the inherent hardware limitations of security screening platforms, which struggle to support computationally intensive detection models while maintaining real-time processing requirements.
[0003] Traditional detection methods, such as Viola-Jones and Histogram of Oriented Gradients (HOG), rely on hand-crafted features and sliding window mechanisms. While these methods achieve reasonable accuracy in controlled environments, their computational inefficiency and limited robustness to appearance variations make them unsuitable for modern security screening scenarios. The advent of deep learning has brought significant improvements through two-stage detectors such as Region-based Convolutional Neural Network (R-CNN) and Faster Region-based Convolutional Neural Network (Faster R-CNN), which employ region proposal networks followed by classification and regression. However, their complex architecture and sequential processing pipelines result in significant computational overhead, making them unsuitable for real-time applications.
[0004] Single-stage detectors, particularly the YOLO (You Only Look Once) family, have revolutionized real-time object detection by directly regressing bounding boxes and class probabilities. While YOLOv8 has demonstrated strong general-purpose object detection capabilities, its architectural design has inherent limitations for practical security screening applications. Specifically, the YOLOv8n / s base model, designed for lightweight deployment, often suffers from insufficient feature extraction capabilities, resulting in inaccurate bounding box regression for complex X-ray images. Conversely, deeper YOLOv8m / l / x variants, while offering improved accuracy, impose prohibitive computational requirements that significantly exceed the capabilities of typical hardware found in resource-constrained security checkpoints. Previous efforts combining Transformer architectures with CNN backbones have met with limited success, often failing to achieve the balance between accuracy and inference speed required for real-time security systems. Therefore, there is an urgent need for a lightweight object detection framework that balances detection efficiency and accuracy and is suitable for resource-constrained environments. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of the above-mentioned existing technologies and provide a lightweight method for detecting contraband in X-ray security images. This invention proposes a novel lightweight object detection framework, Light-YOLO, which achieves an optimal balance between performance and efficiency through three core innovations, making it particularly suitable for detecting contraband in X-ray security images: Channel Separation Convolution (CSC) module: This module is designed to efficiently learn features and eliminate feature redundancy. It uses a two-stream architecture for efficient feature processing and introduces cross-reconstruction operations to achieve intelligent feature fusion.
[0006] Lightweight Shared CSC Convolutional Detection (LSCCD) head: This detection head effectively eliminates cross-scale redundancy through cross-scale parameter sharing and CSC module integration.
[0007] Enhanced StarNet backbone network: By integrating the lightweight StarNet architecture and supplementing it with the SE (Squeeze-and-Excitation) module, a cohesive backbone network is constructed that balances feature discrimination capabilities and computational load.
[0008] The method of the present invention first performs preprocessing operations on the input X-ray image, including image size standardization and pixel value normalization, and then sequentially goes through the feature extraction stage, feature fusion stage and target detection and prediction stage to perform the final contraband classification and bounding box regression.
[0009] (1) Feature extraction stage: The enhanced StarNet backbone network is used to extract initial multi-scale features from the preprocessed X-ray image. This includes the following steps: (1.1) The preprocessed X-ray image first passes through a 1×1 initial convolution layer for initial convolution processing.
[0010] (1.2) The output of the initial convolutional layer is divided into two different feature streams Z1 and Z2, forming a dual-path processing strategy.
[0011] (1.3) Parallel convolution: One feature stream Z1 is processed by a 3×3 group convolution (Group Conv) to extract basic high-level features efficiently and robustly; the other feature stream Z2 is processed by a 3×3 depthwise convolution (DW Conv) to generate complementary lightweight features.
[0012] (1.4) Feature concatenation and fusion: Concatenate the outputs of the two parallel convolution branches, and then apply a 1×1 final convolution layer to fuse these combined features and adjust the channel dimension to the desired output.
[0013] (1.5) A SE (Squeeze-and-Excitation) module is integrated after the final convolutional layer to adaptively recalibrate the feature response in the channel direction and enhance the discriminative ability of features by explicitly modeling the interdependence between channels.
[0014] (1.6) Residual connection: Each StarBlock in the enhanced StarNet backbone network contains a residual connection. If the input feature map is aligned with the dimension of the feature map output by the SE module, the input feature map is directly added to the output of the SE module, further stabilizing training and improving feature propagation.
[0015] (1.7) After the above steps, the enhanced StarNet backbone network outputs an initial multi-scale feature map containing information of different resolutions and semantic levels.
[0016] (2) Feature fusion stage: Construct a channel separation convolution (CSC) neck network, input the initial multi-scale feature map, and efficiently fuse these features to reduce feature redundancy and enhance multi-scale representation. Output multi-scale feature maps (P1, P2, P3) to the detection head, where P1, P2, and P3 are three scale feature maps at different feature pyramid levels.
[0017] The channel-separated convolutional neck network is an improvement on the classic neck network. It retains the overall feature pyramid structure of the classic neck network, such as the structure of the Path Aggregation Network (PAN) or Feature Pyramid Network (FPN). It replaces the standard C2f module in the classic neck network with a channel-separated convolutional (CSC) module. The replacement method is to directly replace the standard Bottleneck component in the standard C2f module with a CSC block. The CSC block is specifically implemented as follows: (a) Input feature channel separation: The input feature map is channel-separated to form two original streams, upper and lower, which are compressed into upper and lower low-dimensional features X1 and X2 respectively through point convolution to improve computational efficiency; (b) Upstream processing: basic feature extraction is performed on the upstream low-dimensional feature X1, and after optimizing the combination of group convolution and point convolution, it is aggregated to form the upstream feature map Y1; (c) Downstream processing: Use lightweight point convolution on the downstream low-dimensional features X2 to generate complementary low-cost features, which are then concatenated with the compressed features of the original downstream to form the downstream feature map Y2; (d) Cross-reconstruction operation: In order to fully combine information from different processing streams and enhance the information flow, a cross-reconstruction operation is included to split both the upstream feature map Y1 and the downstream feature map Y2 into subcomponents, then perform cross-element-wise summation, and finally concatenate these combined features to generate a rich, aggregated channel-separated convolution module output.
[0018] (3) Target detection and prediction stage: Input the multi-scale feature map (P1, P2, P3), and perform the final contraband classification and bounding box regression based on the multi-scale feature map. The specific method is as follows: (3.1) Level-by-level channel alignment: The three scale feature maps P1, P2, and P3 at different feature pyramid levels are first individually aligned level-by-level through a set of 1×1 convolutional layers to adapt to the input channels.
[0019] (3.2) Cross-Scale Parameter Shared Feature Extraction: The aligned feature maps at each level are fed into a shared feature extraction block for processing. This shared feature extraction block is uniformly applied to all scales and integrates a channel-separated convolutional module for efficient feature processing. It also enhances multi-scale feature representation through a two-stream architecture and cross-reconstruction operations. This effectively integrates the inherent parameter and GFLOPs (floating-point operation) reduction capabilities of the channel-separated convolutional module and leverages its enhanced feature representation to improve the head's ability to discriminate contraband at different resolutions.
[0020] (3.3) Bounding Box Regression with Shared Parameters at All Scales: The features output from the shared feature extraction block are passed through a set of shared 1×1 convolutional layers and learnable scale parameters to perform bounding box regression prediction. All scales share the same set of weights.
[0021] (3.4) Class Prediction with Shared Parameters at Each Scale: The features output from the shared feature extraction block are passed through another set of shared 1×1 convolutional layers to predict the contraband category. All scales also share the same set of weights.
[0022] (3.5) Concatenation and Output of Prediction Results Within Each Scale: The bounding box regression results and category prediction results within each scale are concatenated channel by channel. This collaborative design significantly reduces computational overhead and the number of parameters, while effectively refining feature discrimination capabilities and achieving accurate contraband detection.
[0023] (3.6) Output the final contraband bounding box coordinates and category probability.
[0024] The present invention achieves a significant improvement in lightweight object detection, and specifically has the following beneficial effects: Excellent efficiency-accuracy balance: By introducing the CSC module and the enhanced StarNet backbone network, Light-YOLO significantly reduces the number of model parameters and computational overhead (GFLOPs) while maintaining highly competitive detection accuracy for contraband detection in X-ray security images. This enables the model to achieve real-time, high-performance detection even in resource-constrained deployment environments.
[0025] Efficient Feature Learning and Redundancy Elimination: The CSC module's dual-stream architecture and cross-reconstruction operations enable efficient feature processing and fusion, reducing redundancy and enhancing multi-scale representation capabilities. Cross-scale parameter sharing and CSC module integration effectively address the common parameter and computational redundancy issues in the detection head. In a YOLOv8m-scale model, this combined effect reduces GFLOPs by 24% while improving mAP50 by 1%.
[0026] Hardware-Optimized Backbone: The enhanced StarNet backbone network integrates SE modules to balance feature discrimination and computational overhead, optimizing hardware alignment performance. For example, for a YOLOv8m-scale model, the enhanced StarNet backbone network reduced GFLOPs by 22% while maintaining mAP50. This collaborative backbone-neck network-detection head design is key to Light-YOLO's outstanding performance.
[0027] Flexible multi-scale deployment options: Light-YOLO is designed with multiple scalable variants (n, s, m, l), which provide flexible deployment options on multiple hardware platforms (including high-performance GPUs and resource-constrained CPUs) according to different computing budgets and accuracy requirements, demonstrating strong generalization capabilities and practical application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 Schematic diagram of the overall architecture of the Light-YOLO framework of the present invention; Figure 2 Schematic diagram of the enhanced StarNet backbone network of the present invention; Figure 3 Schematic diagram of the channel separation convolution module of the present invention; Figure 4 is a schematic diagram of a CSC block of the present invention; Figure 5 Schematic diagram of the target detection and prediction stage of the present invention. DETAILED DESCRIPTION
[0029] The present invention is described in detail below in conjunction with specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other.
[0030] like Figure 1 As shown in the figure, a lightweight contraband detection method for X-ray security inspection images is proposed. Its overall architecture includes a feature extraction stage (Backbone), a feature fusion stage (Neck), and a target detection and prediction stage (Head).
[0031] Before feature extraction, input X-ray images undergo necessary preprocessing, including image size normalization and pixel value normalization, to ensure that the data meets the model input requirements. For example, the 1225×954 pixel images in the OPIXray dataset are typically scaled to a fixed size, such as 640×640 pixels, while maintaining the aspect ratio and padding any missing pixels. Pixel values are typically normalized to the range [0, 1] or [-1, 1] to facilitate stable training and inference of neural networks. Furthermore, during training, standard data augmentation strategies such as random horizontal flipping, HSV color space perturbation, and mosaic augmentation can be applied to improve the model's generalization capabilities.
[0032] Feature extraction stage: through the enhanced StarNet backbone network, such as Figure 2 As shown in Figure 1, the initial multi-scale features are extracted from the preprocessed input X-ray image. Specifically, the following steps are included: (1.1) Initial convolution processing: The pre-processed X-ray image (e.g., H×W×C after resizing and normalization) in Feature map, where H and W are height and width, C in The network first passes through an initial convolutional layer (where is the number of channels). This convolutional layer is typically used to adjust the number of channels, converting the input feature map to the number required by the subsequent StarNet module and serving as the starting point for feature extraction. The convolution kernel size is 1×1, with a stride of 1 and zero padding. The number of output channels can be determined by the model configuration (such as Light-YOLOn, Light-YOLOs, and other variants).
[0033] (1.2) Feature Stream Separation: The output of the initial 1×1 convolutional layer is then strategically split into two distinct feature streams, Z1 and Z2, forming a dual-path processing strategy. This is typically accomplished by splitting the feature map into two parts along the channel dimension. For example, if the output of the previous step has 2c´ channels, then Z1 and Z2 can each have c´ channels. This separation aims to provide different feature emphases for subsequent parallel processing.
[0034] (1.3) Parallel convolution: One feature stream Z1 is processed by a 3×3 group convolution (Group Conv). Group convolution reduces the amount of computation by dividing the input and output channels into several groups for independent convolution operations, while being able to efficiently and robustly extract basic high-level features. For example, the number of groups can be set to half the number of channels to further improve efficiency. At the same time, another feature stream Z2 is processed by a 3×3 depthwise separable convolution (DW Conv). Depthwise separable convolution decomposes the standard convolution into depthwise convolution and pointwise convolution. Its computational complexity is much smaller than that of standard convolution. It is a highly lightweight operation used to generate complementary lightweight features with extremely low computational overhead. The stride of the two convolutions is usually 1, and the padding is 1 to keep the spatial size unchanged.
[0035] (1.4) Feature concatenation and fusion: The outputs from the two parallel convolution branches (i.e., the output of Z1 after group convolution and the output of Z2 after depthwise separable convolution) are then concatenated along the channel dimension. After concatenation, a final 1×1 convolution layer is applied to fuse these combined features and adjust the channel dimension to the desired number of output channels C. out This 1×1 convolution plays the role of feature fusion and channel integration.
[0036] (1.5) A Squeeze-and-Excitation (SE) module is integrated after the final 1×1 convolutional layer. The SE module is a lightweight channel attention mechanism. Its implementation steps include: 1) Squeeze operation: Global average pooling is performed on each channel of the input feature map to compress the spatial information of each channel into a single channel descriptor; 2) Excitation operation: These channel descriptors are input into a small fully connected neural network, which contains two fully connected layers and a ReLU activation function (first layer) and a Sigmoid activation function (second layer). This network learns the importance weights of each channel; 3) Scale operation: The learned channel weights are multiplied back to the corresponding channels of the original feature map, thereby adaptively recalibrating the feature responses in the channel direction, and enhancing the discriminative ability of features by explicitly modeling the interdependence between channels.
[0037] (1.6) Residual Connections: Each StarBlock in the enhanced StarNet backbone network includes a residual connection. If the input feature map aligns with the dimensions of the feature map output by the SE module (particularly the number of channels and spatial size), the input feature map is directly added to the output of the SE module. This residual connection helps alleviate the vanishing gradient problem in deep networks, allowing direct information flow from the input, further stabilizing training and improving feature propagation, making the model easier to train and maintaining performance.
[0038] (1.7) After the above steps, the enhanced StarNet backbone network will output initial multi-scale feature maps containing different resolutions (e.g., low-level feature map P1, mid-level feature map P2, high-level feature map P3, corresponding to the feature pyramid output level of YOLOv8) and semantic level information, such as Figure 1 The connection between the backbone network and the neck network is shown in Figure 2. These feature maps are the basis for subsequent feature fusion and target detection.
[0039] Feature fusion stage: Construct a Channel Separation Convolution (CSC) neck network (Neck Network), input the initial multi-scale feature map, and efficiently fuse these features to reduce feature redundancy and enhance multi-scale representation. The output multi-scale feature map (P1, P2, P3) is sent to the detection head. P1, P2, and P3 are three scale feature maps at different feature pyramid levels. The Channel Separation Convolution Neck Network is an improvement on the classic neck network: (2.1) Figure 1 As shown in the figure, the overall feature pyramid structure of the classic neck network is retained, such as the structure of the Path Aggregation Network (PAN) or the Feature Pyramid Network (FPN), to effectively aggregate feature information of different scales. Specifically, it fuses the feature maps of different scales extracted by the backbone network through top-down and bottom-up paths, thereby providing the detection head with features with rich semantic information and precise positioning capabilities. For example, the P3 feature output by the backbone network will be fused with the P2 feature through upsampling, and the fused feature will be fused with the P1 feature. There is also a downsampling path for feature transfer to form multi-scale fused features.
[0040] (2.2) Figure 3As shown, the standard C2f module in the classic neck network is replaced with a channel-wise separable convolution (CSC) module. This replacement is one of the key innovations in the present invention, achieving lightweight and efficient feature fusion. This replacement method directly replaces the standard Bottleneck component in the standard C2f module with a CSC block, replacing the standard Bottleneck structure in the traditional C2f module and introducing a more efficient channel separation and reconstruction mechanism. The standard Bottleneck component originally used for feature extraction and channel reduction is directly replaced by the CSC block of the present invention. This means that each processing branch of the improved C2f module utilizes the lightweight and efficient feature processing capabilities of CSC.
[0041] like Figure 4 As shown in Figure 2, the CSC block is the core component of the CSC module. It is designed to efficiently learn features and eliminate feature redundancy. The CSC block is implemented as follows: (a) Input feature channel separation: For the input feature map entering the CSC module, it will first pass through a point convolution layer, and then its output channel will be strategically divided into two original streams: an upstream and a downstream. These two original streams are then compressed into upstream low-dimensional features X1 and downstream low-dimensional features X2. For example, if the input channel is C in , after point convolution, it becomes C out , then the number of channels of each of the two original streams can be 0.5×C out , thereby improving the computational efficiency of subsequent processing.
[0042] (b) Upstream processing: The upstream low-dimensional feature X1 focuses on basic feature extraction. It first undergoes a point convolution, then a combination of a 3×3 group convolution (Group Conv) and a point convolution (Point Conv). These operations are designed to extract high-level semantic information and ultimately aggregate to form a highly representative feature map, such as Figure 4 This branch is designed to reduce the amount of computation as much as possible while maintaining feature richness.
[0043] (c) Downstream processing: The downstream low-dimensional features X2 mainly use lightweight point-wise convolution (Point Conv) to generate complementary low-cost features. This point convolution maps the feature channels of X2 and then concatenates its output with the original X2 compressed features. This branch aims to capture redundant but informative patterns while maintaining minimal computational overhead, such as Figure 4 It is represented as Y2.
[0044] (d) Cross-reconstruction operation: In order to fully combine the information from different processing streams (i.e., Y1 generated by the upstream and Y2 generated by the downstream) and enhance the information flow between them, the CSC module contains a unique cross-reconstruction operation. Instead of simple concatenation or element-wise addition, this operation strategically splits both Y1 and Y2 into subcomponents (e.g., Y 11 、Y 12 and Y 21 、Y 22 ), and then perform a cross element-wise summation (e.g., Y 11 With Y 22 Sum, Y 12 With Y 21 Finally, these combined features are concatenated along the channel dimension to produce a rich, aggregated CSC module output. This sophisticated reconstruction mechanism enables the CSC module to generate more informative features and efficiently utilize the feature space, which is particularly helpful for improving the detection performance of complex multi-scale objects in X-ray images, such as straight knives.
[0045] To ensure consistent lightweight performance across different model scales, the number of iterations of the CSC module can be freely set based on the model variant (e.g., Light-YOLOn, Light-YOLOs, Light-YOLOm, Light-YOLOl), or typically kept fixed for an overall compact design. For example, in YOLOv8's C2f architecture, the number of repetitions of its Bottleneck module affects model depth and computational complexity. Similarly, the number of iterations of the CSC module can be configured to balance performance and efficiency across models of different scales.
[0046] After efficient fusion and redundancy reduction, the multi-scale feature map (usually P1, P2, P3 level features, such as Figure 1 The connection between the neck network and the detection head is shown in Figure 3), ready to be input into the object detection prediction stage. Compared to the features directly output by the backbone network, these feature maps incorporate more contextual information and reduce redundancy, making them more suitable for accurate object detection.
[0047] (3) Object detection and prediction stage: Input multi-scale feature maps (P1, P2, P3), undergo cross-scale parameter sharing feature extraction, and bounding box regression and category prediction of each scale shared parameter. After splicing, the final contraband bounding box coordinates and category probability are output. The specific method is as follows: (3.1) Channel alignment at each level: Figure 5As shown on the left, three scale feature maps P1, P2, and P3 from different feature pyramid levels of the neck network are first individually aligned through a set of 1×1 convolutional layers. This means that each scale feature map undergoes a separate 1×1 convolution to adjust its channel count to the same number of hidden layer channels. This step ensures that all features input to the shared block have the same channel dimension, which meets the requirements of subsequent shared modules.
[0048] (3.2) Cross-scale parameter sharing feature extraction: The aligned feature maps at each level are fed into a shared feature extraction block for processing. This shared feature extraction block contains a CSC block, a group normalization layer, and a SiLU activation function, and is uniformly applied to all scales. This means that regardless of the P1, P2, or P3 feature map, the same weight parameters are used for feature extraction. In this way, the dual-stream architecture of the CSC block and the efficient feature processing capabilities brought by the cross-reconstruction operation are effectively integrated, significantly reducing the number of parameters and computational effort (GFLOPs), while enhancing the head's ability to discern contraband at different resolutions.
[0049] (3.3) Bounding box regression with shared parameters at all scales: Figure 5 As shown on the right, the features output from the shared feature extraction block are then split into two paths. One path passes through a set of shared 1×1 convolutional layers (labeled "BBox 1×1 Convolution") and learnable scale parameters to perform bounding box regression prediction. The weights of these 1×1 convolutional layers and scale parameters are shared across all scales (P1, P2, P3). Bounding box regression typically predicts the center coordinates (x, y), width w, and height h of each detection box. The learnable scale parameter helps adjust the prediction sensitivity of features at different scales.
[0050] (3.4) Shared parameter category prediction at each scale: Figure 5 As shown on the right, the features output from the shared feature extraction block are passed through another set of shared 1×1 convolutional layers (labeled "Cls 1×1 convolutions") to predict the contraband category. The weights of these 1×1 convolutional layers are also shared across all scales (P1, P2, and P3). Category prediction typically outputs a confidence score for each pre-defined category, indicating the probability that the object belongs to a specific contraband item.
[0051] (3.5) Concatenation and output of prediction results at each scale: Figure 5 As shown on the right, the bounding box regression results and category prediction results at each scale are finally concatenated channel by channel. This collaborative design significantly reduces computational overhead and the number of parameters, while effectively refining feature discrimination capabilities and achieving accurate contraband detection.
[0052] (3.6) Finally, the bounding box coordinates and category probabilities of all detected contraband are output.
Claims
1. A lightweight contraband detection method for X-ray security inspection images. The input X-ray image is first preprocessed, including image size normalization and pixel value normalization. The method then sequentially undergoes feature extraction, feature fusion, and object detection and prediction stages before performing contraband classification and bounding box regression. The method is characterized by: The feature extraction stage: extracting initial multi-scale features from the preprocessed X-ray image through the enhanced StarNet backbone network; The feature fusion stage: constructing a channel separation convolutional neck network, inputting the initial multi-scale feature map, fusing these features to reduce feature redundancy and enhance multi-scale representation, and outputting the multi-scale feature map to the detection head; The channel-separated convolutional neck network is an improvement on the classic neck network. The overall feature pyramid structure of the classic neck network is retained, and the standard C2f module in the classic neck network is replaced with a channel-separated convolutional module. The replacement method is to directly replace the standard Bottleneck component in the standard C2f module with a CSC block, using a dual-stream architecture and cross-reconstruction operation. The target detection prediction stage: input multi-scale feature maps, undergo cross-scale parameter shared feature extraction, and bounding box regression and category prediction of shared parameters at each scale, and then output the final contraband bounding box coordinates and category probability after splicing.
2. The lightweight X-ray security inspection image contraband detection method according to claim 1, characterized in that: The method for extracting multi-scale features in the feature extraction stage is as follows: (1.1) The preprocessed X-ray image first passes through a 1×1 initial convolution layer for initial convolution processing; (1.2) Split the output of the initial convolutional layer into two different feature streams Z1 and Z2, forming a dual-path processing strategy; (1.3) Parallel convolution: One feature stream Z1 is processed by a 3×3 group convolution to extract basic high-level features; the other feature stream Z2 is processed by a 3×3 depth-separable convolution to generate complementary lightweight features; (1.4) Feature concatenation and fusion: Concatenate the outputs of the two parallel convolution branches, then apply a 1×1 final convolution layer to fuse these combined features and adjust the channel dimension to the desired output; (1.5) A SE module is integrated after the final convolutional layer to adaptively recalibrate the feature response in the channel direction and enhance the discriminative ability of features by explicitly modeling the interdependence between channels; (1.6) Each star block of the enhanced StarNet backbone network contains a residual connection. If the input feature map is aligned with the dimension of the feature map output by the SE module, the input feature map is directly added to the output of the SE module. (1.7) After the above steps, the enhanced StarNet backbone network outputs an initial multi-scale feature map containing information of different resolutions and semantic levels.
3. The lightweight X-ray security inspection image contraband detection method according to claim 1, characterized in that: In the channel separation convolution neck network, the CSC block is specifically implemented as follows: (a) Input feature channel separation: The input feature map is channel-separated to form two original streams, upper and lower, which are compressed into upper and lower low-dimensional features X1 and X2 respectively through point convolution; (b) Upstream processing: Basic feature extraction is performed on the upstream low-dimensional feature X1, and after optimizing the combination of group convolution and point-by-point convolution, it is aggregated to form the upstream feature map Y1; (c) Downstream processing: Use lightweight point-by-point convolution on the downstream low-dimensional features X2 to generate complementary low-cost features, which are then concatenated with the compressed features of the original downstream to form the downstream feature map Y2; (d) Cross-reconstruction operation: Set the cross-reconstruction operation to split both the upstream feature map Y1 and the downstream feature map Y2 into subcomponents, then perform cross-element summation, and finally concatenate these combined features to generate the output of the channel-separated convolution module.
4. The lightweight X-ray security inspection image contraband detection method according to claim 1, characterized in that: In the feature fusion stage, in order to ensure consistent lightweight performance at different model scales, the number of iterations of the channel separation convolution module in the channel separation convolution neck network is freely set.
5. The lightweight X-ray security inspection image contraband detection method according to claim 1, characterized in that: The specific method of the target detection prediction stage is as follows: (3.1) Channel alignment at each level: The three scale feature maps at different feature pyramid levels are first individually aligned channel-by-channel through a set of 1×1 convolutional layers; (3.2) Cross-scale parameter shared feature extraction: The aligned feature maps at each level are fed into a shared feature extraction block for processing; The shared feature extraction block is uniformly applied to all scales. It integrates a channel-separated convolution module and enhances the multi-scale feature representation capability through a dual-stream architecture and cross-reconstruction operations. (3.3) Bounding box regression with shared parameters at each scale: The features output from the shared feature extraction block are passed through a set of shared 1×1 convolutional layers and learnable scale parameters to perform bounding box regression prediction; (3.4) Shared parameter category prediction at each scale: The features output from the shared feature extraction block are passed through another set of shared 1×1 convolutional layers to predict the contraband category; (3.5) Concatenate the bounding box regression results and category prediction results within each scale by channel; (3.6) Output the final contraband bounding box coordinates and category probability.
6. A lightweight X-ray security image contraband detection method as claimed in claim 5, characterized in that In bounding box regression and category prediction, all scales share the same set of weights.
Citation Information
Cited By
Contraband detection method based on double-view-angle X-ray image fusion
CN121213888A