A multimodal X-ray foreign body detection method for materials

Through the multimodal X-ray detection method, material-contour coupling feature bodies are generated, topological networks are constructed and foreign body feature conduction paths are simulated, which solves the technical problems existing in traditional X-ray detection technology in detecting foreign bodies with insignificant material differences. The detection process of materials is realized, which solves the shortcomings of traditional X-ray detection technology in detecting foreign bodies with insignificant material differences, improves the accuracy and adaptability of detection, and realizes intelligent and efficient material detection.

CN120446171BActive Publication Date: 2025-09-23ZHIYAN INTELLIGENT TECH (JIAXING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510947165.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-09-23
Estimated Expiration
2045-07-10

AI Technical Summary

Technical Problem

The existing multimodal X-ray detection technology in material inspection cannot effectively identify foreign objects with insignificant material differences, and it is difficult to meet the modern industry's needs for high precision, real-time performance and intelligence.

Method used

By acquiring the transmission grayscale timing array and scattered photon energy spectrum distribution matrix output by the multimodal X-ray acquisition system, a composite feature body containing material-contour coupling features is generated, a material-contour associated node topological network is constructed, the foreign body feature conduction path is simulated, and a foreign body-detection coupling prediction surface is generated through time-space dimension mapping transformation. The sensitivity adjustment factor is calculated, and a standardized foreign body-detection coupling coefficient thermal cloud map is generated. Multi-scale feature extraction and dynamic matching are performed to generate a control plan.

Benefits of technology

It achieves accurate identification of foreign objects with insignificant material differences, improves the anti-interference ability and adaptability of detection, realizes intelligent and adaptive adjustment of the detection process, and meets the high precision and high efficiency requirements of modern industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120446171B_ABST
    Figure CN120446171B_ABST
Patent Text Reader

Abstract

This invention relates to the field of material detection technology and discloses a multimodal X-ray foreign body detection method for materials. The method obtains the transmission grayscale time series array and scattered photon energy spectrum distribution matrix output by a multimodal X-ray acquisition system, generates a composite feature volume through cross-modal feature interaction encoding, constructs a material-contour association node topology network, simulates the foreign body feature transmission path and outputs a set of associated confidence values, performs spatiotemporal dimensional mapping transformation to generate a foreign body-detection coupling prediction surface, calculates a sensitivity adjustment factor and generates a normalized coupling coefficient thermal cloud map, extracts a set of detection quantitative indicators and dynamically matches them to a preset benchmark range, and generates a control plan when an indicator exceeds the limit. This method improves the accuracy, reliability, and real-time performance of foreign body detection and can adapt to the detection needs of complex scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of material detection, and in particular to a material multimodal X-ray foreign body detection method. Background Art

[0002] In many fields such as modern industrial production and food processing, accurate detection of foreign matter in materials is crucial. Traditional single-modality X-ray detection technology has gradually revealed many limitations when faced with complex material scenarios. From the detection principle point of view, traditional technology only relies on transmitted grayscale information, and it is difficult to accurately identify foreign matter with insignificant material differences. For example, in food processing, some foreign matter such as plastic fragments that are similar in material to the material are easily missed by traditional methods. Moreover, a single modality cannot fully capture the physical properties of foreign matter. Key information such as the material composition and density distribution of foreign matter is often ignored, which greatly reduces the accuracy and reliability of detection.

[0003] In practical applications, traditional technologies also suffer from significant deficiencies in detection sensitivity and anti-interference capabilities. Changes in material density or thickness can severely interfere with the transmitted grayscale information, leading to deviations in detection results. For example, when inspecting multi-layered packaging, the influence of the packaging material can mask the foreign object signal, resulting in detection failure. Furthermore, traditional technologies have limited detection capabilities for tiny foreign objects, making them difficult to meet the high-precision detection demands of modern industry.

[0004] With the continuous improvement of industrial automation, the demand for real-time and intelligent material testing on production lines is also increasing. Traditional testing methods mostly use fixed detection parameters and modes, which cannot adapt to changes in material characteristics and the testing environment, making it difficult to achieve efficient automated testing. For example, in high-variety, small-batch production scenarios, frequent material changes require manual resetting of detection parameters. This is not only inefficient but also prone to human error.

[0005] The limitations of traditional single-modality X-ray inspection technology become even more pronounced in complex scenarios, such as inspecting mixed materials or during dynamic transport. It cannot effectively process multi-source information and struggles to accurately correlate foreign body characteristics with inspection results. This results in delays in timely detection and removal of foreign bodies in actual production, posing potential risks to product quality and production safety.

[0006] Traditional single-modality X-ray inspection technology is no longer able to meet the diverse and complex inspection requirements of modern industry. Therefore, there is an urgent need for a highly accurate material foreign body detection method that can integrate multimodal information, possesses adaptive adjustment capabilities, and improves detection accuracy, reliability, and real-time performance to meet the development needs of modern industrial production. Summary of the Invention

[0007] The object of the present invention is to provide a multimodal X-ray foreign body detection method for materials to solve the problems raised in the above background technology.

[0008] To achieve the above objectives, the present invention provides the following technical solution: a multimodal X-ray foreign body detection method for materials, the method comprising:

[0009] Obtain the transmission grayscale time series array and scattered photon energy spectrum distribution matrix output by the multimodal X-ray acquisition system, and generate a composite feature volume containing material-contour coupling features through cross-modal feature interaction encoding;

[0010] Based on the spatiotemporal coordinate parameters of the composite feature body, a material-contour association node topological network is constructed;

[0011] Inputting the node connection weights of the topological network into a feature conduction model to simulate a foreign body feature conduction path and outputting a set of associated confidence values ​​of adjacent nodes in the path;

[0012] According to the associated confidence value set, the composite feature body is subjected to a spatiotemporal dimension mapping transformation, a bidirectional mapping equation between a sequence of microscopic foreign body contour change rates and a cumulative macroscopic detection sensitivity is established, and a foreign body-detection coupling prediction surface is generated;

[0013] Based on the foreign object-detection coupling prediction surface, a sensitivity adjustment factor of each detection area is calculated, and a nonlinear covariance tensor operation is performed on the adjustment factor and the associated confidence value of the corresponding position to generate a normalized foreign object-detection coupling coefficient thermal cloud map;

[0014] Performing multi-scale feature extraction on the coupling coefficient thermal cloud map to extract a set of detection quantitative indicators including material mutation gradient, contour complexity entropy, and detection convergence stability, and dynamically matching them with a preset benchmark range;

[0015] When any detection quantitative index exceeds the preset benchmark boundary, a control scheme including a ray parameter reconfiguration sequence and a detection mode switching strategy is generated.

[0016] Preferably, the cross-modal feature interaction encoding includes:

[0017] Performing short-time Fourier time-frequency decomposition on the transmission grayscale time series array to generate a multi-band transmission feature tensor;

[0018] Performing mathematical morphological filtering based on structural elements on the scattered photon energy spectrum distribution matrix to output an energy spectrum enhancement matrix of the foreign matter area;

[0019] The multi-band transmission feature tensor and the energy spectrum enhancement matrix are input into a dual-branch cross attention network for cross-modal feature fusion, and the fusion weight is optimized through the material-contour coupling loss function to generate the composite feature body.

[0020] Preferably, the construction of the material-contour association node topology network includes:

[0021] Based on the material-contour coupling feature distribution of the composite feature body, a DBSCAN density clustering algorithm is used to screen the associated candidate node set;

[0022] Perform Voronoi hierarchical decomposition on the node set to construct a three-dimensional spatial grid model and divide it into multiple grid cells;

[0023] Calculate the feature information gain rate of adjacent grid cells and generate a dynamic connection matrix;

[0024] The dynamic connection matrix is ​​used to output a weighted material-contour association node topology network.

[0025] Preferably, the simulated foreign body characteristic conduction path includes:

[0026] Inputting the dynamic connection matrix of the topological network into the characteristic conduction model to calculate the information conduction matrix between nodes;

[0027] The information conduction matrix and the node set are used to simulate the characteristic conduction path by adopting an improved genetic optimization algorithm, and the associated confidence value set of adjacent nodes is output and stored in a dynamic confidence database.

[0028] Preferably, the spatiotemporal dimension mapping transformation includes:

[0029] Dividing the composite feature into frames according to detection time, and combining the spatial distribution of the associated confidence value set to construct a five-dimensional space-time mapping hypersurface;

[0030] Performing discrete wavelet transform on the contour dimension of the five-dimensional space-time mapping hypersurface to generate a frequency domain mapping subspace;

[0031] Performing a third-order difference calculation on the macroscopic detection sensitivity cumulant dimension of the five-dimensional space-time mapping hypersurface to extract frequency-domain-time domain correlation features;

[0032] The coupling parameter tensor of the bidirectional mapping equation is solved to generate the relationship surface between the contour change rate and the detection sensitivity, and the foreign object-detection coupling prediction surface is obtained.

[0033] Preferably, the calculation of the sensitivity adjustment factor includes:

[0034] Extracting a curvature change sequence of each detection area along the foreign object-detection coupling prediction surface;

[0035] Aligning the curvature change sequence with the associated confidence value set according to topological network node coding;

[0036] The aligned data is fused with the material density time series data based on the bicubic interpolation algorithm to generate a dynamic sensitivity correction factor;

[0037] The noise interference is eliminated by independent component analysis and the sensitivity adjustment factor is output.

[0038] Preferably, generating a standardized foreign body-detection coupling coefficient thermal cloud map includes:

[0039] mapping the sensitivity adjustment factors and associated confidence values ​​to mesh vertices of the topological network;

[0040] Construct a four-dimensional covariance correlation tensor and enhance the nonlinear coupling effect through the GELU activation function;

[0041] Use the manifold learning LLE algorithm to reduce the dimension to three-dimensional space;

[0042] The coupling coefficient distribution is dynamically superimposed according to the time labels of the space-time mapping hypersurface, and a standardized thermal cloud map is output.

[0043] Preferably, the multi-scale feature extraction includes:

[0044] Calculating a Sobel edge operator along the thermal gradient dimension of the standardized foreign body-detection coupling coefficient thermal cloud map to extract geometric feature vectors of material mutation areas;

[0045] The fast Walsh transform is performed on the thermodynamic layer of continuous time periods, and the sample entropy is calculated as the contour complexity entropy;

[0046] The fractal dimension of the trajectory fitting is optimized in combination with the feature of the space-time mapping hypersurface to generate a detection convergence stability; and a detection quantitative index set including mutation gradient, contour complexity entropy and convergence stability is output.

[0047] Preferably, the dynamic matching includes:

[0048] Inputting the detection quantitative indicator set into a support vector machine decision engine of a knowledge base;

[0049] Match the material tolerance critical interval and contour safety region of the reference range function;

[0050] When any indicator exceeds the benchmark boundary, the ant colony search protocol of the multi-objective optimization engine is triggered;

[0051] Based on the optimal convergence solution of the characteristic conduction path and the coupled prediction surface, a ray parameter adjustment coordinate set and a detection path scheduling sequence are output.

[0052] Preferably, the generation of the control scheme includes:

[0053] Mapping the ray parameter adjustment coordinate set to voltage-current control parameters of the X-ray generating device;

[0054] Converting the detection path scheduling sequence into motion trajectory instructions for a mechanical scanning device;

[0055] The voltage-current control parameters and motion trajectory instructions are sent to the detection terminal for execution through the communication protocol.

[0056] Compared with the prior art, the present invention has the following beneficial effects:

[0057] The proposed multimodal X-ray foreign body detection method for materials effectively addresses the information shortage problem of traditional single-modality detection by fusing multimodal information such as the transmitted grayscale time series array and the scattered photon energy spectrum distribution matrix. This method generates a composite feature volume through cross-modal feature interactive encoding. This method can more comprehensively capture the material and contour characteristics of foreign bodies, improving the ability to identify foreign bodies with subtle material differences. For example, in food processing, it can accurately detect foreign bodies such as plastic fragments with similar materials to the raw materials, which are often missed by traditional methods.

[0058] Based on composite feature bodies, a material-contour node-based topological network is constructed, and a feature conduction model is used to simulate the conduction path of foreign body features. This node-based topological network construction method can deeply explore the correlation between foreign body features and establish a more accurate foreign body feature model. By simulating the feature conduction path, a set of associated confidence values ​​for adjacent nodes is output, providing richer and more accurate feature information for subsequent detection and analysis. This enables the detection process to more clearly track the conduction path of foreign body features, thereby improving the positioning accuracy and detection reliability of foreign bodies.

[0059] By mapping and transforming the spatiotemporal dimensions, a bidirectional mapping equation is established to generate a foreign body-detection coupling prediction surface. This surface establishes a bidirectional correlation between microscopic foreign body contour changes and macroscopic detection sensitivity, providing a more scientific theoretical basis for the detection process. Based on this surface, a sensitivity adjustment factor is calculated and combined with the associated confidence value to generate a thermal cloud map. This allows for dynamic adjustment of detection sensitivity based on the actual conditions of different detection areas, effectively addressing interference from factors such as material density and thickness variations. For example, when detecting multi-layer packaging, detection parameters can be dynamically adjusted based on the influence of the packaging material to prevent foreign body signals from being masked, thereby improving the detection's anti-interference capability and adaptability.

[0060] Multi-scale feature extraction is performed on the thermal cloud map to obtain a set of quantitative detection indicators including material mutation gradient, contour complexity entropy, detection convergence stability, etc., and dynamically match them with the preset benchmark range. When the indicators exceed the boundaries, a control plan is generated. This multi-scale feature extraction and dynamic matching mechanism realizes intelligent analysis and adaptive adjustment of the detection process. By real-time monitoring of quantitative detection indicators, abnormal situations in the detection process can be discovered in time, and corresponding control plans can be generated, such as ray parameter reconfiguration and detection mode switching, so that the detection system can automatically optimize the detection parameters and modes according to the actual situation, improving the real-time and intelligent level of detection. For example, in multi-variety, small-batch production scenarios, it can automatically adapt to the detection needs of different materials without the need for frequent manual parameter adjustments, thereby improving production efficiency and detection accuracy.

[0061] The control scheme is converted into specific control parameters and motion trajectory instructions, which are then sent to the detection terminal for execution. This achieves closed-loop management from detection analysis to actual control, ensuring the efficient operation of the detection system and the accuracy of the test results. This closed-loop management mechanism makes the entire detection process more automated and intelligent, reduces human intervention, improves the stability and reliability of the detection system, and better meets the high-precision and high-efficiency material detection requirements of modern industrial production. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 This is a working principle diagram of the multimodal X-ray foreign body detection method for materials according to the present invention;

[0063] Figure 2 Flowchart for coding cross-modal feature interactions;

[0064] Figure 3 Flowcharts constructed for topological networks;

[0065] Figure 4 Flowchart for the simulation of characteristic conduction paths;

[0066] Figure 5 Flowchart of the spatiotemporal dimension mapping transformation. DETAILED DESCRIPTION

[0067] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0068] See also Figure 1-Figure 5 The present invention relates to a multimodal X-ray foreign body detection method for materials, which comprises the following steps:

