Freeform surface shape error texture separation method based on mask-aware physical information network

By using a mask-based physical information network approach, the problems of misjudging hole boundaries and lack of physical interpretability in deep learning models on freeform surfaces are solved. This approach achieves high-fidelity separation of shape error textures on complex freeform surfaces, improving local reconstruction accuracy and cross-domain adaptability.

CN122287323APending Publication Date: 2026-06-26ZHEJIANG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610371200.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-25
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing deep learning methods struggle to effectively distinguish between valid measurement data and invalid hole regions on freeform surfaces, leading to models misjudging hole boundaries as features to be learned. Furthermore, they lack physical interpretability and generalization ability, making it difficult to handle shape error texture separation on complex freeform surfaces.

Method used

We employ a mask-aware physical information network approach, which constructs an APC-UNet neural network by generating a synthetic dataset, generating dual masks, adaptive threshold inference, and using a mask-aware hybrid loss function. Combined with a spatial attention mechanism, we achieve high-fidelity separation between shape error and texture.

Benefits of technology

It significantly improves the model's local reconstruction accuracy for the boundaries of tiny holes and sharp geometric features, has parameter adaptive capability, can efficiently separate the shape error texture of complex freeform surfaces, has good physical interpretability and cross-domain generalization ability, and meets the needs of high-throughput industrial inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122287323A_ABST
    Figure CN122287323A_ABST
Patent Text Reader

Abstract

This invention relates to the field of precision engineering metrology, specifically to a method for separating shape error and texture of freeform surfaces based on a mask-aware physical information network. The method includes the following steps: Step S1: Generating a synthetic dataset; Step S2: Generating dual masks; Step S3: Adaptive threshold inference; Step S4: Constructing a mask-aware physical information network; Step S5: Model training; Step S6: Domain-adaptive fine-tuning; Step S7: Shape error-texture separation. This invention effectively overcomes the end effect generated during filtering separation of freeform surfaces containing topological discontinuities such as holes, reduces parameter tuning dependence, endows the model with physical interpretability, and achieves high-fidelity shape and texture separation of complex freeform surfaces.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of precision engineering metrology and surface morphology analysis technology, specifically to a method for separating the shape error texture of freeform surfaces based on a mask-sensing physical information network, which is particularly suitable for processing complex freeform surfaces containing topological discontinuities such as holes and slots. Background Technology

[0002] Freeform surfaces are complex physical surfaces widely used in high-value-added components in aerospace (such as turbine blades and wing skins), automotive manufacturing (such as body panels), precision optics (such as aspherical lenses and mirrors), and medical devices (such as artificial joints and dental implants). The manufacturing quality of these surfaces directly determines the assembly accuracy, optical performance, fatigue life, and other key functions and service reliability of the parts.

[0003] According to ISO standards, the actual surface morphology of a finished part can be considered as a superposition of its nominal design shape and various manufacturing errors. Among these, macroscopic shape errors and microscopic surface textures are the core components that need to be accurately separated and evaluated. Therefore, achieving high-fidelity separation of shape errors and textures is a key prerequisite for process optimization in the aforementioned high-end manufacturing fields.

[0004] The essence of shape error texture separation is to extract components with different spatial frequencies from the processing error signal, i.e., filtering. In existing technologies, deep learning techniques, represented by convolutional neural networks (CNNs), provide an effective solution for surface filtering and shape error texture separation.

[0005] However, in the aforementioned application areas, freeform surfaces often possess local discontinuities such as holes and slots (e.g., turbine blade positioning holes and engine cylinder head valve seat holes) to achieve specific functions, which presents significant limitations for existing deep learning methods. On one hand, standard convolution operations process all pixels uniformly, making it impossible for the network model to distinguish between valid measurement data and invalid hole regions. This leads to the model misclassifying hole boundaries as features to be learned, resulting in residual boundary artifacts in the output. On the other hand, the aforementioned techniques lack physical interpretability, and their generalization ability is severely limited by the coverage of the training data distribution. In the field of precision surface metrology, existing technologies struggle to construct a hybrid modeling framework that can handle data gaps, ensure physical consistency, and possess parameter adaptive capabilities for the discontinuous topology of freeform surfaces. Summary of the Invention

[0006] The purpose of this invention is to provide a freeform surface shape error texture separation method based on mask-aware physical information network. This method significantly improves the local reconstruction accuracy of the model for the boundaries of small holes and sharp geometric features, overcomes the problem of lack of physical interpretability of deep learning models, has excellent parameter adaptive ability, and can effectively separate high-fidelity shape error textures of complex freeform surfaces.

[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0008] A method for separating freeform surface shape errors and textures based on mask-aware physical information networks, the method including:

[0009] Step S1: Generate a synthetic dataset: Generate shape error components, surface texture components, measurement noise components, and discontinuous region markers in sequence. Linearly superimpose each component to form freeform surface sample data in the form of a three-dimensional point cloud. Through grayscale mapping, convert the freeform surface sample data in the form of a three-dimensional point cloud into target sample data represented by a two-dimensional height map. Generate a synthetic dataset based on multiple target sample data.

[0010] Step S2: Dual Mask Generation: Input sample data from the synthetic dataset, perform validity mapping on the target sample data to generate an original validity mask; perform morphological erosion operation on the original validity mask to generate a gradient safety mask that defines the reliable domain of numerical difference;

