Three-dimensional object X-ray image generation method and system for security check
Through text/picture to picture pre-training models and X-ray absorption formulas, a three-dimensional object X-ray image that meets the characteristics of specific X-ray equipment is generated, solving the problems of shortage of data set labeling and incomplete scenes in the prior art, and achieving high quality X-ray image generation improves the development efficiency of AI recognition system.
Patent Information
- Application Number
- CN202411062204.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-11-22
AI Technical Summary
The prior art cannot use text descriptions or natural images to generate high-quality three-dimensional X-ray images of objects, resulting in a shortage of labeling data for X-ray security data sets, incomplete image scenes, limited luggage types, and low degree of fusion between background and objects.
Using a pre-trained model from text/picture to picture, three-dimensional representations of luggage and luggage are generated through text or image prompts, combined with random combinations and X-ray absorption formulas, X-ray images of specific X-ray equipment characteristics are rendered and generated to achieve systematic Three-dimensional object X-ray image generation.
It realizes that the generation results of a single object are clear, the edges are accurate, and the variegated artifacts are few. The generation in the scene is natural, and the colors are close to real X-ray images, which improves the development efficiency of the AI recognition system.
Smart Images

Figure CN119006689A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a technology in the field of image processing, in particular to a method and system for generating X-ray images of three-dimensional objects for security inspection. Background Art
[0002] When generating X-ray images, existing image generation technology needs to use signals in special formats as input, such as X-ray images or three-dimensional models of contraband, but cannot use easily accessible text descriptions or natural images as input; when the improved method generates X-ray images, it can usually only generate a given contraband and then synthesize a picture with a scene with the existing X-ray image. It cannot generate a complete scene, and the number of generated luggage types is relatively small, and the generated part is usually less integrated with the background part. Summary of the invention
[0003] In view of the above-mentioned deficiencies in the prior art, the present invention proposes a method and system for generating X-ray images of three-dimensional objects for security inspection. By inputting images or texts, high-quality X-ray images that meet the characteristics of specific X-ray equipment are generated, which can alleviate the problem of shortage of annotation data in existing X-ray security inspection data sets, thereby promoting the development of AI recognition systems.
[0004] The present invention is achieved through the following technical solutions:
[0005] The present invention relates to a method for generating an X-ray image of a three-dimensional object for security inspection. The method comprises: using a text / image to image pre-training model, generating independent three-dimensional representations of luggage and a suitcase according to text or image prompts; generating a combined three-dimensional representation of a suitcase containing different luggage based on random combination; and obtaining an X-ray absorption formula and a mass absorption coefficient of the material to X-rays according to scanning results of a standard sample and an X-ray security inspection device of a known model, which are then used to render the combined three-dimensional representation to generate an X-ray image of a specific X-ray device feature.
[0006] The present invention relates to a three-dimensional object X-ray image generation system for security inspection for realizing the above-mentioned method, comprising: a three-dimensional object simulation module, a suitcase simulation module and an X-ray image generation module, wherein: the three-dimensional object simulation module generates corresponding three-dimensional explicit grid representation results after training according to the image / text prompts of the luggage and the suitcase and the camera external parameter information; the suitcase simulation module screens the luggage that can be placed in the suitcase and determines the placement positions of these luggage according to multiple explicit grid representations, and obtains the relative position relationship of the luggage in the suitcase; the X-ray image generation module renders the X-ray security inspection image based on the X-ray absorption formula according to the calibration results of the given X-ray security inspection equipment, the explicit grid information and the relative position relationship, and the material properties of the specified explicit grid, and obtains the X-ray security inspection image results that meet the characteristics of the given X-ray security inspection equipment. Technical Effects
[0007] The present invention uses a multi-view synthetic data set to fine-tune the pre-trained model of image / text to image, supplemented by an X-ray rendering model based on X-ray security inspection optical path modeling and X-ray absorption physical formula, to achieve clear generation results for single objects, accurate edges, and fewer color artifacts; the generated part in the scene is natural, and the colors of different objects are close to the subjective feeling of the X-ray images obtained under real equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 It is a flow chart of the present invention;
[0009] Figure 2 is a schematic diagram of a three-dimensional representation unit;
[0010] Figure 3 It is a schematic diagram of the prompt unit;
[0011] Figure 4 It is a schematic diagram of the effect of the embodiment;
[0012] Figure 5 It is a schematic diagram of the luggage grid combination effect of the embodiment. DETAILED DESCRIPTION
[0013] This embodiment relates to a three-dimensional object X-ray image generation system for security inspection, including: a three-dimensional object simulation module, a suitcase simulation module and an X-ray image generation module.
[0014] The three-dimensional object simulation module includes: a prompt unit, a three-dimensional representation unit and a mesh extraction unit, wherein: the prompt unit is fine-tuned on a multi-view synthetic data set through a pre-trained model of image / text to image, thereby generating an accurate multi-view image; the three-dimensional representation unit, under the supervision of the prompt unit, learns the three-dimensional representation of the object corresponding to the image / text prompt information; the mesh extraction unit extracts the three-dimensional representation output by the three-dimensional representation unit into an explicit polygonal mesh (Mesh), and defines the shape of the polygonal object through a collection of vertices, edges and faces.
[0015] The image / text to image pre-training model generates an image that meets the description from random Gaussian noise according to the input image and / or text description information. The pre-training model includes: an encoder, a denoiser and a decoder, wherein: the encoder encodes the input description information into a low-dimensional feature vector, the denoiser performs iterative denoising according to the noisy input and prompt information to generate a low-dimensional feature vector, and the decoder converts the feature vector and outputs the generated image
[0016] The denoiser supports conditional control so that the generated image is consistent with the description information.
[0017] The multi-perspective synthetic data set refers to: a multi-perspective synthetic image of an object is obtained by rendering the digital modeling object from multiple angles, wherein: each group of object ID, camera perspective, and object image constitutes a set of multi-perspective image data; multi-perspective image data is collected for different objects, and the data set is obtained by summarizing and collating.
[0018] like Figure 2 As shown, the three-dimensional representation unit is based on a multi-layer perceptron network structure, including: 12 linear layers, wherein: the first to eighth linear layers constitute a potential three-dimensional feature backbone network for extracting corresponding coordinates from sinusoidally encoded coordinate information, the ninth and tenth linear layers constitute a branch structure, the first branch, i.e., the ninth linear layer, extracts the volume density at the point from the potential three-dimensional feature, and the second branch, i.e., the tenth to twelfth linear layers, extracts the reflectivity of the point from the potential three-dimensional feature.
[0019] In the backbone network, the fifth linear layer uses residual connection to concatenate the sinusoidally encoded coordinates with the features extracted by the network, providing the subsequent network with low-level semantic information of the sinusoidally encoded coordinates and high-level semantic information of the features extracted by the network, thereby enhancing the expression ability of the backbone network.
[0020] The luggage simulation module includes: a random sorting unit, a size detection unit and a random placement unit, wherein: the random sorting unit generates a random order for luggage to be placed in the luggage; the size detection unit performs a feasibility test on the current luggage placed in the luggage, that is, determines whether the luggage can be placed in the luggage or discarded; the random placement unit randomly places the luggage in a feasible area of the luggage and records the placement result, that is, updates the coordinates of each vertex of the luggage grid in the luggage grid coordinate system and outputs the recorded luggage placement result to the X-ray image generation module.
[0021] The X-ray image generation module includes: an equipment calibration unit, a thickness calculation unit and an X-ray image rendering unit, wherein: the equipment calibration unit calibrates the X-ray optical characteristics of the security inspection equipment to be simulated based on the scanning results of a group of standard samples under the required X-ray security inspection equipment; the thickness calculation unit calculates the thickness of the luggage or luggage at any position along the X-ray direction according to the luggage arrangement combination generated by the luggage simulation module, that is, the distance that the X-ray passing through the position on the camera plane passes through the luggage or luggage; the X-ray image rendering unit renders and generates a three-dimensional X-ray image of the object for security inspection under a given material according to the calibration information and thickness information.
[0022] The X-ray optical properties include: typical values of X-ray intensity, mass absorption coefficients of different materials under the device, etc.
[0023] The scanning results based on a set of standard samples under the required X-ray security inspection equipment refer to: using a rectangular sample composed of common materials (such as iron, aluminum, wood, plastic, etc.) with known density and thickness, and the X-ray security inspection image obtained by scanning the X-ray security inspection equipment to be simulated.
[0024] like Figure 1 As shown, a method for generating a three-dimensional object X-ray image based on the above system according to this embodiment includes:
[0025] Step 1: Generate a three-dimensional representation of the luggage or suitcase according to the input text or image prompt, specifically including:
[0026] 1.1) Fine-tune the text / image-to-image pre-training model to achieve accurate multi-view control, including:
[0027] 1.1.1) Synthesize multi-view images and their label data by means of, but not limited to, shooting and modeling, specifically: including key viewpoints such as the front, side, top, and back of the object, evenly distributed in a sphere at intervals of 45 degrees, under the same lighting conditions and excluding the background.
[0028] The tag data includes: object ID, camera viewing angle, camera extrinsic parameters and brightness information.
[0029] 1.1.2) Construct a pre-trained model and fine-tune the pre-trained model using the multi-view images obtained in step 1.1.1, specifically:
[0030] i) Construct a pre-trained model including encoder, denoiser, and generator and load the pre-trained weights:
[0031] ii) Take a pair of data with the same object ID from the synthetic dataset, one of which is used as the original view image and the other as the view image to be synthesized. The difference between the view image to be synthesized and the original view is used as the camera extrinsic parameter of the input network.
[0032] iii) Encode the image to be synthesized using an encoder and add Gaussian random noise; extract shallow features of the encoder and concatenate them with the aforementioned noise-added features. The concatenated features are input into the denoiser.
[0033] iii) The original view image obtained in step ii) is encoded using an encoder, and the camera extrinsic parameters are encoded using sine encoding. The two are concatenated and injected into the denoiser through a cross-attention method.
[0034] iv) The denoiser performs several steps of iterative denoising (e.g., 1000 steps), and subtracts the noise value added to the synthesized view image from the denoising value of the denoiser to obtain the loss value. The loss value minimization is used as the training goal, and the loss value gradient is back-propagated to fine-tune the pre-trained model, specifically: Where: θ represents the denoiser weight, z~ε(x) represents the encoded value of the synthetic view image, t represents the noise step length, represents unit Gaussian random noise, z t represents the encoding value of the noise added t steps, and c(x,φ) represents the result of encoding and splicing the original view image and the camera extrinsic parameters.
[0035] 1.1.3) Freeze the weights of the pre-trained model after training in step 1.1.2.
[0036] 1.2) Using the multi-view prompt information provided by the pre-trained image / text-to-image model, the 3D representation unit is trained to obtain a 3D representation of the luggage or suitcase, specifically including:
[0037] 1.2.1) Construct a three-dimensional representation unit and initialize the weights;
[0038] 1.2.2) The camera extrinsic parameter φ and the sampling point coordinate μ are input into the three-dimensional representation unit after sinusoidal encoding to obtain the volume density τ and reflectivity ρ of the point, specifically: (τ, ρ) = g(μ, φ; ξ).
[0039] 1.2.3) Use the rendering formula to calculate the rendering result along the direction of the light. Specifically, use the negative gradient of the volume density τ with respect to the coordinate μ to calculate the normal vector at μ Assume that there are several point light sources with coordinates c and brightness l ρ , then the brightness of each point can be generated by using diffuse reflectance ρ along the direction of the light α-blending point by point along the ray direction, finally obtaining the brightness observed by the camera α i =1-exp(-τ i ||μ i -μ i+1 ||), calculate the points in the camera plane point by point, and get the rendered two-dimensional image.
[0040] 1.2.4) After encoding and denoising the rendered two-dimensional image and concatenating the shallow features of the rendered image, it is input into the denoiser of the pre-trained model.
[0041] 1.2.5) After encoding and splicing the text or image prompts and camera extrinsics, they are injected into the denoiser of the pre-trained model through cross-attention. The denoiser iterates denoising for several steps (e.g., 1000 steps). The denoising value of the denoiser is subtracted from the noise value added to the rendered two-dimensional image input in step 1.2.4 to obtain the loss value. The loss value minimization is used as the training goal, and the loss value gradient is back-propagated to train the three-dimensional representation unit, specifically: Where: φ represents the camera external parameters, represents the rendered 2D image, g(ξ) represents the 3D representation unit with weight ξ, represents the encoded value of the rendered image, t represents the noise step size, represents unit Gaussian random noise, z t represents the encoding value of the noise added t steps, and c(x,φ) represents the result of encoding and splicing the text or image prompt and the camera extrinsic parameters.
[0042] 1.3) After generating a 3D representation of the input text or image prompt through the trained 3D representation unit, a general algorithm is used to extract it into an explicit mesh representation.
[0043] The general algorithm uses but is not limited to matching cube.
[0044] Step 2: Randomly combine the luggage grids generated in step 1 into the grid of the suitcase, specifically including:
[0045] 2.1) Randomly sort the luggage, take one bag from the sequence each time, and try to put it into the suitcase;
[0046] 2.2) In the physics engine, place the suitcase on the horizontal ground and check if the size of the luggage is smaller than the size that the suitcase can accommodate. Place the luggage randomly in the feasible area; otherwise, discard the luggage.
[0047] 2.3) Repeat step 2.2 until all the luggage is placed in the suitcase, record the luggage placed in the suitcase and the position of the suitcase, that is, the coordinate representation of each vertex of the luggage grid in the suitcase coordinate system, and use this representation as a combined three-dimensional representation of the suitcase containing different luggage.
[0048] Step 3: Rendering an X-ray image with specific X-ray device features based on the combined three-dimensional representation of the suitcases containing different luggage obtained in step 2.3, specifically including:
[0049] 3.1) Calibrate the X-ray optical properties of security inspection equipment: Place the standard sample into an X-ray security inspection device of known model for scanning. Based on the scanning results, the X-ray security inspection optical path model and the physical formula of X-ray absorption are established to calibrate the initial X-ray intensity typical value and mass absorption coefficient of different materials used by the X-ray security inspection equipment. Specifically, when the X-ray light source is a parallel plane light source perpendicular to the sample, the absorption process of X-rays is simulated along the direction of the light, and the absorption formula of X-rays at μ is dl μ =ρ'τl μ dμ, where: τ represents the density of the object, l μ represents the intensity of X-ray at μ, and d represents the sign of the derivative. The mass absorption coefficient of the material to X-ray l0 is the intensity of the X-ray when it does not pass through the sample, x is the thickness of the sample, and the intensity l when the X-ray passes through the sample x =l0exp(-ρ'τx), l0 is the X-ray intensity where no sample is placed. l0 is the typical value of the light intensity of the security inspection equipment.
[0050] 3.2) Calculate the thickness of the luggage or any position of the luggage along the X-ray direction according to the luggage arrangement combination generated by the luggage simulation module, including:
[0051] i) The luggage is assumed to be a solid structure. The original mesh is used as the inner surface of the luggage box, and the inner surface is extended outward by d in the positive direction of the mesh surface normal. The extended part is used as the solid part of the luggage box.
[0052] When the extension causes gaps in the mesh, the gaps are filled with triangular facets through a water-densification operation, so that the mesh becomes solid.
[0053] ii) Projecting each vertex of the baggage mesh obtained in step 2.3) onto the camera plane and extracting a frame graph, where the vertex is the point where two (or more) edges on the projection plane intersect;
[0054] iii) Calculate the thickness of each vertex of the wireframe diagram by linear interpolation of the thickness of the vertex of the wireframe diagram in the closed area where each vertex is located: Any closed area can be subdivided to obtain a triangle ΔABC, so that any position p falls on the edge or inside of the triangle. Suppose the coordinates of p, A, B, and C in the projection plane are (x, y), (x1, y1), (x2, y2), and (x3, y3), respectively. Then the centroid coordinates of p in ΔABC are Where: α+β+γ=1, then the thickness d at position p=α·d1+β·d2+γ·d3, where: d1, d2, d3 are the thickness of the mesh at A, B, and C in the projection direction, that is, the distance that the X-ray needs to pass through;
[0055] iv) Use multi-threading to parallelly calculate the results between different pieces of luggage, and for each piece of luggage, store the thickness results at the vertices of the box line graph;
[0056] 3.3) Based on the X-ray optical properties obtained in step 3.1 and the material properties of the luggage, the thickness d1…d at any position p is solved by the interpolation formula K , input the X-ray absorption formula for rendering, calculate the rendering structure point by point, and then output the rendered X-ray security inspection image, specifically: Where: l0 represents the initial X-ray intensity, l i represents the intensity of X-ray after passing through object i, Represents the light intensity received by the camera plane. ρ' i represents the material mass absorption coefficient of object i, τ i represents the density of object i.
[0057] After specific actual experiments, on a Linux server with 40GB memory space, GTX 1080 graphics card and Intel i7-8700K CPU, Python language and Pytorch framework were used as code languages to compare the X-ray image generation effect of single object / scene generation in a subjective way. The results are as follows Figure 4 In the single object generation, the generation result obtained by the method used in the present invention is clearer, the result of the object edge is more accurate, and there is less noise (color) and artifacts, such as Figure 4 (a) is shown. In the case of including the complete background, the method used in the present invention can generate a complete X-ray image including the luggage and suitcase, while the GAN-based method can only generate, and the generated image is the original X-ray image and the generated composite image. At the same time, the X-ray image colors of objects with similar thickness and similar materials generated by the method used in the present invention are close, while the generated part (red frame area) of the GAN-based method is obviously inconsistent with the background part, as shown in Figure 2. Figure 4 (b). Figure 5 The figure shows a random combination of several luggage and suitcase meshes and the placement of luggage inside the suitcase. Some mesh patches on the upper surface of the suitcase are removed. The selected area shows the local 3D details of the generated luggage mesh.
[0058] Compared with the existing technology, the method has clear generation results for single objects, accurate edges, and fewer color artifacts; the method can generate the entire scene, rather than using the scene provided by the original X-ray image and the generated contraband to synthesize the scene; the generated part of the scene is natural, and the colors of different objects are close to the subjective feeling of the X-ray image obtained under the real equipment.
[0059] The above-mentioned specific implementation can be partially adjusted in different ways by those skilled in the art without departing from the principle and purpose of the present invention. The protection scope of the present invention shall be based on the claims and shall not be limited by the above-mentioned specific implementation. Each implementation scheme within its scope shall be subject to the constraints of the present invention.
Claims
1. A method for generating a three-dimensional object X-ray image for security inspection, characterized in that: Through the text / image to image pre-training model, independent 3D representations of luggage and suitcases are generated according to text or image prompts; a combined 3D representation of a suitcase containing different luggage is generated based on random combination; the X-ray absorption formula and the mass absorption coefficient of the material to X-rays are obtained based on the scanning results of standard samples and X-ray security inspection equipment of known models, which are then used to render the combined 3D representation to generate an X-ray image with specific X-ray equipment characteristics.
2. The method for generating a three-dimensional object X-ray image for security inspection according to claim 1, characterized in that: The independent three-dimensional representation is obtained by: 1.1) Fine-tune the text / image-to-image pre-training model to achieve accurate multi-view control; 1.2) Using the multi-view prompt information provided by the pre-trained image / text-to-image model, a 3D representation unit is trained to obtain a 3D representation of the luggage or suitcase; 1.3) After generating a 3D representation of the input text or image prompt through the trained 3D representation unit, a general algorithm is used to extract it into an explicit mesh representation.
3. The method for generating a three-dimensional object X-ray image for security inspection according to claim 2, characterized in that: The step 1.1 specifically includes: 1.1.1) Synthesize multi-view images and their label data, specifically: including the key viewpoints of the front, side, top, and back of the object, evenly distributed in a sphere at intervals of 45 degrees, under the same lighting conditions and excluding the background; The tag data includes: object ID, camera viewing angle, camera external parameters and brightness information; 1.1.2) Construct a pre-trained model and fine-tune the pre-trained model using the multi-view images obtained in step 1.1.1, specifically: i) Construct a pre-trained model including encoder, denoiser, and generator and load the pre-trained weights: ii) Take a pair of data with the same object ID from the synthetic data set, one of which is used as the original view image and the other as the view image to be synthesized. The difference between the view image to be synthesized and the original view is used as the camera extrinsic parameter of the input network; iii) using an encoder to encode the image to be synthesized and add Gaussian random noise; extracting shallow features of the encoder, concatenating them with the aforementioned noise-added features, and inputting the concatenated features into a denoiser; iii) The original view image obtained in step ii) is encoded using an encoder, and the camera extrinsic parameters are encoded using sine encoding. The two are concatenated and injected into the denoiser through a cross-attention method; iv) The denoiser performs several steps of iterative denoising (e.g., 1000 steps), and subtracts the noise value added to the synthesized view image from the denoising value of the denoiser to obtain the loss value. The loss value minimization is used as the training goal, and the loss value gradient is back-propagated to fine-tune the pre-trained model, specifically: Where: θ represents the denoiser weight, z~ε(x) represents the encoded value of the synthetic view image, t represents the noise step length, represents unit Gaussian random noise, z t represents the encoding value of the noise added t steps, c(x,φ) represents the result of encoding and splicing the original view image and the camera extrinsic parameters; 1.1.3) Freeze the weights of the pre-trained model after training in step 1.1.
2.
4. The method for generating a three-dimensional object X-ray image for security inspection according to claim 2, characterized in that: The step 1.2 specifically includes: 1.2.1) Construct a three-dimensional representation unit and initialize the weights; 1.2.2) The camera external parameter φ and the sampling point coordinate μ are input into the three-dimensional representation unit after sinusoidal encoding to obtain the volume density τ and reflectivity ρ of the point, specifically: (τ, ρ) = g(μ, φ; ξ); 1.2.3) Use the rendering formula to calculate the rendering result along the direction of the light. Specifically, use the negative gradient of the volume density τ with respect to the coordinate μ to calculate the normal vector at μ Assume that there are several point light sources, whose coordinates are c and brightness is l ρ , the brightness of each point can be generated by using diffuse reflectance ρ along the direction of the light α-blending point by point along the ray direction, and finally obtaining the brightness observed by the camera w i =α i ∏ j<i (1-α i ),α i =1-exp(-τ i ||μ i -μ i+1 ||), calculate the points in the camera plane point by point, and get the rendered two-dimensional image; 1.2.4) After encoding and denoising the rendered two-dimensional image and concatenating the shallow features of the rendered image, the image is input into the denoiser of the pre-trained model; 1.2.5) After encoding and splicing the text or image prompts and camera extrinsics, they are injected into the denoiser of the pre-trained model through cross-attention. The denoiser iterates denoising for several steps, and the denoising value of the denoiser is subtracted from the noise value added to the rendered two-dimensional image input in step 1.2.4 to obtain the loss value. The loss value minimization is used as the training goal, and the loss value gradient is back-propagated to train the three-dimensional representation unit, specifically: Where: φ represents the camera external parameters, represents the rendered 2D image, g(ξ) represents the 3D representation unit with weight ξ, represents the encoded value of the rendered image, t represents the noise step size, represents unit Gaussian random noise, z t represents the encoding value of the noise added t steps, and c(x,φ) represents the result of encoding and splicing the text or image prompt and the camera extrinsic parameters.
5. The method for generating a three-dimensional object X-ray image for security inspection according to claim 1, characterized in that: The combined three-dimensional representation is obtained by randomly combining the meshes of the luggage generated in step 1 into the meshes of the suitcase, and specifically includes: 2.1) Randomly sort the luggage, take one bag from the sequence each time, and try to put it into the suitcase; 2.2) In the physics engine, place the suitcase on the horizontal ground and check if the size of the luggage is smaller than the size that the suitcase can accommodate. Place the luggage randomly in the feasible area; otherwise, discard the luggage. 2.3) Repeat step 2.2 until all the luggage is placed in the suitcase, record the luggage placed in the suitcase and the position of the suitcase, that is, the coordinate representation of each vertex of the luggage grid in the suitcase coordinate system, and use this representation as a combined three-dimensional representation of the suitcase containing different luggage.
6. The method for generating a three-dimensional object X-ray image for security inspection according to claim 1, characterized in that: The generating of an X-ray image with specific X-ray device characteristics specifically includes: 3.1) Calibrate the X-ray optical properties of security inspection equipment: Place the standard sample into an X-ray security inspection device of known model for scanning. Based on the scanning results, the X-ray security inspection optical path model and the physical formula of X-ray absorption are established to calibrate the initial X-ray intensity typical value and mass absorption coefficient of different materials used by the X-ray security inspection equipment. Specifically, when the X-ray light source is a parallel plane light source perpendicular to the sample, the absorption process of X-rays is simulated along the direction of the light, and the absorption formula of X-rays at μ is dl μ =ρ'τl μ dμ, where: τ represents the density of the object, l μ represents the intensity of X-ray at μ, d represents the derivative sign, and the mass absorption coefficient of the material to X-ray l0 is the intensity of the X-ray when it does not pass through the sample, x is the thickness of the sample, and the intensity l when the X-ray passes through the sample x =l0exp(-ρ'τx), l0 is the X-ray intensity where no sample is placed, and l0 is the typical value of the light intensity of the security inspection equipment; 3.2) Calculate the thickness of the luggage or any position of the luggage along the X-ray direction according to the luggage arrangement combination generated by the luggage simulation module, including: i) The luggage is assumed to be a solid structure. The original mesh is used as the inner surface of the luggage box, and the inner surface is extended outward by d in the positive direction of the mesh surface normal. The extended part is used as the solid part of the luggage box. ii) Projecting each vertex of the baggage mesh obtained in step 2.3) onto the camera plane and extracting a frame graph, where the vertex is the point where two (or more) edges on the projection plane intersect; iii) Calculate the thickness of each vertex of the wireframe diagram by linear interpolation of the thickness of the vertex of the wireframe diagram in the closed area where each vertex is located: Any closed area can be subdivided to obtain a triangle ΔABC, so that any position p falls on the edge or inside of the triangle. Suppose the coordinates of p, A, B, and C in the projection plane are (x, y), (x1, y1), (x2, y2), and (x3, y3), respectively. Then the centroid coordinates of p in ΔABC are Where: α+β+γ=1, then the thickness d at position p=α·d1+β·d2+γ·d3, where: d1, d2, d3 are the thickness of the mesh at A, B, and C in the projection direction, that is, the distance that the X-ray needs to pass through; iv) Use multi-threading to parallelly calculate the results between different pieces of luggage, and for each piece of luggage, store the thickness results at the vertices of the box line graph; 3.3) According to the X-ray optical characteristics obtained in step 3.1 and the material properties of the luggage, the thickness d1…dK at any position p is solved by the interpolation formula, and the X-ray absorption formula is used for rendering. The rendering structure is calculated point by point, and the rendered X-ray security inspection image can be output, which is specifically: Where: l0 represents the initial X-ray intensity, l i represents the intensity of X-ray after passing through object i, represents the light intensity received by the camera plane, ρ' i represents the material mass absorption coefficient of object i, τ i represents the density of object i.
7. A system for generating a three-dimensional object X-ray image for implementing the method described in any one of claims 1 to 7, characterized in that: include: A three-dimensional object simulation module, a suitcase simulation module and an X-ray image generation module, wherein: the three-dimensional object simulation module generates corresponding three-dimensional explicit grid representation results after training according to the image / text prompts of the luggage and the suitcase and the camera external parameter information; the suitcase simulation module screens the luggage that can be placed in the suitcase and determines the placement of these luggage according to multiple explicit grid representations, and obtains the relative position relationship of the luggage in the suitcase; the X-ray image generation module renders the X-ray security inspection image based on the X-ray absorption formula according to the calibration results of the given X-ray security inspection equipment, the explicit grid information and its relative position relationship, and the material properties of the specified explicit grid, and obtains the X-ray security inspection image results that meet the characteristics of the given X-ray security inspection equipment.
8. The three-dimensional object X-ray image generation system according to claim 7, characterized in that: The three-dimensional object simulation module includes: a prompt unit, a three-dimensional representation unit and a mesh extraction unit, wherein: the prompt unit is fine-tuned on a multi-view synthetic data set through a pre-trained model of image / text to image, thereby generating an accurate multi-view image; the three-dimensional representation unit learns the three-dimensional representation of the object corresponding to the image / text prompt information under the supervision of the prompt unit; the mesh extraction unit extracts the three-dimensional representation output by the three-dimensional representation unit into an explicit polygonal mesh (Mesh), and defines the shape of the polygonal object through a collection of vertices, edges and faces; The image / text-to-image pre-training model generates an image that meets the description from random Gaussian noise based on the input image and / or text description information. The pre-training model includes: an encoder, a denoiser and a decoder, wherein: the encoder encodes the input description information into a low-dimensional feature vector, the denoiser performs iterative denoising based on the noisy input and prompt information to generate a low-dimensional feature vector, and the decoder converts the feature vector and outputs the generated image; The multi-view synthetic data set refers to: a multi-view synthetic image of an object is obtained by rendering the digital modeling object from multiple angles, wherein: each set of object ID, camera perspective, and object image constitutes a set of multi-view image data; multi-view image data of different objects are collected and summarized to obtain a data set; The three-dimensional representation unit is based on a multi-layer perceptron network structure, and includes: 12 linear layers, wherein: the first to eighth linear layers constitute a potential three-dimensional feature backbone network for extracting corresponding coordinates from sinusoidally encoded coordinate information, the ninth and tenth linear layers constitute a branch structure, the first branch, i.e., the ninth linear layer, extracts the volume density at the point from the potential three-dimensional feature, and the second branch, i.e., the tenth to twelfth linear layers, extracts the reflectivity of the point from the potential three-dimensional feature; In the backbone network, the fifth linear layer uses residual connection to concatenate the sinusoidally encoded coordinates with the features extracted by the network, providing the subsequent network with low-level semantic information of the sinusoidally encoded coordinates and high-level semantic information of the features extracted by the network, thereby enhancing the expression ability of the backbone network.
9. The three-dimensional object X-ray image generation system according to claim 7, characterized in that: The luggage simulation module includes: a random sorting unit, a size detection unit and a random placement unit, wherein: the random sorting unit generates a random order for luggage to be placed in the luggage; the size detection unit performs a feasibility test on the current luggage placed in the luggage, that is, determines whether the luggage can be placed in the luggage or discarded; the random placement unit randomly places the luggage in a feasible area of the luggage and records the placement result, that is, updates the coordinates of each vertex of the luggage grid in the luggage grid coordinate system and outputs the recorded luggage placement result to the X-ray image generation module.
10. The three-dimensional object X-ray image generation system according to claim 7, characterized in that: The X-ray image generation module includes: an equipment calibration unit, a thickness calculation unit and an X-ray image rendering unit, wherein: the equipment calibration unit calibrates the X-ray optical characteristics of the security inspection equipment to be simulated based on the scanning results of a group of standard samples under the required X-ray security inspection equipment; the thickness calculation unit calculates the thickness of the luggage or luggage at any position along the X-ray direction according to the luggage arrangement combination generated by the luggage simulation module, that is, the distance that the X-ray passing through the position on the camera plane passes through the luggage or luggage; the X-ray image rendering unit renders and generates a three-dimensional X-ray image of the object for security inspection under a given material according to the calibration information and thickness information.
