Security inspection forbidden article detection method and device, equipment and storage medium

By slicing, convolution and feature extraction of X-ray security images, the target detection model is verified, which solves the problem of low automatic identification of prohibited items in X-ray security images in the prior art, and achieves efficient and accurate detection of prohibited items.

CN119762741APending Publication Date: 2025-04-04WUHAN POLYTECHNIC UNIVERSITY

Patent Information

Application Number
CN202411608887.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The prior art has low accuracy and low efficiency in automatic recognition of prohibited items in X-ray security images.

Method used

By obtaining target images containing the image data set of security-checking prohibited items, the training data foundation is built, and the target detection model is verified using these target images, including slicing, convolution, feature extraction, dynamic convolution, spatial pyramid pooling and feature fusion processing.

Benefits of technology

The accuracy and robustness of the model for detection of prohibited items is improved, ensuring that prohibited items can be identified efficiently and accurately in practical applications, thereby improving the overall security inspection efficiency and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762741A_ABST
    Figure CN119762741A_ABST
Patent Text Reader

Abstract

The invention discloses a security check forbidden article detection method, device and equipment and a storage medium, and relates to the technical field of target detection, the security check forbidden article detection method comprises the steps that a target image is acquired, and the target image comprises a security check forbidden article image data set; and verifying the target detection model through the target image to obtain a verification result of security check prohibited article image detection. According to the method, the YOLO v5 algorithm is applied to X-ray security check image prohibited article detection, and dynamic convolution, a large-kernel separable attention mechanism and an optimized bounding box loss function are combined, so that the accuracy and efficiency of prohibited article detection are remarkably improved, meanwhile, the robustness of the model is enhanced, false detection and missing detection conditions are reduced, and the detection efficiency of the prohibited article is improved. Therefore, the efficiency of the security check process is improved while the public security is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of target detection technology, and in particular to a method, device, equipment and storage medium for detecting prohibited items during security inspections. Background Art

[0002] With the improvement of social security awareness, X-ray security technology is increasingly used in public places such as airports, stations, and large-scale events. Its main purpose is to detect and identify prohibited items in luggage to ensure public safety. Effective prohibited item detection methods are essential to prevent terrorist attacks, criminal acts, and other potential threats.

[0003] At present, the detection of prohibited items in X-ray security inspection images mainly relies on manual recognition. Security personnel need to carefully check the images generated by the X-ray machine to identify prohibited items. In addition, some automated detection methods are also used to assist in the detection of prohibited items.

[0004] Although manual detection and traditional automated methods can identify prohibited items to a certain extent, they have the problems of low efficiency and insufficient accuracy. Therefore, how to improve the accuracy of automatic identification of prohibited items in X-ray security inspection images has become an urgent problem to be solved. Summary of the invention

[0005] The purpose of this application is to provide a method, device, equipment and storage medium for detecting prohibited items in security inspections, aiming to solve the technical problem of how to improve the accuracy of automatic identification of prohibited items in X-ray security inspection images.

[0006] To achieve the above objectives, the present application proposes a method for detecting prohibited items during security inspection, the method comprising:

[0007] Acquire a target image, wherein the target image includes a data set of images of prohibited items for security inspection;

[0008] The target detection model is verified by the target image to obtain a verification result of the security inspection prohibited items image detection.

[0009] In one embodiment, the target detection model is verified by the target image to obtain a verification result of the security inspection prohibited items image detection, including:

[0010] Based on the training data, a training image is obtained;

[0011] After slicing, convolving and extracting features from the training image, a first reference feature map is obtained;

[0012] Convolving the first reference feature map to obtain a second reference feature map;

[0013] Performing dynamic convolution, feature extraction, and spatial pyramid pooling processing on the second reference feature map to obtain a third reference feature map;

[0014] Feature fusion is performed based on the third reference feature map to obtain a verification result of the security inspection prohibited items image detection.

[0015] In one embodiment, feature fusion is performed based on the third reference feature map to obtain a verification result of security inspection prohibited items image detection, including:

[0016] Upsampling the third reference feature map, and performing feature fusion with the second reference feature map to obtain a fourth reference feature map;

[0017] Determine an attention score based on the fourth reference feature map, and obtain a fifth reference feature map according to the attention score;

[0018] Upsampling the fifth reference feature map, and performing feature fusion with the first reference feature map to obtain a sixth reference feature map;

[0019] Based on the sixth reference feature map, a verification result of the security inspection prohibited items image detection is obtained.

[0020] In one embodiment, based on the sixth reference feature map, obtaining a verification result of the security inspection prohibited items image detection includes:

[0021] Based on the sixth reference feature map, obtaining a first target prediction map;

[0022] Based on the fifth reference feature map and the sixth reference feature map, obtaining a second target prediction map;

[0023] Obtaining a third target prediction map based on the third reference feature map, the fifth reference feature map, and the sixth reference feature map;

[0024] Based on the first target prediction map, the second target prediction map and the third target prediction map, a verification result of the security inspection prohibited items image detection is obtained.

[0025] In one embodiment, before verifying the target detection model through the target image to obtain the verification result of the security inspection prohibited items image detection, the method includes:

[0026] Based on the target image, obtaining training data;

[0027] Input the training data into the initial detection model to get the predicted bounding box;

[0028] Determining a distance loss value based on the predicted bounding box and the labeled bounding box;

[0029] Obtaining an overlap coefficient between the marked bounding box and the predicted bounding box;

[0030] The initial detection model is adjusted according to the overlap coefficient, the distance loss value and the balance loss parameter until the initial detection model converges to obtain a target detection model.

[0031] In one embodiment, determining a distance loss value according to the predicted bounding box and the labeled bounding box includes:

[0032] Obtaining a weight coefficient, a width of the target image, a height of the target image, vertex coordinates of the marked bounding box, and vertex coordinates of the predicted bounding box, and obtaining a vertex coordinate distance between the marked bounding box and the predicted bounding box;

[0033] Based on the vertex coordinate distance and the weight coefficient, a distance loss value is obtained.

[0034] In one embodiment, the target detection model is verified by the target image to obtain a verification result of the security inspection prohibited items image detection, including:

[0035] Based on the target image, obtaining test data;

[0036] Based on the test data and the target detection model, the indicator accuracy, recall rate and mean average precision are obtained;

[0037] Based on the indicator accuracy, the recall rate and the mean average precision, a verification result is obtained.

[0038] In addition, to achieve the above-mentioned purpose, the present application also proposes a security inspection prohibited items detection device, the device comprising:

[0039] An acquisition module, used to acquire a target image, wherein the target image includes a data set of images of prohibited items for security inspection;

[0040] The verification module is used to verify the target detection model through the target image to obtain the verification result of the security inspection prohibited items image detection.

[0041] In addition, to achieve the above-mentioned purpose, the present application also proposes a security prohibited items detection device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the security prohibited items detection method as described above.

[0042] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the security inspection prohibited items detection method as described above are implemented.

[0043] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the method for detecting prohibited items in security inspection as described above.

[0044] One or more technical solutions proposed in this application have at least the following technical effects:

[0045] This application first builds a rich training data foundation by acquiring target images containing a data set of images of prohibited items for security inspection, and then uses these target images to verify the target detection model. This process involves in-depth analysis and processing of the image data set, and ultimately obtains the verification results of the detection of images of prohibited items for security inspection. This application improves the accuracy and robustness of the model for prohibited item detection, ensuring that prohibited items can be efficiently and accurately identified in practical applications, thereby improving the overall security inspection efficiency and safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0048] Figure 1 A flowchart of the first embodiment of the method for detecting prohibited items in security inspection provided by this application;

[0049] Figure 2 This is a dynamic convolutional layer flow chart of the method for detecting prohibited items in security inspection for this application;

[0050] Figure 3 This is a schematic diagram of a target detection framework for a method for detecting prohibited items for security inspection in this application;

[0051] Figure 4 This is a flow chart of the core separable attention mechanism for the security inspection prohibited items detection method for this application;

[0052] Figure 5 A flowchart of the second embodiment of the method for detecting prohibited items in security inspection provided by this application;

[0053] Figure 6 This is a schematic diagram of the module structure of the security inspection prohibited items detection device according to an embodiment of the present application;

[0054] Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the method for detecting prohibited items for security inspection in the embodiment of the present application.

[0055] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0056] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0057] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0058] With the improvement of social security awareness, X-ray security technology is increasingly used in public places such as airports, stations, and large-scale events. Its main purpose is to detect and identify prohibited items in luggage to ensure public safety. Effective prohibited item detection methods are crucial to preventing terrorist attacks, criminal acts, and other potential threats. At present, the detection of prohibited items in X-ray security images mainly relies on manual visual recognition. Security personnel need to carefully examine the images generated by the X-ray machine to identify prohibited items. In addition, some automated detection methods are also used to assist in the detection of prohibited items. Although manual detection and traditional automated methods can identify prohibited items to a certain extent, they have problems with low efficiency and lack of accuracy.

[0059] The main solution of the embodiment of the present application is: by acquiring target images containing a data set of images of prohibited items for security inspection, the embodiment first constructs a rich training data foundation, and then uses these target images to verify the target detection model. This process involves in-depth analysis and processing of the image data set, and finally obtains the verification result of the image detection of prohibited items for security inspection. The embodiment improves the accuracy and robustness of the model for prohibited items detection, ensures that prohibited items can be efficiently and accurately identified in practical applications, thereby improving the overall security inspection efficiency and safety.

[0060] It should be noted that the execution subject of the embodiment of the present application can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions. The following takes the terminal loaded with this model as an example to illustrate this embodiment and the following embodiments.

[0061] Based on this, the present application embodiment provides a method for detecting prohibited items in security inspection, referring to Figure 1 , Figure 1This is a flow chart of the first embodiment of the method for detecting prohibited items in security inspection of the present application.

[0062] In this embodiment, the method for detecting prohibited items for security inspection includes steps S10 to S20:

[0063] Step S10, obtaining a target image, wherein the target image includes a data set of images of prohibited items for security inspection; it should be noted that the target image may be a specific image used to train and verify the target detection model, and these images are collected during the security inspection process and include photos of the luggage scanned by an X-ray machine. These images may contain various prohibited items, such as guns, knives, explosives, etc., which are the basic data for training and verifying the prohibited items detection model. The data set of images of prohibited items for security inspection may be a collection of a series of target images collected for training and evaluating the target detection model. This data set includes not only the image itself, but also the annotation information of the prohibited items in each image, such as the location, size and category of the items. This annotation information is used to guide the model to learn how to identify and locate prohibited items in the image. The images in the data set are preprocessed and annotated so that the deep learning model can learn from them the features to distinguish prohibited items from non-prohibited items.

[0064] Understandably, it is necessary to first collect and organize a series of X-ray security images that contain samples of various prohibited items, such as guns, knives, explosives, etc. These image datasets are used as input for training and validating the target detection model, with the goal of enabling the model to learn to identify and distinguish the features of prohibited items. This step is the basis of the entire detection process, as it provides the necessary data support for the model to accurately detect and locate prohibited items in luggage during subsequent learning and prediction processes, thereby improving the efficiency and safety of security inspections. The quality and diversity of the target images directly affect the performance of the model, so this step is crucial to building an efficient and reliable prohibited items detection system.

