X-ray prohibited items detection method and system

By introducing de-occlusion module and boundary consistency module into the neural network, combining boundary and material information to optimize the loss function, the problem of insufficient utilization of occlusion information in X-ray prohibited items is solved, the detection accuracy and performance are improved, and the loss function is reduced Mis-detection and missed inspection.

CN118537643BActive Publication Date: 2025-01-17SOUTHWEST JIAOTONG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410669388.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2025-01-17
Estimated Expiration
2044-05-28

AI Technical Summary

Technical Problem

The prior art is difficult to use the boundary information and material information of the occluded images in the detection of X-ray prohibited items, resulting in low detection accuracy and high risk of false detection and missed detection. Especially in the case of inter-class occlusion and internal occlusion, the bounding box is Inadequate regression accuracy affects the detection effect.

Method used

A neural network-based de-occlusion module was designed to extract local features of prohibited items through the boundary guidance module and the material perception module, and introduce boundary consistency module and Alpha-RepLoss loss function to optimize feature expression and loss function to improve detection. performance.

Benefits of technology

Effectively identifying and positioning prohibited items in complex security inspection environments improves the accuracy and performance of detection, reduces false and missed inspections, and enhances the ability to handle occlusion scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537643B_ABST
    Figure CN118537643B_ABST
Patent Text Reader

Abstract

This invention relates to the field of computer vision technology and discloses a method and system for detecting contraband items using X-rays. The method constructs a neural network to detect X-ray images; the neural network includes an occlusion removal module, which extracts local features of the contraband item based on boundary information and material information. This invention solves the problems of low detection accuracy and high risk of false positives and false negatives in existing technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to an X-ray prohibited article detection method and system. Background Art

[0002] Prohibited items detection is an integral part of security inspection and is widely used in crowded public places such as stations and subways. However, with the rise of globalization and the rapid development of the transportation industry, people's travel frequency has increased significantly, resulting in a surge in passenger traffic. This not only places a heavy burden on security inspectors, but also increases the risk of overlooking or erroneously detecting prohibited items during the inspection process. Especially in the field of X-ray image security inspection for luggage inspection at airports or other important places, the detection technology of prohibited items plays a vital role. With the improvement of computer computing power and data storage capacity, deep learning technology has gradually become a research hotspot. Object detection methods based on deep learning have been widely used in various detection fields, and X-ray prohibited items detection based on deep learning has become a technological trend.

[0003] In recent years, many researchers have explored the application of object detection networks in the task of X-ray prohibited items detection in security inspection scenarios, and have achieved remarkable results. First, a prohibited items detection algorithm based on F-RCNN is proposed, which uses F-RCNN to extract foreground features to detect prohibited items. In addition, a prohibited items detection algorithm based on improved YOLOv3 is proposed. It is based on the YOLOv3 general object detection algorithm, optimizes the feature extraction model, Bounding Box generation method, etc., and introduces the FPN feature fusion module and GIoU Loss into the training framework, which further improves the model accuracy.

[0004] Although the above methods have improved the performance of prohibited items detection, there are still challenges in using target detection methods for intelligent security screening: for example, items in a suitcase may be completely or partially blocked by other items, which often leads to incomplete target information and thus missed detections; the boundary pixels of prohibited items are often affected by blocked boundary pixels, resulting in the inability to close the target boundaries, which affects the detection effect; prohibited items block each other, making it impossible to clearly present the features of each object, making it difficult for the detection method to accurately distinguish between objects, which in turn leads to difficulties in locating prohibited items.

[0005] The prior art has the following problems:

[0006] 1: The network often fails to utilize the boundary information and material information in the occluded X-ray prohibited items images, resulting in difficulty in accurately detecting and distinguishing the occluded prohibited items.

[0007] By observing X-ray images, it is found that even when prohibited items are severely obscured, the shape, appearance and material information of the items are still retained in the image. However, traditional X-ray prohibited items detection methods mainly rely on the complete visual features of the items for detection, and often fail to make full use of these key information, especially when the prohibited items are partially obscured. This makes it difficult to distinguish prohibited items from other items, thus affecting the accuracy of prohibited items detection and increasing the risk of false detection and missed detection.

[0008] 2: The network performs poorly in processing the boundary pixels of occluded prohibited items, resulting in the inability to close the target boundary, which in turn affects the detection effect.

