Sample image generation method and apparatus, device, storage medium, and program product
Patent Information
- Application Number
- CN202411000644.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2044-07-24
AI Technical Summary
[0004]本发明实施例提供一种样本图像生成方法、装置、设备、存储介质及程序产品,能够有效解决因真实危险品难以获取而导致的样本量不足问题
[0056] The sample image generation method, apparatus, device, storage medium, and program product of this application embodiment construct a projection imaging system model using the geometric parameters of an actual operating projection imaging system, thereby simulating the physical characteristics in the actual imaging process. Then, using the projection imaging system model, a three-dimensional volume model of the target object is subjected to omnidirectional ray projection from multiple preset different viewpoints, thereby generating multiple two-dimensional projection images to comprehensively simulate various imaging angles that the target object may encounter in the real environment, ensuring that the generated multiple two-dimensional projection images can broadly cover all possible scene changes. Furthermore, by superimposing these multi-view two-dimensional projection images with preset scene images, sample images of the target object covering various imaging angles in various possible scenes can be generated. Using this method, a large number of sample images can be efficiently generated without relying on actual hazardous material testing, thus effectively solving the problem of scarce sample resources caused by the difficulty and high cost of obtaining hazardous materials.
Smart Images

Figure CN118781452B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of image processing, and particularly relates to a method, apparatus, device, storage medium, and program product for generating sample images. Background Technology
[0002] Dual-projection radiography (DPRT) is a commonly used technique in the safety inspection of large vehicles. DPRT utilizes two independent radiation sources and detectors to perform a comprehensive and detailed inspection of the vehicle's interior using radiographic imaging technology. However, large vehicles have complex backgrounds with a large amount of background information, resulting in images containing a wealth of data. In such cases, hazardous materials typically occupy a small portion of the image, making it difficult for manual review to identify potential hazards.
[0003] To improve the accuracy and efficiency of hazardous materials detection, image intelligent recognition technology is often used to analyze images generated by dual-projection radiometric imaging systems, enabling more effective identification of hazardous materials. However, image intelligent recognition algorithms largely rely on a large set of labeled training images containing hazardous materials. Obtaining such a training image set through real-world testing is not only costly, but also limits the number of hazardous materials in the training image set due to the difficulty in acquiring real hazardous materials. This limitation may affect the accuracy of hazardous materials identification by dual-projection radiometric imaging systems. Summary of the Invention
[0004] This invention provides a sample image generation method, apparatus, device, storage medium, and program product, which can effectively solve the problem of insufficient sample volume caused by the difficulty in obtaining real hazardous materials.
[0005] In a first aspect, embodiments of this application provide a method for generating a sample image, the method comprising:
[0006] Obtain the 3D volume model of the target object;
[0007] Using a pre-built projection imaging system model, a three-dimensional volume model is projected from multiple preset viewpoints to obtain multiple two-dimensional projection images. The projection imaging system model is constructed based on preset geometric parameters.
[0008] Each two-dimensional projection image is superimposed on a preset scene image to obtain multiple reference images. The preset scene image includes the scene image of the preset scene in which the target object is located.
[0009] For each reference image, the annotation information of the target object in the reference image is generated based on the position information of the two-dimensional projection image in the reference image;
[0010] Sample images are generated based on each reference image and its corresponding annotation information.
[0011] In some embodiments, the projection imaging system model includes at least one detection system, the detection system includes a radiation source and a detector group, the detector group includes n detection units, where n is a positive integer, the three-dimensional volume model is constructed from the three-dimensional volume data of the target object, the three-dimensional volume data includes multiple voxels, and before projecting the three-dimensional volume model onto the pre-constructed projection imaging system model from multiple preset viewpoints to obtain multiple two-dimensional projection images, the method further includes:
[0012] For each voxel among multiple voxels, the attenuation coefficient of the voxel is determined based on the material properties of the voxel and the energy spectrum of the corresponding radioactive source.
[0013] Using a pre-constructed projection imaging system model, a 3D volume model is projected from multiple preset viewpoints to obtain multiple 2D projected images, including:
[0014] Obtain n detection paths of the detection system respectively. Each detection path is the path of a ray from the radiation source that travels through the three-dimensional volume model to a corresponding detection unit.
[0015] For each of the n detection paths, the total attenuation of the ray corresponding to the detection path is obtained based on the attenuation coefficient of all voxels on the detection path.
[0016] Based on the total attenuation of n detection paths and the first detection parameters of the projection imaging system model, a two-dimensional projection image of the target object is generated. The first detection parameters include the detection speed and detection direction of the detection system relative to the preset scene.
[0017] In some embodiments, the total attenuation of the ray corresponding to the detection path is obtained based on the attenuation coefficients of all voxels along the detection path, including:
[0018] For each voxel on the detection path, the attenuation of the voxel is calculated based on the voxel's attenuation coefficient and the propagation distance of the ray corresponding to the detection path within the voxel.
[0019] The total attenuation of the detection path is obtained by summing the attenuation of all voxels along the detection path.
[0020] In some embodiments, the total attenuation of the ray corresponding to the detection path is obtained based on the attenuation coefficients of all voxels along the detection path, including:
[0021] The total attenuation of the ray along the detection path is determined by the following formula.
[0022]
[0023] In the formula, μi(l) represents the attenuation coefficient of each voxel on the detection path, and dln represents the minute length element on the detection path.
[0024] In some embodiments, before superimposing each two-dimensional projected image onto a preset scene image to obtain multiple reference images, the method further includes:
[0025] Acquire bright-field and dark-field information from the projection imaging system;
[0026] Use a projection imaging system to acquire scene image information where the target object does not exist in a preset scene;
[0027] The total scene attenuation μBx of the preset scene is calculated using the following formula;
[0028]
[0029] In the formula, IF represents bright field information; IZ represents dark field information; and IB represents scene image information.
[0030] Based on the total scene attenuation and scene image information, a preset scene image is determined.
[0031] In some embodiments, each two-dimensional projected image is superimposed on a preset scene image to obtain multiple reference images, including:
[0032] For each detection path, the reference ray intensity IT corresponding to the detection path is calculated using the following formula:
[0033]
[0034] In the formula, I0 represents the initial intensity of the radiation emitted by the radiation source, μx represents the linear attenuation coefficient of the detection path in the target object, μB represents the linear attenuation coefficient of the detection path in the preset scene, and x represents the path length of the radiation path corresponding to the detection path through the target object.
[0035] For each two-dimensional projection image, a reference image corresponding to the two-dimensional projection image is constructed based on the intensities of n reference rays and a preset scene image.
[0036] In some embodiments, obtaining a three-dimensional volume model of the target object includes:
[0037] Obtain the point and surface data of the target object;
[0038] Discrete sampling is performed on point and surface data to extract the boundary pixels of the target object;
[0039] The outline pixels of the target object are determined based on the set of adjacent pixels in the boundary pixels.
[0040] Perform dilation and closing operations on the contour pixels to obtain the contour line of the target object;
[0041] The target object is filled in three dimensions based on the outline to obtain the three-dimensional volume data of the target object;
[0042] Construct a three-dimensional volume model of the target object based on the three-dimensional volume data.
[0043] In some embodiments, based on the position information of the two-dimensional projected image in the reference image, annotation information of the target object in the reference image is generated, including:
[0044] Based on the position information of the two-dimensional projected image in the reference image, determine the bounding box that can cover the two-dimensional projected image and the coordinates of the corner points of the bounding box;
[0045] Annotation information is generated based on the corner coordinates of the bounding box and the type of the target object.
[0046] Secondly, embodiments of this application provide a sample image generation apparatus, the apparatus comprising:
[0047] The first acquisition module is used to acquire the three-dimensional volume model of the target object;
[0048] The first determining module is used to project a three-dimensional volume model onto a three-dimensional volume model from multiple preset viewpoints using a pre-built projection imaging system model to obtain multiple two-dimensional projection images. The projection imaging system model is constructed based on preset geometric parameters.
[0049] The second determining module is used to superimpose each two-dimensional projection image onto a preset scene image to obtain multiple reference images. The preset scene image includes the scene image of the preset scene where the target object is located.
[0050] The first generation module is used to generate annotation information of the target object in the reference image for each reference image based on the position information of the two-dimensional projection image in the reference image;
[0051] The second generation module is used to generate sample images based on each reference image and its corresponding annotation information.
[0052] Thirdly, embodiments of this application provide an electronic device, which includes: a processor and a memory storing computer program instructions;
[0053] When the processor executes computer program instructions, it implements a sample image generation method as described in any of the first aspects.
[0054] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the sample image generation method as described in any of the first aspects.
[0055] Fifthly, embodiments of this application provide a program product comprising a computer program that, when executed, implements a sample image generation method as described in any of the first aspects.
[0056] The sample image generation method, apparatus, device, storage medium, and program product of this application embodiment construct a projection imaging system model using the geometric parameters of an actual operating projection imaging system, thereby simulating the physical characteristics in the actual imaging process. Then, using the projection imaging system model, a three-dimensional volume model of the target object is subjected to omnidirectional ray projection from multiple preset different viewpoints, thereby generating multiple two-dimensional projection images to comprehensively simulate various imaging angles that the target object may encounter in the real environment, ensuring that the generated multiple two-dimensional projection images can broadly cover all possible scene changes. Furthermore, by superimposing these multi-view two-dimensional projection images with preset scene images, sample images of the target object covering various imaging angles in various possible scenes can be generated. Using this method, a large number of sample images can be efficiently generated without relying on actual hazardous material testing, thus effectively solving the problem of scarce sample resources caused by the difficulty and high cost of obtaining hazardous materials. Attached Figure Description
[0057] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 A schematic flowchart of a sample image generation method provided in one embodiment of this application is shown;
[0059] Figure 2 A flowchart illustrating a specific implementation of S101 provided in one embodiment of this application is shown;
[0060] Figure 3a This paper shows a schematic diagram of the structure of a side projection detection system in a projection imaging system according to an embodiment of the present application;
[0061] Figure 3b This paper shows a schematic diagram of the structure of a bottom projection detection system in a projection imaging system provided in one embodiment of this application;
[0062] Figure 4The diagram illustrates a specific implementation of S102 provided in one embodiment of this application;
[0063] Figure 5 A schematic diagram of the process for calculating the scene attenuation coefficient in a sample image generation method provided in one embodiment of this application is shown;
[0064] Figure 6 A flowchart illustrating a specific implementation of S104 provided in one embodiment of this application is shown;
[0065] Figure 7 A schematic diagram of a three-dimensional volume model of a target object provided in one embodiment of this application is shown;
[0066] Figure 8a This illustration shows a set of two-dimensional projected images of the bottom of a target object in various placement configurations according to an embodiment of this application.
[0067] Figure 8b This illustration shows a set of two-dimensional projection images of the side of a target object in various placement configurations according to an embodiment of this application.
[0068] Figure 9 A schematic diagram of a sample image provided in one embodiment of this application is shown;
[0069] Figure 10 This paper shows a schematic diagram of the structure of a sample image generation apparatus provided in one embodiment of the present application;
[0070] Figure 11 A schematic diagram of the structure of an electronic device provided in one embodiment of this application is shown. Detailed Implementation
[0071] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0072] It should be noted that, in this document, relational terms such as "first" and "second" are used merely 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..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0073] Before describing the technical solutions provided in the embodiments of this application, in order to facilitate understanding of the embodiments of this application, this application first provides a detailed description of the relevant technologies:
[0074] Dual-projection radiometric imaging system is a radiometric imaging technique that uses two or more radiation sources (such as radioactive sources) to project the object under inspection from different angles, and receives the radiation information through corresponding detectors to generate a projected image of the target object.
[0075] Contraband image detection methods primarily rely on dual-projection radiometric imaging systems to generate projected images of the objects to be inspected, and then analyze these images using image recognition algorithms to identify hazardous materials. The training image set is the foundation of the image recognition algorithm, and its quality and quantity directly determine the accuracy of hazardous material identification. An optimal training image set should include a large number of precisely labeled sample images covering various types of hazardous materials. However, the hazardous nature of hazardous materials means that their acquisition and handling are subject to various restrictions, making it extremely difficult and costly to construct a large-scale, diverse training image set. Therefore, even if some hazardous material sample images can be obtained, the number is often limited, making it difficult to comprehensively cover all possible types of hazardous materials and their variations. This limitation of the training image set inevitably affects the accuracy of dual-projection radiometric imaging systems in hazardous material identification.
[0076] To address the aforementioned technical problems, embodiments of this application provide a sample image generation method, apparatus, device, storage medium, and program product.
[0077] The sample image generation method provided in the embodiments of this application will be introduced first below.
[0078] Figure 1 A schematic flowchart of a sample image generation method according to an embodiment of this application is shown. Figure 1As shown, the sample image generation method specifically includes the following steps: S101 to S105.
[0079] S101: Obtain the 3D volume model of the target object.
[0080] S102: Using a pre-built projection imaging system model, project multiple preset viewpoints onto the three-dimensional volume model to obtain multiple two-dimensional projection images. The projection imaging system model is constructed based on preset geometric parameters.
[0081] S103: Superimpose each two-dimensional projection image onto the preset scene image to obtain multiple reference images. The preset scene image includes the scene image of the preset scene where the target object is located.
[0082] S104: For each reference image, generate the annotation information of the target object in the reference image based on the position information of the two-dimensional projection image in the reference image.
[0083] S105: Generate sample images based on each reference image and its corresponding annotation information.
[0084] In this embodiment, a projection imaging system model is constructed using the geometric parameters of an actual operating projection imaging system, which simulates the physical characteristics of the actual imaging process. Then, using the projection imaging system model, omnidirectional ray projection is performed on the three-dimensional volume model of the target object from multiple preset perspectives, thereby generating multiple two-dimensional projection images. This comprehensively simulates the various imaging angles the target object may encounter in the real environment, ensuring that the generated multiple two-dimensional projection images can broadly cover all possible scene changes. Furthermore, these multi-view two-dimensional projection images are superimposed with preset scene images to generate sample images of the target object covering various imaging angles in various possible scenes. Using this method, a large number of sample images can be efficiently generated without relying on actual hazardous materials testing, thus effectively solving the problem of scarce sample resources caused by the difficulty and high cost of obtaining hazardous materials.
[0085] In some embodiments, in S101, the target object refers to the hazardous materials that need to be modeled, which may include explosives, chemical agents, knives, etc. A three-dimensional volume model is a way to digitally represent the target object in three-dimensional space. It contains information such as the object's shape, size, surface texture, and spatial location, and allows users to view and manipulate the object from any angle.
[0086] Figure 2 This diagram illustrates a specific implementation of S101 provided in an embodiment of this application. In some embodiments, this is done to construct a complete and operable three-dimensional model. Figure 2As shown, the above S101 may specifically include the following steps: S1011 to S1016.
[0087] S1011: Obtain the point and surface data of the target object.
[0088] Point and surface data refer to the geometric information of the target object, specifically including point data and surface data. Point data is used to represent a single location in three-dimensional space, specifically including the coordinate values of a single location point. Surface data is used to represent the surface or boundary of the target object, specifically including the coordinate information and connection information of each location point constituting the surface.
[0089] S1012: Discretely sample the point and surface data to extract the boundary pixels of the target object.
[0090] Discrete sampling refers to selecting a set of sampling points from continuous point and surface data that can represent the shape and structure of the target object, thereby reducing the amount of data while improving processing efficiency. The number of sampling points is directly related to the required level of detail in the 3D volume model during simulation. That is, the more sampling points there are, the more detailed the constructed 3D volume model. Boundary pixels refer to pixels located at the edge of the target object that have significant differences in brightness or color compared to their neighboring pixels. In practice, boundary pixels can be identified and extracted from the point and surface data using edge detection algorithms.
[0091] In one example, the sampling points represent voxels of the target object, and the physical dimensions d of the voxels in the x, y, z directions can be calculated using the following formula. x,y,z :
[0092]
[0093] In equation (1), S x,y,z N represents the actual physical dimensions of the target object in the x, y, z directions. x,y,z This indicates the number of voxels in the x, y, z directions of the target object.
[0094] S1013: Determine the outline pixels of the target object based on the set of adjacent pixels in the boundary pixels.
[0095] Here, the set of adjacent pixels refers to the set of pixels formed around a boundary pixel according to a certain connection rule. Contour pixels refer to the continuous sequence of pixels that constitute the boundary of the target object.
[0096] In one example, the contour pixels of a target object can be determined using a contour tracking algorithm.
[0097] S1014: Perform dilation and closing operations on the contour pixels to obtain the contour line of the target object.
[0098] The dilation and closing operations on contour pixels are used to improve and enhance the initial contour of the target object. Dilation increases the width of the contour, helping to fill small holes or breaks, making the contour smoother and more continuous. Closing fills small holes within the target area, connecting adjacent discontinuities while maintaining the size and position of the target area essentially unchanged. After dilation and closing, the resulting smoother and more continuous target object boundary is the contour line. The contour pixels on this line are more accurate and complete than the initial contour pixels.
[0099] S1015: Fill the target object in three dimensions according to the outline to obtain the three-dimensional volume data of the target object.
[0100] 3D filling refers to creating or reconstructing a target object in 3D space based on a contour line. Specifically, it involves filling volume data within the area defined by the contour line. 3D volume data refers to the set of data used to represent the internal structure and shape of a target object in 3D space. This data typically exists in the form of voxels, each voxel representing a small cube in 3D space and containing information about the physical properties of that area.
[0101] In one example, after obtaining the contour lines, 3D reconstruction algorithms can be used to fill in volume data in 3D space based on the contour lines. These algorithms determine which voxels should be marked as part of the target object by analyzing the position and orientation of the contour lines in the 3D mesh. The filling process may need to consider factors such as voxel resolution and the shape complexity of the target object.
[0102] S1016: Construct a three-dimensional volume model of the target object based on the three-dimensional volume data.
[0103] In one example, 3D modeling software or graphics processing libraries can be used to construct a 3D volume model of the target object. This typically involves converting the 3D volume data into a 3D mesh.
[0104] In this embodiment, by acquiring the point and surface data of the target object, accurate geometric information can be obtained. Analyzing the set of adjacent pixels in the boundary pixels helps determine the contour pixels of the target object, aiding in the identification of the target object's boundaries and preparing for the extraction of a clear contour. Dilation and closing operations on the contour pixels ensure the integrity of the contour lines. Accurate contour pixel extraction and 3D filling further improve the reliability of the 3D model. Using the aforementioned method, a clear and reliable 3D model can be created efficiently and accurately from point and surface data.
[0105] In some embodiments, in S102, the projection imaging system model is an optical system that projects a three-dimensional object or scene onto a two-dimensional plane using optical means to form a two-dimensional projected image. Geometric parameters in the projection imaging system model refer to various physical dimensions, shapes, and positional relationships related to the projection process. Multiple preset viewing angles refer to the ability to display the two-dimensional projected image of the three-dimensional volume model from different angles or in different ways during the projection imaging process by adjusting the projection imaging system model or the three-dimensional volume model of the target object. Multiple preset viewing angles can be set according to actual needs to allow for observation and analysis of the three-dimensional volume model from different angles.
[0106] In some embodiments, the pre-built projection imaging system model is a model pre-built in a computer based on the configuration and geometric parameters of the actual projection imaging system used in security checks. It is a digital simulation of the actual projection imaging system for simulating and predicting the projection imaging effect of the actual projection imaging system on a computer.
[0107] In some embodiments, the projection imaging system includes a gantry and at least one detection system. The detection system includes a radiation source 32 and a detector group 33, the detector group comprising n detection units, where n is a positive integer. In one example, such as... Figure 3a and Figure 3b As shown, the projection imaging system can have two detection systems, specifically including a side projection detection system. Figure 3a ) and bottom projection detection system ( Figure 3b This allows for comprehensive imaging of the target object from multiple angles. The gantry includes a first side portion 31a, a second side portion 31b, and a top portion 31c connected in sequence. A side projection detection system is used to illuminate the target object from the side, thereby capturing the structural features of the target object's side. A bottom projection detection system is used to illuminate the target object from the bottom, thereby capturing the structural features of the target object's bottom.
[0108] See the example above; in another example, such as... Figure 3a As shown, in the side projection detection system, the radiation source is installed on the first side 31a of the gantry. Multiple detection units in the detector group are distributed in two sections: one section is placed on the second side 31b of the gantry directly opposite the radiation source, and the other section is placed on the top 31c of the gantry to maximize the reception of radiation from the side of the target object. Figure 3b As shown, in the bottom projection detection system, the radiation source 32 is installed on the bottom mounting surface of the first side 31a and the second side 31b, and is located between the first side 31a and the second side 31b. The multiple detection units in the detector group are distributed in three sections, with the three detection units respectively installed on the first side 31a, the second side 31b and the top 31c of the gantry, effectively ensuring that the radiation can fully cover the bottom area of the target object.
[0109] In some embodiments, the three-dimensional volume data includes multiple voxels, each voxel having a corresponding attenuation coefficient. Prior to S102, the method further includes:
[0110] For each voxel among multiple voxels, the attenuation coefficient of the voxel is determined based on the material properties of the voxel and the energy spectrum of the corresponding radioactive source.
[0111] As an example, the attenuation coefficient μ of a voxel can be calculated using the following formula. i :
[0112]
[0113] In equation (2), K is the number of segments in the energy spectrum f(E), j is the energy segment index, and E j For the energy of the ray in the j-energy band, μ i_Ej For the i-th material pair, the energy is E j The linear attenuation coefficient of the ray, where d is the size of a unit pixel in the three-dimensional volume data.
[0114] Here, the energy spectrum f(E) represents the intensity distribution of the X-ray source at different energies E.
[0115] In some embodiments, in order to accurately generate a two-dimensional projected image, such as... Figure 4 As shown, the aforementioned S102 may specifically include the following steps: S1021 to S1023.
[0116] S1021: Obtain the n detection paths of the detection system respectively. Each detection path is the path of a ray from the radiation source that travels through the three-dimensional volume model to a corresponding detection unit.
[0117] The detection path is simulated using the projection imaging system model and the three-dimensional volume model of the target object constructed in the example above. It represents the straight-line trajectory of a ray emitted from a radiation source, passing through the three-dimensional volume model, and reaching a detection unit. It is worth noting that the number of detection paths depends on the design and configuration of the projection imaging system model, specifically including the number of radiation sources, the layout of the detection units, the relative positions between the radiation sources and detection units, and the detection parameters (detection speed and detection direction). This is merely an example and is not a limitation.
[0118] In one example, geometric calculations or simulation software can be used to determine the starting point (radiation source location) and ending point (detection unit location) of each ray, thereby determining the corresponding detection path.
[0119] S1022: For each of the n detection paths, the total attenuation of the ray corresponding to the detection path is obtained based on the attenuation coefficient of all voxels on the detection path.
[0120] The attenuation coefficient of the voxel can be calculated with reference to Formula 2 mentioned above, and will not be elaborated here.
[0121] In one example, S1022 above may specifically include:
[0122] For each voxel on the detection path, the attenuation of the voxel is calculated based on its attenuation coefficient and the propagation distance of the ray corresponding to the detection path within the voxel. Then, the attenuation of all voxels on the detection path is summed to obtain the total attenuation of the detection path.
[0123] Since the material of the target object is discretized into voxels in practical applications, the total attenuation can be approximated by summing the attenuation of all voxels along the detection path.
[0124] In another example, S1022 above may specifically include:
[0125] The total attenuation of the ray corresponding to the nth detection path is determined by the following formula.
[0126]
[0127] In equation (3), μi(l) represents the attenuation coefficient of each voxel on the detection path, and dln represents the small length element on the detection path.
[0128] Where ∮μi(l)dln represents the linear integration of the attenuation coefficient along the detection path, and dln represents the step size or infinitesimal element during integration.
[0129] S1023: Generate a two-dimensional projection image of the target object based on the n total attenuation values of the n detection paths.
[0130] In one example, the total attenuation of each detection path is mapped onto the corresponding detection unit, forming a two-dimensional attenuation distribution map. Then, image processing techniques are used to convert the attenuation distribution map into a two-dimensional projected image. Specifically, based on the total attenuation of each detection path, the brightness or grayscale value of the corresponding image pixels is adjusted; generally, the greater the total attenuation, the darker the pixel.
[0131] In another example, the sampling step size is determined based on the actual detection speed of the projection imaging system and the predetermined image resolution. Then, along the predetermined scanning direction, the target object is traversed layer by layer (line-by-line scanning) at intervals equal to the sampling step size. At each sampling point, the attenuation of the ray after passing through the object or scene is calculated, and the attenuation values of all sampling points are mapped onto the detector to form a two-dimensional projection image.
[0132] In this embodiment, the total attenuation of each detection path is calculated using a radiation source and a detection unit, which can obtain the internal structural information of the target object. Furthermore, the information is converted into a visualized two-dimensional projection image using image processing technology. The two-dimensional projection image can accurately reflect the attenuation characteristics of the internal structure of the target object and can improve the quality and reliability of the imaging.
[0133] In some embodiments, in S103, the preset scene image refers to a scene image defined or created in advance under a specific environment, typically including the background or environment where the target object is located. The preset scene image can be a scene image taken in real-world conditions or a scene image created through modeling. By overlaying, the target object can be better displayed in the scene, which helps to improve the accuracy of target image detection and recognition.
[0134] In some embodiments, prior to the aforementioned S103, such as Figure 5 As shown, the above method may further include the following steps:
[0135] S501: Acquire bright field and dark field information of the projection imaging system.
[0136] Bright-field information refers to the intensity of radiation received by the detector in a projection imaging system when there is no object being measured. Dark-field information refers to the intensity of background noise received by the detector in a projection imaging system when there is no radiation source.
[0137] As an example, when the object being detected is absent in the projection imaging system, the first radiation intensity distribution value received by the detector group is determined as bright-field information. When the object being detected exists in the projection imaging system model and completely blocks the radiation source's rays, the second radiation intensity distribution value received by the detector group is determined as dark-field information.
[0138] S502: Use a projection imaging system to acquire scene image information where the target object does not exist in the preset scene.
[0139] S503: Calculate the total scene attenuation of the preset scene.
[0140] As an example, the total scene attenuation μ of the preset scene is calculated using the following formula. B x:
[0141]
[0142] In equation (4), I F Indicates brightfield information; I Z Indicates dark field information; I B Represents scene image information.
[0143] The scene image information refers to the scene image information obtained under actual measurement conditions. The total scene attenuation helps to distinguish the attenuation characteristics of the target object from background noise, improving image quality and the accuracy of analysis.
[0144] S504: Determine the preset scene image based on the total scene attenuation and scene image information.
[0145] In this embodiment, by combining the initial ray intensity emitted by the radiation source, the attenuation of the two-dimensional projected image, the scene attenuation coefficient of the preset scene image, and the path length through which the ray passes, this technology can generate multiple reference images. These reference images not only contain the internal structural information of the target object from a specific viewpoint, but also allow for correction, enhancement, or other forms of image processing of the scene image information based on the introduction of the total scene attenuation. The influence of the background or environment on the imaging results is considered to ensure that the final preset scene image accurately reflects the attenuation in the scene, thereby providing more accurate and comprehensive imaging results.
[0146] In some embodiments, to ensure the accuracy of the reference images, each two-dimensional projected image is superimposed on a preset scene image to obtain multiple reference images, including:
[0147] For each detection path corresponding to each two-dimensional projection image, the reference ray intensity I corresponding to the detection path is calculated using the following formula. T ;
[0148]
[0149] In equation (5), I0 represents the initial intensity of the radiation emitted by the radiation source, μ x μ represents the linear attenuation coefficient of the probe path in the target object. B This represents the linear attenuation coefficient of the detection path in the preset scene, and x represents the path length of the ray corresponding to the detection path through the target object.
[0150] For each two-dimensional projection image, a reference image corresponding to the two-dimensional projection image is constructed based on the intensities of n reference rays and a preset scene image.
[0151] In one example, before overlaying the target object, a region of the preset scene image is sampled, specifically the region corresponding to the location where the target object will be overlaid. Next, a Gaussian blur is applied to the selected region. Gaussian blur is an image blurring technique that replaces the value of each pixel with a weighted average of the values of its neighboring pixels, effectively reducing image noise. By overlaying the Gaussian-blurred preset scene image onto the reference image, the overlaid target object blends more naturally with the background.
[0152] In one example, a Poisson noise model can be introduced to process the 2D projection image, capturing the inherent statistical randomness in the X-ray imaging process. This makes the 2D projection image more closely resemble the X-ray image in a real-world scene in terms of noise performance, effectively reflecting the natural fluctuation characteristics during the imaging process. Furthermore, to comprehensively simulate the scattering phenomena that X-rays may encounter when penetrating diverse media, a more refined convolutional blurring process can be applied to the 2D projection image, establishing a higher visual similarity between the 2D projection image and the measured image. These images not only accurately present the projection features of the target object in terms of content but also profoundly reproduce the physical phenomena and environmental interference in the actual security inspection process in terms of form, providing higher-quality sample images that are closer to real-world applications for subsequent image recognition and algorithm training.
[0153] In some embodiments, in S104, image processing and computer vision techniques, such as feature matching, template matching, or deep learning models, can be used to identify and label the location of the target object on the reference image.
[0154] In one example, to accurately locate the position of a target object in an image. Figure 6 As shown, the aforementioned S104 may specifically include the following steps: S1041 to S1042.
[0155] S1041: Based on the position information of the two-dimensional projected image in the reference image, determine the bounding box that can cover the two-dimensional projected image and the coordinates of the corner points of the bounding box.
[0156] S1042: Generate annotation information based on the corner coordinates of the bounding box and the type of the target object.
[0157] In the embodiments of this application, the above steps can be used to accurately locate and label target objects in sample images, providing support for subsequent image analysis or machine learning.
[0158] In some embodiments, in S105, target objects in sample images can be identified and labeled manually or using automated tools. The sample images are labeled images containing markers for the target objects, used for training and validating the machine learning model corresponding to the hazardous materials intelligent identification algorithm.
[0159] Next, we will use a specific example to explain the aforementioned sample image generation method in detail.
[0160] In practice, the precise geometric layout of the pre-constructed projection imaging system model (such as...) is used. Figure 3a and Figure 3b As shown), for Figure 7The 3D volumetric model of the target object displayed in the simulation underwent projection simulation. Specifically, within the simulated gantry environment, N different target object placement scenarios were set up, each scenario defined by coordinate parameters (r). N θ N Define r, where r N θ represents the radius vector of the center position of the 3D volume model of the target object in the Nth scenario. N This represents the rotation angle of the target object in the Nth scenario. Specifically, it can be represented as L1(r1,θ1), L2(r2,θ2), ..., L... N (r N ,θ N ).
[0161] Next, for each of the N possible placement scenarios for the target objects, ray projection simulations of the target objects were performed using a projection imaging system model. This process not only ensured the high accuracy of the two-dimensional projection images but also fully demonstrated the characteristic projection changes of the target objects under different spatial postures. For example... Figure 8a As shown, the unique two-dimensional projection image of the bottom of the target object under each placement method was successfully captured, such as... Figure 8b As shown, the side two-dimensional projection images of the target object under each placement method were successfully captured. These two-dimensional projection images clearly show the outline, spatial position and posture information of the target object.
[0162] To further enhance the realism and practicality of the sample images, these characteristic projection images can be overlaid with a preset background image to make the sample images more closely resemble the complex environments in actual application scenarios. Figure 9 An example is shown showing two superimposed sample images. Figure 9 The 1 in the image represents the two-dimensional side projection of the target object within the preset background image. Figure 9 2 in the image represents the bottom two-dimensional projection image of the target object in the preset background image.
[0163] Based on the sample image generation method provided in the above embodiments, this application also provides specific implementations of the sample image generation apparatus. Please refer to the following embodiments.
[0164] First refer to Figure 10 The sample image generation apparatus provided in this application embodiment may specifically include:
[0165] The first acquisition module 1001 is used to acquire the three-dimensional volume model of the target object.
[0166] The first determining module 1002 is used to project a three-dimensional volume model onto a three-dimensional volume model from multiple preset perspectives using a pre-built projection imaging system model to obtain multiple two-dimensional projection images. The projection imaging system model is constructed based on preset geometric parameters.
[0167] The second determining module 1003 is used to superimpose each two-dimensional projection image onto a preset scene image to obtain multiple reference images. The preset scene image includes the scene image of the preset scene where the target object is located.
[0168] The first generation module 1004 is used to generate annotation information of the target object in the reference image based on the position information of the two-dimensional projection image in the reference image for each reference image.
[0169] The second generation module 1005 is used to generate sample images based on each reference image and its corresponding annotation information.
[0170] In this embodiment, a projection imaging system model is constructed using the geometric parameters of an actual operating projection imaging system, which simulates the physical characteristics of the actual imaging process. Then, using the first determining module 1002, the three-dimensional volume model of the target object is ray-projected from multiple preset perspectives through the projection imaging system model, generating multiple two-dimensional projection images to comprehensively simulate various imaging angles the target object may encounter in the real environment, ensuring that the generated multiple two-dimensional projection images can broadly cover all possible scene changes. Furthermore, the second determining module 1003 can superimpose these multi-view two-dimensional projection images with preset scene images, generating sample images of the target object covering various imaging angles in various possible scenes. Using this method, a large number of sample images can be efficiently generated without relying on actual hazardous material testing, effectively solving the problem of scarce sample resources caused by the difficulty and high cost of obtaining hazardous materials.
[0171] In some embodiments, the projection imaging system model includes at least one detection system, the detection system including a radiation source and a detector group, the detector group including n detection units, where n is a positive integer, and the three-dimensional volume model is constructed from the three-dimensional volume data of the target object, the three-dimensional volume data including multiple voxels. The above-described apparatus may further include:
[0172] The third determining module is used to determine the attenuation coefficient of each voxel among multiple voxels, based on the material properties of the voxel and the energy spectrum of the corresponding radioactive source.
[0173] The aforementioned first determining module may include:
[0174] The first acquisition submodule is used to acquire the n detection paths of the detection system. Each detection path is the path of a ray from the radiation source that travels through the three-dimensional volume model to a corresponding detection unit.
[0175] The first determining submodule is used to determine the total attenuation of the ray corresponding to the detection path on each of the n detection paths, based on the attenuation coefficient of all voxels on the detection path.
[0176] The first generation submodule is used to generate a two-dimensional projection image of the target object based on the n total attenuation values of the n detection paths.
[0177] In some embodiments, in order to accurately obtain the total attenuation of the detection path, the aforementioned first determining submodule may specifically include:
[0178] The first calculation unit is used to calculate the attenuation of each voxel on the detection path based on the voxel's attenuation coefficient and the propagation distance of the ray corresponding to the detection path within the voxel.
[0179] The first determining unit is used to add up the attenuation of all voxels along the detection path to obtain the total attenuation of the detection path.
[0180] In some embodiments, in order to accurately obtain the total attenuation of the detection path, the aforementioned first determining submodule may specifically include:
[0181] The total attenuation of the ray along the detection path is determined by the following formula.
[0182]
[0183] In the formula, μ i (l) represents the attenuation coefficient of each voxel along the detection path, dl n This represents a tiny length element along the detection path.
[0184] In some embodiments, the above-described apparatus may further include:
[0185] The second acquisition module is used to acquire the bright field information and dark field information of the projection imaging system.
[0186] The third acquisition module is used to acquire scene image information of a preset scene where no target object exists, using a projection imaging system.
[0187] The second calculation module is used to calculate the scene attenuation μ of the preset scene image using the following formula. B x:
[0188]
[0189] In the formula, I F Indicates brightfield information; I Z Indicates dark field information; I B Represents scene image information.
[0190] The fourth determination module is used to determine the preset scene image based on the total scene attenuation and scene image information.
[0191] In some embodiments, the aforementioned second determining module 1003 may specifically include:
[0192] The first calculation submodule is used to calculate the reference ray intensity I corresponding to each detection path using the following formula. T :
[0193]
[0194] In the formula, I0 represents the initial intensity of the radiation emitted by the radiation source, and μ x μ represents the linear attenuation coefficient of the probe path in the target object. B This represents the linear attenuation coefficient of the detection path in the preset scene, and x represents the path length of the ray corresponding to the detection path through the target object.
[0195] The first construction submodule is used to construct a reference image corresponding to each two-dimensional projection image based on the intensities of n reference rays and a preset scene image.
[0196] In some embodiments, the first acquisition module 1001 described above may include:
[0197] The second acquisition submodule is used to acquire the point and surface data of the target object.
[0198] The extraction submodule is used to perform discrete sampling on point and surface data to extract the boundary pixels of the target object.
[0199] The second determination submodule is used to determine the contour pixels of the target object based on the set of adjacent pixels in the boundary pixels.
[0200] The third determination submodule is used to perform dilation and closing operations on the contour pixels to obtain the contour line of the target object.
[0201] The fourth submodule is used to perform three-dimensional filling of the target object based on the contour lines to obtain the three-dimensional volume data of the target object.
[0202] The second construction submodule is used to construct a three-dimensional volume model of the target object based on the three-dimensional volume data.
[0203] In some embodiments, the aforementioned first generation module 1004 may specifically include:
[0204] The fifth determination submodule is used to determine the bounding box that can cover the two-dimensional projection image and the coordinates of the corner points of the bounding box based on the position information of the two-dimensional projection image in the reference image.
[0205] The generation submodule is used to generate annotation information based on the corner coordinates of the bounding box and the type of the target object.
[0206] Figure 11 A schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application is shown.
[0207] The electronic device may include a processor 1101 and a memory 1102 storing computer program instructions.
[0208] Specifically, the processor 1101 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0209] Memory 1102 may include mass storage for data or instructions. For example, and not limitingly, memory 1102 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 1102 may include removable or non-removable (or fixed) media. Where appropriate, memory 1102 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 1102 is non-volatile solid-state memory.
[0210] Memory 1102 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, typically, memory 1102 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this disclosure.
[0211] The processor 1101 reads and executes computer program instructions stored in the memory 1102 to implement any of the sample image generation methods in the above embodiments.
[0212] In one example, the electronic device may also include a communication interface 1103 and a bus 1110. Wherein, as... Figure 11 As shown, the processor 1101, memory 1102, and communication interface 1103 are connected through bus 1110 and complete communication with each other.
[0213] The communication interface 1103 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0214] Bus 1110 includes hardware, software, or both, that couples components of an electronic device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 1110 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0215] The electronic device can execute the sample image generation method in the embodiments of this application, thereby achieving the combination Figure 1 and Figure 9 The described sample image generation method and apparatus.
[0216] Furthermore, in conjunction with the sample image generation methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the sample image generation methods in the above embodiments.
[0217] Furthermore, in conjunction with the sample image generation method in the above embodiments, this application embodiment can provide a computer program product to implement it. This computer program product includes a computer program that, when executed, implements any of the aforementioned sample image generation methods.
[0218] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0219] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0220] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0221] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0222] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A method for generating sample images, characterized in that, The method includes: Obtain a three-dimensional volume model of the target object, which refers to the hazardous material that needs to be modeled. Using a pre-built projection imaging system model, the three-dimensional volume model is projected from multiple preset viewpoints to obtain multiple two-dimensional projection images. The pre-built projection imaging system model is a model pre-built in a computer based on the configuration and geometric parameters of the projection imaging system actually used in security inspections. The projection imaging system model includes at least one detection system, and the detection system includes a radiation source and a detector group. Acquire bright-field and dark-field information from the projection imaging system; acquire scene image information of the preset scene where the target object does not exist using the projection imaging system; calculate the total scene attenuation of the preset scene using the following formula. : In the formula, Indicates bright field information; Indicates dark field information; Representing scene image information; determining a preset scene image based on the total scene attenuation and the scene image information, wherein the preset scene image includes the scene image of the preset scene in which the target object is located; For each of the n detection paths corresponding to each two-dimensional projection image, the reference ray intensity corresponding to the detection path is calculated using the following formula. : In the formula, This indicates the initial intensity of the radiation emitted by the radiation source. This represents the linear attenuation coefficient of the detection path within the target object. This represents the line attenuation coefficient of the detection path in the preset scenario. This indicates the path length of the ray corresponding to the detection path through the target object; for each two-dimensional projection image, a reference image corresponding to the two-dimensional projection image is constructed based on n reference ray intensities and the preset scene image; a detection path is the path of a ray from the radiation source that starts from the radiation source, passes through the three-dimensional volume model, and reaches a corresponding detection unit; For each reference image, the annotation information of the target object in the reference image is generated based on the position information of the two-dimensional projection image in the reference image; Sample images are generated based on each reference image and its corresponding annotation information.
2. The method according to claim 1, characterized in that, The detector group includes n detection units, where n is a positive integer. The three-dimensional volume model is constructed using the three-dimensional volume data of the target object, and the three-dimensional volume data includes multiple voxels. Before projecting the three-dimensional volume model onto the pre-constructed projection imaging system model from multiple preset viewpoints to obtain multiple two-dimensional projection images, the method further includes: For each of the plurality of voxels, the attenuation coefficient of the voxel is determined based on the material properties of the voxel and the energy spectrum of the radiation source corresponding to the radiation source. The method involves using a pre-constructed projection imaging system model to project the three-dimensional volume model from multiple preset viewpoints to obtain multiple two-dimensional projection images, including: Obtain each of the n detection paths of the detection system; For each of the n detection paths, the total attenuation of the ray corresponding to the detection path is obtained based on the attenuation coefficient of all voxels on the detection path. A two-dimensional projection image of the target object is generated based on the total attenuation of the n detection paths.
3. The method according to claim 2, characterized in that, The step of obtaining the total attenuation of the ray corresponding to the detection path based on the attenuation coefficients of all voxels along the detection path includes: For each voxel on the detection path, the attenuation of the voxel is calculated based on the attenuation coefficient of the voxel and the propagation distance of the ray corresponding to the detection path within the voxel. The total attenuation of the detection path is obtained by summing the attenuation of all voxels along the detection path.
4. The method according to claim 2, characterized in that, The step of obtaining the total attenuation of the ray corresponding to the detection path based on the attenuation coefficients of all voxels along the detection path includes: The total attenuation of the ray along the detection path is determined by the following formula. : In the formula, This represents the attenuation coefficient of each voxel along the detection path. This represents a tiny length element along the detection path.
5. The method according to any one of claims 2 to 4, characterized in that, The process of obtaining the three-dimensional volume model of the target object includes: Obtain the point and surface data of the target object; Discrete sampling is performed on the point and surface data to extract the boundary pixels of the target object; The outline pixels of the target object are determined based on the set of adjacent pixels in the boundary pixels. Perform dilation and closing operations on the contour pixels to obtain the contour line of the target object; The target object is filled in three dimensions according to the outline to obtain the three-dimensional volume data of the target object; A three-dimensional model of the target object is constructed based on the three-dimensional volume data.
6. The method according to any one of claims 2 to 4, characterized in that, The step of generating annotation information of the target object in the reference image based on the position information of the two-dimensional projection image in the reference image includes: Based on the position information of the two-dimensional projected image in the reference image, determine the bounding box that can cover the two-dimensional projected image and the coordinates of the corner points of the bounding box; Annotation information is generated based on the corner coordinates of the bounding box and the type of the target object.
7. A sample image generation device, characterized in that, The device includes: The first acquisition module is used to acquire a three-dimensional solid model of the target object, wherein the target object refers to the hazardous material that needs to be modeled. The first determining module is used to project the three-dimensional volume model from multiple preset perspectives using a pre-built projection imaging system model to obtain multiple two-dimensional projection images. The pre-built projection imaging system model is a model pre-built in a computer based on the configuration and geometric parameters of the projection imaging system actually used for security inspection. The projection imaging system model includes at least one detection system, and the detection system includes a radiation source and a detector group. The second determining module is used to acquire bright-field and dark-field information from the projection imaging system; acquire scene image information of the preset scene where the target object does not exist using the projection imaging system; and calculate the total scene attenuation of the preset scene using the following formula. : In the formula, Indicates bright field information; Indicates dark field information; The scene image information is represented; based on the total scene attenuation and the scene image information, a preset scene image is determined, the preset scene image including the scene image of the preset scene where the target object is located; for each of the n detection paths corresponding to each two-dimensional projection image, the reference ray intensity corresponding to the detection path is calculated using the following formula. : In the formula, This indicates the initial intensity of the radiation emitted by the radiation source. This represents the linear attenuation coefficient of the detection path within the target object. This represents the line attenuation coefficient of the detection path in the preset scenario. This indicates the path length of the ray corresponding to the detection path through the target object; for each two-dimensional projection image, a reference image corresponding to the two-dimensional projection image is constructed based on n reference ray intensities and the preset scene image; a detection path is the path of a ray from the radiation source that starts from the radiation source, passes through the three-dimensional volume model, and reaches a corresponding detection unit; The first generation module is used to generate, for each reference image, annotation information of the target object in the reference image based on the position information of the two-dimensional projection image in the reference image; The second generation module is used to generate sample images based on each reference image and its corresponding annotation information.
8. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the sample image generation method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the sample image generation method as described in any one of claims 1-6.
10. A computer program product, characterized in that, Includes a computer program, which, when executed, implements the sample image generation method according to any one of claims 1-6.
Citation Information
Patent Citations
X-ray imaging apparatus and methods
CN105247624A
Workpiece scanning image generation method, device and equipment and computer storage medium
CN114581605A
Systems and methods for projection data simulation
WO2021190276A1
Method and apparatus for automatically generating labeled image, and computer storage medium
WO2023028777A1