[0011] Step S3: Adaptive threshold inference: Within the reliable domain defined by the gradient safety mask, calculate the gradient magnitude distribution of the input data and extract the statistical quantiles of the gradient magnitude as a feature scale; set the target diffusion coefficient and calculate the anisotropic diffusion threshold based on the exponential decay characteristics of the target diffusion coefficient.

[0012] Step S4: Construct a mask-aware physical information network: Construct a deep neural network that integrates partial convolutional layers and spatial attention mechanisms, as well as a mask-aware hybrid loss function;

[0013] Step S5: Model Training: Based on the synthetic dataset and the mask-aware hybrid loss function, the deep neural network is trained to obtain a pre-trained mask-aware physical information network model.

[0014] Step S6: Domain Adaptation Fine-tuning: Acquire industrial measurement data and construct a real case dataset using a pseudo-label-based domain adaptation fine-tuning strategy; use the case dataset to fine-tune the mask-aware physical information network model to obtain a shape error texture separation model;

[0015] Step S7: Shape Error-Texture Separation: Based on the additive decomposition method of processing error, the shape error prediction value output by the shape error texture separation model is subtracted from the input data to be separated to obtain the separated surface texture components, thus completing the separation of shape error and texture.

[0016] As a preferred embodiment of the present invention, in step S01, the shape error component is generated by simulating a weighted random combination of polynomial surfaces, sine surfaces, Gaussian surfaces and regular geometric surfaces; the surface texture component is generated by simulating periodic tool trajectories and Perlin noise based on the superposition of high-frequency sine functions; the measurement noise component is generated based on the hybrid injection method; and the discontinuous region marker is generated based on the binarized matrix topological missing feature layout method.

[0017] As a preferred embodiment of the present invention, in step S02, the gradient safety mask is generated in the following manner:

[0018] a. Iterate through each pixel position of the input data. If the value at that position is a valid real number, mark it as 1; if it is an invalid value, mark it as 0. This forms a binary original validity mask of the same size as the input data.

[0019] b. Perform a morphological erosion operation on the original validity mask, using a structuring element of a preset size, so that the complete neighborhood of a pixel that satisfies the gradient safety mask of 1 is a valid pixel, thereby generating a gradient safety mask that defines the reliable domain of numerical difference.

[0020] As a preferred embodiment of the present invention, in step S03, the diffusion threshold is the optimal threshold parameter K of the Perona-Malik anisotropic diffusion equation; the governing equation of the Perona-Malik anisotropic diffusion equation is:

[0021]

[0022]

[0023] in, For image or surface height function, For virtual time variables, For gradient operators, For divergence operators, This is the diffusion coefficient function that depends on the magnitude of the local gradient.

[0024] As a preferred embodiment of the present invention, in step S03, within the reliable domain defined by the gradient safety mask, the Sobel gradient operator is used to calculate the gradient magnitude of the input data to generate the gradient magnitude distribution result.

[0025] As a preferred embodiment of the present invention, in step S04, the deep neural network integrating partial convolutional layers and spatial attention mechanisms is a U-Net encoder-decoder structure; the encoder includes multiple cascaded encoder modules, each encoder module including a partially convolutional layer, a batch normalization layer and an activation function layer connected in sequence; the decoder includes multiple cascaded decoder modules, each decoder module including a transposed convolutional upsampling layer, a partially convolutional layer, a batch normalization layer and an activation function layer connected in sequence; a skip connection path is provided between the corresponding layers of the encoder and the decoder, and the skip connection path integrates a spatial attention module.

[0026] As a preferred embodiment of the present invention, in step S05, the model training process uses the AdamW optimizer to accelerate model convergence, and sets the ReduceLROnPlateau learning rate scheduler to automatically decay the learning rate when the validation set loss stagnates.

[0027] As a preferred embodiment of the present invention, in step S04, the mask-aware hybrid loss function includes a weighted data fidelity term, a physical constraint term, and a total variation regularization term; and the weight coefficients corresponding to each term are determined by searching on the validation set.

[0028] As a preferred embodiment of the present invention, the data fidelity term is constructed based on the mask-aware mean square error method; the physical constraint term is constructed based on the anisotropic diffusion equation.

[0029] As a preferred embodiment of the present invention, the method for fine-tuning the mask-sensing physical information network model in step S06 is specifically as follows:

[0030] a. Obtain the measurement 3D point cloud data of real industrial parts, and rigidly align and register the measurement 3D point cloud data with the CAD nominal model through the iterative nearest point algorithm;

[0031] b. Convert the three-dimensional point cloud data into sample data represented by a two-dimensional height map through grayscale mapping;

[0032] c. Calculate the normal deviation of the measured surface relative to the nominal surface to obtain the true machining error data, which includes the actual shape error, surface texture, and measurement noise;

[0033] d. Generate pseudo-labels based on the surface topology type, and construct a domain-adaptive fine-tuning dataset based on the actual processing error data and the pseudo-labels;

[0034] e. Fine-tune the mask-aware physical information network model pre-trained on the synthetic dataset using the domain-adaptive fine-tuning dataset.

[0035] In summary, the present invention has the following beneficial effects:

[0036] The dual-mask numerical stabilization mechanism constructed in this invention, by defining the absolute safe domain of the difference operation, fundamentally blocks the propagation of false gradients generated by invalid pixels (such as holes and missing regions), eliminates boundary Gibbs oscillation artifacts, and solves the fundamental contradiction of the traditional filtering algorithm causing end effect due to the failure of weight normalization at discontinuous boundaries.

[0037] The proposed APC-UNet neural network architecture accurately extracts effective region features through partial convolutional layers under mask guidance, and combines spatial attention mechanism to achieve efficient cross-layer transmission of edge information, ensuring that the contribution of invalid regions to the deep computation of the network is strictly zero, which significantly improves the model's local reconstruction accuracy for the boundaries of small holes and sharp geometric features.

[0038] This invention embeds the steady-state conditions of the Perona-Malik anisotropic diffusion equation as soft constraints into the network training system, injecting a strong physical inductive bias into the purely data-driven network. This forces the separated shape error to perform efficient denoising in flat regions, while automatically suppressing smoothing at geometric abrupt changes, overcoming the bottleneck of the lack of physical interpretability in deep learning models, and at the same time endowing the model with cross-domain generalization ability.

[0039] The adaptive threshold inference mechanism designed in this invention establishes an inverse mathematical mapping from data distribution to physical parameters, enabling the model to dynamically infer the optimal diffusion threshold K based on the inherent texture features of each input sample. This eliminates the shortcomings of traditional anisotropic diffusion methods that heavily rely on manual experience for parameter tuning, and meets the automation requirements of high-throughput industrial detection.

[0040] This invention can achieve a processing speed of 293.6 FPS based on a lightweight parameter of 5.65M, and has the potential to be deployed in real time on resource-constrained industrial control computers. Based on the domain adaptation strategy of pseudo-labels, the model can adapt to the batch detection of new types of freeform surface parts with only a very small number of real samples for fine-tuning, which greatly reduces the labor and time costs in the actual implementation process. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is a flowchart of the method of the present invention;

[0043] Figure 2 This is a schematic diagram of the component decomposition of the synthetic dataset;

[0044] Figure 3 This is an example of a 3D point cloud of a sample of a discontinuous freeform surface in a synthetic dataset.

[0045] Figure 4 This is an example of a two-dimensional height map of a discontinuous freeform surface sample in a synthetic dataset;

[0046] Figure 5 This is a schematic diagram of the dual-mask numerical stabilization mechanism;

[0047] Figure 6 Flowchart of the adaptive threshold inference module;

[0048] Figure 7 A diagram of the APC-UNet network architecture;

[0049] Figure 8 This is a schematic diagram illustrating the principle of some convolutional layers and spatial attention mechanisms.

[0050] Figure 9 This is a two-dimensional height diagram of the measured data of the turbine blades in Example 2;

[0051] Figure 10 This is a two-dimensional height diagram of the nominal CAD model of the turbine blades in Example 2;

[0052] Figure 11 This is a two-dimensional height diagram of the machining error of the turbine blades in Example 2;

[0053] Figure 12 This is a schematic diagram of the machining error of the turbine blades in Example 2;

[0054] Figure 13 This is a schematic diagram of the shape error separation results of the turbine blades in Example 2;

[0055] Figure 14 This is a schematic diagram of the surface texture and noise separation results of the turbine blades in Example 2;

[0056] Figure 15 This is a two-dimensional height diagram of the measurement data of the engine cylinder head combustion chamber in Example 3;

[0057] Figure 16 This is a two-dimensional height diagram of the nominal CAD model of the engine cylinder head combustion chamber in Example 3;

[0058] Figure 17 This is a two-dimensional height diagram of the machining error of the engine cylinder head combustion chamber in Example 3;

[0059] Figure 18 This is a schematic diagram of the machining error of the engine cylinder head combustion chamber in Example 3;

[0060] Figure 19 This is a schematic diagram showing the shape error separation results of the engine cylinder head combustion chamber in Example 3;

[0061] Figure 20 This is a schematic diagram of the surface texture and noise separation results of the engine cylinder head combustion chamber in Example 3. Detailed Implementation

[0062] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed merely to enable those skilled in the art to better understand and implement the subject matter described herein, and are not intended to limit the scope, applicability, or examples set forth in the claims. The function and arrangement of the elements discussed may be changed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the various examples. For example, the described methods may be performed in a different order than described, and steps may be added, omitted, or combined. Furthermore, features described in some examples may be combined in other examples.

[0063] Example 1

[0064] like Figure 1 As shown, the freeform surface shape error texture separation method based on mask-aware physical information network provided by this invention includes complete data generation, model construction, and separation inference, specifically including the following steps:

[0065] Step S1: Generate a synthetic dataset: Generate shape error components, surface texture components, measurement noise components, and discontinuous region markers in sequence. Linearly superimpose each component to form freeform surface sample data in the form of a three-dimensional point cloud. Through grayscale mapping, convert the freeform surface sample data in the form of a three-dimensional point cloud into target sample data represented by a two-dimensional height map. Generate a synthetic dataset based on multiple target sample data.

[0066] like Figure 2 As shown, this invention generates diverse training data with perfect ground truth labels based on a procedural synthesis strategy. The synthesis process involves the generation and superposition of four independent components: shape error component, surface texture component, measurement noise component, and discontinuous region labeling. Figure 3 and Figure 4 The images show examples of the 3D point cloud and 2D height map of a discontinuous freeform surface sample, respectively. From left to right, they represent processing error, shape error, and surface texture and noise.