[0009] In security inspection scenarios such as luggage scanning, items in a suitcase are usually densely stacked and occlude each other. In this environment, the boundary pixels of prohibited items are often affected by the occlusion of other items, resulting in the target boundary not being closed correctly, making boundary recognition inaccurate. This unclear boundary not only reduces the accuracy of detection, but also increases the probability of misjudgment, further affecting the overall performance of the prohibited item detection network.

[0010] 3: The network directly uses a simple loss function (such as the CIoU loss function) for supervised training, resulting in low bounding box regression accuracy and insufficient performance in handling intra-class target occlusion, thus affecting the overall effect and accuracy of detection.

[0011] The CIoU loss function used by the object detection algorithm YOLOv7-tiny lacks the ability to adaptively adjust weights and gradients, resulting in insufficient bounding box regression accuracy, which affects the detection accuracy of prohibited items. In addition, in the field of prohibited item detection, occlusion of objects within a class often brings challenges to detection. Summary of the invention

[0012] In order to overcome the deficiencies of the prior art, the present invention provides an X-ray prohibited items detection method and system to solve the problems of low detection accuracy, high risk of false detection and missed detection, etc. in the prior art.

[0013] The technical solution adopted by the present invention to solve the above problems is:

[0014] A method for detecting prohibited items by X-ray is disclosed. A neural network is constructed to detect X-ray images. The neural network includes a de-occlusion module, which is used to extract local features of prohibited items based on boundary information and material information.

[0015] As a preferred technical solution, the de-occlusion module includes a boundary guidance module and a material perception module; wherein the boundary guidance module is used to: generate boundary feature information, and input the boundary feature information and the original feature information in series into the material perception module; the material perception module is used to: suppress irrelevant channel features to extract local features of prohibited items, and distinguish between item categories based on the local feature information.

[0016] As a preferred technical solution, the formula for the output feature of the de-occlusion module is:

[0017]

[0018] Where X′=E(X)||X(2);

[0019] In the formula, represents the output feature of the de-occlusion module, X′ represents the feature after the channel splicing operation, Represents the element-wise multiplication operation, W MAM represents the output weight of the material perception module, E(·) represents the boundary guidance operation, || represents the channel splicing operation, X represents the input feature, represents the real number domain, C represents the number of channels, H represents the height of the feature map, and W represents the width of the feature map.

[0020] As a preferred technical solution, the formula for the operation performed by the boundary guidance module is:

[0021]

[0022] In the formula, Conv1D(·) represents the convolution block operation with a convolution kernel of 1, k 1×3 represents the features extracted by the convolution kernel of size 1×3, k 3×1 represents the features extracted by the convolution kernel of size 3×1, represents the element-wise multiplication operation, and b represents the bias term.

[0023] As a preferred technical solution, the formula for the operation performed by the material perception module is:

[0024] W MAM =σ(Conv1D(A c ||G c )) (6);

[0025] In the formula, σ(·) represents the Sigmoid operation, Conv1D(·) represents the convolution block operation with a convolution kernel of 1, and A c represents the global average pooling operation, G c Represents a standard pooling operation.

[0026] As a preferred technical solution, A c , G c is defined as:

[0027]

[0028] In the formula, h represents the height index of X′, w represents the width index of X′, c represents the channel index, and x′ chw Represents the eigenvalue of X′ at the position of channel index c, height index h, and width index w.

[0029] As a preferred technical solution, the neural network includes a boundary consistency module; wherein the boundary consistency module is used to: perform dilated convolution on the features output by the de-occlusion module, increase the long-range context correlation between the output features, and identify the boundary information of the occluded part.

[0030] As a preferred technical solution, the formula for the operation performed by the boundary consistency module is:

[0031] F BCM =Conv1D(Conv3D(D3(F in ))) (7);

[0032] In the formula, F BCM is the output feature of the boundary consistency module, Conv3D(·) represents the convolution block operation with a convolution kernel of 3, D3(·) is the dilated convolution with a dilation rate of 3, and F in Represents the input features of the boundary consistency module.

[0033] As a preferred technical solution, the loss function of the neural network is:

[0034] L α-Rep =L α-CIoU +αL RepGT +βL RepBox (15)

