Security inspection machine detection model and training data generation method and device thereof
By acquiring high- and low-energy data and using feature extraction and reconstruction models to generate pseudo-color training images adapted to target security inspection machines, the problem of poor small target detection performance in traditional methods is solved, achieving efficient training data generation and accurate small target detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DONGGUAN ZKTECO ELECTRONICS TECH
- Filing Date
- 2022-11-17
- Publication Date
- 2026-05-05
AI Technical Summary
Traditional training data generation methods cannot effectively improve the small target detection performance of security inspection machine detection models, and existing technologies struggle to generate training images that match real-world scenarios.
By acquiring high- and low-energy data, a feature extraction model is used to extract high-order material features, which are then fused with the features of the background items and the injected items. A pseudo-color training image is generated by combining the feature restoration model, and the detection model of the target security inspection machine is trained accordingly.
The generated training data is closer to the real-world scenario, improving the accuracy and efficiency of small target detection while reducing costs.
Smart Images

Figure CN115690563B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of security inspection machine technology, and in particular to a security inspection machine detection model and its training data generation method, device, storage medium and computer equipment. Background Technology
[0002] Security checks are a crucial means of identifying and eliminating potential hazards, implementing safety measures, and preventing accidents. In recent years, X-ray machines have been widely used for security checks in public places such as subway stations and airports. Security personnel primarily rely on the naked eye to examine images captured by X-ray security cameras, which can easily lead to missed or false detections. To improve efficiency, deep learning-based security machine detection models have emerged, enabling automated detection. However, these models are data-driven; the quantity and quality of the training set determine the detection accuracy. Traditional training data generation methods cannot guarantee the detection performance of small targets by these models. Summary of the Invention
[0003] The purpose of this application is to at least address one of the aforementioned technical deficiencies, particularly the technical deficiency that training images in traditional techniques are insufficient to help security inspection machine detection models improve small target detection performance.
[0004] In a first aspect, embodiments of this application provide a method for generating training data for a security inspection machine detection model, including:
[0005] Obtain the high and low energy data of the first background item and the first injected item;
[0006] The high and low energy data of the first background item and the first injected item are respectively input into the feature extraction model corresponding to the target security inspection machine to obtain the high-order material features of the first background item and the high-order material features of the first injected item; the high-order material features are used to reflect two or more material properties of the item.
[0007] The higher-order material characteristics of the first background item and the first injected item are fused to obtain fused characteristics;
[0008] The fused features are input into the feature restoration model corresponding to the target security inspection machine to obtain the high and low energy data of the injected item; the injected item is the result of fusing the first injected item into the first background item.
[0009] Based on the high and low energy data of the injected item, the first original image is obtained;
[0010] The first original image is colored to obtain the first training image.
[0011] In one embodiment, after obtaining multiple first training images, the training data generation method further includes:
[0012] Acquire high- and low-energy images of the second background object and the second injected object;
[0013] For a set of high- and low-energy images of a second background object and a second injected object, the pixel values corresponding to the pixel values of the set of pixels are queried according to the pixel values of the set of pixels and the injection mapping table. The pixel values of the pixels at the same position in the second training image are determined according to the queried pixel values, and the second training image is obtained. The injection mapping table is used to reflect the mapping relationship between the pixel values of each pixel in the high- and low-energy images of the first background object and the first injected object and the pixel values of the pixels at the same position in the corresponding first training image.
[0014] In one embodiment, coloring the first original image includes:
[0015] Select the coloring method corresponding to the target security inspection machine and color the first original image.
[0016] In one embodiment, after obtaining the first training image, the method further includes:
[0017] Data augmentation is performed on the first training image to obtain multiple third training images.
[0018] In one embodiment, the data augmentation method includes any of the following:
[0019] Perform geometric transformations on the items in the first training image;
[0020] Perform color transformation on the items in the first training image.
[0021] Secondly, this application provides a security inspection machine detection model, which includes a backbone network, a feature fusion network and a detection network connected in sequence. The security inspection machine detection model is trained using the training data generation method in any of the above embodiments.
[0022] In one embodiment, an ASFF module is configured at the tail of the feature fusion network.
[0023] Thirdly, embodiments of this application provide a training data generation device for a security inspection machine detection model, including:
[0024] The high and low energy data acquisition module is used to acquire the high and low energy data of the first background item and the first injected item;
[0025] The feature extraction module is used to input the high and low energy data of the first background item and the first injected item into the feature extraction model corresponding to the target security inspection machine, respectively, to obtain the high-order material features of the first background item and the high-order material features of the first injected item; the high-order material features are used to reflect two or more material properties of the item;
[0026] The feature fusion module is used to fuse the high-order material features of the first background item and the first injected item to obtain fused features;
[0027] The feature restoration module is used to input the fused features into the feature restoration model corresponding to the target security inspection machine to obtain the high and low energy data of the injected item; the injected item is the result of fusing the first injected item into the first background item.
[0028] The imaging module is used to obtain the first raw image based on the high and low energy data of the injected object;
[0029] The coloring module is used to color the first original image to obtain the first training image.
[0030] Fourthly, embodiments of this application provide a storage medium storing computer-readable instructions. When executed by one or more processors, the computer-readable instructions cause the one or more processors to perform the steps of the training data generation method in any of the above embodiments.
[0031] Fifthly, embodiments of this application provide a computer device including one or more processors and a memory storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, they perform the steps of the training data generation method in any of the above embodiments.
[0032] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0033] Based on any of the above embodiments, a feature extraction model specifically adapted to the target security inspection machine is used to extract features from the high- and low-energy data of the first background object and the first injected object, respectively. This yields higher-order material features that better reflect the absorption characteristics of the object to X-rays in the target security inspection machine. The higher-order material features of the first background object and the first injected object are then fused to obtain fused features reflecting the higher-order material features of the injected object. Finally, the fused features are restored to high- and low-energy data, and the high- and low-energy data of the injected object are imaged and colored to obtain the first training image. This method uses higher-order material features to reflect the absorption characteristics of the material, making the fusion of the background object and the injected object closer to the image acquired in the actual scene. It generates training data that can be used to improve the detection effect of small targets at low cost and high efficiency. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 A flowchart illustrating the method for generating training data for the security inspection machine detection model provided in this application embodiment;
[0036] Figure 2 A module structure diagram of the training data generation device for the security inspection machine detection model provided in the embodiments of this application;
[0037] Figure 3 This is an internal structural diagram of a computer device provided in an embodiment of this application. Detailed Implementation
[0038] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0039] Firstly, embodiments of this application provide a method for generating training data for a security inspection machine detection model. Please refer to [link to relevant documentation]. Figure 1 This includes steps S102 to S112.
[0040] S102, Obtain the high and low energy data of the first background item and the first injected item.
[0041] Understandably, most security inspection machines currently use a dual-energy model for imaging. This means the machine emits X-rays of a continuous energy spectrum at the object. Because the composition of the object varies, the attenuation of high-energy and low-energy X-rays differs. The imaging based on the high-energy and low-energy data collected during the scan can effectively distinguish between materials of different types and thicknesses. The high-energy and low-energy data include both high-energy and low-energy data.
[0042] In the field of security inspection, to generate training images containing prohibited items, TIP (Threat Image Projection) technology is used to simulate injecting prohibited items into background objects. Background objects can be briefcases, suitcases, backpacks, etc. The scanning data for the background objects and injected items used to generate the training images can be collected during routine security checks, or specific items can be selected and scanned specifically for training images. The first background object is the one containing corresponding high- and low-energy data, and the first injected item is a small target injected with corresponding high- and low-energy data (i.e., a small prohibited item).
[0043] S104, input the high and low energy data of the first background item and the first injected item into the feature extraction model corresponding to the target security inspection machine, respectively, to obtain the high-order material features of the first background item and the first injected item. The high-order material features are used to reflect two or more material properties of the item.
[0044] Traditional TIP (Target Injection Point) technology directly fuses the high- and low-energy data of the injected object and the background object, or considers only a single material attribute of the object. Due to the small size of small targets, simple fusion methods easily lead to confusion between the small target and other objects in the background. The resulting training image differs significantly from the actual image of the small target placed within the background in a real-world scene. For the model, this method offers little learning value in improving small target detection performance. To address this issue, the training images generated in this application can only be used to train a specific security inspection machine, namely a target security inspection machine. A feature extraction model corresponding to the target security inspection machine is established based on the X-ray absorption characteristics of materials in the target security inspection machine. The feature extraction model can extract high-order material features reflecting the uniqueness of the material by analyzing the high- and low-energy data of the object. These high-order material features can reflect two or more material attributes, which are properties that affect X-ray absorption, such as density and linear attenuation coefficient. High- and low-energy data can reflect the absorption of X-rays by matter. By acquiring high- and low-energy data of different items and actually testing the higher-order material characteristics of the items, a correspondence between high- and low-energy data and higher-order material characteristics can be established. The feature extraction model can be trained by learning the correspondence between multiple sets of different types of items, thus achieving accurate feature extraction. Higher-order material characteristics can reflect the absorption characteristics of matter to X-rays from two or more dimensions, making the first injected item more distinguishable from other items in the first background item, more closely matching the actual scene, and ensuring that the training images generated based on different combinations of candidate background items and candidate injected items are unique. This makes the final generated training images beneficial for improving the detection effect of small targets.
[0045] S106, the high-order material characteristics of the first background item and the first injected item are fused to obtain fused characteristics.
[0046] Traditional TIP (Telematic Injection Processing) technology directly fuses high- and low-energy data to inject the injected item into the background item. However, this embodiment uses higher-order material features to characterize the first injected item and the first background item; therefore, these two items should be fused at the feature level. This step can be implemented using a feature fusion model. The item obtained by injecting the first injected item into the first background item is called the post-injection item, and the fused features are the higher-order material features of the post-injection item. Inputting the higher-order material features of the first injected item and the first background item into the feature fusion model yields the higher-order material features of the post-injection item.
[0047] There are many ways to construct a feature fusion model, and the appropriate method can be chosen based on the specific circumstances. For example, one approach is to scan a set of background objects and injected objects separately, extracting the higher-order material features of each. Then, the injected object is actually placed into the background objects, and the model is scanned again to extract the higher-order material features of the inserted object. This establishes a correspondence between the higher-order material features of the background objects, the injected object, and the inserted object. By learning from multiple sets of data, a feature fusion model for fusing higher-order material features can be constructed.
[0048] S108, the fused features are input into the feature restoration model corresponding to the target security inspection machine to obtain the high and low energy data of the injected item. The injected item is the result of fusing the first injected item with the first background item.
[0049] It can be understood that the injected item is the result of simulating placing the first injected item inside the first background item. For example, if the first background item is backpack A and the first injected item is contraband B, the injected item is the simulated backpack A containing contraband B. To image the scanned item, it is still necessary to restore the high-order material features to high- and low-energy data. Similar to the feature extraction model, which establishes the correspondence between high- and low-energy data and high-order material features, the feature restoration model is essentially the reverse operation of the feature extraction model, restoring the high-order material features to high- and low-energy data. Therefore, the feature restoration model also needs to consider the absorption characteristics of materials to X-rays in the target security scanner; different target security scanners have different feature extraction and feature restoration models.
[0050] S110, based on the high and low energy data of the injected item, obtain the first original image.
[0051] It can be understood that the first original image is a grayscale image obtained by simulating scanning of the injected object. The method of imaging using the high and low energy data of the object is a relatively mature technology in this field, and will not be elaborated here.
[0052] S112, colorize the first original image to obtain the first training image.
[0053] It is understandable that, due to the insufficient intuitiveness of grayscale images, security inspection machines need to perform pseudo-color coloring on grayscale images generated from high- and low-energy data. This means assigning specific color information based on the grayscale value of each pixel. What security personnel observe is the pseudo-color scanning image. During pseudo-color coloring, since items with similar materials have grayscale values within a specific range in the grayscale image, items can be classified based on their grayscale values, such as organic, inorganic, and mixtures. Each category corresponds to a color, and items of the same category are distinguished by different shades of color. Different security inspection machines may have different color choices and grayscale ranges for each color. Therefore, when coloring, the same coloring method as the target security inspection machine can be selected. Based on this, the image input to the security inspection machine detection model is also a pseudo-color colored image. Therefore, after obtaining the first original image, pseudo-color coloring processing yields the first training image used to train the security inspection machine detection model, and this detection model is specifically suitable for the target security inspection machine. In addition, it is worth mentioning that, based on the method in this embodiment, by randomly combining different first background items and first injected items, and by changing the injection position and injection quantity, a large training set containing the first training images can be obtained.
[0054] Based on the training data generation method in this embodiment, a feature extraction model specifically adapted to the target security inspection machine is used to extract features from the high- and low-energy data of the first background object and the first injected object, respectively. This yields higher-order material features that better reflect the absorption characteristics of the object to X-rays in the target security inspection machine. The higher-order material features of the first background object and the first injected object are then fused to obtain fused features reflecting the higher-order material features of the injected object. Finally, the fused features are restored to high- and low-energy data, and the high- and low-energy data of the injected object are imaged and colored to obtain the first training image. This method uses higher-order material features to reflect the absorption characteristics of the material, making the fusion of the background object and the injected object closer to the image collected in the actual scene. It generates training data that can be used to improve the detection effect of small targets at low cost and high efficiency.
[0055] Since the generation of the first training images relies on multiple models, in order to further enrich the training set and accelerate data generation, [further steps are taken] using [the following methods]. Figure 1After obtaining a certain number of first training images using the method described above, second training images can be generated based on the first training images. Specifically, in one embodiment, after obtaining multiple first training images, the training data generation method further includes:
[0056] (1) Obtain high and low energy images of the second background object and the second injected object.
[0057] It can be understood that high- and low-energy imaging refers to images generated from the high- and low-energy data of objects and then pseudo-colored. The second background object and the second injected object are the materials used to generate the second training image. The second background object and the second injected object do not require the original high- and low-energy data; only the high- and low-energy images are needed. The high- and low-energy images of the second background object and the second injected object can be collected during routine security checks or can be scanned specifically for generating training data.
[0058] (2) For a set of second background objects and second injected objects, the high and low energy imaging of the same pixel point is used to query the corresponding pixel value according to the pixel value of the set of pixels and the injection mapping table. The pixel value of the second training image at the same position is determined according to the queried pixel value, and the second training image is obtained.
[0059] It is understandable that the approach to generating the second training image is not to directly fuse the second background object and the second injected object, but rather to utilize the fusion results of the first training image through a lookup table. Specifically, the injection mapping table reflects the mapping relationship between the pixel values of each pixel in the high- and low-energy imaging of the first background object and the first injected object and the pixel values of each pixel in the corresponding first training image. For example, the first background object A1 and the first injected object B1 utilize... Figure 1 The method described above generates the corresponding first training image C1. The pixel value of the pixel at position (x,y) in the first training image C1 is obtained by harmonizing the pixel value of the pixel at position (x,y) in the first background item A1 with the pixel value of the pixel at position (x,y) in the first injected item B1.
[0060] Since this reconciliation is based on Figure 1 The process is implemented in a similar way for each group of first background items and first injected items. It can fit how the pixel values of the same pixel in the background item and injected item are mapped to the corresponding pixel values of the same pixel in the first training image. That is, by summarizing the correspondence between all obtained fusion results and the source images, an injection mapping table can be obtained, which can be expressed mathematically as: P TIP =f map (P ROI P BACK ), where P TIPLet P be the pixel value of any pixel at any location in the first training image. ROI P is the pixel value of the pixel at the same position as the first injected item. BACK f is the pixel value of the pixel at the same position as the first background object. map () represents the injection mapping table.
[0061] After obtaining a certain number of first training images, a set of pixel values from the second background object and the second injected object is input. This allows a pixel value to be retrieved, which reflects the pixel value of the pixel at the same position as the pixel value in the image obtained by fusing the first background object and the first injected object, which are similar to the second background object and the second injected object. Based on the retrieved pixel value, the coordinates of the pixel at the same position in the second training image are determined. This process is repeated for each pixel in the second training image to obtain the second training image. This is equivalent to utilizing a method based on... Figure 1 The method in this paper generates a first training image to fuse the second background item and the second injected item, achieving batch augmentation without adding too much extra computation, and further expanding the sample set at low cost.
[0062] Additionally, it's worth noting that in some cases, the color formats of the first training image and the high- and low-energy images may differ. In such cases, the color formats of the high- and low-energy images of the second background object and the second injected object should first be synchronized with the first training image. For example, if the first training image is in HSV format for easier coloring, and the high- and low-energy images are in RGB format for easier display, the high- and low-energy images of the second background object and the second injected object should first be converted to HSV format, and then the second training image in HSV format should be obtained using the table lookup method described above. If display is required, the first and second training images in HSV format can also be further converted to RGB format.
[0063] In one embodiment, after obtaining the first training image, the method further includes: performing data augmentation on the first training image to obtain multiple third training images. It is understood that, in addition to the sample set expansion method based on the first training image in the previous embodiment, simple data augmentation methods can also be used. For example, geometric transformations can be performed on the items in the first training image, i.e., changing the placement position, angle, etc., of the items in the first training image. Alternatively, color transformations can be performed on the items in the first training image. The resulting first training image can be distinguished based on the type and shade of the item's color. Therefore, changing the color is equivalent to changing the absorption characteristics of the item, generating a new training image. However, it is worth noting that the color transformation here is limited to shade transformations and cannot involve type transformations. For example, the color of an item that originally corresponds to a mixture cannot be transformed into the color of an organic compound.
[0064] This application provides a security inspection machine detection model, comprising a backbone network, a feature fusion network, and a detection network connected in sequence. The security inspection machine detection model is trained using a training set obtained through the training data generation method described in any of the above embodiments. It can be understood that a classic deep learning model includes a backbone network, a feature fusion network, and a detection network connected in sequence. The scanning image from the security inspection machine is input into the security inspection machine detection model, which ultimately outputs the detection result of illegal items. A security inspection machine detection model trained using training images specifically generated for the target security inspection machine can significantly improve the detection effect of small targets.
[0065] In one embodiment, to facilitate the deployment of the security inspection machine detection model on the target security inspection machine, the backbone network can be a network structure with adjustable depth and width.
[0066] In one embodiment, an ASFF (Adaptively Spatial Feature Fusion) module is configured at the end of the feature fusion network. Since security inspection imaging is transmission imaging, multiple items may overlap, and small items are more easily occluded by other items. To further improve the detection performance of small targets, an ASFF module is added to the end of the feature fusion network, taking into account this data characteristic. This module learns the connections between feature maps from different layers to solve the inconsistency problem within the feature pyramid, and introduces almost no inference overhead.
[0067] It should be understood that, although Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.
[0068] This application provides a training data generation device for a security inspection machine detection model. Please refer to [link / reference]. Figure 2The system includes a high- and low-energy data acquisition module 210, a feature extraction module 220, a feature fusion module 230, a feature restoration module 240, an imaging module 250, and a coloring module 260. The high- and low-energy data acquisition module 210 acquires the high- and low-energy data of a first background item and a first injected item. The feature extraction module 220 inputs the high- and low-energy data of the first background item and the first injected item into the feature extraction model corresponding to the target security inspection machine, respectively, to obtain the high-order material features of the first background item and the first injected item. The high-order material features reflect two or more material properties of the item. The feature fusion module 230 fuses the high-order material features of the first background item and the first injected item to obtain fused features. The feature restoration module 240 inputs the fused features into the feature restoration model corresponding to the target security inspection machine to obtain the high- and low-energy data of the injected item. The injected item is the result of fusing the first injected item into the first background item. The imaging module 250 obtains a first original image based on the high- and low-energy data of the injected item. The coloring module 260 is used to color the first original image to obtain the first training image.
[0069] In one embodiment, the training data generation device further includes a sample expansion module. The sample expansion module is used to acquire high- and low-energy images of the second background object and the second injected object; for a set of pixels at the same position in the high- and low-energy images of the second background object and the second injected object, the module queries the pixel values corresponding to the pixel values of the set of pixels based on the pixel values of the set of pixels and an injection mapping table, and determines the pixel values of the pixels at the same position in the second training image based on the queried pixel values, thereby obtaining the second training image; wherein, the injection mapping table is used to reflect the mapping relationship between the pixel values of each pixel in the high- and low-energy images of the first background object and the first injected object and the pixel values of the pixels at the same position in the corresponding first training image.
[0070] In one embodiment, the coloring module 260 is used to select the coloring method corresponding to the target security inspection machine and color the first original image.
[0071] In one embodiment, the sample expansion module is used to perform data augmentation on the first training image to obtain multiple third training images.
[0072] Specific limitations regarding the training data generation device can be found in the limitations of the training data generation method described above, and will not be repeated here. Each module in the aforementioned training data generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module. It should be noted that the module division in this embodiment is illustrative and only represents a logical functional division; other division methods may be used in actual implementation.
[0073] This application provides a storage medium storing computer-readable instructions. When executed by one or more processors, the computer-readable instructions cause the one or more processors to perform the steps of the training data generation method in any of the above embodiments.
[0074] This application provides a computer device including one or more processors and a memory. The memory stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, they perform the steps of the training data generation method in any of the above embodiments.
[0075] Indicatively, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the internal structure of a computer device 300 provided in an embodiment of this application. The computer device 300 can be provided as a server. (Refer to...) Figure 3 The computer device 300 includes a processing component 302, which further includes one or more processors, and memory resources represented by memory 301 for storing instructions, such as application programs, that can be executed by the processing component 302. The application programs stored in memory 301 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 302 is configured to execute instructions to perform the training data generation method of any of the above embodiments.
[0076] The computer device 300 may also include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate on an operating system stored in memory 301, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or similar.
[0077] Those skilled in the art will understand that Figure 3The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0078] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0079] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0080] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating training data for a security inspection machine detection model, characterized in that, include: Acquire high and low energy data of the first background item and the first injected item; the high and low energy data includes high energy data and low energy data. The high and low energy data of the first background item and the high and low energy data of the first injected item are respectively input into the feature extraction model corresponding to the target security inspection machine to obtain the high-order material features of the first background item and the high-order material features of the first injected item; the high-order material features are used to reflect two or more material properties of the item. The higher-order material features of the first background item and the first injected item are fused to obtain fused features; The fused features are input into the feature restoration model corresponding to the target security inspection machine to obtain the high and low energy data of the injected item; The injected item is the result of fusing the first injected item into the first background item; Based on the high and low energy data of the injected item, a first original image is obtained; The first original image is colored to obtain the first training image.
2. The method according to claim 1, characterized in that, After obtaining multiple first training images, the training data generation method further includes: Acquire high- and low-energy images of the second background object and the second injected object; For a group of pixels in the high- and low-energy imaging of the second background item and the second injected item that are at the same position, the pixel value corresponding to the pixel value of the group of pixels is queried according to the pixel value of the group of pixels and the injection mapping table. The pixel value of the pixel at the same position in the second training image is determined according to the queried pixel value, and the second training image is obtained. The injection mapping table is used to reflect the mapping relationship between the pixel value of each pixel in the high- and low-energy imaging of the first background item and the first injected item and the pixel value of the corresponding pixel at the same position in the first training image.
3. The method according to claim 1, characterized in that, The step of coloring the first original image includes: Select the coloring method corresponding to the target security inspection machine and color the first original image.
4. The method according to claim 1, characterized in that, After obtaining the first training image, the process also includes: Data augmentation is performed on the first training image to obtain multiple third training images.
5. The method according to claim 4, characterized in that, The data augmentation methods include any of the following: Perform geometric transformations on the items in the first training image; The colors of the items in the first training image are transformed.
6. A security inspection machine detection model product, characterized in that, The security inspection machine detection model comprises a backbone network, a feature fusion network, and a detection network connected in sequence. The security inspection machine detection model is trained using the training data generation method described in any one of claims 1-5.
7. The security inspection machine detection model product according to claim 6, characterized in that, The feature fusion network is equipped with an ASFF module at its tail.
8. A training data generation device for a security inspection machine detection model, characterized in that, include: The high- and low-energy data acquisition module is used to acquire high- and low-energy data of the first background item and the first injected item; the high- and low-energy data includes high-energy data and low-energy data. The feature extraction module is used to input the high and low energy data of the first background item and the high and low energy data of the first injected item into the feature extraction model corresponding to the target security inspection machine, respectively, to obtain the high-order material features of the first background item and the high-order material features of the first injected item; the high-order material features are used to reflect two or more material properties of the item. The feature fusion module is used to fuse the higher-order material features of the first background item and the first injected item to obtain fused features; The feature restoration module is used to input the fused features into the feature restoration model corresponding to the target security inspection machine to obtain the high and low energy data of the injected item; The injected item is the result of fusing the first injected item into the first background item; An imaging module is used to obtain a first raw image based on the high and low energy data of the injected item; A coloring module is used to color the first original image to obtain the first training image.
9. A storage medium, characterized in that, The storage medium stores computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the training data generation method as described in any one of claims 1 to 5.
10. A computer device, characterized in that, The method includes one or more processors and a memory storing computer-readable instructions that, when executed by the one or more processors, perform the steps of the training data generation method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Synthesis method and system for mammary gland molybdenum target image and energy spectrum recombination image
CN112233198A
Safety check image coloring method, device, storage medium and computer equipment
CN113313843A