[0067] First, the shape error component characterizes macroscopic low-frequency geometric deviations and is generated through a weighted random combination of polynomial surfaces, sinusoidal surfaces, Gaussian surfaces, and regular geometric surfaces. Specifically, the shape error component is generated using a simulation model to cover typical low-frequency machining error patterns: polynomial surfaces of order 1 to 3 (simulating overall deflection caused by insufficient workpiece stiffness or uneven clamping force distribution), sinusoidal surfaces (simulating periodic errors of machine tool guideways or spindle rotation errors), Gaussian surfaces (simulating local thermal effects), and regular geometric surfaces such as spheres and cones. These are weighted and combined to form the shape error component, which serves as the absolute true value for supervised learning.

[0068] Secondly, the high-frequency micro-cutting marks in the generated surface texture components are characterized: deterministic textures are simulated by superimposing high-frequency sine functions to simulate periodic tool paths, while random textures are generated using Perlin noise to simulate non-periodic roughness.

[0069] Then, measurement noise components are generated, and Gaussian white noise and impulse noise are injected to simulate sensing interference of industrial measuring instruments.

[0070] Finally, discontinuous region markers are generated, and six typical topological missing features, such as circular holes, linear cracks, and edge missing, are randomly distributed in the effective space using a binarization matrix. The values ​​in these regions are forcibly assigned to invalid non-numeric forms (NaN).

[0071] The above four types of components are linearly superimposed to form synthetic sample data. It should be noted that the frequency characteristics of the components strictly follow the ISO 16610 filtering standard, that is, the spatial wavelength of the shape error is greater than the given cutoff wavelength, while the texture component is less than the cutoff wavelength.

[0072] Step S2: Dual Mask Generation: Input sample data from the synthetic dataset, perform validity mapping on the target sample data to generate an original validity mask; perform morphological erosion operation on the original validity mask to generate a gradient safety mask that defines the reliable domain of numerical difference.

[0073] like Figure 5 As shown, the input is a freeform surface synthetic dataset containing discontinuous regions. The dataset samples are subjected to validity mapping to generate an original validity mask: traversing each pixel position of the input data, if the value at that position is a valid real number, it is marked as 1, otherwise it is marked as 0; performing a morphological erosion operation on the original validity mask generates a gradient-safe mask. The erosion operation uses a 3×3 structuring element. The value at a pixel is marked as 1 if and only if all pixels in the complete 3×3 neighborhood of a pixel are valid pixels.

[0074] Step S3: Adaptive threshold inference: Within the reliable domain defined by the gradient safety mask, calculate the gradient magnitude distribution of the input data and extract the statistical quantiles of the gradient magnitude as a feature scale; set the target diffusion coefficient and calculate the anisotropic diffusion threshold based on the exponential decay characteristics of the target diffusion coefficient.

[0075] This step is an adaptive threshold inference step, such as... Figure 6 As shown, the gradient magnitude distribution of the input data is calculated within the reliable domain defined by the gradient safety mask in step S02. The gradient components in the horizontal and vertical directions are calculated using a 3×3 Sobel operator, and then the gradient magnitude is calculated. The gradient magnitude within the reliable domain is statistically analyzed, and the gradient magnitude corresponding to the 75th percentile is extracted as the feature scale. This statistic represents the upper limit of the intensity of the background noise gradient in the current sample. It is set that the diffusion coefficient should decay to the target value of 0.9 at the feature scale.

[0076] Based on the exponential decay form of the diffusion coefficient, the diffusion threshold K is calculated by algebraic inversion: the diffusion threshold K is equal to the characteristic scale divided by the square root of the negative logarithm of the target value.

[0077] Specifically, in this embodiment, the diffusion threshold K is the optimal threshold parameter of the Perona-Malik anisotropic diffusion equation; the governing equation of the Perona-Malik anisotropic diffusion equation is in divergence form:

[0078]

[0079] in, For image or surface height function, For virtual time variables, For gradient operators, For divergence operators, The diffusion coefficient function depends on the magnitude of the local gradient;

[0080] The diffusion coefficient function is in exponential form:

[0081]

[0082] When the local gradient magnitude When the value is much smaller than the threshold K, the diffusion coefficient c approaches 1, producing a smoothing effect; when the local gradient magnitude is much smaller... When the value is much greater than the threshold K, the diffusion coefficient c approaches 0, and the edge features are preserved.

[0083] Specifically, the Sobel gradient operator is used to calculate the gradient magnitude of the input data. The Sobel operator is a discrete gradient operator that calculates the horizontal and vertical gradient components using a 3×3 convolution kernel. Statistical analysis is performed on the gradient magnitudes within the reliable domain, and the gradient magnitudes corresponding to preset quantiles are extracted as feature scales. The feature scale represents the gradient magnitudes within the reliable domain that are sorted and located at the preset quantile. By selecting an appropriate quantile (preferably 0.75), representative gradient scales in the data can be captured, eliminating flat regions with low gradients and avoiding interference from high-gradient outliers.