[0065] Step S20, verifying the target detection model through the target image to obtain a verification result of the security inspection prohibited items image detection;

[0066] It should be noted that the target detection model can be an algorithm model used in the present invention to identify and locate prohibited items in X-ray security inspection images. This model is usually based on deep learning technology, especially convolutional neural network (CNN), which can automatically learn the characteristics of prohibited items from image data. The model detects and determines the location and outline of prohibited items by analyzing the input X-ray image, and usually outputs bounding boxes, which mark the specific location of prohibited items in the image. The verification result of the security inspection prohibited item image detection can be the output obtained after analyzing the X-ray security inspection image using the target detection model. These results include the bounding box, category label and confidence score of the prohibited items identified by the model. The verification results are used to evaluate the performance of the model, including its accuracy, recall rate and precision. Through these verification results, the actual application effect of the target detection model can be evaluated to ensure that it can work reliably in the actual security inspection scene and effectively assist security personnel in identifying and handling prohibited items.

[0067] It can be understood that the process of verifying the target detection model through the target image involves using an X-ray security image dataset containing prohibited items to test and evaluate the performance of the model. The purpose of this step is to verify the accuracy and reliability of the model in identifying prohibited items in practical applications. The final verification results include the model's ability to detect prohibited items in the image, such as recognition accuracy, positioning accuracy, and overall detection efficiency. These results directly reflect the effectiveness and practicality of the model in actual security inspection scenarios.

[0068] As an example, the target detection model is verified by the target image to obtain the verification result of the security inspection prohibited items image detection, including: obtaining training data based on the target image; inputting the training data into the initial detection model to obtain a predicted bounding box; determining a distance loss value based on the predicted bounding box and the annotated bounding box; obtaining an overlap coefficient between the annotated bounding box and the predicted bounding box; and adjusting the initial detection model based on the overlap coefficient, the distance loss value and the balance loss parameter until the initial detection model converges to obtain a target detection model.

[0069] The training data refers to the original X-ray security image datasets used to train the target detection model. These datasets contain images of various prohibited items, which are used to enable the model to learn how to identify and locate prohibited items. These image data are annotated, that is, the outline of each prohibited item is marked so that the model can know what to identify during the training process. The initial detection model can be the basic model at the beginning of the training. It is usually not optimized and is used to perform preliminary target detection on the input training data and generate prediction results. This model will be continuously adjusted and optimized as the training progresses. The predicted bounding box can be the bounding box predicted by the initial detection model after detecting the prohibited items in the training image, indicating the location and size of the prohibited items in the image as believed by the model. The annotated bounding box can be the real bounding box of the actual prohibited items in the training image annotated by manual or automated tools, which is used to train and evaluate the performance of the model. The distance loss value can be the distance difference between the predicted bounding box and the annotated bounding box, which is usually determined by calculating the difference in vertex coordinates of the two bounding boxes. This value is used to quantify the accuracy of the model prediction. The overlap coefficient can be the ratio of the overlap area between the predicted bounding box and the annotated bounding box to the area of ​​each bounding box, usually measured by the intersection over union (IoU). This coefficient is used to evaluate the accuracy of the predicted bounding box. The balanced loss parameter can be a weight parameter used in the loss function to balance different types of losses (such as classification loss and positioning loss) to ensure that the model gives proper attention to all tasks during training. The object detection model can be a mature model that can accurately detect prohibited items from images and generate accurate bounding boxes after training and optimization. This model has converged, that is, the performance on the training data has reached stability and can be used for actual detection tasks.

[0070] Specifically, first, the target image is used to generate training data, which is then input into the initial detection model, and the model generates predicted bounding boxes, that is, the location and size of the prohibited items in the image predicted by the model. Then, by comparing these predicted bounding boxes with the actual bounding boxes annotated manually (annotated bounding boxes), the distance loss value is calculated, which reflects the distance difference between the predicted box and the real box. At the same time, the overlap coefficient, that is, the intersection over union (IoU) between the predicted box and the real box, is calculated. This coefficient measures the accuracy of the predicted box. Finally, the initial detection model is adjusted and optimized using the overlap coefficient, distance loss value, and balance loss parameter. This process is repeated until the performance of the model on the training data is stable, that is, the model converges. At this time, the model obtained is the final target detection model, which can accurately detect prohibited items in the image.

[0071] As an example, determining a distance loss value according to the predicted bounding box and the annotated bounding box includes: obtaining a weight coefficient, a width of the target image, a height of the target image, and vertex coordinates of the annotated bounding box and vertex coordinates of the predicted bounding box to obtain a vertex coordinate distance between the annotated bounding box and the predicted bounding box; and obtaining a distance loss value based on the vertex coordinate distance and the weight coefficient.

[0072] Among them, the weight coefficient in the target detection model can refer to a numerical factor used to adjust the relative importance of different loss components. When calculating the distance loss value, the weight coefficient can help balance the contribution of different vertex coordinate distances to the final loss value, or emphasize the importance of certain vertex coordinate distances. The choice of weight coefficient depends on the needs of the specific application and the sensitivity of the model designer to different types of errors. The vertex coordinates of the annotated bounding box can be the coordinate values ​​of the four corner points (upper left corner, upper right corner, lower left corner, and lower right corner) of the bounding box determined by manual annotation. These coordinates define the position and size of the bounding box in the target image, usually expressed in pixels. The vertex coordinates of the predicted bounding box can be the coordinate values ​​of the four corner points of the bounding box automatically predicted by the target detection model. These coordinates are calculated by the model based on the input target image data, indicating the position and size of the target object in the image as considered by the model. The vertex coordinate distance can be the distance between the corresponding vertices of the annotated bounding box and the predicted bounding box. Specifically, it is the Euclidean distance between the coordinates of the upper left corner, upper right corner, lower left corner, and lower right corner of the two sets of bounding boxes. This distance measures the difference in position between the bounding box predicted by the model and the bounding box of the actual annotation. In the object detection task, by calculating the vertex coordinate distance and combining it with the weight coefficient to obtain the distance loss value, the accuracy of the model prediction can be quantified and used for optimization during the model training process to reduce the difference between the predicted bounding box and the actual bounding box.