[0035] Where, L α-Rep Represents the loss function of the neural network, L α-CIoU represents the loss function of the power complete intersection-over-combination ratio, L RepGT represents the loss function of the non-real target box rejection term, L RepBox represents the loss function of the bounding box exclusion term, and α represents L RepGT The weight factor of L RepBox The weight factor of .

[0036] An X-ray prohibited items detection system, used to implement the X-ray prohibited items detection method, includes a neural network for detecting X-ray images; wherein the neural network includes a de-occlusion module, and the de-occlusion module is used to: extract local features of prohibited items based on boundary information and material information.

[0037] Compared with the prior art, the present invention has the following beneficial effects:

[0038] (1) The present invention designs an X-ray prohibited items detection network based on occlusion perception and loss optimization to realize X-ray prohibited items detection in complex security inspection environments. The network can effectively identify and locate prohibited items in X-ray prohibited items images with dense occlusions;

[0039] (2) Aiming at the problem of inter-class occlusion of prohibited X-ray objects, the present invention designs a removal occlusion module (ORM), which generates edge guidance information and material perception information through an edge guidance module (EGM) and a material perception module (MAM), and combines these two information sources to generate a high-quality mask to highlight the local features of prohibited objects and eliminate the interference of irrelevant object information, effectively alleviating the problem of difficulty in distinguishing between classes;

[0040] (3) To address the boundary inconsistency problem of prohibited X-ray items caused by inter-class occlusion, the present invention designs a boundary consistency module (BCM), which uses a combination of dilated convolution and other convolution modules to increase the long-range context correlation between output pixels, which helps to improve the consistency of local feature boundaries of prohibited items;

[0041] (4) Aiming at the intra-class occlusion problem of X-ray prohibited items, the present invention designs an Alpha-RepLoss loss function for supervised training. This loss function is based on the CIoU loss function, optimized using the Alpha-IoU method, and introduces the exclusion terms RepGT and RepBox in the Repulsion Loss, which effectively alleviates the positioning difficulty caused by mutual occlusion within the target cluster;

[0042] (5) A large number of experiments have proved that the X-ray prohibited items detection network based on occlusion perception and loss optimization proposed in the present invention can detect more prohibited items when dealing with occlusion scenes, while effectively alleviating the situation of false detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A schematic diagram of the structure of a neural network used in the present invention;

[0044] Figure 2 It is a schematic diagram of the structure of the boundary guidance module (EGM);

[0045] Figure 3It is a schematic diagram of the structure of the material sensing module (MAM);

[0046] Figure 4 Schematic diagram of the structure of the boundary consistency module (BCM). DETAILED DESCRIPTION

[0047] The present invention will be further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0048] Example 1

[0049] like Figures 1 to 4 As shown, the present invention relates to an X-ray prohibited item detection scenario in a security inspection scenario. The present invention provides a prohibited item detection method based on occlusion perception and loss optimization, specifically, for effectively identifying and locating prohibited items in a complex security inspection environment, especially under dense occlusion conditions.

[0050] In order to solve the problem 1 of the existing technology, a de-occlusion module (ORM) is proposed. This module makes full use of boundary information and material information, combines these two information sources to generate high-quality masks to highlight the local features of prohibited items (color and partial texture information), and eliminates the interference of irrelevant object information, effectively alleviating the problem of difficulty in distinguishing between classes.

[0051] In order to solve problem 2 of the existing technology, a boundary consistency module (BCM) is introduced, which increases the long-range context correlation between output pixels through dilated convolution (in the visual field, long-range context correlation refers to the correlation or connection between different regions in an image, that is, the long-distance dependency between different features in space. In computer vision tasks, considering and utilizing long-range context correlation is very important for improving model performance and enhancing the expressiveness of visual features.), optimizes feature expression, reduces redundant responses of non-boundary pixels, and more effectively retains and highlights the key features of occlusion boundaries, thereby improving the overall detection performance.

[0052] In order to solve the problem 3 of the existing technology, a new loss function Alpha-IoU is designed. This loss function introduces the Alpha-IoU method for optimization based on CIoU, that is, the loss and gradient of IoU are adaptively adjusted through power transformation, so that the loss function can more effectively emphasize and optimize the prediction accuracy of high IoU areas when processing bounding box regression. In addition, the exclusion terms RepGT and RepBox in Repulsion Loss are introduced to enable the prediction box to be away from the true value prediction box and other prediction boxes of the adjacent target, which helps prevent the prediction boxes of different targets from being too close and filtered out by the NMS method, thereby reducing the problem of missed detection.