[0084] A target value is set to which the diffusion coefficient should decay at the characteristic scale. The physical meaning of the target diffusion coefficient is: when the local gradient magnitude is equal to the characteristic scale, the diffusion coefficient is expected to decay to (preferably 0.90). This setting ensures that a strong diffusion capability (90%) is still maintained at the characteristic scale, while diffusion at larger gradients (edge ​​regions) will be more significantly suppressed. Based on the exponential decay form of the diffusion coefficient, the diffusion threshold K is calculated by algebraic inversion. The target diffusion coefficient is substituted into the diffusion coefficient function to obtain the optimal threshold parameter K.

[0085] Step S4: Construct a mask-aware physical information network: Construct a deep neural network that integrates partial convolutional layers and spatial attention mechanisms, as well as a mask-aware hybrid loss function.

[0086] The deep neural network integrating partial convolutional layers and spatial attention mechanisms is the U-Net encoder-decoder structure, and its network architecture diagram is shown below. Figure 7 As shown. The encoder contains multiple cascaded encoder modules, each containing a partially convolutional layer, a batch normalization layer, and an activation function layer connected in sequence. The decoder contains multiple cascaded decoder modules, each containing a transposed convolutional upsampling layer, a partially convolutional layer, a batch normalization layer, and an activation function layer connected in sequence. Skip connections are established between corresponding layers of the encoder and decoder, and spatial attention modules are integrated into these skip connections. Furthermore, all standard convolutional layers are replaced with partially convolutional layers. The schematic diagram of the partially convolutional layers and the spatial attention mechanism is shown below. Figure 8 As shown.

[0087] More specifically, the APC-UNet backbone network is constructed; this architecture is based on U-Net and includes encoder and decoder parts.

[0088] The encoder section consists of four cascaded encoder modules, achieving four downsampling operations to form five scales; the first scale has a resolution of 256×256 and 32 channels; the second scale has a resolution of 128×128 and 64 channels; the third scale has a resolution of 64×64 and 128 channels; the fourth scale has a resolution of 32×32 and 256 channels; and the bottleneck layer has a resolution of 16×16 and 512 channels.

[0089] The decoder section consists of four cascaded decoder modules, which gradually restore spatial resolution through upsampling; all standard convolutional layers are replaced with partial convolutional layers, so that convolution operations are performed only on pixels marked as valid by the mask, and the change in the number of valid pixels is compensated by a dynamic scaling factor.

[0090] A spatial attention module is integrated into the skip connection path. First, spatial information is aggregated through average pooling and max pooling along the channel dimension. Then, the aggregated feature maps are concatenated and passed through a 7×7 convolutional layer. The output is normalized to the 0-1 range by the Sigmoid activation function to obtain the spatial attention map. The generated attention map is multiplied element-wise with the original feature map to obtain a weighted feature map, achieving selective enhancement of edge features.

[0091] A mask-aware hybrid loss function is constructed, which includes three loss terms: data fidelity term, physical constraint term, and total variation regularization term, and the three loss terms are weighted.

[0092] The data fidelity term is constructed using a mask-aware mean squared error method. It is used to calculate the pixel-level error between the predicted value and the true value in the regions marked as valid by the original validity mask, and then normalizes it by dividing by the total number of valid pixels. In this embodiment, the weight of the data fidelity term is set to 0.4.

[0093] The physical constraint term is used to embed the steady-state condition of the Perona-Malik anisotropic diffusion as a soft constraint into the training process; the governing equation of the anisotropic diffusion is expressed in divergence form, and the diffusion coefficient is a function dependent on the local gradient; in order to achieve edge preservation, the diffusion coefficient is designed as an exponential decay function of the gradient magnitude, and the decay rate is controlled by the diffusion threshold inferred in step S03.

[0094] In addition, the physical constraint term also considers a two-field strategy: the diffusion coefficient is calculated based on the gradient field of the input data to accurately locate the edge, the divergence operator is applied to the network prediction to apply smoothing constraints, and the calculation of the physical residual is strictly limited to the reliable domain defined by the gradient safety mask. In this embodiment, the weight of the physical constraint term is set to 0.4.

[0095] The total variation regularization term is used to provide global smoothness constraints to suppress high-frequency oscillations. This loss term calculates the L1 norm of the gradient magnitude, which promotes the generation of piecewise smooth solutions and is also restricted to the gradient safety mask domain. In this embodiment, the weight of the total variation regularization term is set to 0.2.

[0096] Step S5: Model Training: Based on the synthetic dataset and the mask-aware hybrid loss function, the deep neural network is trained to obtain a pre-trained mask-aware physical information network model.

[0097] Next, model training is performed using the constructed dataset and loss function to train the APC-UNet physical information network. The AdamW adaptive optimizer is employed to accelerate convergence, with an initial learning rate set to [value missing]. The weight decay factor is set to 0.01, and the batch size is set to 16. The ReduceLROnPlateau learning rate scheduler is configured so that if the validation set loss does not improve within 10 consecutive epochs, the learning rate is decayed to 0.5 times its original value. The maximum number of training epochs is set to 200, supplemented by an early stopping mechanism to extract the model weights with the best validation performance.

[0098] Step S6: Domain Adaptation Fine-tuning: Acquire industrial measurement data and construct a real case dataset using a pseudo-label-based domain adaptation fine-tuning strategy; use the case dataset to fine-tune the mask-aware physical information network model to obtain a shape error texture separation model.

[0099] The specific method for fine-tuning the mask-sensing physical information network model is as follows:

[0100] Acquire 3D point cloud data of real industrial parts (using a high-precision scanner to acquire the measurement point cloud of the real parts, the type of scanner used includes but is not limited to white light interferometer, laser confocal microscope or 3D laser scanner), and rigidly align and register the measurement 3D point cloud data with the CAD nominal model through an iterative nearest point algorithm;

[0101] The three-dimensional point cloud data is converted into sample data represented by a two-dimensional height map through grayscale mapping;

[0102] Calculate the normal deviation of the measured surface relative to the nominal surface to obtain true machining error data that includes the actual shape error, surface texture, and measurement noise; specifically, for example, it is two-dimensional topological data of true machining error that includes machine tool thermal deformation, actual machining marks, and surface defects;

[0103] The metrology experts used traditional robust Gaussian regression or anisotropic diffusion filtering to finely tune a small number of real samples. The processed shape error results were used as "pseudo-labels". Based on the real processing error data and the pseudo-labels, a domain-adaptive fine-tuning dataset was constructed.

[0104] The mask-aware physical information network model pre-trained on a synthetic dataset is fine-tuned using a domain-adaptive fine-tuning dataset. The key to the fine-tuning process is to preserve the physical constraints while using a small learning rate and fewer iterations to obtain the fine-tuned model.

[0105] Step S7: Shape Error-Texture Separation: Based on the additive decomposition method of processing error, the shape error prediction value output by the shape error texture separation model is subtracted from the input data to be separated to obtain the separated surface texture components, thus completing the separation of shape error and texture.

[0106] Finally, the inference step is executed, outputting the shape error prediction. Specifically, based on the additive decomposition principle of processing errors, the surface texture component is extracted by subtracting the shape error prediction from the input data, achieving high-fidelity separation of shape error and texture. The extracted shape error and texture separation results are as follows: Figure 12 As shown.

[0107] Example 2

[0108] In another possible implementation, this embodiment applies the above method to separate the shape error and surface texture of a certain type of steam turbine blade to verify the effectiveness of the present invention in processing continuous freeform surfaces with large curvature. The specific implementation steps are as follows:

[0109] In the model pre-training stage of this embodiment, the generation of synthetic data, dual-mask processing, feature extraction, network construction, and model pre-training are completed according to the methods described in the above embodiments.

[0110] To address the potential for missing data in industrial settings, this embodiment sets the area ratio of discontinuous regions (i.e., invalid value regions) to 5% to 30% when synthesizing training samples. This dataset is then used to complete the full pre-training of the APC-UNet backbone network, endowing it with basic morphological feature extraction and physical perception capabilities.

[0111] The turbine blades were scanned with high precision across the entire surface using an industrial-grade 3D laser scanner with a resolution of up to 0.02 mm, acquiring a point cloud of approximately 500,000 points. The resulting 2D height visualization is shown below. Figure 9 As shown.

[0112] The measured point cloud acquired by scanning is rigidly aligned and registered with the blade's CAD nominal model using the ICP algorithm. The two-dimensional height map of the CAD nominal model is shown below. Figure 10As shown, the normal deviation is calculated to obtain the actual machining error data, and then its interpolation and resampling are performed. The regular grid, the two-dimensional height map of the actual machining error is as follows Figure 11 As shown.

[0113] Given that the turbine blade body is a continuous freeform surface, metrology experts repeatedly performed manual parameter tuning using robust Gaussian regression filtering until visual satisfaction was achieved. A small number of representative blade samples were then processed to generate pseudo-labels. Using the aforementioned processing error data as input and the pseudo-labels as monitoring signals, the physical constraint loss term was strictly preserved during the fine-tuning process, and a relatively small learning rate was used. Fine-tune the pre-trained network over 50 epochs.

[0114] The turbine blade machining error data to be measured is input into the fine-tuned network, and the two-dimensional height diagram of this data is shown below. Figure 12 As shown, a single forward propagation directly outputs a high-fidelity predicted shape error value. Based on the additive decomposition principle of machining errors, surface texture components are extracted by subtracting the predicted shape error from the input data, achieving high-fidelity separation of shape error and texture; the turbine blade shape error-texture separation result is shown in the figure below. Figure 13 and Figure 14 As shown, where Figure 13 For the separated shape error, Figure 14 The separated surface texture and noise.

[0115] Experimental Results: In terms of quantitative evaluation, the method of this invention achieves a mean squared error (MSE) of [value missing] on synthetic test sets containing complex features. The structural similarity index (SSIM) reaches 0.9836, outperforming existing industry benchmark methods and mainstream deep learning methods.

[0116] On the hardware platform (NVIDIA RTX 3090 GPU), the single-frame inference speed reaches up to 293.6 FPS, meeting the online real-time processing requirements of industrial automated production lines.

[0117] In terms of qualitative assessment, such as Figure 14As shown, the blade shape error output by the network of this invention exhibits smooth and continuous low-frequency characteristics, reflecting systematic machining errors such as machine tool thermal deformation and workpiece clamping errors. The separated surface texture components clearly retain the tool marks and polishing textures left by machining, exhibiting a distinct directional and periodic wavy structure, highly consistent with the helical tool path of five-axis milling. No low-frequency residues related to the macroscopic shape appear in the texture components, nor are Gibbs oscillation artifacts generated in the edge areas. Based on the ISO 25178 surface roughness evaluation standard, feature regions A1 on the upper part of the blade and the lower main body surface A2 were selected for evaluation. The calculated arithmetic mean heights (Sa) of the two regions were 0.0544 μm and 0.0551 μm, respectively, with a difference within 1.3%, demonstrating the high consistency of the blade surface machining quality. The main texture direction of both regions is 45 degrees, completely preserving the directional characteristics generated by five-axis milling along a fixed tool path.