[0069] The transmission grayscale time series array and scattered photon energy spectrum distribution matrix output by the multimodal X-ray acquisition system are obtained, and a composite feature body containing material-contour coupling features is generated through cross-modal feature interaction encoding. Specifically, when the multimodal X-ray acquisition system detects the material, it synchronously collects transmission grayscale data and scattered photon energy spectrum data. Among them, the transmission grayscale time series array reflects the change of the material's absorption degree of X-rays over time, and the scattered photon energy spectrum distribution matrix reflects the energy distribution of scattered photons after the interaction between X-rays and the material. By performing feature interaction encoding on these two modal data, material information and contour information can be coupled, providing a more comprehensive feature basis for subsequent detection.

[0070] A node-based topological network of material-contour associations is constructed based on the spatiotemporal coordinate parameters of the composite feature. These parameters contain information about the composite feature's spatial location and time series. Using these parameters, feature points are converted into nodes, and relationships between nodes are established to form a topological network structure. This allows for a network representation of the association between materials and contours.

[0071] The feature transmission model uses the node connection weights of the topological network to simulate the transmission path of foreign object features and outputs a set of associated confidence values ​​for adjacent nodes along the path. Based on the node connection weights, the feature transmission model analyzes the transmission patterns of foreign object features in the topological network. By simulating the transmission path, it obtains the associated confidence values ​​between adjacent nodes. These values ​​reflect the reliability of the feature associations between nodes.