[0073] Specifically, in the object detection process, in order to measure the accuracy between the model's predicted bounding box and the actual annotated bounding box, it is first necessary to obtain the weight coefficient and the size information of the target image, including the width and height of the image. At the same time, the coordinates of the four vertices of the annotated bounding box and the predicted bounding box are also required. By calculating the distance between the two sets of bounding box vertices, the vertex coordinate distance can be obtained. Then, using these distances and the preset weight coefficients, the distance loss value is calculated. The loss value reflects the degree of deviation between the predicted bounding box and the true bounding box in spatial position, which is one of the key indicators used to optimize and adjust model parameters in model training. This process ensures that the model can improve the accuracy of the prediction by minimizing the distance loss value.

[0074] As an example, the target detection model is verified by the target image to obtain a verification result of the security inspection prohibited items image detection, including: obtaining a training image based on training data; slicing, convolving and extracting features of the training image to obtain a first reference feature map; convolving the first reference feature map to obtain a second reference feature map; performing dynamic convolution, feature extraction and spatial pyramid pooling on the second reference feature map to obtain a third reference feature map; performing feature fusion based on the third reference feature map to obtain a verification result of the security inspection prohibited items image detection.

[0075] Among them, the training image refers to the image extracted from the training data and used in the actual training process. These images will undergo a series of preprocessing and enhancement operations, such as scaling, cropping, and normalization, to meet the requirements of the model input. The first reference feature map refers to the feature map Feature-C2, the second reference feature map refers to the feature map Feature-C3, and the third reference feature map refers to the feature map Feature-C5. The training image passes through the first layer of Focus convolution. The specific method is to first slice the input training image. Specifically, for a 640×640×3 RGB image, the Focus module will take the value of every other pixel in each direction to generate four smaller, complementary images. This step is similar to neighboring downsampling. The size of each slice image is 320×320, but the number of channels changes from 3 to 12. After the above slicing operation, the four images are spliced ​​along the channel dimension to form a new 320×320×12 feature map. This process not only retains the spatial information of the original image, but also concentrates the information of width (w) and height (h) into the channel space, thereby achieving lossless compression of information. The image is then convolved to obtain the feature map Feature-C1 after the feature map passes through the Focus convolution and the 3×3 convolution layer; the feature map Feature-C1 is input into the CSP module, where CSP divides the input feature map into two branches, performs convolution operations and residual connections respectively, and then merges the feature maps of the two branches to achieve more efficient feature extraction and gradient back propagation. The CSP structure first divides the input feature map into two branches. In the first branch, the feature map passes through a convolution layer (Conv+BN+SiLU) and the number of channels is halved. This branch also passes through multiple residual structures (Bottleneck*N) to further extract features. In the second branch, the input feature map is directly convolved without passing through the residual structure. The feature maps of the two branches are merged through the concat operation. The merged feature map will pass through a convolution layer (Conv+BN+SiLU) again, and the activation function is processed, and then pass through a 3×3 convolution layer to obtain the feature map Feature-C2. The feature map Feature-C2 is passed through a CSP module and a 3×3 convolution to output Feature-C3; after the feature map Feature-C3 passes through a CSP module, it is input into the dynamic convolution network, and the output after dynamic convolution is Feature-C4. The specific implementation flow chart of dynamic convolution (DynamicConv) is as follows Figure 2As shown in the figure, attention is an attention mechanism, a mechanism that simulates human attention in deep learning, which is used to enhance the model's attention to important parts of the input data; avg pool is an average pooling layer, a pooling operation that divides the input feature map into several regions and averages the values ​​in each region to reduce the size of the feature map; FC is a fully connected layer, a neural network layer in which each neuron is connected to all neurons in the previous layer; ReLU is a rectified linear unit, an activation function that sets all negative values ​​to zero and retains positive values; softmax is an activation function commonly used in the output layer of multi-classification problems to convert the output into a probability distribution; conv1, conv2, and convk are the basic building blocks in convolutional neural networks, used to extract local features of input data. x is the input data, which can be an image or other types of data; y is the output data, which is usually the prediction result of the model; conv is a convolution operation used to extract the features of the input data; BN is batch normalization, a technology used to accelerate the training of neural networks and improve their stability; Activation is an activation function used to introduce nonlinearity in neural networks so that the model can learn more complex features; Data flow is the data flow, which refers to the data transmission path in the model; Model parameter flow is the model parameter flow, which refers to the update path of the model parameters during the training process. This figure shows a neural network module containing an attention mechanism, in which the input data x is processed by a series of convolutional layers, the weights are adjusted by the attention mechanism, and then combined with the original data, and finally processed by convolution, batch normalization and activation function to obtain the output data y. The attention mechanism calculates the weight of each convolutional layer through average pooling, fully connected layers, ReLU activation functions and softmax functions, and these weights are used to weightedly merge the outputs of different convolutional layers. After the feature map Feature-C4 passes through a CSP module, it enters the spatial pyramid pooling layer for maximum pooling. The architecture of the spatial pyramid pooling layer is described below. First, the input feature map is first subjected to a convolution operation to reduce its size and the number of parameters. This step helps to reduce the computational complexity while retaining the main feature information. Next, the compressed feature map is subjected to multiple serial MaxPool operations, each time using convolution kernels of different sizes (such as 5×5, 9×9, 13×13, etc.). These operations extract features at different scales and help capture information at different levels in the image. The feature map obtained after multiple pooling operations is fused with the original feature map before pooling through the concat module. Finally, the fused feature map is subjected to a convolution operation to increase its dimension. This step helps to restore the expressive power of the feature map and provide richer information for subsequent network layers.After Feature-C4 passes through the spatial pyramid pooling layer, the feature map Feature-C5 is obtained, which serves as the input for the subsequent Neck part feature fusion.

