A method for margin detection and correction in an additive manufacturing process
By combining visible light cameras and infrared thermal imagers with deep learning algorithms, the geometry and thermal state of the edge region during additive manufacturing are monitored in real time. The system can intelligently identify the causes of deviations and generate process parameter correction instructions, which solves the problem of difficult accurate identification of edge defects in existing technologies and improves the yield and stability of additive manufacturing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG NORMAL UNIV
- Filing Date
- 2026-03-04
- Publication Date
- 2026-06-09
AI Technical Summary
In the additive manufacturing process, defects such as over-melting, collapse, incomplete fusion, or warping are prone to occur in the edge areas due to heat accumulation or changes in heat dissipation conditions. Existing detection methods are difficult to investigate the causes of deviations in depth, resulting in a lack of targeted correction strategies and affecting the yield and stability of the finished product.
Visible light images and temperature distribution images of the printed layer edge are acquired simultaneously using a visible light camera and an infrared thermal imager. An edge deviation map is generated through contour extraction and fitting. A deep learning algorithm is then used for multi-level correlation analysis to intelligently determine the cause of the deviation and generate process parameter correction instructions.
It enables intelligent identification and targeted adjustment of the causes of edge defects in the additive manufacturing process, thereby improving yield and stability.
Smart Images

Figure CN122165645A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of edge detection, and more specifically, to a method for edge detection and correction in additive manufacturing. Background Technology
[0002] Additive manufacturing, commonly known as 3D printing, is a disruptive manufacturing technology that has shown enormous application potential in aerospace, biomedicine, and mold making due to its unique advantages in manufacturing complex structures, personalized customization, and rapid prototyping. However, the additive manufacturing process is a complex thermophysical and chemical process involving the rapid melting, solidification, and layer-by-layer deposition of materials. This process is susceptible to interference from various factors (such as unstable energy input, uneven powder / filament supply, scanning speed fluctuations, and changes in ambient temperature), making it difficult to guarantee the geometric accuracy and mechanical properties of the final formed part. Among these factors, precise control of the part's edge contour is crucial for ensuring overall dimensional accuracy and assembly performance. In actual printing, edge areas are more prone to defects such as over-melting, collapse, incomplete fusion, or warping due to heat accumulation or changes in heat dissipation conditions, severely affecting part quality and even leading to printing failure. Therefore, to improve the stability and yield of additive manufacturing, real-time detection and correction of edge defects during the printing process becomes particularly important.
[0003] Currently, researchers have proposed several online monitoring methods for quality control in additive manufacturing processes. For example, some methods use visible light cameras or laser scanners to acquire geometric morphology information of the printed layer surface, comparing it with theoretical models to determine if geometric deviations exist. However, these methods often only reflect the results of geometric deviations and struggle to delve into the causes. Simple geometric information is insufficient to comprehensively diagnose complex process problems; for instance, it cannot distinguish whether edge collapse is caused by localized overheating or excessive scanning speed, leading to a lack of targeted correction strategies. Other methods utilize infrared thermal imagers or pyrometers to monitor the temperature field distribution of the printed area or temperature changes at key points, attempting to assess print quality by analyzing thermal characteristics. While these methods can capture the temperature field distribution of the molten pool, they cannot establish a quantitative correlation between thermal characteristics and geometric deformation, making it difficult to accurately identify the multi-physics coupling causes of edge deviations. This results in lag and blindness in process parameter correction.
[0004] Therefore, an optimized method for edge detection and correction in the additive manufacturing process is needed. Summary of the Invention
[0005] To address the aforementioned technical problems, this application is proposed. Embodiments of this application provide a method for edge detection and correction during additive manufacturing. This method utilizes a visible light camera and an infrared thermal imager to simultaneously acquire visible light images and temperature distribution images of the printed layer's edge region. Through contour extraction and fitting, the actual edge coordinate sequence is extracted from the visible light images, and spatially registered and geometrically deviated against the target layer's edge contour data. The difference between the coordinate sequence and the target edge is quantified, generating an edge deviation map. Furthermore, a deep learning algorithm is employed to perform multi-level correlation analysis on the actual temperature distribution image and the edge deviation map to deeply explore the dynamic response characteristics of edge deformation under thermal coupling. This intelligently determines the specific causes of edge deviation and generates process parameter correction instructions based on the causes of deviation and the quantified edge deviation map. This method enables intelligent identification and targeted adjustment of the causes of edge defects during additive manufacturing, thereby improving the yield and stability of additive manufacturing.
[0006] According to one aspect of this application, a method for edge detection and correction during additive manufacturing is provided, comprising: A visible light camera installed near the printhead acquires a visible light image of the current layer edge region, and an infrared thermal imager simultaneously acquires a temperature distribution image of the current layer edge region. Contour extraction and fitting are performed on the visible light image of the current layer edge region to obtain the actual edge coordinate sequence; Extract the target layer edge contour data from the backend database; Spatially register the actual edge coordinate sequence with the target layer edge contour data, and calculate the geometric deviation between the two to obtain an edge deviation map; Multi-level joint sensing is performed on the temperature distribution image of the current layer edge region and the edge deviation map to determine the cause of the edge deviation; Based on the causes of the edge deviation and the edge deviation diagram, process parameter instructions are generated.
[0007] Compared with existing technologies, the edge detection and correction method provided in this application for additive manufacturing utilizes a visible light camera and an infrared thermal imager to simultaneously acquire visible light images and temperature distribution images of the printed layer edge region. Through contour extraction and fitting, the actual edge coordinate sequence is extracted from the visible light image, and spatially registered and geometrically deviated with the target layer edge contour data. This quantifies the difference from the design target, generating an edge deviation map. Furthermore, a deep learning algorithm is used to perform multi-level correlation analysis on the actual temperature distribution image and the edge deviation map to deeply explore the dynamic response characteristics of edge deformation under thermal coupling, thereby intelligently determining the specific causes of edge deviation. Based on the causes of deviation and the quantified edge deviation map, process parameter correction instructions are generated. This method enables intelligent identification and targeted adjustment of the causes of edge defects in additive manufacturing, thereby improving the yield and stability of additive manufacturing. Attached Figure Description
[0008] Figure 1 This is a flowchart of the edge detection and correction method in the additive manufacturing process according to an embodiment of this application; Figure 2 This is a schematic diagram of the data flow in the edge detection and correction method during additive manufacturing according to an embodiment of this application; Figure 3 This is a flowchart of sub-step S5 of the edge detection and correction method in the additive manufacturing process according to an embodiment of this application; Figure 4 This is a flowchart of sub-step S53 of the edge detection and correction method in the additive manufacturing process according to an embodiment of this application; Figure 5 This is a flowchart of sub-step S532 of the edge detection and correction method in the additive manufacturing process according to an embodiment of this application. Detailed Implementation
[0009] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.
[0010] It is worth noting that all data acquisition actions in this application were carried out in compliance with the relevant data protection laws and policies of the country where the application is located, and with the authorization granted by the owner of the relevant device.
[0011] To address the technical problems described in the background, this application proposes a method for edge detection and correction in additive manufacturing. This method utilizes a visible light camera and an infrared thermal imager to simultaneously acquire visible light images and temperature distribution images of the printed layer edge region. Through contour extraction and fitting, the actual edge coordinate sequence is extracted from the visible light images, and spatially registered and geometrically deviated against the target layer edge contour data. The difference between the actual edge coordinate sequence and the target edge coordinate sequence is quantified to generate an edge deviation map. Furthermore, a deep learning algorithm is used to perform multi-level correlation analysis on the actual temperature distribution image and the edge deviation map to deeply explore the dynamic response characteristics of edge deformation under thermal coupling. This allows for intelligent identification of the specific causes of edge deviation and, based on the causes of deviation and the quantified edge deviation map, the method generates process parameter correction instructions. This method enables intelligent identification and targeted adjustment of the causes of edge defects in additive manufacturing, thereby improving the yield and stability of additive manufacturing.
[0012] Figure 1 This is a flowchart of a method for edge detection and correction in additive manufacturing according to an embodiment of this application. Figure 2 This is a schematic diagram of the data flow in the edge detection and correction method during additive manufacturing according to an embodiment of this application. Figure 1 and Figure 2 As shown, the edge detection and correction method in the additive manufacturing process includes the following steps: S1, a visible light camera installed near the printhead acquires a visible light image of the current layer edge region, and an infrared thermal imager simultaneously acquires a temperature distribution image of the current layer edge region; S2, contour extraction and fitting are performed on the visible light image of the current layer edge region to obtain an actual edge coordinate sequence; S3, target layer edge contour data is extracted from the background database; S4, the actual edge coordinate sequence and the target layer edge contour data are spatially registered, and the geometric deviation between the two is calculated to obtain an edge deviation map; S5, multi-level joint sensing is performed on the temperature distribution image of the current layer edge region and the edge deviation map to determine the cause of the edge deviation; S6, based on the cause of the edge deviation and the edge deviation map, process parameter instructions are generated.
[0013] In the aforementioned edge detection and correction method during additive manufacturing, step S1 involves a visible light camera mounted near the printhead acquiring a visible light image of the current layer's edge region, and an infrared thermal imager simultaneously acquiring a temperature distribution image of the current layer's edge region. It should be understood that the complexity of heat accumulation and dissipation during additive manufacturing easily leads to geometric defects in the edge region, and single geometric or thermal information is insufficient to comprehensively reflect the edge forming state. Therefore, to capture the physical state of the edge region in real-time and comprehensively, this application deploys a visible light camera and an infrared thermal imager near the printhead. As the printhead moves and constructs the edge of the current layer, the control system simultaneously triggers the visible light camera to expose and the infrared thermal imager to detect, simultaneously acquiring visible light and temperature distribution images of the current layer's edge region to achieve real-time monitoring of the edge region's physical state. Specifically, visible light images provide geometric information about the edge contours, reflecting the macroscopic geometry of the edges, while infrared thermal imagers capture the temperature distribution in the edge region, revealing the diffusion trend and intensity distribution of the thermophysical field. By simultaneously acquiring visible light images and temperature distribution images of the current layer's edge region, it helps to more comprehensively understand the physical state of the edge region and provides original, corresponding multi-source sensing data for accurately analyzing the relationship between edge deviations and their thermal environment.
[0014] In practice, a visible light camera is mounted near the printhead, with its field of view covering the edge contour area of the current layer. A high-resolution industrial-grade camera can acquire clear edge images during each layer's printing, providing fundamental data for subsequent geometric analysis. To improve image contrast and clarity, an external synchronous triggering mechanism can be used during printing to control camera exposure at key points along the scanning path, preventing image blurring or distortion caused by high-speed printhead movement. Furthermore, the lens angle and focal length must be precisely adjusted to maintain stable focus on the edge areas at different layer heights. Considering potential interference from dust, splatter, and other contaminants during printing, protective covers or cleaning devices can be provided to ensure the cleanliness of the camera lens, thereby improving the reliability of image acquisition.
[0015] Meanwhile, an infrared thermal imager is also integrated into the print head assembly, and its placement should ensure that its field of view completely covers the heat distribution of the current layer's edge region. The infrared thermal imager acquires images of the object's surface temperature distribution in a non-contact manner, reflecting the heat conduction state of the molten pool and its surrounding area, revealing potential heat accumulation or uneven heat dissipation. To achieve high-resolution capture of the temperature field, the selected infrared thermal imager should have high spatial resolution and temporal sampling frequency to continuously record temperature change trends in the edge region during the printing process. Furthermore, the imager's detection wavelength must be optimized according to the type of printing material used to ensure good response to the specific material's radiation characteristics. For example, in 3D printing of metal materials, a long-wave infrared detector in the 8-14μm band is typically selected to adapt to the radiation characteristics of the metal surface and reduce external light interference.
[0016] To ensure time synchronization between the visible light image and the temperature distribution image, the control system needs to jointly trigger and manage the two imaging devices. This trigger signal can be issued by the main control unit of the printing system, starting synchronously with the printing path of each layer. When the print head begins to execute the scanning path of the edge portion, the main control system sends a synchronous acquisition command to the visible light camera and the infrared thermal imager, ensuring that both complete image acquisition at the same time. This synchronization mechanism not only helps avoid time misalignment between images but also improves the accuracy of subsequent feature fusion and analysis. Furthermore, the image acquisition time interval should also match the printing speed to ensure sufficient data samples are obtained at key nodes in the scanning path, thereby supporting more accurate deviation identification and attribution analysis.
[0017] In the actual implementation process, the impact of the printing environment on image acquisition must also be considered. For example, the lighting conditions inside the printing chamber may affect the imaging quality of the visible light camera. Therefore, auxiliary light sources, such as LED ring lights, can be added to the printhead assembly to provide a stable lighting environment. Simultaneously, to avoid interference from ambient radiation in high-temperature environments on the infrared thermal imager, filters or isolation cavities can be installed around the imager to shield unnecessary background heat sources. Furthermore, in multi-material or multi-process composite printing scenarios, different materials have different thermal radiation characteristics. A material-thermal response database can be established through pre-calibration to provide a basis for subsequent temperature image correction and analysis.
[0018] In the edge detection and correction method described above in the additive manufacturing process, step S2 involves extracting and fitting the contour of the visible light image of the current layer's edge region to obtain the actual edge coordinate sequence. It should be understood that since the original visible light image contains irrelevant information such as background, noise, and internal parts, it cannot accurately represent the edge contour of the current layer directly. Therefore, in order to accurately extract the actual printed edge geometry information from the visible light image of the current layer's edge region, this application further utilizes image processing technology to identify the set of pixels representing the part's edge in the visible light image of the current layer's edge region, and transforms it into an ordered sequence of coordinate points using mathematical methods to obtain the actual edge coordinate sequence. Specifically, firstly, the acquired visible light image of the current layer's edge region is preprocessed (e.g., filtering and denoising, histogram equalization to enhance contrast). Then, edge detection operators (e.g., Canny, Sobel) are used to initially locate the edge pixels. Next, a contour tracking algorithm is used to connect these pixels to form a contour. Finally, a curve fitting method (e.g., least squares fitting of polynomials or B-spline curves) is used to fit the discrete contour pixels into a smooth, continuous, and ordered sequence of actual edge coordinates. In this way, visual edges can be transformed into a mathematical representation that can be quantitatively analyzed, accurately reflecting the actual printed shape of the current layer edge.
[0019] In the edge detection and correction method described above for additive manufacturing, step S3 involves extracting the target layer edge contour data from the background database. That is, to accurately determine whether there is a deviation between the actual printed edge and the expected design target, and the degree of deviation, this application extracts the target layer edge contour data from the background database to obtain the theoretical design boundary of the current printing layer. It should be understood that additive manufacturing is based on slicing a three-dimensional model layer by layer, and the target contour of each layer has been generated and stored by slicing software before printing. Therefore, in practical applications, based on the current printing layer number, the system can access the background database (or file system) storing printing task data, search for and read the corresponding layer's slice file (such as STL slices, CLI, or G-code contour data), thereby extracting the theoretical edge contour coordinate sequence of that layer, providing an accurate design reference for subsequent deviation calculations.
[0020] In the edge detection and correction method described above for additive manufacturing, step S4 involves spatially registering the actual edge coordinate sequence with the target layer edge contour data and calculating the geometric deviation between them to obtain an edge deviation map. It should be understood that since the actually acquired edge coordinates (camera coordinate system) and the designed target contour data (model / machine coordinate system) are usually in different coordinate systems, there are pose (position and orientation) differences, and direct comparison cannot yield meaningful deviations. Therefore, in order to accurately quantify the geometric difference between the actual edge and the target edge under a unified spatial reference, this application employs a spatial registration algorithm. By transforming and aligning the actual edge coordinate sequence with the target layer edge contour data, the two can be compared in the same coordinate system. Specifically, the spatial registration algorithm solves for optimal transformation parameters (including translation, rotation, and scaling) to make the actual edge coordinate sequence fit the target layer edge contour data as closely as possible, minimizing the spatial distance error between them. In the embodiments of this application, a feature-point-based registration method, such as the Iterative Closest Point (ICP) algorithm or its improved version, is employed. Transformation parameters are iteratively optimized until convergence to meet preset accuracy requirements, thereby finding a transformation matrix that minimizes the distance between the actual edge coordinate sequence and the target contour data. This transformation is then applied to the actual edge coordinate sequence to unify the coordinate system, thus completing spatial registration. After registration, for each point on the actual edge (or multiple sampling points along the edge), its shortest distance (or normal distance) to the target contour is calculated to constitute edge deviation data. Furthermore, the calculated deviation values are correlated with their positions on the edge to generate an edge deviation map. The edge deviation map intuitively displays the distribution and degree of deviation of the actual edge relative to the design target, providing crucial information for subsequent adjustment of process parameters.
[0021] In the edge detection and correction method described above for additive manufacturing, step S5 involves performing multi-level joint sensing on the temperature distribution image of the current layer edge region and the edge deviation map to determine the cause of the edge deviation. Wherein, Figure 3 This is a flowchart of sub-step S5 of the edge detection and correction method in the additive manufacturing process according to an embodiment of this application. Figure 3 As shown, step S5 includes the following steps: S51, extracting edge thermal feature vectors from the temperature distribution image of the current layer edge region; S52, extracting edge deviation feature vectors from the edge deviation map; S53, performing progressive feature multidimensional correlation on the edge thermal feature vectors and the edge deviation feature vectors to obtain a multi-level joint sensing encoding vector for edge thermal-geometric deviation; S54, determining the cause of the edge deviation based on the multi-level joint sensing encoding vector for edge thermal-geometric deviation.
[0022] Specifically, in a specific example of this application, step S51 includes: extracting edge thermal features from the temperature distribution image of the current layer edge region based on the ASPP model to obtain the edge thermal feature vector. Specifically, since the original temperature distribution image has high dimensionality and contains a large amount of data, directly using it for correlation analysis would be computationally intensive and might obscure key information. Furthermore, edge deviations are often related to specific thermal feature patterns (such as temperature gradient, peak temperature, cooling rate, etc.). Therefore, in order to extract the core thermal information most relevant to edge geometric deviations from the complex temperature field, this application employs the ASPP (Atrous Spatial Pyramid Pooling) model to extract features from the temperature distribution image of the current layer edge region, thereby achieving efficient, multi-scale representation of the edge thermal state. Specifically, the ASPP model is a commonly used image feature extraction structure in deep learning, which can use dilated convolutions of different scales in parallel to capture contextual information in the image while maintaining high spatial resolution. When applied to the temperature distribution image of the current layer edge region, the ASPP model learns the local details and global context information of the temperature distribution by performing dilated convolution operations at different scales. It can effectively capture multi-level thermodynamic features such as local melt pool temperature gradients and global heat accumulation regions in the image, understand the local concentration and diffusion of heat in the edge region, and the penetration and interaction of heat on structures at different scales. Finally, it outputs an edge thermal feature vector containing multi-level thermal features to characterize the thermal state of the edge region, providing an effective information basis for subsequent edge deviation analysis.
[0023] Specifically, in a specific example of this application, step S52 includes: extracting edge deviation features from the edge deviation map based on the ASPP model to obtain the edge deviation feature vector. Specifically, since the edge deviation map itself also contains the spatial distribution pattern of the current layer's edge deviations (such as local depressions or overall shifts), it needs to be further transformed into high-dimensional features to match the needs of thermodynamic analysis. Therefore, in order to more comprehensively describe the properties of the current layer's edge deviations to facilitate subsequent causal relationship mining, this application also uses the ASPP model to perform multi-scale feature extraction on the edge deviation map, capturing deviation patterns at different scales in the edge deviation map through dilated convolution operations at different scales, such as local sharp protrusions / depressions, large-scale slow drifts, or periodic fluctuations, generating an edge deviation feature vector, thereby achieving an effective characterization of the edge geometric deviation pattern.
[0024] Specifically, in step S53, a progressive multidimensional feature correlation is performed on the edge thermal feature vector and the edge deviation feature vector to obtain a multi-level joint sensing encoding vector for edge thermal-geometric deviation. It should be understood that edge deviation is a result of thermodynamic field coupling. Therefore, to establish a quantitative correlation between the temperature field and geometric deviation, this application introduces a multi-dimensional feature interaction mechanism. By performing multi-dimensional interactive correlation analysis on the edge thermal feature vector and the edge deviation feature vector, complex correlation patterns between the temperature field and geometric deviation are learned at different levels, such as the matching correspondence between high-temperature areas and edge depression positions, and the correlation between cooling rate changes and edge offset trends. This generates a characterization of the currently observed edge thermal-shape coupling state, obtaining a multi-level joint sensing encoding vector for edge thermal-geometric deviation, providing a decision-making basis for subsequent deviation tracing. Figure 4 This is a flowchart of sub-step S53 of the edge detection and correction method in the additive manufacturing process according to an embodiment of this application. Figure 4 As shown, step S53 includes the following steps: S531, performing multi-level feature association interaction on the edge thermal feature vector and the edge deviation feature vector to obtain a low-level joint sensing encoding vector of edge thermal-geometric deviation, a mid-level joint sensing encoding vector of edge thermal-geometric deviation, and a deep-level joint sensing encoding vector of edge thermal-geometric deviation; S532, performing progressive complementary sensing fusion on the low-level joint sensing encoding vector of edge thermal-geometric deviation, the mid-level joint sensing encoding vector of edge thermal-geometric deviation, and the deep-level joint sensing encoding vector of edge thermal-geometric deviation to obtain the multi-level joint sensing encoding vector of edge thermal-geometric deviation.
[0025] More specifically, in a specific example of this application, step S531 includes: first, performing low-level feature fusion based on a multilayer perceptron model on the edge hot feature vector and the edge deviation feature vector to obtain the edge hot-geometric deviation low-level joint perceptron coding vector, expressed by the formula:
[0026] in, Represents the edge hot feature vector. Represents the marginal deviation feature vector. This indicates adding based on position points. This represents a multilayer perceptron model. This represents the low-level joint sensing encoding vector for edge thermal-geometric deviation.
[0027] In other words, by using a multilayer perceptron model, low-level details and precise correspondences between edge thermal feature vectors and edge deviation feature vectors are preserved and utilized, thereby enabling a more accurate analysis of the dynamic response characteristics of edge deformation. This feature fusion approach avoids the loss of details during layer-by-layer abstraction in deep networks, allowing for a more comprehensive acquisition of the correlation between edge thermal features and edge deviation features. This leads to more accurate subsequent judgments about the causes of edge deviations, ultimately improving the yield and stability of additive manufacturing.
[0028] Secondly, multi-level latent feature extraction is performed on the edge hot feature vector and the edge deviation feature vector to obtain the middle-level latent coding vector of the edge hot feature, the middle-level latent coding vector of the geometric deviation feature, the deep-level latent coding vector of the edge hot feature, and the deep-level latent coding vector of the geometric deviation feature, which can be expressed by the following formula:
[0029] in, and These represent the weight matrix and bias term of the latent feature extraction network, respectively. Represents the ReLU activation function. This represents the hidden encoding vector in the middle layer of edge hot features. This represents the hidden encoding vector in the middle layer of the geometric deviation feature. and These represent the weight matrix and bias term of the deep latent feature extraction network, respectively. This represents the Sigmoid activation function. and These represent the deep hidden coding vectors of edge hot features and geometric deviation features, respectively.
[0030] In other words, through multi-level latent feature extraction, feature information at different levels of abstraction, from low to high, can be obtained. This allows subsequent analysis to understand the relationship between edge hot features and edge deviation features from multiple angles and levels, helping to more accurately identify the causes of edge deviation. The generated mid-level latent encoding vectors of edge hot features and geometric deviation features go beyond the details of the original input, capturing structured information with a certain degree of invariance. Meanwhile, the deep latent encoding vectors of edge hot features and geometric deviation features undergo high abstraction and information compression, providing highly condensed and task-relevant information such as global semantics and core concepts, thereby improving the accuracy of edge deviation cause judgment.
[0031] Then, a mid-level feature fusion based on a cross-attention mechanism is performed on the latent coding vectors of the edge hot features and the latent coding vectors of the geometric deviation features to obtain the mid-level joint perceptual coding vector of edge hot and geometric deviation, which is expressed by the formula:
[0032]
[0033] in, For attention fusion networks, This indicates dot product by position. This represents the hierarchical joint sensing encoding vector in edge thermal-geometric deviation. for The feature scale value, Represents the transpose of a vector. It is a normalized exponential function.
[0034] In other words, by utilizing a cross-attention mechanism to uncover the structural dependencies between the latent encoding vectors of edge thermal features and geometric deviation features, a cross-modal feature correlation model is established at the component and region levels, providing abstract-level information support for analyzing the causes of moderate complexity in edge deviations. By focusing on the structured information directly related to edge defects in the mid-level features and suppressing the interference of irrelevant noise, a joint sensing encoding vector at the mid-level of edge thermal-geometric deviation is generated, enabling the model to identify the coupling mechanism between thermal features and geometric deviations at the local structural level.
[0035] Finally, deep-level feature fusion based on linear projection gating interaction is performed on the deep latent coding vector of the edge thermal features and the deep latent coding vector of the geometric deviation features to obtain the deep-level joint sensing coding vector of edge thermal and geometric deviation, which is expressed by the formula:
[0036] in, and For different low-rank projection matrices, This represents the GELU activation function. This represents the LayerNorm normalization function. This is the weight matrix of a deep feature fusion network. This represents the edge thermal-geometric deviation feature projection-gated interactive encoding vector. This represents the edge thermal-geometric deviation deep-level joint sensing encoding vector.
[0037] In other words, by capturing the synergistic effect of the deep latent encoding vectors of edge thermal features and the deep latent encoding vectors of geometric deviation features in core meaning, global context or final goal, semantic alignment, reasoning and fusion are achieved. This enables the model to deeply understand the relationship between edge thermal features and geometric deviation features from a semantic level, improve the accuracy and reliability of judging the causes of edge deviations, and thus adjust process parameters more precisely to improve the quality and stability of additive manufacturing products.
[0038] Figure 5 This is a flowchart of sub-step S532 of the edge detection and correction method in the additive manufacturing process according to an embodiment of this application. Figure 5 As shown, step S532 includes the following steps: S5321, performing gated complementary interactive fusion on the edge thermal-geometric deviation low-level joint sensing encoding vector and the edge thermal-geometric deviation mid-level joint sensing encoding vector to obtain the edge thermal-geometric deviation low-level-mid-level joint interactive encoding vector; S5322, performing cross-level interaction based on a cross-attention mechanism on the edge thermal-geometric deviation low-level-mid-level joint interactive encoding vector and the edge thermal-geometric deviation deep-level joint sensing encoding vector to obtain the edge thermal-geometric deviation multi-level joint sensing encoding vector.
[0039] In a specific example of this application, step S5321 is expressed by the formula: {G}_{gate}=Sigmoid({W}_{g}[{f}_{low};{f}_{mid}])
[0040] Among them, [\cdot ;\cdot ] Indicates feature cascading, This represents the weight matrix of the progressive complementary sensing network. express and The gating interaction coefficient between them This represents the low- to mid-level joint interactive coding vector for edge thermal-geometric deviation.
[0041] In other words, by gating complementary interaction and fusion, the complementary advantages of the low-level joint sensing coding vector and the mid-level joint sensing coding vector of edge thermal-geometric deviation are fully utilized to avoid the limitations of single-level information. This makes the obtained low-level and mid-level joint interactive coding vector of edge thermal-geometric deviation more comprehensive and representative, thereby capturing the feature information of edge thermal-geometric deviation more comprehensively and providing a richer information foundation for more accurate judgment of the cause of edge deviation and generation of effective process parameter instructions.
[0042] In particular, in a preferred embodiment of this application, step S5322 includes: setting a query embedding matrix, a key embedding matrix, and a value embedding matrix; and performing weight distribution balancing collaborative optimization on the query embedding matrix, the key embedding matrix, and the value embedding matrix to obtain an optimized query embedding matrix, an optimized key embedding matrix, and an optimized value embedding matrix.
[0043] Here, considering that when performing gated complementary interaction fusion on the low-level joint sensing coding vector and the middle-level joint sensing coding vector of the edge thermal-geometric deviation, the gated interaction coefficients generated by the low-level and middle-level joint sensing coding vectors of the edge thermal-geometric deviation are fused based on the phase complementarity of the gated interaction coefficients. Furthermore, the interaction is achieved by constraining the deep-level joint sensing coding vector of the edge thermal-geometric deviation with an orderliness metric field through a query embedding matrix, a key embedding matrix, and a value embedding matrix. Due to the instability of the constraint structure solution of the orderliness metric field, the interaction is limited. Therefore, this application further suppresses the non-integrability accumulation of the constraint connections in the orderliness metric field by calculating the field decomposition path integral representation of the query embedding matrix, the key embedding matrix, and the value embedding matrix, and by using the path integrals of each decomposition field of the orderliness metric field, thus avoiding geometric phase accumulation that hinders the formation of local field structure interactions.
[0044] Specifically, firstly, for the pre-trained matrix , and Calculate the decomposed field path integral representation of the order parameter field domain coupled with each matrix: in, , and These matrices represent the query embedding matrix, key embedding matrix, and value embedding matrix, respectively. , and and represent the optimized query embedding matrix, optimized key embedding matrix, and optimized value embedding matrix, respectively.
[0045] Then, define the field-state equilibrium alignment loss function:
[0046] in, This represents the calculation of the nuclear norm, which is the sum of the eigenvalues of a matrix. This represents the scaling hyperparameter. This represents the field-state equilibrium alignment loss function.
[0047] In this way, the field-state equilibrium correspondence of the sum of eigenvalues can be used to avoid the stability control of the constraint structure solution, thereby achieving the interactive preservation of the query embedding matrix, key embedding matrix and value embedding matrix, and thus generating the optimized query embedding matrix, optimized key embedding matrix and optimized value embedding matrix.
[0048] Then, the optimized query embedding matrix is used to embed the low-to-mid-level joint interactive coding vector of edge hot-geometric deviation to obtain the query vector. The optimized key embedding matrix and the optimized value embedding matrix are used to embed the deep-level joint sensing coding vector of edge hot-geometric deviation to obtain the key vector and value vector, respectively, as expressed by the formula: in, , and These represent the query vector, key vector, and value vector, respectively.
[0049] In other words, by optimizing the query embedding matrix, key embedding matrix, and value embedding matrix, targeted mapping is performed on the low-to-mid-level joint interactive encoding vector and the deep-level joint perceptual encoding vector of edge thermal-geometric deviation. This not only preserves the detailed information about edge geometric deviation and the local patterns of heat distribution in the low-to-mid-level features, but also extracts the global thermal-geometric coupling rules contained in the deep-level features. This makes the generated query vector, key vector, and value vector match each other in dimension and semantics, enhances the effectiveness of cross-level feature interaction, and ensures that the query vector, key vector, and value vector can achieve efficient information exchange and fusion in subsequent interactions, laying the foundation for accurately identifying the multi-physics causes of edge deviation.
[0050] Finally, the query vector, the key vector, and the value vector are subjected to cross-level interaction based on a converter architecture to obtain the edge thermal-geometric deviation multi-level joint sensing encoding vector, which is expressed by the formula: in, This represents the multi-level joint sensing encoding vector for edge thermal-geometric deviation.
[0051] In other words, through the converter architecture, the query vector, key vector, and value vector are interacted across levels to generate a comprehensive, multi-scale interactive sensing edge thermal-geometric deviation multi-level joint sensing encoding vector. This maximizes the use of the synergistic information of edge thermal features and geometric deviation features at all levels of abstraction, forming a comprehensive and robust joint representation. This significantly improves the ability to identify and analyze edge deviations, enhances the accuracy and targeting of process parameter adjustments, and thus effectively improves the yield and stability of additive manufacturing.
[0052] Specifically, in a specific example of this application, step S54 includes: inputting the multi-level joint sensing encoding vector of edge thermal-geometric deviation into a classifier-based edge deviation cause diagnosis module to obtain a diagnosis result of the edge deviation cause. It should be understood that different process problems will exhibit different thermodynamic characteristics and geometric deviation patterns. For example, local overheating can lead to material collapse, uneven cooling can cause shrinkage deviation, low temperature can cause edge burrs or holes, and excessively fast printing speed can cause uneven edges. Therefore, in order to accurately identify the specific process causes of edge deviation, this application uses a classifier model to classify and judge the multi-level joint sensing encoding vector of edge thermal-geometric deviation.
[0053] In a specific example of this application, the multi-level joint sensing encoding vector of edge thermal-geometric deviation is input into a classifier-based edge deviation cause diagnosis module to obtain a diagnosis result of the edge deviation cause. This includes: using the fully connected layer of the edge deviation cause diagnosis module to perform fully connected encoding on the multi-level joint sensing encoding vector of edge thermal-geometric deviation to obtain a fully connected encoding vector of edge thermal-geometric deviation; inputting the fully connected encoding vector of edge thermal-geometric deviation into the Softmax classification function of the edge deviation cause diagnosis module to obtain the probability value of the multi-level joint sensing encoding vector of edge thermal-geometric deviation belonging to each edge deviation cause category label; and determining the edge deviation cause category label corresponding to the largest probability value as the diagnosis result. Specifically, the classifier is based on a deep learning architecture and learns the mapping relationship between the thermodynamic characteristics and geometric deviation patterns caused by different process problems by training on a large dataset of known process conditions and corresponding edge deviation samples. Furthermore, upon receiving the edge thermal-geometric deviation joint sensing encoding vector corresponding to unknown process conditions, the classifier learns the feature patterns of the edge thermal-geometric deviation joint sensing encoding vector and, based on the learned mapping relationship, can quickly and accurately identify the most likely process cause of the current edge deviation. The classifier outputs the probability distribution of each cause through the Softmax classification layer, such as excessively high / low laser power, excessively fast / slow scanning speed, etc., thereby providing precise guidance for the adjustment and optimization of process parameters.
[0054] In the edge detection and correction method described above for additive manufacturing, step S6 generates process parameter instructions based on the cause of edge deviation and the edge deviation map. That is, to achieve precise control of printing process parameters and optimize edge quality, this application further generates targeted process parameter adjustment instructions based on the determined cause of edge deviation (determining the parameters to be adjusted) and the edge deviation map (determining the amount of adjustment). Specifically, a decision logic is first established to determine the process parameters to be adjusted and their adjustment direction based on the cause of edge deviation. For example, if the deviation is caused by material collapse due to excessive laser power, the decision logic will instruct to reduce the laser power; if the deviation is caused by uneven edges due to excessive scanning speed, the decision logic will instruct to slow down the scanning speed. Next, based on the specific degree of deviation in the edge deviation map, the adjusted parameter values are quantified, such as determining the specific amount of laser power reduction or the specific proportion of slowing down the scanning speed. Finally, the adjusted process parameter values are encoded into process parameter instructions and sent to the control system of the additive manufacturing equipment for recognition and execution, thereby achieving real-time control of the printing process to reduce deviations and improve the geometric accuracy and surface quality of the printed parts.
[0055] In summary, the edge detection and correction method in additive manufacturing based on the embodiments of this application is explained. It utilizes a visible light camera and an infrared thermal imager to simultaneously acquire visible light images and temperature distribution images of the printed layer edge region. Through contour extraction and fitting, the actual edge coordinate sequence is extracted from the visible light image, and spatially registered and geometrically deviated with the target layer edge contour data. This quantifies the difference from the design target, generating an edge deviation map. Furthermore, a deep learning algorithm is used to perform multi-level correlation analysis on the actual temperature distribution image and the edge deviation map to deeply explore the dynamic response characteristics of edge deformation under thermal coupling, thereby intelligently determining the specific causes of edge deviation. Based on the deviation causes and the quantified edge deviation map, process parameter correction instructions are generated. This method enables intelligent identification and targeted adjustment of the causes of edge defects in additive manufacturing, thereby improving the yield and stability of additive manufacturing.
[0056] The basic principles of the present invention have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in the present invention are merely examples and not limitations, and should not be considered as essential features of each embodiment of the present invention. Furthermore, the specific details of the above embodiments are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the present invention to the necessity of employing the specific details described above.
[0057] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. In the several embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for example, the unit division is only a logical functional division, and other division methods may exist in actual implementation. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0058] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the present invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0059] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units stated in a system claim may also be implemented by a single unit through software or hardware.
[0060] Finally, it should be noted that the above description has been given for illustrative and descriptive purposes. Furthermore, the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention.
Claims
1. A method for edge detection and correction in additive manufacturing, characterized in that, include: A visible light camera installed near the printhead acquires a visible light image of the current layer edge region, and an infrared thermal imager simultaneously acquires a temperature distribution image of the current layer edge region. Contour extraction and fitting are performed on the visible light image of the current layer edge region to obtain the actual edge coordinate sequence; Extract the target layer edge contour data from the backend database; Spatially register the actual edge coordinate sequence with the target layer edge contour data, and calculate the geometric deviation between the two to obtain an edge deviation map; Multi-level joint sensing is performed on the temperature distribution image of the current layer edge region and the edge deviation map to determine the cause of the edge deviation; Based on the causes of the edge deviation and the edge deviation diagram, process parameter instructions are generated.
2. The method for edge detection and correction in additive manufacturing according to claim 1, characterized in that, Multi-level joint sensing is performed on the temperature distribution image of the current layer edge region and the edge deviation map to determine the cause of the edge deviation, including: Extract edge thermal feature vectors from the temperature distribution image of the current layer's edge region; Extract the edge deviation feature vector from the edge deviation map; Progressive feature multidimensional correlation is performed on the edge thermal feature vector and the edge deviation feature vector to obtain the edge thermal-geometric deviation multi-level joint sensing coding vector; The cause of the edge deviation is determined based on the multi-level joint sensing encoding vector of the edge thermal-geometric deviation.
3. The method for edge detection and correction in additive manufacturing according to claim 2, characterized in that, Extracting edge thermal feature vectors from the temperature distribution image of the current layer edge region includes: The edge thermal feature vector is obtained by performing edge thermal feature extraction based on the ASPP model on the temperature distribution image of the current layer edge region.
4. The method for edge detection and correction in additive manufacturing according to claim 3, characterized in that, Extracting the edge deviation feature vector from the edge deviation map includes: The edge deviation feature vector is obtained by performing edge deviation feature extraction based on the ASPP model on the edge deviation map.
5. The method for edge detection and correction in additive manufacturing according to claim 4, characterized in that, Progressive multidimensional feature correlation is performed on the edge thermal feature vector and the edge deviation feature vector to obtain a multi-level joint sensing encoding vector of edge thermal-geometric deviation, including: Multi-level feature association interaction is performed on the edge thermal feature vector and the edge deviation feature vector to obtain the low-level joint sensing coding vector of edge thermal-geometric deviation, the middle-level joint sensing coding vector of edge thermal-geometric deviation, and the deep-level joint sensing coding vector of edge thermal-geometric deviation. Progressive complementary sensing fusion is performed on the low-level joint sensing coding vector of edge thermal-geometric deviation, the mid-level joint sensing coding vector of edge thermal-geometric deviation, and the deep-level joint sensing coding vector of edge thermal-geometric deviation to obtain the multi-level joint sensing coding vector of edge thermal-geometric deviation.
6. The method for edge detection and correction in additive manufacturing according to claim 5, characterized in that, Multi-level feature association interaction is performed on the edge thermal feature vector and the edge deviation feature vector to obtain a low-level joint sensing encoding vector of edge thermal-geometric deviation, a mid-level joint sensing encoding vector of edge thermal-geometric deviation, and a deep-level joint sensing encoding vector of edge thermal-geometric deviation, including: The edge thermal feature vector and the edge deviation feature vector are subjected to low-level feature fusion based on a multilayer perceptron model to obtain the edge thermal-geometric deviation low-level joint perceptron coding vector; Multi-level latent feature extraction is performed on the edge hot feature vector and the edge deviation feature vector to obtain the middle-level latent coding vector of the edge hot feature, the middle-level latent coding vector of the geometric deviation feature, the deep latent coding vector of the edge hot feature, and the deep latent coding vector of the geometric deviation feature; The mid-level feature fusion based on the cross-attention mechanism is performed on the mid-level latent coding vector of the edge hot feature and the mid-level latent coding vector of the geometric deviation feature to obtain the mid-level joint sensing coding vector of edge hot-geometric deviation. The edge thermal feature deep latent coding vector and the geometric deviation feature deep latent coding vector are subjected to deep feature fusion based on linear projection gating interaction to obtain the edge thermal-geometric deviation deep joint sensing coding vector.
7. The method for edge detection and correction in additive manufacturing according to claim 6, characterized in that, Progressive complementary sensing fusion is performed on the low-level joint sensing coding vector of edge thermal-geometric deviation, the mid-level joint sensing coding vector of edge thermal-geometric deviation, and the deep-level joint sensing coding vector of edge thermal-geometric deviation to obtain the multi-level joint sensing coding vector of edge thermal-geometric deviation, including: The edge thermal-geometric deviation low-level joint sensing coding vector and the edge thermal-geometric deviation mid-level joint sensing coding vector are subjected to gated complementary interactive fusion to obtain the edge thermal-geometric deviation low-level-mid-level joint interactive coding vector; The edge thermal-geometric deviation low-level-mid-level joint interactive coding vector and the edge thermal-geometric deviation deep-level joint sensing coding vector are subjected to cross-level interaction based on a cross-attention mechanism to obtain the edge thermal-geometric deviation multi-level joint sensing coding vector.
8. The method for edge detection and correction in additive manufacturing according to claim 7, characterized in that, The edge thermal-geometric deviation low-level-mid-level joint interactive coding vector and the edge thermal-geometric deviation deep-level joint sensing coding vector are subjected to cross-level interaction based on a cross-attention mechanism to obtain the edge thermal-geometric deviation multi-level joint sensing coding vector, including: Set the query embedding matrix, key embedding matrix, and value embedding matrix; The query embedding matrix, the key embedding matrix, and the value embedding matrix are subjected to weight parameter distribution balance and collaborative constraint to obtain an optimized query embedding matrix, an optimized key embedding matrix, and an optimized value embedding matrix; The optimized query embedding matrix is used to embed the low- to mid-level joint interactive coding vector of edge hot- to geometric deviation to obtain a query vector. The optimized key embedding matrix and the optimized value embedding matrix are used to embed the deep-level joint sensing coding vector of edge hot- to geometric deviation to obtain a key vector and a value vector, respectively. The query vector, the key vector, and the value vector are subjected to cross-level interaction based on a converter architecture to obtain the edge thermal-geometric deviation multi-level joint sensing encoding vector.
9. The method for edge detection and correction in additive manufacturing according to claim 8, characterized in that, Based on the multi-level joint sensing encoding vector of the edge thermal-geometric deviation, the cause of the edge deviation is determined, including: The edge thermal-geometric deviation multi-level joint sensing encoding vector is input into the classifier-based edge deviation cause diagnosis module to obtain the diagnosis result of the edge deviation cause.
10. The method for edge detection and correction in additive manufacturing according to claim 9, characterized in that, The edge thermal-geometric deviation multi-level joint sensing encoding vector is input into the classifier-based edge deviation cause diagnosis module to obtain the diagnosis result of the edge deviation cause, including: The edge thermal-geometric deviation multi-level joint sensing coding vector is fully encoded using the fully connected layer of the edge deviation cause diagnosis module to obtain the edge thermal-geometric deviation multi-level joint sensing fully connected coding vector. The edge thermal-geometric deviation multi-level joint sensing fully connected encoding vector is input into the Softmax classification function of the edge deviation cause diagnosis module to obtain the probability value of the edge thermal-geometric deviation multi-level joint sensing encoding vector belonging to each edge deviation cause category label; The marginal deviation cause category label corresponding to the largest of the probability values is determined as the diagnostic result.