[0072] Based on the associated confidence value set, the composite feature body is transformed in time and space, and a bidirectional mapping equation is established between the sequence of microscopic foreign body contour change rates and the cumulative macroscopic detection sensitivity, generating a foreign body-detection coupled prediction surface. Through the time and space dimension mapping transformation, the composite feature body is remapped in time and space, and the relationship between microscopic contour changes and macroscopic detection sensitivity is found. A bidirectional mapping equation is established, and then a coupled prediction surface capable of predicting foreign body detection is generated.

[0073] Based on the foreign object-detection coupling prediction surface, the sensitivity adjustment factor for each detection area is calculated. A nonlinear covariance tensor operation is performed on the adjustment factor and the associated confidence value at the corresponding location to generate a normalized foreign object-detection coupling coefficient thermal cloud map. The sensitivity adjustment factor for each detection area is extracted from the coupling prediction surface and combined with the associated confidence value to generate a thermal cloud map, visualizing the coupling relationship between foreign objects and detection.

[0074] Multi-scale feature extraction is performed on the coupling coefficient thermal cloud map. A set of quantitative detection indicators, including material gradient mutation, contour complexity entropy, and detection convergence stability, is extracted and dynamically matched against a preset benchmark range. This multi-scale feature extraction method obtains multiple key quantitative detection indicators from the thermal cloud map. These indicators are then dynamically compared against the preset benchmark range to determine whether they are within the normal range.

[0075] When any quantitative detection metric exceeds a preset benchmark boundary, a control plan is generated, including a ray parameter reconfiguration sequence and a detection mode switching strategy. If a quantitative detection metric exceeds the benchmark boundary, it indicates that there may be an anomaly in the detection process or an area that needs optimization. In this case, a corresponding control plan is generated to adjust the detection parameters and mode to ensure the accuracy and effectiveness of the detection.

[0076] Example 1: Specific implementation of cross-modal feature interaction encoding

[0077] During multimodal X-ray foreign body detection, the multimodal X-ray acquisition system simultaneously outputs a transmission grayscale time-series array and a scattered photon energy spectrum distribution matrix. The transmission grayscale time-series array is composed of the grayscale values ​​collected by the detector in a time series after X-rays penetrate the material. Each element corresponds to the degree of X-ray absorption at different locations within the material at a given moment, reflecting how the material's profile changes over time. The scattered photon energy spectrum distribution matrix, on the other hand, records the energy distribution of scattered photons after the X-rays interact with the material. Different materials produce different energy spectrum distributions for scattered photons, so this matrix contains rich material information.

[0078] When performing short-time Fourier time-frequency decomposition on a transmission grayscale time series array, the type and length of the window function must be determined first. Window functions can be selected from Hanning windows, Hamming windows, etc. The window length setting must take into account both time resolution and frequency resolution requirements. If the window length is too short, the frequency resolution will be reduced, making it difficult to accurately distinguish the characteristics of different frequencies; if the window length is too long, the time resolution will be reduced, making it impossible to capture rapidly changing time domain characteristics. The window length setting is dynamically determined based on the speed of the material being inspected and the characteristic scale of the foreign matter:

[0079] Assuming the material transmission speed is v (m / s), the minimum characteristic size of foreign matter is d (mm), then the basic value of the window length is (Unit: s); If detecting high-frequency dynamic foreign matter (such as high-speed transmission of granular materials), the window length is To improve the time resolution; if detecting low-frequency static foreign matter (such as bulk materials), the window length is To improve frequency resolution; in actual application, it can be quickly called through the preset material type-window length mapping table (see Table 1), or dynamically adjusted through real-time speed sensor feedback.

[0080] Table 1:

[0081]

[0082] Taking a window length of N as an example, the transmission grayscale time series array is divided into several overlapping segments of length N in chronological order. Each segment is Fourier transformed to obtain the spectrum information of each time segment, thereby generating a multi-band transmission feature tensor. This tensor contains the transmission characteristics of different time points and different frequency bands, which can more comprehensively describe the contour characteristics of the material from the perspective of time and frequency domain.

[0083] Mathematical morphology filtering based on structuring elements is a key step in processing the scattered photon energy spectrum distribution matrix. First, an appropriate structuring element must be designed based on the characteristics of the energy spectrum distribution matrix. The shape and size of the structuring element directly influence the filtering effect. Common structuring elements include linear, square, and circular. For example, if the foreign body signature in the energy spectrum exhibits a linear distribution, a linear structuring element can be selected; if the foreign body signature is point-like, a circular structuring element may be more appropriate. The size of the structuring element should be determined based on the noise scale and the size of the foreign body signature. Generally, a structuring element slightly larger than the noise scale and smaller than the foreign body signature is selected. By performing mathematical morphology operations such as erosion and dilation on the scattered photon energy spectrum distribution matrix, noise can be effectively removed and the energy spectrum signature of the foreign body region can be enhanced, thereby outputting an energy spectrum enhancement matrix for the foreign body region. The erosion operation eliminates noise points in the energy spectrum matrix that are smaller than the structuring element, while the dilation operation fills any small gaps that may exist in the foreign body region, making the energy spectrum signature of the foreign body more prominent.