[0053] 1: Overview:

[0054] Given an X-ray image, features are extracted and aggregated using existing techniques such as the ELAN simplification module. This method mainly consists of two modules: the Occlusion Removal Module (ORM) and the Boundary Consistency Module (BCM), where the ORM is mainly composed of the Boundary Guidance Module (EGM) and the Material Awareness Module (MAM). The Alpha-RepLoss loss function is used for supervised training.

[0055] The whole framework consists of the following aspects: First, the Occlusion Removal Module (ORM) is used before the backbone maximum pooling layer to combine the two information sources of boundary and material to generate a high-quality mask. Specifically, the boundary feature information is generated in the Boundary Guidance Module (EGM), and this information is concatenated with the input features as the input of the Material Awareness Module (MAM). MAM suppresses irrelevant channel features to highlight the local features of prohibited items, and finally uses high-quality local feature masks for inter-class distinction. Secondly, the Boundary Consistency Module (BCM) is used to increase the long-range context relevance and improve the consistency of occlusion boundaries. By understanding the boundaries of objects, the network can better distinguish the boundaries between different objects. Finally, the detection head is used to detect prohibited items.

[0056] 2: Specific plan:

[0057] 2.1 Occlusion Removal Module (ORM):

[0058] Since the items in a suitcase are often arranged in a random and overlapping manner, prohibited items may be completely or partially occluded by other items, which often leads to incomplete target information. By observing the X-ray images, it can be found that the shape appearance and material information distribution of the severely occluded parts are preserved in the image. Inspired by this, a removal module (ORM) was designed to focus on emphasizing the appearance and material information of the occluded parts of prohibited items. ORM designs two core modules, namely the boundary guidance module (EGM) and the material awareness module (MAM). EGM is used to generate boundary feature information, while MAM uses style pooling technology to extract material information from each channel and recalibrate channel weights. These improvements help the network better understand and identify occluded prohibited items, improve the processing ability and detection accuracy of complex scenes, highlight the local features of prohibited items, and effectively eliminate the interference of irrelevant item information.

[0059] Specifically, given the input features C represents the number of channels, H and W represent the height and width of the feature map respectively. The feature map obtained by the boundary guidance operation E(·) is concatenated with the output feature and input into MAM. Then MAM generates channel weights to adjust the feature map. ORM finally outputs the feature map. for:

[0060]

[0061] X′=E(X)||X (2)

[0062] In the formula, represents the output feature of the de-occlusion module, X′ represents the feature after the channel splicing operation, Represents the element-wise multiplication operation, W MAM represents the output weight of the material perception module, E(·) represents the boundary guidance operation, || represents the channel splicing operation, X represents the input feature, represents the field of real numbers, Used to illustrate the data type and shape of the feature map. C represents the number of channels, H represents the height of the feature map, and W represents the width of the feature map.

[0063] 2.1.1 Edge Guidance Module (EGM):

[0064] For the extraction of boundary feature information, an edge guidance module (EGM) is designed. The EGM structure uses two asymmetric convolution kernels to merge features and extract feature edge information for input features, then uses convolution operations to adjust the number of channels, and reintroduces the input feature map through residual connections to further amplify the edge information of the original features. This improvement enables the network to more clearly identify and process the edges of objects, improving the recognition ability under occlusion and complex scenes.

[0065] Specifically, the above operations are expressed as:

[0066]

[0067] Where Conv1D(·) represents the convolution block operation with a convolution kernel of 1, k 1×3 Indicates that the convolution kernel is 1×3, k 3×1 The representative convolution kernel is 3×1, Represents the element-wise multiplication operation, and b is the bias term.

[0068] 2.1.2 Material Awareness Module (MAM):

[0069] In X-ray images, prohibited items of different materials present unique pseudo colors and textures, and this material information characteristic helps to effectively detect prohibited items. Therefore, a material-aware module (MAM) is designed to extract material information. The MAM structure adopts a method of assigning information channel weights to enhance the local features of occluded prohibited items across categories while suppressing irrelevant channel features. Inspired by the existing structure SRM, MAM uses global average pooling and standard deviation pooling to obtain the mean and standard deviation of each channel respectively to effectively extract material information. This method can better capture the local features of occluded prohibited items and form a richer and more useful feature representation by concatenating these statistical information.