[0076] Specifically, based on the training data, the image used for training is first obtained, and then the first reference feature map is generated by slicing, convolution and feature extraction operations. The feature map contains the preliminary feature information of the image. Next, the first reference feature map is further convolved to obtain the second reference feature map to deepen the feature extraction. Subsequently, dynamic convolution, feature extraction and spatial pyramid pooling are applied to the second reference feature map to obtain the third reference feature map. This step enhances the model's ability to capture features of different scales. Finally, feature fusion is performed based on the third reference feature map to integrate features at all levels to produce verification results for security inspection prohibited items image detection.

[0077] As an example, feature fusion is performed based on the third reference feature map to obtain a verification result of image detection of prohibited items for security inspection, including: upsampling the third reference feature map and performing feature fusion with the second reference feature map to obtain a fourth reference feature map; determining an attention score based on the fourth reference feature map, and obtaining a fifth reference feature map according to the attention score; upsampling the fifth reference feature map and performing feature fusion with the first reference feature map to obtain a sixth reference feature map; and obtaining a verification result of image detection of prohibited items for security inspection based on the sixth reference feature map.

[0078] Among them, the fourth reference feature map refers to the feature map Feature-F1, the fifth reference feature map refers to the feature map Feature-F2, and the sixth reference feature map refers to the feature map Feature-F3. The FPN network obtains the feature map Feature-U1 by performing convolution with a convolution kernel of 3×3 and a channel number of 512 on the feature map Featrue-C5 after feature extraction and upsampling; the feature map Feature-U1 is feature fused with the feature map Feature-C3. The feature fusion method is to horizontally connect the two feature maps with the same resolution. The method used here is addition, that is, element-by-element addition, to fuse feature information of different scales. After passing through the CSP module, the fused feature map Feature-F1 is obtained. After the above feature map Feature-F1 passes through the large-core separable attention module, it is convolved with a convolution kernel size of 3×3 to obtain the feature map Feature-F2. Among them, the target detection framework is as follows Figure 3As shown in the figure, Input refers to the input data of the neural network or model; Backbone is the main part of the neural network used to extract features; Focus is a special convolutional layer used to adjust the channel dimension of the input image, which is usually used in the YOLO series of models; Conv is the convolutional layer, which is the basic building block in the convolutional neural network and is used to extract local features of the input data; BottleneckCSP is the bottleneck CSP module, which is a network structure that combines the bottleneck layer and CSP (Cross Stage The characteristics of the partial) network are used to improve the efficiency and performance of the network; DynamicConv is a dynamic convolution layer that can dynamically adjust the convolution kernel parameters according to the input features; SPPF is a spatial pyramid pooling layer, which is used to extract features at different scales and enhance the model's detection ability for targets of different sizes; Neck is a neck network located between the backbone network and the detection head, which is used to further process and fuse features; Concat is a splicing operation used to merge two or more feature maps in the channel dimension; upsample is an upsampling operation used to increase the size of the feature map, which is usually used to recover high-resolution information from low-resolution feature maps; LSKA is a large kernel separable attention mechanism, which is an attention mechanism used to enhance the model's attention to important features; Head is the output part of the neural network, which is used to generate the final detection results, such as bounding boxes and category probabilities. This figure shows the network architecture of an object detection model, including the backbone network, the neck network, and the detection head. The backbone network is responsible for extracting the features of the input image, the neck network is used to fuse and process these features, and the detection head is responsible for generating the final detection results. The figure also shows advanced feature processing techniques such as dynamic convolution and large kernel separable attention mechanism, which help improve the detection performance of the model. The large kernel separable attention module uses large convolution kernels to capture extensive contextual information in the image. Its flowchart is shown in the figure. Figure 4 shown. Figure 4Input is the input data of the neural network or model; DW-Conv is Depthwise Separable Convolution, which is an efficient convolution operation that decomposes the standard convolution into two smaller operations: Depthwise Convolution and Pointwise Convolution to reduce the amount of calculation and model parameters. 1*(2d-1)DW-Conv represents a depth-wise separable convolution layer, where the convolution kernel size is 1x(2d-1). This setting is usually used to adjust the size of the feature map or increase the diversity of features; (2d-1)*1DW-Conv represents another depth-wise separable convolution layer, where the convolution kernel size is (2d-1)x1. This setting is used to further process the feature map; 1*[k / d]DW-D-Conv represents a depth-wise separable convolution layer, where the convolution kernel size is 1x[k / d]. Here [k / d] may represent some specific size adjustment, and k and d are parameters; [k / d]*1DW-D-Conv represents another depth-wise separable convolution layer, where the convolution kernel size is [k / d]x1. 1*1Conv** represents a 1x1 convolution layer, which is usually used to adjust the number of channels of the feature map or perform feature fusion. Large convolution kernels can simulate the receptive field of the self-attention mechanism, and by decomposing the two-dimensional convolution kernel of the deep convolution layer into serially connected horizontal and vertical one-dimensional convolution kernels, the computational complexity is reduced while maintaining the model performance. Through one-dimensional convolution operations in the horizontal and vertical directions, LSKA can effectively integrate spatial information and improve the accuracy and robustness of target detection. The feature map Feature-F2 is upsampled to obtain Feature-U2, and the feature map Feature-U2 is fused with the feature map Feature-C2 from the backbone network after the CSP module to obtain the fused feature map Feature-F3.