[0084] Next, the multi-band transmission feature tensor and the energy spectrum enhancement matrix are input into a two-branch cross-attention network for cross-modal feature fusion. This network consists of two branches, one for processing transmission features and the other for processing energy spectrum features. Each branch typically consists of convolutional layers, pooling layers, and other layers to extract deep representations of features. The cross-attention mechanism is the core of this network, enabling the two branches to focus on each other's important features. The structure of the two-branch cross-attention network is as follows:

[0085] Branch 1 (transmission feature processing): contains 3 convolutional layers (convolution kernel size 3×3, stride 1) + 1 self-attention module, with an output dimension of ;

[0086] Branch 2 (energy spectrum feature processing): contains 2 convolution layers (convolution kernel size 5×5, stride 2) + 1 self-attention module, with an output dimension of ;

[0087] Cross-attention mechanism: feature tensor generated by branch 1 The feature tensor generated by branch 2 Map to the same dimension via linear transformation: , ( 、 is a learnable weight matrix); calculate the attention weight matrix ,in is the dimension after mapping; branch 1 passes Focus on the key features of Branch 2: , the same goes for branch 2: ;

[0088] Modal fusion: and Perform element-by-element addition, compress the dimension through a 1×1 convolutional layer, and output a composite feature volume.

[0089] Specifically, when processing the transmission feature branch, the network generates attention weights based on information from the energy spectrum feature branch. These weights indicate which parts of the transmission feature are more closely associated with the energy spectrum feature, thereby focusing on these key parts of the transmission feature. Similarly, when processing the energy spectrum feature branch, attention weights are also generated based on information from the transmission feature branch, focusing on key parts of the energy spectrum feature. This cross-attention mechanism enables information interaction and complementarity between different modal features.

[0090] During the training of the two-branch cross attention network, the material-contour coupling loss function is needed to optimize the fusion weights. The mathematical expression of this loss function is:

[0091]

[0092] Among them: Material loss : Use cross entropy loss to measure the difference between the predicted material category and the true category: , where L m: Material loss value, used to quantify the difference between the predicted material category and the real material category. ∑ is the summation symbol, which performs cumulative calculations on all possible material categories (such as metal, plastic, organic matter, etc.). For real material labels (such as metal / plastic / organic), is the network prediction probability, α, β, γ are weight coefficients, which are used to balance the contribution of material loss, contour loss and coupling loss respectively, log is the natural logarithm function, which is used to convert the probability value into information entropy form; contour loss : Use Dice loss to measure the overlap between the predicted contour and the true contour: , where: L c is the contour loss value, which is used to quantify the overlap between the predicted contour and the true contour. The first ∑ (in the numerator) is the sum of the pixels in the intersection of the true contour and the predicted contour. contour is the binary mask matrix of the true contour, y pred_contour is the binary mask matrix of the predicted contour. The second ∑ (in the denominator) is the sum of all "1" pixels in the true contour mask, that is, the total number of pixels of the true contour. The third ∑ (in the denominator) is the sum of all "1" pixels in the predicted contour mask, that is, the total number of pixels of the predicted contour. is the smoothing term; coupling term, : Use MSE loss to constrain the consistency of material and contour features: , where: L Couple is the coupling loss value, which is used to constrain the consistency of material features and contour features to ensure that the two match each other in the feature space. 、 is the feature mapping matrix, is the material feature vector, is the contour feature vector; weight coefficient , , (It can be adjusted dynamically according to the data set and determined by minimizing the loss of the validation set.) Minimize it through the back propagation algorithm , achieving adaptive optimization of fusion weights and generating a composite feature volume. The loss function is designed to ensure that the fused composite feature volume accurately reflects both the material and contour information of the material. For example, the loss function can include a material feature loss term and a contour feature loss term. The material feature loss term measures the difference between the fused feature and the actual material feature, while the contour feature loss term measures the difference between the fused feature and the actual contour feature. Through the backpropagation algorithm, the parameters in the network are continuously adjusted to minimize the value of the loss function, thereby obtaining the optimal fusion weight and generating a composite feature volume that contains material-contour coupling features.

[0093] During implementation, attention must also be paid to data normalization to ensure that the numerical ranges of the transmitted grayscale time series array and the scattered photon energy spectrum distribution matrix are consistent, to avoid significant numerical discrepancies that could affect network training and feature fusion. Furthermore, the number of layers and nodes in the dual-branch cross-attention network must be appropriately configured based on the complexity of the actual data and computational resources. Too few layers may not extract sufficient features, while too many layers will increase computational complexity and training time.

[0094] Through the above series of operations, the cross-modal feature interaction encoding process can deeply fuse the contour information in the transmitted grayscale time series array and the material information in the scattered photon energy spectrum distribution matrix. The generated composite feature body contains both the contour features and the material features of the material, and reflects the coupling relationship between the two, providing a more comprehensive and effective feature representation for subsequent foreign body detection, so that the subsequent detection steps based on the composite feature body can more accurately identify foreign bodies in the material.

[0095] Example 2: Specific implementation method for constructing a material-contour associated node topology network

[0096] After obtaining a composite feature volume containing material-contour coupling features, a topological network must be constructed based on its spatiotemporal coordinate parameters. These parameters encompass the positional coordinates (x, y, z) in three-dimensional space and sequence information in the time dimension. Each feature point has corresponding coordinate values ​​in the spatiotemporal dimension, which reflect the spatial distribution of the feature and its changes over time. The material-contour coupling feature distribution refers to the combined characteristic distribution of the material properties and contour morphology presented by these feature points in the spatiotemporal coordinates, such as how the spatial position and contour shape of regions of different materials change over time.

[0097] When using the DBSCAN density clustering algorithm to screen candidate nodes, the algorithm's key parameters must be determined: the neighborhood radius Eps and the minimum sample count MinPts. The neighborhood radius Eps defines the node's neighborhood range. A point's neighborhood is the spatial region with a radius of Eps centered on that point. The minimum sample count MinPts refers to the minimum number of points within the neighborhood. A point is considered a core point if the number of points within its neighborhood is at least MinPts. The parameter settings should be determined based on the distribution density of the composite feature volume. If the feature distribution is dense, Eps and MinPts can be appropriately reduced; if the distribution is sparse, these two parameters should be increased.

[0098] In specific operations, each feature point in the composite feature volume is traversed, and the number of points in its neighborhood is calculated. For each core point, all points in its neighborhood are divided into a cluster. Non-core points located within the neighborhood of a core point are assigned to the cluster containing that core point; otherwise, they are considered noise points. Through the DBSCAN algorithm, high-density areas in the composite feature volume can be divided into multiple clusters. Each cluster represents an area with similar material-contour coupling characteristics. Representative points are selected from each cluster as candidate nodes for association, thus forming a candidate node set. These candidate nodes can effectively characterize the distribution characteristics of the composite feature volume and reduce the amount of data required for subsequent processing.