[0070] Subsequently, MAM captures local channel information by adding a convolution block and Sigmoid function, generates channel weights, and performs a tandem operation with the input to emphasize important channel information and suppress irrelevant channel features. Combined with two pooling operations and subsequent cross-channel interactions, the proposed MAM structure can more accurately distinguish and identify occluded prohibited items, greatly improving the overall detection performance.

[0071] Specifically, given the input features The global average pooling operation and standard pooling are defined as follows:

[0072]

[0073]

[0074] After global average pooling and standard pooling operations, information of different levels and types are fused together to improve the representation ability of features, so that the model can better understand and characterize complex material information. Finally, MAM outputs weights Defined as:

[0075] W MAM =σ(Conv1D(A c ||G c )) (6)

[0076] Where σ(·) represents the Sigmoid operation, Conv1D(·) represents the convolution block operation with a convolution kernel of 1, and || represents the channel concatenation operation.

[0077] 2.2 Boundary Consistency Module (BCM):

[0078] When the boundary pixels of prohibited items are occluded, the target boundary often cannot be closed correctly, which has an adverse effect on the accuracy and effect of detection. Therefore, the BCM structure is introduced to improve the boundary consistency of local features. The BCM structure first adopts a dilated convolution with a convolution kernel size of 3×3, a dilation rate of 3, and a stride of 3, so that the long-range context correlation between output pixels is increased while keeping the receptive field range unchanged, helping the model to better understand and restore the boundary information of the occluded part, and improving the coherence and boundary consistency of the image. However, the dilated convolution operation sometimes produces unnatural checkerboard textures or structures in the output feature map, which may have an adverse effect on subsequent image processing tasks. In order to suppress this adverse effect, the BCM structure uses a 3×3 convolution module to further process the output feature map. Finally, a 1×1 convolution block is used to adjust the number of feature channels. These measures help to optimize the feature expression before the detection head, alleviate the redundant response of non-boundary pixels, and more effectively retain and highlight the key features of the occluded boundary, thereby improving the overall detection performance.

[0079] Specifically, the BCM structure can be expressed as:

[0080] F BCM =Conv1D(Conv3D(D3(F in ))) (7)

[0081] Where Conv1D(·) represents the convolution block operation with a convolution kernel of 1, Conv3D(·) represents the convolution block operation with a convolution kernel of 3, D3(·) is the dilated convolution with a dilation rate of 3, and F in is the input feature, F BCM is the output characteristic of BCM.

[0082] 2.3Alpha-RepLoss loss function design:

[0083] Since the power complete intersection-over-union loss function (CIoU) used by the target detection algorithm YOLOv7-tiny (You Only Look Once version 7-tiny) has no ability to adaptively adjust weights and gradients, the bounding box regression accuracy is not high. Therefore, based on the existing method Alpha-IoU, the CIoU function is optimized by introducing power transformation to adaptively adjust the loss and gradient of the intersection-over-union (IoU), and the optimized loss function is:

[0084]

[0085] In the formula, ρ represents the second-order Minkowski distance function, c represents the diagonal of the minimum circumscribed rectangle, b and b gtRepresents the center point of the predicted box and the center point of the real box, w gt Indicates the width of the real box, h gt This improvement can more effectively handle bounding box regression, especially when there is no intersection between candidate boxes, and can emphasize high IoU target areas, improve the accuracy of the model in the overlapping area of ​​the prediction box, and thus more effectively learn the exact position and shape of the target object.

[0086] In addition, in order to improve the handling of occlusion problems and enhance the detection capability of prohibited items occlusion problems, α-CIoU Based on the above, the exclusion terms RepGT and RepBox in Repulsion Loss are introduced. The design of RepGT and RepBox enables the prediction box to be far away from the true prediction box and other prediction boxes of the adjacent target, which helps prevent the prediction boxes of different targets from being too close and filtered out by the NMS method, thereby reducing the problem of missed detection.

[0087] Specifically, RepGT Loss is defined as follows:

[0088]