[0079] Specifically, the third reference feature map is first upsampled to increase its resolution, and then feature fused with the second reference feature map to generate the fourth reference feature map. This step helps to combine feature information at different levels. Next, attention scores are calculated based on the fourth reference feature map. These scores indicate the importance of each area in the image. Based on this, the fifth reference feature map is generated to further highlight the key areas. Subsequently, the fifth reference feature map is upsampled and feature fused with the first reference feature map to obtain the sixth reference feature map. This process further refines the feature representation. Finally, based on the sixth reference feature map, the model can accurately identify and locate prohibited items in the image, thereby obtaining verification results for security inspection prohibited items image detection.

[0080] As an example, based on the sixth reference feature map, a verification result of image detection of prohibited items for security inspection is obtained, including: based on the sixth reference feature map, a first target prediction map is obtained; based on the fifth reference feature map and the sixth reference feature map, a second target prediction map is obtained; based on the third reference feature map, the fifth reference feature map and the sixth reference feature map, a third target prediction map is obtained; based on the first target prediction map, the second target prediction map and the third target prediction map, a verification result of image detection of prohibited items for security inspection is obtained.

[0081] Among them, the first target prediction map refers to the feature prediction map P1, the second target prediction map refers to the feature prediction map P2, and the third target prediction map refers to the feature prediction map P3. The feature map Feature-F3 is subjected to feature extraction through the CSP module and the convolution layer with a convolution kernel size of 1×1 to obtain the feature prediction map P1, which has a size of 80×80 and a feature size of 1 / 4 of the original image, and is used for the detection of small targets. The feature map Feature-F3 is subjected to the CSP module and the convolution kernel size of 3×3 to obtain Feature-F4, and Feature-F4 is feature fused with the above-mentioned feature map Feature-F2 to obtain the feature map Feature-F5, and then the feature extraction is performed through the CSP module and the convolution layer with a convolution kernel of 1×1 to obtain the feature prediction map P2, which has a size of 40×40 and a feature size of 1 / 8 of the image, and is used for the detection of medium-sized targets. The feature map Feature-F5 is convolved through the CSP module and the convolution kernel size of 3×3 to obtain Feature-F6, and Feature-F6 and the feature map Feature-C5 are convolved through the convolution kernel size of 3×3 to obtain the feature map Feature-F7, and then feature extraction is performed through the CSP module and the convolution layer with the convolution kernel of 1×1 to obtain the feature prediction map P3 with a size of 20×20, and its feature size is 1 / 16 of the image, which is used for the detection of large targets.

[0082] Specifically, based on the sixth reference feature map, we first obtain the first target prediction map, which is suitable for the prediction of small targets. Then, combining the information of the fifth reference feature map and the sixth reference feature map, we generate the second target prediction map, which is suitable for the prediction of medium-sized targets. Then, by combining the third reference feature map, the fifth reference feature map and the sixth reference feature map, we obtain the third target prediction map, which is suitable for the prediction of large targets. Finally, based on these three target prediction maps, a comprehensive analysis is performed to obtain the verification results of the security inspection prohibited items image detection. This result reflects the comprehensive performance of the model in the actual detection task, including the recognition accuracy and positioning accuracy of prohibited items, thereby verifying the effectiveness and practicality of the model in X-ray security inspection image detection.

[0083] This embodiment provides a method for detecting prohibited items for security inspection. This embodiment first constructs a rich training data foundation by acquiring target images containing a data set of images of prohibited items for security inspection, and then uses these target images to verify the target detection model. This process involves in-depth analysis and processing of the image data set, and finally obtains the verification result of the image detection of prohibited items for security inspection. This embodiment improves the accuracy and robustness of the model for prohibited items detection, ensures that prohibited items can be efficiently and accurately identified in practical applications, thereby improving the overall security inspection efficiency and safety.

[0084] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later. Figure 5 , Figure 5 This is a flow chart of the second embodiment of the method for detecting prohibited items for security inspection of the present application. Step S20 of the method for detecting prohibited items for security inspection includes steps S21 to S23:

[0085] Step S21, obtaining test data based on the target image;

[0086] It should be noted that test data refers to a dataset extracted or generated from target images for evaluating the performance of target detection models. In the field of machine learning and deep learning, the test dataset is independent of the training dataset and contains new samples that are not used in the model training process. These samples are used to simulate real-world application scenarios to fairly evaluate the generalization ability of the model on unseen data. For security inspection prohibited items image detection, the test dataset includes a series of X-ray images that may or may not contain prohibited items. The quality and diversity of the test data are crucial to the final performance of the model. Therefore, building a representative and wide-coverage test dataset is one of the key steps to the success of a machine learning project.

[0087] It can be understood that the process of obtaining test data based on the target image involves selecting a part of the collected X-ray security images that have not been used for model training. These images constitute a test data set for evaluating and verifying the performance of the target detection model in practical applications, including its accuracy in identifying prohibited items, positioning accuracy, and overall detection efficiency, to ensure that the model has good generalization ability and reliability on new data independent of the training data.

[0088] Step S22, based on the test data and the target detection model, obtain the indicator accuracy, recall rate and mean average precision;