[0099] When performing a hierarchical Voronoi mesh on a node set to construct a 3D spatial mesh model, the basic principle of Voronoi meshing is to divide the space into multiple Voronoi cells, each corresponding to a node, where the distance from any point within the cell to that node is smaller than the distance to other nodes. First, the number of layers to be meshed and the accuracy of each layer are determined based on the extent of the 3D space. Hierarchical meshing can be performed in a top-down manner, starting with a coarse meshing of the entire space to obtain larger mesh cells. Regions with a large number of nodes or with more drastic feature changes are then subdivided to form a multi-layered, nested mesh structure.

[0100] In each layer of subdivision, the Voronoi unit of each node is calculated based on the candidate node set. In three-dimensional space, a Voronoi unit is a polyhedron surrounded by multiple planes. Through layered subdivision, a three-dimensional spatial grid model that adapts to the distribution of features can be constructed. Each grid unit corresponds to an area in space, and each unit contains at least one node or the influence range of a node. When dividing the grid units, it is necessary to ensure that the size and number of the units can reasonably reflect the spatial distribution of the features, neither too sparse to cause loss of feature information, nor too dense to increase the computational burden.

[0101] To calculate the feature information gain ratio of adjacent grid cells to generate a dynamic connectivity matrix, we first need to extract the feature vector of each grid cell. This feature vector can include the cell's material characteristics (such as average energy spectrum value and material category probability), contour characteristics (such as contour complexity and geometric shape parameters), and spatiotemporal characteristics (such as time series variation trends). For each pair of adjacent grid cells, we calculate their feature information gain ratio.

[0102] The information gain rate is calculated based on the concept of entropy in information theory, which measures the degree of feature difference between two units and the efficiency of information transfer. Specifically, the characteristic entropy of the source unit is calculated first, and then the conditional entropy of the source unit is calculated given the known characteristics of the target unit. The difference between the two is the information gain, and the ratio of the information gain to the source unit entropy is the information gain rate. A larger information gain rate indicates a greater feature difference between adjacent units, a higher value of information transfer, and a larger connection weight between nodes.

[0103] By traversing all adjacent grid cells and calculating the information gain ratio for each pair of cells, a matrix is ​​formed. This matrix is ​​called the dynamic connection matrix. Each element in the matrix corresponds to the connection weight between two nodes. The weight value reflects the strength of the feature association between the nodes and the efficiency of information transmission.

[0104] When using a dynamic connection matrix to output a weighted, node-based topological network of material-contour coupling, the topological network uses a set of candidate nodes as nodes, and the weights in the dynamic connection matrix as edge weights. Each node represents a key feature region within the composite feature volume, and the edge weights represent the strength of the association between nodes. This topological network can represent the temporal and spatial associations of material-contour coupling features in a graph structure, providing the foundation for subsequent feature conduction path simulations.

[0105] During implementation, attention must be paid to the handling of noise points during DBSCAN clustering to avoid incorporating them into the candidate node set, which could impact network construction. The number and accuracy of the Voronoi hierarchical decomposition must be dynamically adjusted based on the complexity of the feature distribution. The calculation of the feature information gain rate requires the use of parameters that effectively characterize material and contour features, ensuring that the dynamic connection matrix accurately reflects the relationships between nodes. The topological network constructed in this way can structure the material and contour information of composite features in the form of nodes and edges, providing an effective mathematical model for subsequent operations such as simulating the conduction paths of foreign body features within the network and analyzing the confidence level of feature associations. This allows the entire detection process to analyze and process foreign body features from a topological perspective, improving detection accuracy and robustness.

[0106] Example 3: Specific implementation of simulating characteristic conduction paths of foreign matter

[0107] After constructing a node-based topological network with material-contour associations, the node connection weights of the topological network need to be input into the feature transmission model to simulate the transmission paths of foreign object features within the network. The node connection weights of the topological network are stored in a dynamic connection matrix. Each element in this matrix represents the connection strength between corresponding nodes. The larger the weight value, the closer the feature association between nodes and the higher the possibility of foreign object features being transmitted between nodes.

[0108] The core of the feature transmission model is based on graph theory. It views a topological network as a directed or undirected graph, with nodes as vertices and edge weights as edge weights. The information transmission matrix between nodes is calculated to describe the transmission patterns of features in the network. The information transmission matrix reflects the probability or efficiency of feature transmission from one node to another. Its calculation method takes into account factors such as node connection weights and network topology.

[0109] When inputting the dynamic connectivity matrix of a topological network into the feature conduction model, the dynamic connectivity matrix must first be normalized to ensure that the weight values ​​in the matrix are within a reasonable range and to avoid large differences in weight values ​​that affect the calculation results. Normalization can be performed using either row normalization or column normalization. For example, row normalization divides the weight value of each row by the sum of the weight values ​​in that row, so that the sum of the weight values ​​in each row is 1. This converts the dynamic connectivity matrix into a probability transfer matrix, where the element value represents the probability of a feature being transmitted from the node corresponding to the row to the node corresponding to the column.

[0110] Assume that the dynamic connection matrix is , whose dimensions are ,in is the number of nodes in the topological network, Representation node To Node The connection weight of After row normalization, the information transmission matrix is ​​obtained , where the elements The calculation method is:

[0111]

[0112] In the above formula, Represents feature from node Conducted to the node The probability of For nodes To Node The original connection weight, denominator Representation node The sum of the connection weights with all other nodes is normalized to convert the original weight into a probability form, which is convenient for the subsequent characteristic conduction path simulation.

[0113] Using the information transmission matrix The improved genetic optimization algorithm is based on the traditional genetic algorithm and is optimized for the needs of characteristic conduction path simulation. For example, the improved genetic optimization algorithm adjusts the encoding method, fitness function design, and evolutionary operation strategy to improve the efficiency and accuracy of the algorithm in searching for the optimal path.

[0114] During implementation, it is necessary to encode the characteristic conduction path and represent the path in the form of chromosomes. The common encoding method is integer encoding. Each chromosome corresponds to a characteristic conduction path, and the gene bits in the chromosome represent the node numbers that the path passes through. For example, a path passes through node , then the chromosome can be represented as [1,3,5,7].

[0115] A fitness function is needed to evaluate the quality of each path. The design of the fitness function must comprehensively consider factors such as the path length, the efficiency of feature transmission, and the confidence level of the associations between nodes in the path. For example, the fitness function can be defined as the product of the probability of information transmission between each node in the path. This function can then be adjusted based on the number of nodes in the path, so that longer paths or paths with lower transmission probabilities have lower fitness values.

[0116] Initialize the population, where each individual represents a randomly generated feature transmission path. The population is iteratively evolved through genetic operations such as selection, crossover, and mutation. Selection selects the best individual from the current population as the parent based on fitness; crossover swaps parts of the chromosomes of two parent individuals to generate new offspring individuals; and mutation randomly modifies an individual's chromosomes to increase population diversity and prevent the algorithm from falling into a local optimum.

[0117] During the evolutionary process, the fitness of each individual is continuously calculated, and the individual with the highest fitness value is recorded, which is the currently found optimal feature transmission path. After several generations of evolution, when the fitness value no longer increases significantly or reaches the preset number of iterations, the algorithm terminates and outputs the optimal path and the associated confidence values ​​of the adjacent nodes in the path.

