X-ray nondestructive testing method based on machine vision
By using a machine vision-based X-ray nondestructive testing method, synthetic data generated from four-dimensional image sequences and numerical fluid simulations is used to train a deep learning segmentation model. This solves the problem of incomplete segmentation of micro-channel structures and complex lesions in existing technologies, achieving highly robust and accurate channel segmentation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHONGSHI KANGKAI TECH CO LTD
- Filing Date
- 2026-02-25
- Publication Date
- 2026-06-02
Smart Images

Figure CN122134745A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of X-ray non-destructive testing technology, specifically to an X-ray non-destructive testing method based on machine vision. Background Technology
[0002] X-ray non-destructive testing technology, especially computed tomography (CT) imaging in the medical field, is an indispensable key tool for clinical diagnosis, disease monitoring, and surgical planning. In the analysis of tubular structures such as blood vessels and bronchi, accurate automated segmentation is a prerequisite for achieving three-dimensional visualization, quantitative analysis, and intelligent diagnosis. However, existing automated segmentation technologies still face three core technical challenges in practical applications:
[0003] Existing automatic segmentation methods rely too heavily on the pixel features of a single static image for judgment. When the target pipeline structure is small in size, has insufficient contrast agent concentration, or is subject to physiological motion interference, resulting in weak or blurred image features, it is not easy to identify accurately, leading to incomplete pipeline segmentation and omission of key areas.
[0004] Data-driven segmentation methods exhibit poor adaptability when dealing with clinical situations that are not included or are not representative enough in the training data. They cannot effectively handle complex duct bifurcation, lesion structures, and strong artifacts caused by metal implants, resulting in a significant decrease in the reliability of segmentation results in complex cases.
[0005] Existing technologies fail to effectively utilize dynamic information throughout the time series when processing dynamic contrast-enhanced scan data, ignoring the stable signals generated by contrast agent flow in the duct structure, thus missing the opportunity to use this unique dynamic feature to distinguish the target duct from the static background tissue.
[0006] To address these issues, this invention proposes a machine vision-based X-ray non-destructive testing method. Summary of the Invention
[0007] To address the shortcomings of existing technologies, this invention provides a machine vision-based X-ray non-destructive testing method to solve the problems mentioned in the background section.
[0008] To achieve the above objectives, the present invention provides the following technical solution: a machine vision-based X-ray non-destructive testing method, comprising:
[0009] Step 1: Obtain the four-dimensional image sequence generated by dynamic contrast-enhanced CT scan, calculate the motion deformation field within the four-dimensional image sequence, and perform spatial alignment processing on the four-dimensional image sequence based on the motion deformation field to generate spatially aligned four-dimensional images.
[0010] Step 2: Generate four-dimensional synthetic image data containing small pipe diameters and complex bifurcation structures using numerical fluid simulation methods, and use the four-dimensional synthetic image data as supplementary training samples for clinical trace detection.
[0011] Step 3: Combine the generated spatially aligned 4D image with the generated supplementary training samples to form a training dataset. Use the training dataset to train a deep learning segmentation model. The deep learning segmentation model can simultaneously predict spatial segmentation labels and temporal intensity change curves for the input voxels.
[0012] Step four: During the training process, a joint loss function is used to impose physical consistency constraints on the parameter optimization of the deep learning segmentation model;
[0013] Step 5: Spatial alignment processing is performed on the dynamic CT sequence images to be segmented, and the processed images are input into the trained deep learning segmentation model to output the final target pipeline structure segmentation result.
[0014] Preferably, the generation of the four-dimensional synthetic image data includes: establishing a virtual pipeline model, introducing a virtual velocity sensor to simulate the time-concentration distribution of the contrast agent in the virtual pipeline model, and simulating the CT imaging process based on the time-concentration distribution to reconstruct the image;
[0015] The dynamic behavior of the contrast agent in the virtual pipeline model is analogous to the physical process of quantum dot luminescence signals, in order to achieve simulation at the level of trace detection of the contrast agent.
[0016] Preferably, in step three, the spatial segmentation label is a binary label used to determine whether the voxel belongs to the target pipeline, and the time intensity change curve is used to characterize the trend of the voxel gray value changing over time.
[0017] The deep learning segmentation model is functionally constructed as a multimodal intelligent sensor, simulating the function of an electrical sensor by predicting the time intensity change curve.
[0018] Preferably, the time consistency loss in step four is used to constrain the time intensity change curve predicted by the model to conform to the preset physical laws of contrast agent inflow and outflow, and to constrain the thermodynamic evolution model in the temperature sensing function.
[0019] Preferably, in step four, the connectivity priority loss is used to penalize topological breakpoints or isolated regions that appear in the segmentation results predicted by the model, and the constraint function simulates the field theory constraint of the magnetic sensor to ensure segmentation connectivity.
[0020] In step four, the simulated-real domain alignment loss is used to minimize the difference in feature distribution extracted from the four-dimensional synthetic image data and the four-dimensional image sequence at the network feature level.
[0021] Preferably, step one further includes:
[0022] Sub-step Obtain the four-dimensional image sequence Furthermore, it iterates through all time frames in the four-dimensional image sequence and calculates the image quality metric for each frame. The image quality metric Specific time frame that satisfies the maximum value Set as a static reference frame for subsequent registration The remaining time frame is set as the moving frame to be registered. The image quality metric The calculation method is as follows:
[0023] ,
[0024] in, For a point in time, In order to be in 3D images of a moment In order to be in the preset target pipeline area The variance of the gray values of all voxels within the range;
[0025] Sub-step For each frame of the moving frame By minimizing the energy function To calculate the optimal motion deformation field The energy function Drive the moving frame To the static reference frame Alignment;
[0026] The energy function The expression is:
[0027] ,
[0028] in, For static reference frame Coordinate system to moving frame Non-rigid spatial mapping of coordinate systems This is a similarity measurement function used to quantify the differences between two aligned images; This is a regularization term used to ensure the stability of the motion deformation field. The smoothness and physical plausibility; This is the regularization weight coefficient, used to balance the similarity measure and the regularization term;
[0029] Sub-step Based on the calculated optimal motion deformation field For each frame of the moving frame Perform a spatial transformation operation to generate a static reference frame. Spatially aligned registered frames Finally, all the registered frames With the static reference frame Combined, they together constitute the spatially aligned four-dimensional image;
[0030] The algorithm for the spatial transformation operation is as follows:
[0031] ,
[0032] in, Static reference frame The spatial coordinates of the points are determined by the motion deformation field. Find and sample the moving frame The grayscale value at the corresponding position in the image is used to generate the registered frame. The grayscale value at the specified coordinates.
[0033] Preferably, step two further includes:
[0034] Sub-step Construct a virtual pipeline geometric model with controllable parameters. The controllable parameters include the pipe diameter. Centerline curvature and bifurcation angle The virtual pipeline geometric model Provides three-dimensional boundary conditions for subsequent fluid dynamics calculations;
[0035] Sub-step In the constructed virtual pipeline geometry model Internally, the velocity field of the incompressible fluid is simulated by solving the Navier-Stokes equations. With pressure field This solution process functionally constitutes a virtual velocity sensor, which is then used to solve for the velocity field. Solving the convection-diffusion equations yields the time-varying concentration distribution of the contrast agent at various spatial points within the pipe, generating a spatiotemporal concentration field. The expression for the convection-diffusion equation is:
[0036] ,
[0037] in, The concentration of the contrast agent. For time, For gradient operators, For the velocity field, The molecular diffusion coefficient of the contrast agent in the fluid;
[0038] Sub-step Based on the generated spatiotemporal concentration field The corresponding linear mapping relationship is calculated. Linear attenuation coefficient field of rays Furthermore, the intensity of the linear attenuation coefficient field is analogous to the intensity of the quantum dot emission signal, and then the solution is obtained. Laws to simulate The process of ray projection generates projection data. Finally, the projection data is reconstructed using a filtered back-projection algorithm. To obtain the four-dimensional synthetic image data ;
[0039] The The law is expressed as follows:
[0040] ,
[0041] in, For incident The initial intensity of the radiation, Exit after passing through an object X-ray intensity, for Rays pass through the linear attenuation coefficient field The path, For along the path The integral variable, For the projection angle, This refers to the position on the detector.
[0042] Preferably, step three further includes:
[0043] Sub-step Construct the training dataset The training dataset The spatially aligned four-dimensional image is generated from step one. and the corresponding actual segmentation labels Compared with the actual time intensity curve The composition includes step two, which generates the four-dimensional synthetic image data. and the corresponding actual segmentation labels Compared with the actual time intensity curve The real time intensity curve Extracted from 4D image data;
[0044] Sub-step Design a deep learning segmentation model The deep learning segmentation model Using four-dimensional image data as input, it has independent output branches. The first branch outputs a spatial segmentation label map. The second branch output time intensity variation curve The deep learning segmentation model Functionally, it is designed as a multimodal intelligent sensor, simulating the function of an electrical sensor by predicting the time-intensity change curve through the second branch; the deep learning segmentation model It can be represented as:
[0045] ,
[0046] in, The input is a four-dimensional image. The segmentation labels predicted by the deep learning segmentation model. The curves showing the change in grayscale values of each voxel predicted by the deep learning segmentation model over time. For all learnable parameters of the deep learning segmentation model;
[0047] Sub-step Using the constructed training dataset The deep learning segmentation model designed The deep learning segmentation model is trained iteratively, and in each training iteration, the deep learning segmentation model... Receive the training dataset Four-dimensional image samples And simultaneously predict spatial segmentation labels Intensity variation curve over time The training process minimizes the loss function. To update the model parameters The loss function The joint loss function drives the deep learning segmentation model. It achieves optimal performance in both spatial segmentation accuracy and the accuracy of temporal intensity change prediction.
[0048] Preferably, step four further includes:
[0049] Sub-step Define and calculate the time consistency loss. The time consistency loss The temporal intensity variation curves of each voxel predicted by the deep learning segmentation model described in step three are used to constrain this process. This ensures that the flow of contrast agent conforms to the preset physical laws of contrast agent inflow and outflow, and the constraint function simulates the thermodynamic evolution model in temperature sensing.
[0050] The time consistency loss The calculation method is as follows:
[0051] ,
[0052] in, For the spatial location of voxels, For time frames, The total number of time frames. voxels predicted by the model In time grayscale intensity This represents the grayscale intensity of the corresponding real-time intensity change curve. This is a scaling factor based on the changes in the actual curve, used to match the local change trends of the predicted curve and the actual curve, ensuring that the dynamic behavior of the predicted curve in the rising and falling phases is similar to that of the actual curve;
[0053] Sub-step Define and compute the connectivity priority loss. The connectivity priority loss The segmentation results predicted by the deep learning segmentation model described in step three. Penalties are imposed on topological breakpoints or isolated regions that appear in the data; the constraint function simulates the field theory constraints of a magnetic sensor to ensure segmented connectivity; the connectivity priority loss is applied. The calculation method is as follows:
[0054] ,
[0055] in, For true segmentation labels, Based on The loss function is used to measure the degree of overlap between the predicted segmentation and the actual segmentation. The predicted segmentation result All tags that are not true separators A set of isolated connected regions; For the isolated connected region Volume; For the isolated connected region To the most recent real segmentation label The Euclidean distance; These are weighting coefficients used for balancing. The loss and connectivity penalty term effectively suppresses the generation of false positive regions by the model that are broken or do not belong to the real pipes;
[0056] Sub-step Define and compute the simulated-real domain alignment loss. The simulated-real domain alignment loss Used to minimize the difference in feature distribution extracted from the four-dimensional synthetic image data and the spatially aligned four-dimensional image at the network feature level;
[0057] The simulated-real-domain alignment loss The calculation method is as follows:
[0058] ,
[0059] in, It is composed of real data domain Mid-sampled four-dimensional images; It is composed of synthetic data domain Mid-sampled four-dimensional images; It is the feature extractor in the deep learning segmentation model, used to extract features from the input four-dimensional image; It is a domain classifier network, which is trained to distinguish whether features are derived from real images or synthetic images.
[0060] This loss, through an adversarial learning mechanism, prompts the feature extractor... Generate domain-independent features, making the domain classifier The source of the feature cannot be accurately determined.
[0061] Preferably, step five further includes:
[0062] Sub-step Obtain a dynamic image to be segmented. Sequence images And for the aforementioned Perform the same operations as the spatial alignment process described in step one to calculate the motion deformation field generated by physiological motion inside. Then, based on the aforementioned motion deformation field Align the image sequence to a common reference frame. Generate a spatially aligned image to be segmented. The motion deformation field The calculation and application follow sub-steps Kyoko Steps The energy function minimization and space transformation algorithm described in [the document].
[0063] Sub-step Sub-steps The generated spatially aligned image to be segmented As input, it is fed into the deep learning segmentation model trained in step four. The model The forward inference process is performed, and based on the learned spatial segmentation features and temporal intensity change patterns, parallel predictions are made for each voxel in the input image, outputting a predicted spatial segmentation label map. Plot of predicted time-intensity changes The model reasoning process can be represented as follows:
[0064] ,
[0065] in, It is the spatially aligned image to be segmented. This is the target pipeline spatial segmentation label map predicted by the model. This is a graph showing the time-intensity variation of each voxel predicted by the model.
[0066] Sub-step , by sub-step The obtained predicted spatial segmentation label map Extract the final target pipeline structure segmentation result. If the above The output is a probability graph, which can be set by setting a preset probability threshold. Perform binarization to convert probability values higher than 100%. The voxel is identified as the target pipeline, with a probability value lower than [value missing]. The voxels are determined as the background, and the final binary segmentation mask is generated. The binarization determination condition is as follows:
[0067] ,
[0068] in, It is the moment when the target pipeline reaches the peak contrast agent concentration on the time-intensity change curve. Indicates the voxels in the final segmentation result Does it belong to the target pipeline?
[0069] This invention provides a machine vision-based X-ray non-destructive testing method. It has the following advantages:
[0070] 1. The present invention adopts a technical solution of spatial alignment processing and temporal intensity change curve joint prediction to achieve a high robustness detection and complete segmentation of micro-pipe structures under low signal-to-noise ratio conditions. Compared with the existing technology that relies on the pixel features of a single frame static image for segmentation, it solves the shortcomings of incomplete pipe segmentation and omission of key areas caused by weak image features or motion interference.
[0071] 2. The present invention adopts a technical solution of generating synthetic data through numerical fluid simulation and training it by combining simulation-real domain alignment loss. This achieves a significant improvement in the generalization ability and reliability of the segmentation model in dealing with complex and rare clinical cases. Compared with the segmentation methods in the prior art that rely solely on limited clinical data for driving, this invention solves the shortcomings of poor adaptability and unreliable segmentation results when the model is dealing with complex duct morphology, lesion structure or artifacts not included in the training set.
[0072] 3. The present invention adopts a technical solution that takes a four-dimensional image sequence as a whole input and introduces time consistency loss for physical constraints. This achieves the technical effect of deeply mining and utilizing the physical essence of dynamic enhancement information that runs through the time series. Compared with the existing technology that ignores time series information and reduces dynamic scanning data to static image processing, this invention solves the problem of missing the opportunity to distinguish target channels from background tissues due to the failure to utilize the stable dynamic signal of contrast agent flow. Attached Figure Description
[0073] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0074] To enable those skilled in the art to understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort should fall within the scope of protection of the present invention.
[0075] The present invention will now be described in detail with reference to the accompanying drawings:
[0076] Example:
[0077] Please see the appendix Figure 1 This invention provides a machine vision-based X-ray non-destructive testing method, comprising:
[0078] Step 1: Obtain the four-dimensional image sequence generated by dynamic contrast-enhanced CT scan, calculate the motion deformation field within the four-dimensional image sequence, and perform spatial alignment processing on the four-dimensional image sequence based on the motion deformation field to generate spatially aligned four-dimensional images.
[0079] Step 2: Generate four-dimensional synthetic image data containing small pipe diameters and complex bifurcation structures using numerical fluid simulation methods, and use the four-dimensional synthetic image data as supplementary training samples for clinical trace detection.
[0080] Step 3: Combine the generated spatially aligned 4D image with the generated supplementary training samples to form a training dataset. Use the training dataset to train a deep learning segmentation model. The deep learning segmentation model can simultaneously predict spatial segmentation labels and temporal intensity change curves for the input voxels.
[0081] Step 4: During the training process, a joint loss function consisting of temporal consistency loss, connectivity priority loss, and simulation-real domain alignment loss is used to physically constrain the parameter optimization of the deep learning segmentation model.
[0082] Step 5: Spatial alignment is performed on a dynamic CT sequence image to be segmented. The processed image is then input into the trained deep learning segmentation model, which outputs the final segmentation result of the target pipeline structure.
[0083] Step one further includes:
[0084] Sub-step Acquire four-dimensional image sequences Furthermore, it iterates through all time frames in the four-dimensional image sequence and calculates the image quality metric for each frame. Image quality measurement Specific time frame that satisfies the maximum value Set as a static reference frame for subsequent registration The remaining time frame is set as the moving frame to be registered. Image quality metrics The calculation method is as follows:
[0085] ,
[0086] in, For a point in time, In order to be in 3D images of a moment In order to be in the preset target pipeline area The variance of the gray values of all voxels within the range;
[0087] Sub-step For each moving frame By minimizing the energy function To calculate the optimal motion deformation field Energy function Drive moving frames To static reference frame Alignment;
[0088] Energy function The expression is:
[0089] ,
[0090] in, For static reference frame Coordinate system to moving frame Non-rigid spatial mapping of coordinate systems This is a similarity measurement function used to quantify the differences between two aligned images; This is a regularization term used to ensure the stability of the motion deformation field. The smoothness and physical plausibility; This is the regularization weight coefficient, used to balance the similarity measure and the regularization term;
[0091] Sub-step Based on the calculated optimal motion deformation field For each frame of the moving frame Perform spatial transformation operations to generate a static reference frame. Spatially aligned registered frames Finally, all registered frames With static reference frame Combined, they together form a spatially aligned four-dimensional image;
[0092] The algorithm for spatial transformation operations is as follows:
[0093] ,
[0094] in, Static reference frame Spatial coordinates in the field, through motion deformation field Find and sample moving frames The grayscale value at the corresponding position in the image is used to generate a registered frame. The grayscale value at the specified coordinates.
[0095] Step two further includes:
[0096] Sub-step Construct a virtual pipeline geometric model with controllable parameters. Controllable parameters include pipe diameter Centerline curvature and bifurcation angle Virtual pipeline geometry model Provides three-dimensional boundary conditions for subsequent fluid dynamics calculations;
[0097] Sub-step In the constructed virtual pipeline geometry model Internally, the velocity field of the incompressible fluid is simulated by solving the Navier-Stokes equations. With pressure field This solution process functionally constitutes a virtual velocity sensor, which is then used to solve for the velocity field. Solving the convection-diffusion equations yields the time-varying concentration distribution of the contrast agent at various spatial points within the pipe, generating a spatiotemporal concentration field. The expression for the convection-diffusion equation is:
[0098] ,
[0099] in, The concentration of the contrast agent. For time, For gradient operators, For the velocity field, The molecular diffusion coefficient of the contrast agent in the fluid;
[0100] Sub-step Based on the generated spatiotemporal concentration field The corresponding linear mapping relationship is calculated. Linear attenuation coefficient field of rays Furthermore, the intensity of the linear decay coefficient field is analogous to the intensity of the quantum dot emission signal, and then the solution is obtained. Laws to simulate The process of ray projection generates projection data. Finally, the projection data is reconstructed using a filtered backprojection algorithm. To obtain four-dimensional synthetic image data ;
[0101] The law is expressed as follows:
[0102] ,
[0103] in, For incident The initial intensity of the radiation, Exit after passing through an object X-ray intensity, for Rays passing through a linear attenuation coefficient field The path, For along the path The integral variable, For the projection angle, This refers to the position on the detector.
[0104] Step three further includes:
[0105] Sub-step Build a training dataset Training dataset The spatially aligned four-dimensional image is generated from step one. and the corresponding actual segmentation labels Compared with the actual time intensity curve It consists of, and also includes, step two, generating four-dimensional synthetic image data. and the corresponding actual segmentation labels Compared with the actual time intensity curve Among them, the real time intensity curve Extracted from 4D image data;
[0106] Sub-step Design a deep learning segmentation model Deep learning segmentation model Using four-dimensional image data as input, it has independent output branches. The first branch outputs a spatial segmentation label map. The second branch output time intensity variation curve Deep learning segmentation model Functionally, it is designed as a multimodal intelligent sensor, simulating the function of an electrical sensor by predicting the time-intensity change curve through a second branch; deep learning segmentation model. It can be represented as:
[0107] ,
[0108] in, The input is a four-dimensional image. The segmentation labels predicted by the deep learning segmentation model. The curves showing the change in grayscale values of each voxel predicted by the deep learning segmentation model over time. For all learnable parameters of the deep learning segmentation model;
[0109] Sub-step Using the constructed training dataset Deep learning segmentation model for design Iterative training is performed, and in each training iteration, the deep learning segmentation model... Receive training dataset Four-dimensional image samples And simultaneously predict spatial segmentation labels Intensity variation curve over time The training process minimizes the loss function. To update model parameters loss function The joint loss function drives the deep learning segmentation model. It achieves optimal performance in both spatial segmentation accuracy and the accuracy of temporal intensity change prediction.
[0110] Step four further includes:
[0111] Sub-step Define and calculate time consistency loss Time consistency loss The temporal intensity variation curves of each voxel predicted by the deep learning segmentation model in step three are used to constrain this process. This ensures that the flow of contrast agent conforms to the preset physical laws of contrast agent inflow and outflow, and constrains the thermodynamic evolution model in temperature sensing.
[0112] Time consistency loss The calculation method is as follows:
[0113] ,
[0114] in, For the spatial location of voxels, For time frames, The total number of time frames. voxels predicted by the model In time grayscale intensity This represents the grayscale intensity of the corresponding real-time intensity change curve. It is a scaling factor based on the changes in the real curve, used to match the local change trends of the predicted curve and the real curve, ensuring that the dynamic behavior of the predicted curve in the rising and falling phases is similar to that of the real curve.
[0115] Sub-step Define and compute connectivity priority loss Connectivity-first loss The segmentation results predicted by the deep learning segmentation model in step three. Penalties are imposed on topological breakpoints or isolated regions appearing in the data, and the constraint function simulates the field theory constraints of the magnetic sensor to ensure segmented connectivity; connectivity is prioritized for loss. The calculation method is as follows:
[0116] ,
[0117] in, For true segmentation labels, Based on The loss function is used to measure the degree of overlap between the predicted segmentation and the actual segmentation. To predict segmentation results All tags that are not true separators A set of isolated connected regions; isolated connected regions Volume; isolated connected regions To the most recent real segmentation label The Euclidean distance; These are weighting coefficients used for balancing. The loss and connectivity penalty term effectively suppress the generation of false positive regions by the model that are broken or do not belong to the real pipes.
[0118] Sub-step Define and compute the simulation-real domain alignment loss. Simulation-Real Domain Alignment Loss This is used to minimize the difference in feature distribution extracted from four-dimensional synthetic image data and spatially aligned four-dimensional images at the network feature level;
[0119] Simulated-Real Domain Alignment Loss The calculation method is as follows:
[0120] ,
[0121] in, It is composed of real data domain Mid-sampled four-dimensional images; It is composed of synthetic data domain Mid-sampled four-dimensional images; It is a feature extractor in deep learning segmentation models, used to extract features from the input four-dimensional image; It is a domain classifier network, which is trained to distinguish whether features come from real images or synthetic images.
[0122] This loss, through an adversarial learning mechanism, prompts the feature extractor... Generate domain-independent features, making the domain classifier The source of the feature cannot be accurately determined.
[0123] Step five further includes:
[0124] Sub-step Obtain a dynamic image to be segmented. Sequence images And for Perform the same operations as the spatial alignment process in step one to calculate the motion deformation field generated by physiological motion inside. Then, based on the motion deformation field Align the image sequence to a common reference frame. Generate a spatially aligned image to be segmented. ; Motion deformation field The calculation and application follow sub-steps Kyoko Steps The energy function minimization and space transformation algorithm described in [the document].
[0125] Sub-step Sub-steps Spatially aligned image to be segmented As input, it is fed into the deep learning segmentation model trained in step four. ; Model The forward inference process is executed, and based on the learned spatial segmentation features and temporal intensity variation patterns, voxels in the input image are predicted in parallel, outputting a predicted spatial segmentation label map. Plot of predicted time-intensity changes The model reasoning process can be represented as:
[0126] ,
[0127] in, It is the spatially aligned image to be segmented. This is the target pipeline spatial segmentation label map predicted by the model. It is a graph showing the time-intensity variation of each voxel predicted by the model;
[0128] Sub-step , by sub-step The obtained predicted spatial segmentation label map Extract the final target pipeline structure segmentation result. ; like The output is a probability graph, which can be set by setting a preset probability threshold. Perform binarization to convert probability values higher than 100%. The voxel is identified as the target pipeline, with a probability value lower than [value missing]. The voxels are determined as the background, and the final binary segmentation mask is generated. The binarization determination condition is:
[0129] ,
[0130] in, It is the moment when the target pipeline reaches the peak contrast agent concentration on the time-intensity change curve. Indicates the voxels in the final segmentation result Does it belong to the target pipeline?
[0131] By performing motion deformation field calculations and spatial alignment on the original four-dimensional image sequence, this step effectively eliminates image artifacts and structural displacements introduced by the patient's physiological movements. This processing provides a stable and unified spatiotemporal coordinate system for all subsequent analyses, ensuring that the signal intensity changes observed at different time points are genuinely caused by contrast agent flow, rather than artifacts caused by tissue movement. This removes a key data obstacle for accurately capturing temporal dynamic features and performing high-precision segmentation.
[0132] By generating physically realistic and morphologically diverse four-dimensional synthetic image data through numerical fluid simulation, this step solves the fundamental problem of the scarcity of high-quality labeled data in clinical practice, especially the difficulty in obtaining samples of small, rare, or complex lesions. It greatly expands the scale and diversity of the training dataset. Importantly, it injects prior knowledge covering working conditions into the data, significantly enhancing the generalization ability and robustness of subsequent deep learning models when facing complex and ever-changing real-world situations.
[0133] This step innovatively designs a multi-task deep learning model capable of simultaneously predicting spatial segmentation labels and temporal intensity variation curves, and uses both real and synthetic images for training. This design forces the model to move beyond recognizing static image features and instead learn and understand the dynamic contrast agent perfusion pattern with clear physical meaning across the temporal dimension. Through deep fusion of spatiotemporal information, the model can utilize unique dynamic features to distinguish target channels from the background, significantly improving segmentation accuracy in low-contrast or blurred boundary conditions.
[0134] This step introduces a joint loss function comprised of temporal consistency loss, connectivity priority loss, and simulation-real domain alignment loss. This explicitly integrates prior physical knowledge, such as fluid dynamics, topology, and domain adaptation theory, into the model training optimization process. This strong constraint based on physical consistency guides the model to learn and generate segmentation results that are physically reasonable, topologically complete, and unaffected by differences in the data source domain, fundamentally improving the reliability and medical interpretability of the segmentation results.
[0135] This step integrates all the aforementioned technological innovations into an automated end-to-end application process, achieving full automation from inputting raw dynamic CT images to outputting final high-precision pipeline structure segmentation results. Users only need to provide the image data to be analyzed to obtain reliable results after precise analysis by an intelligent model constrained by physical laws through motion correction. This greatly simplifies the operation process, improves the efficiency of non-destructive testing and clinical diagnosis, and ensures the consistency and repeatability of analysis results.
[0136] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A machine vision-based X-ray non-destructive testing method, characterized in that, include: Step 1: Obtain the four-dimensional image sequence generated by dynamic contrast-enhanced CT scan, calculate the motion deformation field within the four-dimensional image sequence, and perform spatial alignment processing on the four-dimensional image sequence based on the motion deformation field to generate spatially aligned four-dimensional images. Step 2: Generate four-dimensional synthetic image data containing small pipe diameters and complex bifurcation structures using numerical fluid simulation methods, and use the four-dimensional synthetic image data as supplementary training samples for clinical trace detection. Step 3: Combine the generated spatially aligned 4D image with the generated supplementary training samples to form a training dataset. Use the training dataset to train a deep learning segmentation model. The deep learning segmentation model can simultaneously predict spatial segmentation labels and temporal intensity change curves for the input voxels. Step four: During the training process, a joint loss function is used to impose physical consistency constraints on the parameter optimization of the deep learning segmentation model; Step 5: Spatial alignment processing is performed on the dynamic CT sequence images to be segmented, and the processed images are input into the trained deep learning segmentation model to output the final target pipeline structure segmentation result.
2. The X-ray non-destructive testing method based on machine vision according to claim 1, characterized in that, The generation of the four-dimensional synthetic image data includes: establishing a virtual pipeline model, introducing a virtual velocity sensor to simulate the time-concentration distribution of the contrast agent in the virtual pipeline model, and simulating the CT imaging process based on the time-concentration distribution to reconstruct the image; The dynamic behavior of the contrast agent in the virtual pipeline model is analogous to the physical process of quantum dot luminescence signals, in order to achieve simulation at the level of trace detection of the contrast agent.
3. The X-ray non-destructive testing method based on machine vision according to claim 2, characterized in that, In step three, the spatial segmentation label is a binary label used to determine whether the voxel belongs to the target pipeline, and the time intensity change curve is used to characterize the trend of the voxel gray value changing over time. The deep learning segmentation model is functionally constructed as a multimodal intelligent sensor, simulating the function of an electrical sensor by predicting the time intensity change curve.
4. The X-ray non-destructive testing method based on machine vision according to claim 1, characterized in that, In step four, the time consistency loss is used to constrain the time intensity change curve predicted by the model to conform to the preset physical laws of contrast agent inflow and outflow, and to constrain the thermodynamic evolution model in the temperature sensing function.
5. The X-ray non-destructive testing method based on machine vision according to claim 1, characterized in that, In step four, the connectivity priority loss is used to penalize topological breakpoints or isolated regions that appear in the segmentation results predicted by the model, and the constraint function simulates the field theory constraint of the magnetic sensor to ensure segmentation connectivity. In step four, the simulated-real domain alignment loss is used to minimize the difference in feature distribution extracted from the four-dimensional synthetic image data and the four-dimensional image sequence at the network feature level.
6. The X-ray non-destructive testing method based on machine vision according to claim 1, characterized in that, Step one further includes: Sub-step Obtain the four-dimensional image sequence Furthermore, it iterates through all time frames in the four-dimensional image sequence and calculates the image quality metric for each frame. The image quality metric Specific time frame that satisfies the maximum value Set as a static reference frame for subsequent registration The remaining time frame is set as the moving frame to be registered. The image quality metric The calculation method is as follows: , in, For a point in time, In order to be in 3D images of a moment In order to be in the preset target pipeline area The variance of the gray values of all voxels within the range; Sub-step For each frame of the moving frame By minimizing the energy function To calculate the optimal motion deformation field The energy function Drive the moving frame To the static reference frame Alignment; The energy function The expression is: , in, For static reference frame Coordinate system to moving frame Non-rigid spatial mapping of coordinate systems This is a similarity measurement function used to quantify the differences between two aligned images; This is a regularization term used to ensure the stability of the motion deformation field. The smoothness and physical plausibility; This is the regularization weight coefficient, used to balance the similarity measure and the regularization term; Sub-step Based on the calculated optimal motion deformation field For each frame of the moving frame Perform a spatial transformation operation to generate a static reference frame. Spatially aligned registered frames Finally, all the registered frames With the static reference frame Combined, they together constitute the spatially aligned four-dimensional image; The algorithm for the spatial transformation operation is as follows: , in, Static reference frame The spatial coordinates of the points are determined by the motion deformation field. Find and sample the moving frame The grayscale value at the corresponding position in the image is used to generate the registered frame. The grayscale value at the specified coordinates.
7. The X-ray non-destructive testing method based on machine vision according to claim 1, characterized in that, Step two further includes: Sub-step Construct a virtual pipeline geometric model with controllable parameters. The controllable parameters include the pipe diameter. Centerline curvature and bifurcation angle The virtual pipeline geometric model Provides three-dimensional boundary conditions for subsequent fluid dynamics calculations; Sub-step In the constructed virtual pipeline geometry model Internally, the velocity field of the incompressible fluid is simulated by solving the Navier-Stokes equations. With pressure field This solution process functionally constitutes a virtual velocity sensor, which is then used to solve for the velocity field. Solving the convection-diffusion equations yields the time-varying concentration distribution of the contrast agent at various spatial points within the pipe, generating a spatiotemporal concentration field. The expression for the convection-diffusion equation is: , in, The concentration of the contrast agent. For time, For gradient operators, For the velocity field, The molecular diffusion coefficient of the contrast agent in the fluid; Sub-step Based on the generated spatiotemporal concentration field The corresponding linear mapping relationship is calculated. Linear attenuation coefficient field of rays Furthermore, the intensity of the linear attenuation coefficient field is analogous to the intensity of the quantum dot emission signal, and then the solution is obtained. Laws to simulate The process of ray projection generates projection data. Finally, the projection data is reconstructed using a filtered back-projection algorithm. To obtain the four-dimensional synthetic image data ; The The law is expressed as follows: , in, For incident The initial intensity of the radiation, Exit after passing through an object X-ray intensity, for Rays pass through the linear attenuation coefficient field The path, For along the path The integral variable, For the projection angle, This refers to the position on the detector.
8. The X-ray non-destructive testing method based on machine vision according to claim 1, characterized in that, Step three further includes: Sub-step Construct the training dataset The training dataset The spatially aligned four-dimensional image is generated from step one. and the corresponding actual segmentation labels Compared with the actual time intensity curve The composition includes step two, which generates the four-dimensional synthetic image data. and the corresponding actual segmentation labels Compared with the actual time intensity curve The real time intensity curve Extracted from 4D image data; Sub-step Design a deep learning segmentation model The deep learning segmentation model Using four-dimensional image data as input, it has independent output branches. The first branch outputs a spatial segmentation label map. The second branch output time intensity variation curve The deep learning segmentation model Functionally, it is designed as a multimodal intelligent sensor, simulating the function of an electrical sensor by predicting the time-intensity change curve through the second branch; the deep learning segmentation model It can be represented as: , in, The input is a four-dimensional image. The segmentation labels predicted by the deep learning segmentation model. The curves showing the change in grayscale values of each voxel predicted by the deep learning segmentation model over time. For all learnable parameters of the deep learning segmentation model; Sub-step Using the constructed training dataset The deep learning segmentation model designed The deep learning segmentation model is trained iteratively, and in each training iteration, the deep learning segmentation model... Receive the training dataset Four-dimensional image samples And simultaneously predict spatial segmentation labels Intensity variation curve over time The training process minimizes the loss function. To update the model parameters The loss function The joint loss function drives the deep learning segmentation model. It achieves optimal performance in both spatial segmentation accuracy and the accuracy of temporal intensity change prediction.
9. The X-ray non-destructive testing method based on machine vision according to claim 1, characterized in that, Step four further includes: Sub-step Define and calculate the time consistency loss. The time consistency loss The temporal intensity variation curves of each voxel predicted by the deep learning segmentation model described in step three are used to constrain this process. This ensures that the flow of contrast agent conforms to the preset physical laws of contrast agent inflow and outflow, and the constraint function simulates the thermodynamic evolution model in temperature sensing. The time consistency loss The calculation method is as follows: , in, For the spatial location of voxels, For time frames, The total number of time frames. voxels predicted by the model In time grayscale intensity This represents the grayscale intensity of the corresponding real-time intensity change curve. This is a scaling factor based on the changes in the actual curve, used to match the local change trends of the predicted curve and the actual curve, ensuring that the dynamic behavior of the predicted curve in the rising and falling phases is similar to that of the actual curve; Sub-step Define and compute the connectivity priority loss. The connectivity priority loss The segmentation results predicted by the deep learning segmentation model described in step three. Penalties are imposed on topological breakpoints or isolated regions that appear in the data; the constraint function simulates the field theory constraints of a magnetic sensor to ensure segmented connectivity; the connectivity priority loss is applied. The calculation method is as follows: , in, For true segmentation labels, Based on The loss function is used to measure the degree of overlap between the predicted segmentation and the actual segmentation. The predicted segmentation result All tags that are not true separators A set of isolated connected regions; For the isolated connected region Volume; For the isolated connected region To the most recent real segmentation label The Euclidean distance; These are weighting coefficients used for balancing. The loss and connectivity penalty term effectively suppresses the generation of false positive regions by the model that are broken or do not belong to the real pipes; Sub-step Define and compute the simulated-real domain alignment loss. The simulated-real domain alignment loss Used to minimize the difference in feature distribution extracted from the four-dimensional synthetic image data and the spatially aligned four-dimensional image at the network feature level; The simulated-real-domain alignment loss The calculation method is as follows: , in, It is composed of real data domain Mid-sampled four-dimensional images; It is composed of synthetic data domain Mid-sampled four-dimensional images; It is the feature extractor in the deep learning segmentation model, used to extract features from the input four-dimensional image; It is a domain classifier network, which is trained to distinguish whether features are derived from real images or synthetic images. This loss, through an adversarial learning mechanism, prompts the feature extractor... Generate domain-independent features, making the domain classifier The source of the feature cannot be accurately determined.
10. The X-ray non-destructive testing method based on machine vision according to claim 1, characterized in that, Step five further includes: Sub-step Obtain a dynamic image to be segmented. Sequence images And for the aforementioned Perform the same operations as the spatial alignment process described in step one to calculate the motion deformation field generated by physiological motion inside. Then, based on the aforementioned motion deformation field Align the image sequence to a common reference frame. Generate a spatially aligned image to be segmented. The motion deformation field The calculation and application follow sub-steps Kyoko Steps The energy function minimization and space transformation algorithm described in [the document]; Sub-step Sub-steps The generated spatially aligned image to be segmented As input, it is fed into the deep learning segmentation model trained in step four. The model The forward inference process is performed, and based on the learned spatial segmentation features and temporal intensity change patterns, parallel predictions are made for each voxel in the input image, outputting a predicted spatial segmentation label map. Plot of predicted time-intensity changes The model reasoning process can be represented as follows: , in, It is the spatially aligned image to be segmented. This is the target pipeline spatial segmentation label map predicted by the model. This is a graph showing the time-intensity variation of each voxel predicted by the model. Sub-step , by sub-step The obtained predicted spatial segmentation label map Extract the final target pipeline structure segmentation result. If the above The output is a probability graph, which can be set by setting a preset probability threshold. Perform binarization to convert probability values higher than 100%. The voxel is identified as the target pipeline, with a probability value lower than [value missing]. The voxels are determined as the background, and the final binary segmentation mask is generated. The binarization determination condition is as follows: , in, It is the moment when the target pipeline reaches the peak contrast agent concentration on the time-intensity change curve. Indicates the voxels in the final segmentation result Does it belong to the target pipeline?