[0089] It should be noted that the indicators Precision, Recall and Mean Average Precision (mAP) are three key indicators for evaluating the performance of target detection models. Precision can be the proportion of samples predicted as positive (i.e., prohibited items) by the model that are actually positive. It measures the accuracy of the model's predictions, that is, the ability to reduce false positives. Recall can be the proportion of samples correctly predicted as positive by the model among all samples that are actually positive. It measures the ability of the model to detect all positive samples, that is, the ability to reduce missed reports. Mean Average Precision can be an indicator that comprehensively considers precision and recall. It calculates the average precision at different recall levels. It is usually used for multi-class classification problems. The average precision (AP) is calculated for each class, and then the average AP of all classes is calculated. These three indicators together provide a comprehensive evaluation of the performance of the target detection model. Precision focuses on the accuracy of the prediction, recall focuses on the coverage of the model, and mAP provides a metric that comprehensively considers both. Especially in the case of class imbalance, mAP is a very important performance indicator. The calculation formulas for the indicators accuracy, recall, and mean average precision can be:

[0090] Among them, TP (True Positives) represents the number of correctly classified positive samples, FP (False positives) represents the number of misclassified negative samples, and FN (False negatives) represents the number of misclassified positive samples. AP (average precision) is obtained through Precision and Recall. For each category, first calculate its PRC (Precision-Recall Curve), that is, the PR curve. The value of AP is the area under the PR curve, which is usually calculated using integration or approximate methods. mAP is obtained by averaging the AP of all categories.

[0091] It can be understood that based on the test data and target detection model, the indicators accuracy, recall and mean average precision are three key indicators for evaluating model performance, among which accuracy measures the proportion of prohibited items predicted by the model to be actually prohibited items, recall measures the proportion of all actual prohibited items correctly predicted by the model, and mean average precision comprehensively considers the accuracy performance of the model at different recall levels, and an overall performance evaluation is obtained by calculating the average precision of all categories. These indicators jointly reflect the accuracy, completeness and comprehensive performance of the model in identifying prohibited items.

[0092] Step S23, obtaining a verification result based on the indicator accuracy, the recall rate and the mean average precision.

[0093] It should be noted that the validation results refer to the conclusions obtained after a comprehensive evaluation of the target detection model using the three key performance indicators of accuracy, recall, and mean average precision (mAP). Combining these indicators, the validation results can comprehensively evaluate the effectiveness and reliability of the target detection model in the actual X-ray security image detection task. If the model performs well on these indicators, then the validation results will indicate that the model is suitable for actual deployment, can effectively assist security inspections, and improve the efficiency and accuracy of prohibited items detection. Conversely, if these indicators perform poorly, the validation results will indicate that the model needs further optimization and adjustment.

[0094] It is understandable that the verification results based on the accuracy, recall and mean average precision of the indicators refer to the conclusion of the overall performance of the model by comprehensively evaluating the performance of the target detection model on the test data. This conclusion not only reflects the accuracy (accuracy) of the model in identifying prohibited items, but also includes the comprehensiveness (recall) of the model in identifying prohibited items, as well as the average precision (mean average precision) of the model performance under different search intensities. The combination of these indicators can provide a comprehensive performance view to guide whether the model needs to be adjusted or to verify its effectiveness in practical applications.

[0095] The first step of this embodiment is to obtain test data, which involves extracting data for model evaluation from an X-ray image data set containing prohibited items for security inspection. These data will serve as the basis for evaluating the performance of the target detection model to ensure the objectivity and accuracy of the test results. Then, the performance of the model is evaluated using these test data and the trained target detection model. In this step, the model detects prohibited items in the images in the test data set and generates prediction results. By comparing the prediction results of the model with the actual annotation information, the three key performance indicators of the model, namely, accuracy, recall and mean average precision, are calculated. The accuracy reflects the proportion of prohibited items correctly predicted by the model, the recall measures the ability of the model to identify all prohibited items, and the mean average precision comprehensively considers the detection performance of prohibited items of different categories. Finally, based on the above-calculated accuracy, recall and mean average precision indicators, a verification result is obtained. This result not only verifies the effectiveness of the target detection model in practical applications, but also provides a basis for further optimization of the model. If the verification results meet the preset performance standards, it means that the model is ready to be deployed in the actual security inspection process; if not, the model needs to be adjusted and retrained to improve its ability to detect prohibited items. The whole process forms a closed-loop evaluation and optimization process to ensure that the object detection model can play the greatest role in actual X-ray security inspection.

[0096] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the method for detecting prohibited items for security inspection in the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0097] This application also provides a security inspection prohibited items detection device, please refer to Figure 6 , the security inspection prohibited items detection device comprises:

[0098] An acquisition module 10 is used to acquire a target image, wherein the target image includes a data set of images of prohibited items for security inspection;

[0099] The verification module 20 is used to verify the target detection model through the target image to obtain a verification result of the security inspection prohibited items image detection.

[0100] The prohibited items detection device for security inspection provided by the present application adopts the prohibited items detection method for security inspection in the above-mentioned embodiment, and can solve the technical problem of how to improve the accuracy of automatic identification of prohibited items in X-ray security inspection images. Compared with the prior art, the beneficial effects of the prohibited items detection device for security inspection provided by the present application are the same as the beneficial effects of the prohibited items detection method for security inspection provided by the above-mentioned embodiment, and the other technical features of the prohibited items detection device for security inspection are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.

[0101] The present application provides a security inspection prohibited items detection device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the security inspection prohibited items detection method in the above-mentioned embodiment one.

[0102] Reference below Figure 7 , which shows a schematic diagram of the structure of a security inspection prohibited article detection device suitable for implementing the embodiment of the present application. The security inspection prohibited article detection device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The security prohibited items detection device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0103] like Figure 7 As shown, the security inspection prohibited article detection device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the security inspection prohibited article detection device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the security inspection prohibited article detection device to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a security inspection prohibited article detection device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.