[0089] In the formula, p represents the candidate box, p + represents the positive sample prediction box, B p represents the target true value prediction box, represents the target true value prediction box with the largest IoU area outside the target true value prediction box that matches the candidate box p, σ is the sensitivity hyperparameter, Indicates the area ratio, Smooth ln (·) represents a smoothing function, area(·) represents the area of ​​the prediction box, and x represents the output value of IoG(·) (i.e. ).

[0090] RepBox Loss is defined as:

[0091]

[0092] In the formula, i represents the index number of the candidate box, j represents the index number of other candidate boxes around the candidate box, and p i represents the candidate box with index number i, p j Represents other candidate boxes with index number j around the candidate box with index number i. Represents the predicted box corresponding to the candidate box, Represents the prediction box Other prediction boxes around Represents two prediction boxes and , I(·) represents the identity function, and ε represents a minimum value to avoid fractional division by 0.

[0093] Finally, the Alpha-RepLoss loss function after introducing the exclusion terms RepGT and RepBox is:

[0094] L α-Rep =L α-CIoU +αL RepGT +βL RepBox (15)

[0095] Where, L α-CIoU represents the loss function of the power complete intersection-over-combination ratio, L RepGT Represents the loss function of the non-real target box rejection term RepGT (rejection term away from the non-real target box), L RepBox Represents the loss function of the bounding box exclusion term RepBox (the exclusion term of other predicted boxes far away from the true target box), α and β are weight factors, and this method sets them to 0.5.

[0096] Example 2

[0097] like Figures 1 to 4 As shown, as a further optimization of Example 1, based on Example 1, this embodiment also includes the following technical features:

[0098] 1: Overall architecture implementation

[0099] like Figure 1 As shown in the figure, the overall framework of the prohibited items detection method based on occlusion perception and loss optimization is shown. The specific process is to input an X-ray image, and then extract and aggregate features through the ELAN simplification module. Then, the input features are sent to the boundary guidance module (EGM) to generate boundary feature information. Subsequently, this information is sent in series with the input features to the material perception module (MAM) to obtain the channel weights for feature map adjustment. Then, the processed feature map is processed by the maximum pooling layer for dimensionality reduction of the spatial size. After performing the above operation twice, the obtained feature map is subjected to the ELAN simplification module operation, and then the feature fusion operation is performed. The processed feature map is sent to the boundary consistency module (BCM) to improve the boundary consistency of local features. Finally, the detection of prohibited items is realized through the detection head.

[0100] 1.1: Design of Occlusion Removal Module (ORM)

[0101] The detailed design of EGM and MAM is as follows Figure 2 , 3 shown.

[0102] In the EGM structure, given an input feature X, two asymmetric convolution kernels (m×1Conv and 1×mConv) are first used to extract and merge features to obtain edge information. Then, the merged feature map is subjected to a convolution block operation with a convolution kernel of 1, and the input feature X is residually connected to amplify the original feature edge information to obtain the feature map X′.

[0103] In the MAM structure, given the input feature X′, first use global average pooling (Avg Pool) and standard deviation pooling (Std Pool) to obtain the channel mean and standard deviation respectively. Then they are concatenated (Concat) to represent the material information, as the input of the convolution block operation with a convolution kernel of 1, and then the channel weight is generated by the Sigmoid function. Finally, the channel weight is concatenated with the feature map X′ to obtain the final input feature

[0104] 1.2: Boundary Consistency Module Design (BCM)

[0105] The detailed design of BCM is as follows Figure 4 shown.

[0106] In the BCM structure, given the input feature F in First, a dilated convolution with a kernel size of 3×3, a dilation rate of 3, and a stride of 3 is used to increase the correlation of long-range contexts between pixels. Then, a 3×3 convolution block is used to further process the output features. Finally, a 1×1 convolution block is used to adjust the number of feature channels, ultimately improving the consistency of local feature boundaries of prohibited items.

[0107] 2: Experimental Setup

[0108] 2.1 Dataset selection:

[0109] The SIXray_PO dataset is a public dataset for X-ray security image analysis, which contains a total of 1,059,231 X-ray security images. Only 8,929 images in the dataset contain prohibited items and corresponding annotation information. There are 5 categories in total: Gun, Knife, Wrench, Pilers, and Scissors. This paper only divides the 8,929 images containing prohibited items into training set, validation set, and test set in an 8:1:1 ratio.