[0118] Each element in the association confidence value set corresponds to the degree of association of the adjacent nodes in the path, and its value can be calculated based on the information transmission matrix The elements in the are determined, such as adjacent nodes and The associated confidence value is These association confidence values ​​reflect the reliability of feature transmission between nodes. The larger the value, the closer the association between nodes and the higher the confidence of feature transmission.

[0119] The output association confidence value set is stored in a dynamic confidence database for subsequent use in steps such as spatiotemporal dimension mapping transformation and sensitivity adjustment factor calculation. The dynamic confidence database is used to store association confidence values ​​under different detection conditions and at different time periods, providing data support for dynamic adjustment and optimization of the detection process.

[0120] When implementing this process, attention must be paid to the computational accuracy of the information transmission matrix to ensure that the normalization process correctly reflects the transmission probability between nodes. Improved genetic optimization algorithm parameter settings, such as population size, crossover probability, and mutation probability, must be adjusted based on the scale and complexity of the topological network to balance the algorithm's search efficiency and convergence speed. At the same time, the storage and management of associated confidence values ​​must facilitate subsequent data queries and calls to ensure the continuity and accuracy of the entire detection process. By simulating the foreign body feature transmission path in this way, the propagation patterns of foreign body features can be analyzed from the perspective of the topological network, providing key feature transmission information for the subsequent establishment of foreign body-detection coupling prediction surfaces and the generation of control schemes. This allows the detection system to more accurately locate foreign bodies and adjust detection parameters, thereby improving the effectiveness of foreign body detection.

[0121] Example 4: Specific implementation of spatiotemporal dimension mapping transformation

[0122] After obtaining the set of association confidence values, the composite feature volume is transformed in time and space to establish a correlation between microscopic foreign body contour changes and macroscopic detection sensitivity. The composite feature volume contains the material-profile coupling characteristics of the material, which exhibit specific distribution and variation patterns in time and space. The set of association confidence values ​​reflects the strength of feature associations between adjacent nodes in the topological network. Its spatial distribution corresponds to the positional relationship of the features in three-dimensional space.

[0123] When dividing the composite feature into frames according to the detection time, the frame interval needs to be determined based on the sampling frequency and time resolution requirements of the detection system. For example, if the detection system collects 10 frames of data per second, the frame interval is 0.1 seconds. The composite feature is divided into multiple time frames in chronological order. Each time frame corresponds to a specific detection moment and contains the distribution information of the composite feature in three-dimensional space at that moment. Assuming that the total detection time is T seconds, it can be divided into N = T × 10 frames, and the data of each frame is represented as ( ), which contains the coordinates and attribute values ​​of the material-contour coupling feature in space at that moment.

[0124] When constructing a five-dimensional space-time mapping hypersurface by combining the spatial distribution of the associated confidence value set, the five dimensions include three-dimensional spatial coordinates (x, y, z), time dimension t, and associated confidence value c. For each feature point (x, y, z) in the network, its associated confidence value c can be determined by the associated confidence value of the node in the topological network where the point resides. The feature points of all time frames, their corresponding spatiotemporal coordinates, and associated confidence values ​​are integrated to form a set of points in five-dimensional space, with each point represented as (x, y, z, t, c). Through interpolation or fitting, these discrete points are constructed into a continuous five-dimensional spatiotemporal mapping hypersurface. This hypersurface can fully describe the distribution of the composite feature volume in the spatiotemporal dimensions and the changes in its associated confidence.

[0125] When performing a discrete wavelet transform on the contour dimension of a five-dimensional space-time mapping hypersurface, the first step is to extract the contour dimension information from the hypersurface. The contour dimension primarily reflects the shape characteristics of materials and foreign objects and can be obtained by extracting edges or shape descriptors that represent the material-contour coupling characteristics within the hypersurface. For example, for the three-dimensional spatial features in each time frame, an edge detection algorithm (such as the Canny operator) is used to extract contour edge points. The coordinates of these edge points in three-dimensional space and the time dimension information are then combined to form a contour dimension dataset.

[0126] The Discrete Wavelet Transform (DWT) decomposes a contour-dimensional dataset into different frequency domain scales, thereby extracting multi-scale contour features. By selecting appropriate wavelet basis functions (such as Daubechies wavelets, Haar wavelets, etc.) and the number of decomposition levels, contour-dimensional data can be subjected to multi-layer wavelet decomposition. Taking a three-layer decomposition as an example, each decomposition separates the data into a low-frequency component (approximation coefficients) and a high-frequency component (detail coefficients). The low-frequency component reflects the overall shape of the contour, while the high-frequency component reflects the contour's detailed features (such as corners, bumps, etc.). The DWT generates a frequency-domain mapping subspace that encompasses contour features at different frequencies, providing a multi-scale feature representation for subsequent analysis of contour change rates.

[0127] When performing third-order difference calculation on the macroscopic detection sensitivity cumulant dimension of the five-dimensional space-time mapping hypersurface, it is necessary to first define the macroscopic detection sensitivity cumulant. The macroscopic detection sensitivity cumulant is an indicator to measure the overall detection capability of the detection system for foreign objects. It can be determined by calculating the cumulative value of the detection signal strength or foreign object recognition rate within a certain time and a certain spatial area. For example, at each time frame t, the detection sensitivity value in the entire detection area is calculated. , then the cumulative amount from the initial moment to the current moment t is , forming a macroscopic detection sensitivity cumulative sequence .

[0128] The third-order difference calculation is the cumulative amount series Perform three-order difference operations to extract its rate of change characteristics. Reflects the change in the cumulative amount at adjacent moments, the second-order difference Reflects the rate of change of the first-order difference, the third-order difference It reflects the rate of change of the second-order difference and can highlight the trend and mutation point of the cumulative amount change. Through the third-order difference calculation, the frequency domain-time domain correlation characteristics are extracted. For example, the sequence after the third-order difference is Fourier transformed to obtain its frequency domain distribution, thereby analyzing the correlation characteristics of the macro detection sensitivity cumulative amount in the time domain and frequency domain.

[0129] When solving the coupling parameter tensor of the bidirectional mapping equation to generate the foreign body-detection coupling prediction surface, the bidirectional mapping equation is used to describe the relationship between the microscopic foreign body profile change rate and the macroscopic detection sensitivity accumulation. Assume that the microscopic foreign body profile change rate sequence is , the cumulative macroscopic detection sensitivity is , the bidirectional mapping equation can be expressed as:

[0130]

[0131] in, is the coupling parameter tensor, which includes the parameters in the equation. and is a mapping function (such as a polynomial function, a neural network function, etc.). By using the least squares method or other optimization methods, the coupling parameter tensor is solved using the existing profile change rate sequence and the corresponding macroscopic detection sensitivity accumulation data. , so that the mapping equation can accurately describe the relationship between the two.

[0132] When generating a surface that relates profile change rate to detection sensitivity, a three-dimensional surface is constructed with profile change rate as the x-axis, detection sensitivity as the y-axis, and time as the z-axis. For each time point t, the detection sensitivity corresponding to different profile change rates is calculated based on the solved mapping equation. Interpolation is then used to generate a continuous surface, which serves as the foreign object-detection coupling prediction surface. This surface predicts how macroscopic detection sensitivity will change under varying microscopic profile change rates, providing a basis for the subsequent calculation of the sensitivity adjustment factor.