[0118] Compared with traditional Gaussian filtering, the method of this invention performs better in edge preservation and does not exhibit edge rounding; compared with purely data-driven deep learning methods, the output of the method of this invention has better physical interpretability.

[0119] Example 3

[0120] In another possible implementation, this embodiment is used to verify the application effect of the method of the present invention on the combustion chamber of an engine cylinder head, a typical industrial part with topological discontinuities, whose morphological features are fundamentally different from the continuous surface of Embodiment 1. The specific implementation steps are as follows:

[0121] The pre-training process is consistent with the above embodiments. The synthetic dataset is pre-injected with data samples containing various hole and edge missing features, providing a foundation for subsequent processing of complex and discontinuous geometry.

[0122] The cylinder head combustion chamber is a core component of an internal combustion engine. Its surface profile is a typical discontinuous free-form surface, containing multiple through-hole features such as intake valve holes, exhaust valve holes, fuel injector mounting holes, and spark plug mounting holes, as well as complex extrusion surface curves. A metrology-grade handheld laser scanner, SIMSCAN, was used to acquire high-density point cloud data of the cylinder head combustion chamber area. The visualization results of the acquired data are shown below. Figure 15 As shown; its 2D height diagram of the nominal CAD model is as follows. Figure 16 As shown, the two are resampled by interpolation after calculating the normal deviation. Grid, to obtain input processing error data, such as Figure 17 As shown.

[0123] Because the combustion chamber contains the aforementioned multiple through-hole features... Figure 18The test data revealed manufacturing errors in the combustion chamber, with invalid data (NaN) from the pore area accounting for approximately 15% of the total data.

[0124] Given the numerous discontinuous features in the combustion chamber, metrologists employed anisotropic diffusion filtering with repeated manual parameter tuning until visual satisfaction was achieved. This process was used to generate pseudo-labels from a small number of samples. These pseudo-labels were then used as supervisory signals, retaining the physical constraint loss term and employing a relatively small learning rate. Fine-tune the pre-trained network over 50 epochs.

[0125] During the inference phase, based on the additive decomposition principle of processing errors, surface texture components are extracted by subtracting shape error prediction from the input data, thus achieving high-fidelity separation of shape error and texture. The extracted shape error and texture separation results are as follows: Figure 19 and Figure 20 As shown, where Figure 19 For the separated shape error, Figure 20 This refers to the separated surface texture and noise.

[0126] Experimental Results: In terms of qualitative evaluation, the shape error component output by the model of this invention clearly reconstructs the smooth and continuous shape distribution of the combustion chamber dome. Focusing on the edge region of the through hole, at the boundary of the valve seat hole, the reconstruction result maintains the natural geometric truncation characteristics, avoiding the collapse into the hole, edge rounding, and annular oscillation artifacts (Gibbs effect) commonly found in traditional Gaussian filtering algorithms at such structures. This edge preservation capability is crucial for the calculation of combustion chamber volume, because any edge collapse or blurring will lead to a false increase in the calculated volume, which will seriously affect the final evaluation accuracy of the engine compression ratio.

[0127] In terms of quantitative evaluation, the separated surface texture components exhibited typical machining characteristics and were not contaminated by invalid data from pores; two representative regions were selected for surface roughness analysis, such as... Figure 20 As shown, taking the arithmetic mean height as an example, the arithmetic mean height of the first region A3 (located at the center of the dome, with an area of ​​20×20 mm) is 0.0482 μm; the arithmetic mean height of the second region A4 (adjacent to the edge of the valve seat hole, with an area of ​​20×20 mm) is 0.0572 μm. It can be seen that the roughness increase of the hole edge region A4 compared to the central region A3 is approximately 18.7% (i.e., the interface expansion rate of the two regions differs within a reasonable range). This conforms to the process characteristics of actual CNC milling.

[0128] The results demonstrate that the dual-mask numerical stabilization mechanism of this invention not only successfully eliminates numerical contamination at the hole boundaries, but also, under the guidance of physical constraints, improves the accuracy of high-fidelity separation and morphology evaluation of free-form surfaces with complex hole and slot structures.