[0110] The OPIXray dataset is a public dataset that focuses on detecting occluded prohibited items in X-ray images. The dataset contains 8885 images, which are divided into 7109 training sets and 1776 test sets. There are five types of knives in total: Utility_Knife (UT), Straight_Knife (ST), Folding_Knife (FO), Multi-tool_Knife (MU), and Scissor (SC). According to the degree of occlusion of prohibited items, the test set is divided into three subsets: OL1, OL2, and OL3. OL1 is a subset with no or slight occlusion, OL2 is a subset with partial occlusion, and OL3 is a subset with severe or complete occlusion.

[0111] The HiXray dataset is a high-quality X-ray security inspection image dataset, which contains 45,364 prohibited items from routine security checks at international airports and 102,928 positive sample annotation information. HiXray divides the dataset in a ratio of about 4:1, including 36,295 training sets and 9,069 test sets, covering a total of 8 common prohibited items categories. It is currently one of the largest high-quality datasets for prohibited items detection.

[0112] 2.2: Evaluation Metrics:

[0113] The mean average precision threshold (mAP) with an IoU threshold of 0.5 is used as the detection accuracy evaluation index. Frames Per Second (FPS) and Floating-point Operations Per Second (FLOPS) are selected as real-time evaluation indicators. Precision and recall are selected as model evaluation indicators.

[0114] 2.3: Implementation details:

[0115] All experiments were conducted on NVIDIA GeForce RTX 3090 based on the PyTorch framework. For fair comparison, YOLOv7-tiny was used as our baseline. The input image size was fixed to 640×640. All models were optimized by the Adam optimizer, with the initial learning rate set to 0.01, the loading threads set to 15, the batch size set to 24, and a total of 300 epochs. The experiment used the default data augmentation method to improve the generalization ability of the model.

[0116] The present invention has the following characteristics:

[0117] 1: The present invention utilizes the boundary and material information of the occluded part in the X-ray prohibited items image to alleviate the difficulty of inter-class classification.

[0118] Since the items in the suitcase may be completely or partially blocked by other items, this often leads to incomplete target information, resulting in missed detection. In addition, by observing the X-ray images, it is found that even if the prohibited items are severely blocked, the shape appearance and material information distribution of the blocked part are still retained in the image. The existing X-ray prohibited items detection method fails to make full use of this key information, resulting in difficulty in distinguishing prohibited items from other items, thus affecting the detection performance. This method combines the two information sources of boundary and material obtained by the boundary guidance module EGM and the material perception module MAM to generate a high-quality mask to highlight the local features of the prohibited items and eliminate the interference of irrelevant item information, thereby alleviating the problem of difficult inter-class classification.

[0119] 2: The boundary consistency module (BCM) of the present invention solves the missed detection problem caused by occlusion boundary inconsistency by enhancing the long-range context correlation between output pixels.

[0120] Since the boundary pixels of prohibited items are often affected by the occlusion of other items, the target boundary cannot be closed correctly, making the boundary recognition inaccurate, thus affecting the detection effect. This method introduces dilated convolution and multiple convolution blocks to enhance the contextual correlation between remote output pixels, optimize feature expression, reduce redundant responses of non-boundary pixels, and help the detection model better understand and restore the occluded parts, thereby improving the coherence and consistency of the image and further solving the inter-class occlusion problem.

[0121] 3: The present invention introduces the Alpha-IoU method and the exclusion terms RepGT and RepBox of Repulsion Loss to solve the Alpha-RepLoss loss function of low bounding box regression accuracy and intra-class occlusion problems.

[0122] Since the CIoU loss function used by YOLOv7-tiny lacks the ability to adaptively adjust weights and gradients, the bounding box regression accuracy is insufficient. In addition, the prohibited items occlude each other, making it difficult to clearly present the features of each object and to accurately distinguish and locate it. In terms of loss function, the Alpha-RepLoss loss function is designed, which can more effectively emphasize and optimize the prediction accuracy of high IoU areas when processing bounding box regression. At the same time, it enables the prediction box to stay away from the true value prediction box and other prediction boxes of nearby targets, which helps prevent different target prediction boxes from being too close and filtered out by the non-maximum suppression (NMS) method, effectively reducing the problem of missed detection.

[0123] 4: Application prospects of this method in the field of security detection.