[0133] For example, when the contour of a foreign object changes slightly (such as an increase in the contour change rate R(t)), the trend of change in the macroscopic detection sensitivity C(t) can be predicted through the coupled prediction surface. If the sensitivity decreases, the detection parameters need to be adjusted to improve the sensitivity. In specific implementations, attention must be paid to the continuity and accuracy of the time frame during frame processing to ensure that the five-dimensional space-time mapping hypersurface can truly reflect the spatiotemporal changes of the features; the wavelet basis and number of decomposition levels of the discrete wavelet transform must be selected based on the complexity of the contour features to avoid feature loss or redundancy; boundary conditions must be properly handled during third-order difference calculations to ensure the reliability of the difference results; and the construction and solution of the bidirectional mapping equation require the selection of an appropriate mathematical model to accurately capture the nonlinear relationship between contour changes and detection sensitivity.

[0134] Through the above-mentioned spatiotemporal dimension mapping and transformation process, the spatiotemporal characteristics, associated confidence characteristics and detection sensitivity characteristics of the composite feature body can be deeply integrated, and a mapping relationship between the micro and macro levels can be established. The generated foreign body-detection coupling prediction surface provides a quantitative basis for the dynamic adjustment and optimization of the detection system, enabling the detection system to predict the changes in detection sensitivity in real time according to the changes in the contour of the foreign body, and adjust the detection parameters accordingly to improve the accuracy and reliability of foreign body detection.

[0135] Example 5: Specific implementation method for calculating the sensitivity adjustment factor

[0136] After generating the foreign body-detection coupling prediction surface, it is necessary to calculate the sensitivity adjustment factors for each detection area based on this surface to dynamically optimize the sensitivity of the detection system. The foreign body-detection coupling prediction surface is a three-dimensional surface. Its horizontal and vertical axes represent the microscopic foreign body contour change rate and detection time, respectively, and the vertical axis corresponds to the macroscopic detection sensitivity accumulation. This surface intuitively shows the correlation between foreign body contour changes and detection sensitivity. For example, when a certain type of plastic foreign body deforms in the material, its contour change rate corresponds to a specific coordinate point on the surface. The vertical axis value of this point represents the current detection system's sensitivity level to the foreign body.

[0137] To extract the curvature change sequence for each detection area along the foreign object-detection coupling prediction surface, the entire detection space must first be divided into multiple regions. This division can be based on the grid cells of the topological network, ensuring that each region corresponds to one or more nodes in the topological network. For example, for particulate material detection in a food sorting scenario, the detection channel can be divided into 10×10 grid regions horizontally and vertically, with each region corresponding to a detection sub-region. For each sub-region, the curvature values ​​of all feature points within the region are extracted on the coupling prediction surface to form a curvature change sequence.

[0138] The curvature value is calculated based on the local geometric properties of the surface at that point and reflects the degree of curvature of the surface at that point. When a foreign object is present in the detection area, changes in the object's contour will cause changes in the curvature of the coupled prediction surface in that area. The more dramatic the curvature change, the more sensitive the detection sensitivity is to changes in the foreign object's contour. For example, a metal foreign object, which is made of a material that differs significantly from the material, may have its contour changed, resulting in a significant increase in the curvature of the coupled prediction surface in the corresponding area, while a plastic foreign object will experience relatively little change in curvature.

[0139] When aligning the curvature change sequence and the associated confidence value set based on the topological network node encoding, each node in the topological network has a unique encoding that corresponds to a specific location in the detection space. Each element in the curvature change sequence corresponds to a detection area, while each element in the associated confidence value set corresponds to a node in the topological network. Therefore, the two positions need to be matched based on the node encoding. For example, if the node encoded as 001 in the topological network corresponds to detection area A, then the curvature value of detection area A in the curvature change sequence is aligned with the confidence value of the node encoded as 001 in the associated confidence value set.

[0140] The alignment process must ensure the spatial consistency of the data to avoid errors in subsequent fusion calculations due to positional misalignment. In practice, a mapping table of node codes and detection areas can be established, through which the data in the curvature change sequence and the associated confidence value set are mapped one-to-one by position. For example, in the pharmaceutical tablet detection scenario, the node codes of the topological network correspond to the position coordinates of the tablet on the conveyor belt. Each data point in the curvature change sequence is mapped to the corresponding node code according to its detection position, thereby aligning with the node data with the same code in the associated confidence value set.

[0141] When merging the aligned data with material density time series data using the bicubic interpolation algorithm, material density time series data refers to the density values ​​of the material that change over time during the inspection process. This data is collected in real time by a density sensor. The bicubic interpolation algorithm is a method for interpolating two-dimensional data. Based on known discrete data points, it calculates the values ​​of unknown points through a weighted average, resulting in smoother interpolated data.

[0142] In specific implementation, a two-dimensional grid is established using the node codes of the topological network as the horizontal and vertical coordinates, with each grid point corresponding to the position of a node. The aligned curvature change sequence and associated confidence values ​​are used as the known values ​​of the grid points, and the material density time series data is mapped to the grid in chronological order. For example, in a grain detection scenario, the density of wheat will change slightly with storage time. The density time series data records the density values ​​of wheat at different time points. These density values ​​are fused to the position of each node through the bicubic interpolation algorithm to generate a dynamic sensitivity correction factor.

[0143] During the fusion process, interpolation weight coefficients must be determined. Weights can be set based on the distance between nodes and the temporal correlation of the data. Data with closer distances and closer temporal relationships receive greater weights. The resulting dynamic sensitivity correction factor incorporates both the spatial characteristics of curvature change and associated confidence, and the temporal variation of material density, more comprehensively reflecting the dynamic changes in the detection environment.

[0144] When using independent component analysis to eliminate noise interference, the data may contain noise due to the influence of factors such as electromagnetic interference and mechanical vibration during the detection process. Independent component analysis (ICA) is a method used to decompose mixed signals into independent components, which can effectively separate the noise components.

[0145] In practice, the aligned and fused dataset is treated as a mixed signal, assuming it is composed of a mixture of several independent source signals, some of which are useful signals reflecting actual sensitivity changes, while others are noise signals. The ICA algorithm calculates the inverse of the mixing matrix, decomposing the mixed signal into independent source signals. The noise component is then identified and removed based on the signal's statistical properties (such as non-Gaussianity), ultimately outputting a pure sensitivity adjustment factor.

[0146] For example, in the inspection of electronic product components, the detection signal may be interfered with by the electromagnetic noise generated by the operation of motors in the workshop. The ICA algorithm can separate these noise components, so that the sensitivity adjustment factor can more accurately reflect the actual detection requirements of component foreign matter.

[0147] When implementing this process, it is important to note that the extraction of the curvature change sequence must accurately reflect the feature changes in the detection area to avoid data deviation due to unreasonable area division; the encoding alignment process must strictly check the mapping relationship between the node code and the detection area to ensure the accuracy of the data position; the parameter setting of the bicubic interpolation algorithm must be adjusted according to the data density and change trend to avoid feature distortion caused by excessive interpolation smoothing; the application of the independent component analysis method must ensure that the data meets the algorithm's prerequisites, such as the independence assumption of the source signal. If necessary, the data can be preprocessed to improve the denoising effect.