[0129] Several embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or technological improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for separating freeform surface shape errors and textures based on mask-aware physical information networks, characterized in that, The methods include: Step S1: Generate a synthetic dataset: Generate shape error components, surface texture components, measurement noise components, and discontinuous region markers in sequence. Linearly superimpose each component to form freeform surface sample data in the form of a three-dimensional point cloud. Through grayscale mapping, convert the freeform surface sample data in the form of a three-dimensional point cloud into target sample data represented by a two-dimensional height map. Generate a synthetic dataset based on multiple target sample data. Step S2: Dual Mask Generation: Input sample data from the synthetic dataset, perform validity mapping on the target sample data to generate an original validity mask; perform morphological erosion operation on the original validity mask to generate a gradient safety mask that defines the reliable domain of numerical difference; Step S3: Adaptive threshold inference: Within the reliable domain defined by the gradient safety mask, calculate the gradient magnitude distribution of the input data and extract the statistical quantiles of the gradient magnitude as a feature scale; set the target diffusion coefficient and calculate the anisotropic diffusion threshold based on the exponential decay characteristics of the target diffusion coefficient. Step S4: Construct a mask-aware physical information network: Construct a deep neural network that integrates partial convolutional layers and spatial attention mechanisms, as well as a mask-aware hybrid loss function; Step S5: Model Training: Based on the synthetic dataset and the mask-aware hybrid loss function, the deep neural network is trained to obtain a pre-trained mask-aware physical information network model. Step S6: Domain Adaptation Fine-tuning: Acquire industrial measurement data and construct a real case dataset using a pseudo-label-based domain adaptation fine-tuning strategy; use the case dataset to fine-tune the mask-aware physical information network model to obtain a shape error texture separation model; Step S7: Shape Error-Texture Separation: Based on the additive decomposition method of processing error, the shape error prediction value output by the shape error texture separation model is subtracted from the input data to be separated to obtain the separated surface texture components, thus completing the separation of shape error and texture.

2. The method for separating freeform surface shape error texture based on mask-aware physical information network according to claim 1, characterized in that, In step S01, the shape error component is generated by simulating a weighted random combination of polynomial surfaces, sinusoidal surfaces, Gaussian surfaces, and regular geometric surfaces; the surface texture component is generated by simulating periodic tool trajectories and Perlin noise based on the superposition of high-frequency sinusoidal functions; the measurement noise component is generated based on the hybrid injection method; and the discontinuous region marker is generated based on the binarized matrix topological missing feature layout method.

3. The method for separating freeform surface shape error texture based on mask-aware physical information network according to claim 1, characterized in that, In step S02, the gradient safety mask is generated in the following specific way: a. Iterate through each pixel position of the input data. If the value at that position is a valid real number, mark it as 1; if it is an invalid value, mark it as 0. This forms a binary original validity mask of the same size as the input data. b. Perform a morphological erosion operation on the original validity mask, using a structuring element of a preset size, so that the complete neighborhood of a pixel that satisfies the gradient safety mask of 1 is a valid pixel, thereby generating a gradient safety mask that defines the reliable domain of numerical difference.

4. The method for separating freeform surface shape error texture based on mask-aware physical information network according to claim 1, characterized in that, In step S03, the diffusion threshold is the optimal threshold parameter K of the Perona-Malik anisotropic diffusion equation; the governing equation of the Perona-Malik anisotropic diffusion equation is: , , in, For image or surface height function, For virtual time variables, For gradient operators, For divergence operators, This is the diffusion coefficient function that depends on the magnitude of the local gradient.

5. The method for separating freeform surface shape error texture based on mask-aware physical information network according to claim 4, characterized in that, In step S03, within the reliable domain defined by the gradient safety mask, the Sobel gradient operator is used to calculate the gradient magnitude of the input data, generating the gradient magnitude distribution result.

6. The method for separating freeform surface shape error texture based on mask-aware physical information network according to claim 1, characterized in that, In step S04, the deep neural network integrating partial convolutional layers and spatial attention mechanisms is a U-Net encoder-decoder structure; the encoder includes multiple cascaded encoder modules, each of which includes a partially convolutional layer, a batch normalization layer, and an activation function layer connected in sequence; the decoder includes multiple cascaded decoder modules, each of which includes a transposed convolutional upsampling layer, a partially convolutional layer, a batch normalization layer, and an activation function layer connected in sequence; a skip connection path is set between the corresponding layers of the encoder and the decoder, and the spatial attention module is integrated in the skip connection path.

7. The method for separating freeform surface shape error texture based on mask-aware physical information network according to claim 6, characterized in that, In step S05, the model training process uses the AdamW optimizer to accelerate model convergence and sets the ReduceLROnPlateau learning rate scheduler to automatically decay the learning rate when the validation set loss stagnates.

8. The method for separating freeform surface shape error texture based on mask-aware physical information network according to claim 6, characterized in that, In step S04, the mask-aware hybrid loss function includes a weighted data fidelity term, a physical constraint term, and a total variation regularization term; and the weight coefficients corresponding to each term are determined by searching on the validation set.

9. The method for separating freeform surface shape error texture based on mask-aware physical information network according to claim 8, characterized in that, The data fidelity term is constructed based on the mask-aware mean square error method; the physical constraint term is constructed based on the anisotropic diffusion equation.

10. The method for separating freeform surface shape error texture based on mask-aware physical information network according to claim 1, characterized in that, In step S06, the method for fine-tuning the mask-aware physical information network model is as follows: a. Obtain the measurement 3D point cloud data of real industrial parts, and rigidly align and register the measurement 3D point cloud data with the CAD nominal model through the iterative nearest point algorithm; b. Convert the three-dimensional point cloud data into sample data represented by a two-dimensional height map through grayscale mapping; c. Calculate the normal deviation of the measured surface relative to the nominal surface to obtain the true machining error data, which includes the actual shape error, surface texture, and measurement noise; d. Generate pseudo-labels based on the surface topology type, and construct a domain-adaptive fine-tuning dataset based on the actual processing error data and the pseudo-labels; e. Fine-tune the mask-aware physical information network model pre-trained on the synthetic dataset using the domain-adaptive fine-tuning dataset.