[0104] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0105] The prohibited items detection device for security inspection provided by the present application adopts the prohibited items detection method for security inspection in the above embodiment, which can solve the technical problem of how to improve the accuracy of automatic identification of prohibited items in X-ray security inspection images. Compared with the prior art, the beneficial effects of the prohibited items detection device for security inspection provided by the present application are the same as the beneficial effects of the prohibited items detection method for security inspection provided by the above embodiment, and the other technical features of the prohibited items detection device for security inspection are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0106] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0107] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0108] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the method for detecting prohibited items for security inspection in the above-mentioned embodiment.

[0109] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0110] The computer-readable storage medium may be included in the security inspection prohibited items detection device; or may exist independently without being assembled into the security inspection prohibited items detection device.

[0111] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the security inspection prohibited items detection device, the security inspection prohibited items detection device: obtains a target image, and the target image contains a security inspection prohibited items image data set; verifies the target detection model through the target image to obtain a verification result of the security inspection prohibited items image detection.

[0112] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0113] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0114] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0115] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned security inspection prohibited items detection method, and can solve the technical problem of how to improve the accuracy of automatic identification of prohibited items in X-ray security inspection images. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the security inspection prohibited items detection method provided by the above-mentioned embodiment, and will not be repeated here.

[0116] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned method for detecting prohibited items in security inspection when executed by a processor.

[0117] The computer program product provided by the present application can solve the technical problem of how to improve the accuracy of automatic identification of contraband in X-ray security inspection images. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the security inspection contraband detection method provided by the above embodiment, which will not be repeated here.

[0118] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for detecting prohibited items during security inspection, characterized in that: The method comprises: Acquire a target image, wherein the target image includes a data set of images of prohibited items for security inspection; The target detection model is verified by the target image to obtain a verification result of the security inspection prohibited items image detection.

2. The method according to claim 1, characterized in that The target detection model is verified by the target image to obtain a verification result of the security inspection prohibited items image detection, including: Based on the training data, a training image is obtained; After slicing, convolving and extracting features from the training image, a first reference feature map is obtained; Convolving the first reference feature map to obtain a second reference feature map; Performing dynamic convolution, feature extraction, and spatial pyramid pooling processing on the second reference feature map to obtain a third reference feature map; Feature fusion is performed based on the third reference feature map to obtain a verification result of the security inspection prohibited items image detection.

3. The method according to claim 2, characterized in that The step of performing feature fusion based on the third reference feature map to obtain a verification result of image detection of prohibited items for security inspection includes: Upsampling the third reference feature map, and performing feature fusion with the second reference feature map to obtain a fourth reference feature map; Determine an attention score based on the fourth reference feature map, and obtain a fifth reference feature map according to the attention score; Upsampling the fifth reference feature map, and performing feature fusion with the first reference feature map to obtain a sixth reference feature map; Based on the sixth reference feature map, a verification result of the security inspection prohibited items image detection is obtained.

4. The method according to claim 3, characterized in that The obtaining, based on the sixth reference feature map, a verification result of the security inspection prohibited items image detection includes: Based on the sixth reference feature map, obtaining a first target prediction map; Based on the fifth reference feature map and the sixth reference feature map, obtaining a second target prediction map; Obtaining a third target prediction map based on the third reference feature map, the fifth reference feature map, and the sixth reference feature map; Based on the first target prediction map, the second target prediction map and the third target prediction map, a verification result of the security inspection prohibited items image detection is obtained.

5. The method according to claim 1, characterized in that Before verifying the target detection model by using the target image to obtain the verification result of the security inspection prohibited items image detection, the method includes: Based on the target image, obtaining training data; Input the training data into the initial detection model to get the predicted bounding box; Determining a distance loss value based on the predicted bounding box and the labeled bounding box; Obtaining an overlap coefficient between the annotated bounding box and the predicted bounding box; The initial detection model is adjusted according to the overlap coefficient, the distance loss value and the balance loss parameter until the initial detection model converges to obtain a target detection model.

6. The method according to claim 5, characterized in that The determining of the distance loss value according to the predicted bounding box and the labeled bounding box includes: Obtaining a weight coefficient, a width of the target image, a height of the target image, vertex coordinates of the marked bounding box, and vertex coordinates of the predicted bounding box, and obtaining a vertex coordinate distance between the marked bounding box and the predicted bounding box; Based on the vertex coordinate distance and the weight coefficient, a distance loss value is obtained.

7. The method according to claim 1, characterized in that The target detection model is verified by the target image to obtain a verification result of the security inspection prohibited items image detection, including: Based on the target image, obtaining test data; Based on the test data and the target detection model, the indicator accuracy, recall rate and mean average precision are obtained; A verification result is obtained based on the indicator accuracy, the recall rate and the mean average precision.

8. A security inspection prohibited items detection device, characterized in that: The device comprises: An acquisition module, used to acquire a target image, wherein the target image includes a data set of images of prohibited items for security inspection; The verification module is used to verify the target detection model through the target image to obtain the verification result of the security inspection prohibited items image detection.

9. A security inspection prohibited items detection device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for detecting prohibited items for security inspection according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for detecting prohibited items for security inspection according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • X-ray security check image forbidden article detection method based on improved YOLOv5s

    CN114897887A

  • Steel defect detection method based on large separable convolution attention mechanism

    CN118365623A

  • Contraband identification model construction method and contraband identification method

    CN118447366A

  • Biological recognition detection method and system suitable for underwater unmanned equipment

    CN118537713A

Cited By

  • Prohibited article risk detection method based on incidence relation

    CN120299012A

  • A method for detecting prohibited article risk based on association relationship

    CN120299012B