[0148] The sensitivity adjustment factor calculated through the above steps can dynamically adapt to changes in material properties and foreign body characteristics during the detection process, providing accurate sensitivity correction parameters for the subsequent generation of a standardized foreign body-detection coupling coefficient thermal cloud map. This enables the detection system to adjust the sensitivity of each area in real time based on actual detection needs, improving the accuracy and anti-interference ability of foreign body detection. For example, when a high-contrast foreign body is detected, the sensitivity adjustment factor automatically reduces the sensitivity of the corresponding area to avoid misidentification caused by excessive detection; when detecting a low-contrast foreign body, the adjustment factor increases sensitivity to ensure that the foreign body is effectively identified.

[0149] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.

[0150] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A multimodal X-ray foreign body detection method for materials, characterized in that: The method comprises: Acquire the transmission grayscale time series array and scattered photon energy spectrum distribution matrix output by the multimodal X-ray acquisition system, and generate a composite feature body containing material-contour coupling features through cross-modal feature interactive coding, including: performing short-time Fourier time-frequency decomposition on the transmission grayscale time series array to generate a multi-band transmission feature tensor; performing mathematical morphological filtering based on structural elements on the scattered photon energy spectrum distribution matrix to output an energy spectrum enhancement matrix of the foreign matter area; inputting the multi-band transmission feature tensor and the energy spectrum enhancement matrix into a two-branch cross attention network for cross-modal feature fusion, optimizing the fusion weights through a material-contour coupling loss function, and generating the composite feature body; Based on the spatiotemporal coordinate parameters of the composite feature body, a material-contour association node topological network is constructed; Inputting the node connection weights of the topological network into a feature conduction model to simulate a foreign body feature conduction path and outputting a set of associated confidence values ​​of adjacent nodes in the path; According to the associated confidence value set, the composite feature body is subjected to a spatiotemporal dimension mapping transformation, a bidirectional mapping equation between a sequence of microscopic foreign body contour change rates and a cumulative macroscopic detection sensitivity is established, and a foreign body-detection coupling prediction surface is generated; Based on the foreign object-detection coupling prediction surface, a sensitivity adjustment factor of each detection area is calculated, and a nonlinear covariance tensor operation is performed on the adjustment factor and the associated confidence value of the corresponding position to generate a normalized foreign object-detection coupling coefficient thermal cloud map; Performing multi-scale feature extraction on the coupling coefficient thermal cloud map to extract a set of detection quantitative indicators including material mutation gradient, contour complexity entropy, and detection convergence stability, and dynamically matching them with a preset benchmark range; When any detection quantitative index exceeds the preset benchmark boundary, a control scheme including a ray parameter reconfiguration sequence and a detection mode switching strategy is generated.

2. The multimodal X-ray foreign body detection method for materials according to claim 1, characterized in that: The construction of the material-contour association node topology network includes: Based on the material-contour coupling feature distribution of the composite feature body, a DBSCAN density clustering algorithm is used to screen the associated candidate node set; Perform Voronoi hierarchical decomposition on the node set to construct a three-dimensional spatial grid model and divide it into multiple grid cells; Calculate the feature information gain rate of adjacent grid cells and generate a dynamic connection matrix; The dynamic connection matrix is ​​used to output a weighted material-contour association node topology network.

3. The multimodal X-ray foreign body detection method for materials according to claim 2, characterized in that: The simulated foreign body characteristic conduction path includes: Inputting the dynamic connection matrix of the topological network into the characteristic conduction model to calculate the information conduction matrix between nodes; The information conduction matrix and the node set are used to simulate the characteristic conduction path by adopting an improved genetic optimization algorithm, and the associated confidence value set of adjacent nodes is output and stored in a dynamic confidence database.

4. The multimodal X-ray foreign body detection method for materials according to claim 3, characterized in that: The spatiotemporal dimension mapping transformation includes: Dividing the composite feature into frames according to detection time, and combining the spatial distribution of the associated confidence value set to construct a five-dimensional space-time mapping hypersurface; Performing discrete wavelet transform on the contour dimension of the five-dimensional space-time mapping hypersurface to generate a frequency domain mapping subspace; Performing a third-order difference calculation on the macroscopic detection sensitivity cumulant dimension of the five-dimensional space-time mapping hypersurface to extract frequency-domain-time domain correlation features; The coupling parameter tensor of the bidirectional mapping equation is solved to generate the relationship surface between the contour change rate and the detection sensitivity, and the foreign object-detection coupling prediction surface is obtained.

5. The multimodal X-ray foreign body detection method for materials according to claim 4, characterized in that: The calculation of the sensitivity adjustment factor includes: Extracting a curvature change sequence of each detection area along the foreign object-detection coupling prediction surface; Aligning the curvature change sequence with the associated confidence value set according to topological network node coding; The aligned data is fused with the material density time series data based on the bicubic interpolation algorithm to generate a dynamic sensitivity correction factor; The noise interference is eliminated by independent component analysis and the sensitivity adjustment factor is output.

6. The multimodal X-ray foreign body detection method for materials according to claim 5, characterized in that: Generating a standardized foreign body-detection coupling coefficient thermal cloud map includes: mapping the sensitivity adjustment factors and associated confidence values ​​to mesh vertices of the topological network; Construct a four-dimensional covariance correlation tensor and enhance the nonlinear coupling effect through the GELU activation function; Use the manifold learning LLE algorithm to reduce the dimension to three-dimensional space; The coupling coefficient distribution is dynamically superimposed according to the time labels of the space-time mapping hypersurface, and a standardized thermal cloud map is output.

7. The multimodal X-ray foreign body detection method for materials according to claim 6, characterized in that: The multi-scale feature extraction includes: Calculating a Sobel edge operator along the thermal gradient dimension of the standardized foreign body-detection coupling coefficient thermal cloud map to extract geometric feature vectors of material mutation areas; The fast Walsh transform is performed on the thermodynamic layer of continuous time periods, and the sample entropy is calculated as the contour complexity entropy; The fractal dimension of the trajectory fitting is optimized in combination with the feature of the space-time mapping hypersurface to generate a detection convergence stability; and a detection quantitative index set including mutation gradient, contour complexity entropy and convergence stability is output.

8. The multimodal X-ray foreign body detection method for materials according to claim 7, characterized in that: The dynamic matching includes: Inputting the detection quantitative indicator set into a support vector machine decision engine of a knowledge base; Match the material tolerance critical interval and contour safety region of the reference range function; When any indicator exceeds the benchmark boundary, the ant colony search protocol of the multi-objective optimization engine is triggered; Based on the optimal convergence solution of the characteristic conduction path and the coupled prediction surface, a ray parameter adjustment coordinate set and a detection path scheduling sequence are output.

9. The multimodal X-ray foreign body detection method for materials according to claim 8, characterized in that: The generation of the control scheme includes: Mapping the ray parameter adjustment coordinate set to the voltage-current control parameters of the X-ray generator; converting the detection path scheduling sequence into motion trajectory instructions for the mechanical scanning device; The voltage-current control parameters and motion trajectory instructions are sent to the detection terminal for execution through the communication protocol.

Citation Information

Patent Citations

  • Nondestructive inspection method for enhancing defect detection efficiency through deep learning

    CN119295827A

  • X-ray-based aramid fiber belt defect online detection method and device

    CN119510454A