[0124] In the field of security inspection, items in suitcases are often arranged in a random and overlapping manner, causing serious occlusion problems for the inspection objects. Security inspectors usually rely on human eyes to judge severely occluded items, which poses a serious threat to public safety. The method proposed in this paper solves the inter-class occlusion and intra-class occlusion problems of X-ray prohibited items based on occlusion perception and loss optimization, and improves the detection performance of X-ray prohibited items in densely occluded scenes.

[0125] As described above, the present invention can be preferably implemented.

[0126] All features disclosed in all embodiments in this specification, or steps in all methods or processes implicitly disclosed, except for mutually exclusive features and / or steps, can be combined and / or expanded or replaced in any manner.

[0127] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. According to the technical essence of the present invention, within the spirit and principles of the present invention, any simple modification, equivalent replacement and improvement made to the above embodiment still falls within the protection scope of the technical solution of the present invention.

Claims

1. A method for detecting prohibited items by X-ray, characterized in that: Constructing a neural network to detect X-ray images; wherein the neural network includes a de-occlusion module, and the de-occlusion module is used to: extract local features of prohibited items based on boundary information and material information; The de-occlusion module includes a boundary guidance module and a material perception module; wherein the boundary guidance module is used to: generate boundary feature information, and input the boundary feature information and the original feature information in series into the material perception module; the material perception module is used to: suppress irrelevant channel features to extract local features of prohibited items, and distinguish between item categories based on the local feature information; The formula for the output feature of the de-occlusion module is: Where, X′=E(X)||X (2); In the formula, represents the output feature of the de-occlusion module, X′ represents the feature after the channel splicing operation, Represents the element-wise multiplication operation, W MAM represents the output weight of the material perception module, E(·) represents the boundary guidance operation, || represents the channel splicing operation, X represents the input feature, represents the real number domain, C represents the number of channels, H represents the height of the feature map, and W represents the width of the feature map; The formula for the operation performed by the boundary guidance module is: In the formula, Conv1D(·) represents the convolution block operation with a convolution kernel of 1, k 1×3 represents the features extracted by the convolution kernel of size 1×3, k 3×1 represents the features extracted by the convolution kernel of size 3×1, represents the element multiplication operation, and b represents the bias term; The formula for the operation performed by the material-aware module is: W MAM σ(Conv1D(A c ||G c )) (6) In the formula, σ(·) represents the Sigmoid operation, Conv1D(·) represents the convolution block operation with a convolution kernel of 1, and A c represents the global average pooling operation, G c Represents a standard pooling operation; A c , G c is defined as: In the formula, h represents the height index of X′, w represents the width index of X′, c represents the channel index, and x′ chw represents the eigenvalue of X′ at the position of channel index c, height index h and width index w; The neural network includes a boundary consistency module; wherein the boundary consistency module is used to: perform dilated convolution on the features output by the de-occlusion module, increase the long-range context correlation between the output features, and identify the boundary information of the occluded part.

2. The X-ray prohibited items detection method according to claim 1, characterized in that: The operation performed by the boundary consistency module is formulated as: F BCM =Conv1D(Conv3D(D3(F in ))) (7); In the formula, F BCM is the output feature of the boundary consistency module, Conv3D(·) represents the convolution block operation with a convolution kernel of 3, D3(·) is the dilated convolution with a dilation rate of 3, and F in Represents the input features of the boundary consistency module.

3. The X-ray prohibited items detection method according to claim 1 or 2, characterized in that: The loss function of the neural network is: L α-Rep =L α-CIoU +αL RepGT +βL RepBox (15) Where, L α-Rep Represents the loss function of the neural network, L α-CIoU represents the loss function of the power complete intersection-over-combination ratio, L RepGT represents the loss function of the non-real target box rejection term, L RepBox represents the loss function of the bounding box exclusion term, and α represents L RepGT The weight factor of L RepBox The weight factor of .

4. An X-ray prohibited article detection system, characterized in that: A method for detecting prohibited items by X-rays according to any one of claims 1 to 3, comprising a neural network for detecting X-ray images; wherein the neural network comprises a de-occlusion module, and the de-occlusion module is used to extract local features of prohibited items based on boundary information and material information.

Citation Information

Patent Citations

  • Prohibited article detection method

    CN111899220A