Synthetic defect data generation method based on physical feature fusion

By establishing a database of real crack feature parameters and generating crack morphology using parameterized fractal functions, and combining this with the Poisson fusion algorithm to eliminate edge artifacts, the problem of scarce defect data and insufficient detection accuracy in stamping parts was solved. This enabled the efficient generation of realistic defect data and improved the detection performance of the deep learning model.

CN121236508APending Publication Date: 2025-12-30TIANJIN EAGLE EYE INTELLIGENT TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511271342.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2025-12-30

AI Technical Summary

Technical Problem

The low natural occurrence rate of cracking defects in stamped parts results in a number of real defect samples that are far less than the data scale required for training deep learning models. Existing defect data generation methods have poor accuracy and cannot simulate the microscopic features of real material fractures. Furthermore, the generated defect images suffer from physical distortion and edge artifacts.

Method used

The method for generating synthetic defect data based on physical feature fusion establishes a database of real crack feature parameters, uses parameterized fractal functions and elastic deformation algorithms to generate crack morphology, combines Poisson fusion algorithm to eliminate edge artifacts, and uses semi-automated tools to adjust defect data to generate synthetic defect data suitable for deep learning models.

Benefits of technology

It generated millions of high-precision defect data, with crack morphology consistent with stress field distribution, edge artifacts eliminated, and excellent model training results. The F1-score reached 0.97, and the false detection rate was reduced to 5.3%, which reduced the quality loss and data construction cost for enterprises and promoted the intelligent upgrade of industrial inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121236508A_ABST
    Figure CN121236508A_ABST
Patent Text Reader

Abstract

The invention discloses a synthetic defect data generation method based on physical feature fusion, and relates to the technical field of defect data generation, and the method comprises the steps: building a real crack feature parameter library of stamping part cracking defects; a parameterized fractal function is adopted to generate a fracture basic form; the Poisson fusion algorithm is used for achieving material sensing fusion of the crack and the stamping part substrate, and edge artifacts are eliminated; performing personalized adjustment on the initial synthetic defect image to generate final synthetic defect data; and using the generated synthetic defect data for deep learning model training. According to the method, a basic system of a real crack characteristic parameter library and CAE stress field data is constructed, a physical real crack form adaptive to a stress field is generated in combination with a parameterized fractal function, edge artifacts are eliminated through Poisson fusion, personalized adjustment is performed through a semi-automatic tool, defect parameters are fed back and optimized by relying on a deep learning model, and thus the crack quality is improved. And finally generating stamping part cracking synthesis defect data with physical authenticity and deep learning adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of defect data generation technology, specifically to a method for generating synthetic defect data based on physical feature fusion. Background Technology

[0002] As core structural components in industries such as automobiles, home appliances, and construction machinery, surface cracking defects of stamped parts directly affect product strength, safety, and service life. For example, cracking of the wheel arch reinforcement plate may lead to structural failure during driving, and cracking of the inner door panel will reduce the sealing performance of the car body. However, the natural occurrence rate of cracking defects in stamped parts is only 0.7% to 1.2%, and the number of real defect samples is far lower than the "million-level" data scale required for training deep learning models, forming a "data scarcity bottleneck" that seriously restricts the accuracy and generalization ability of defect detection models.

[0003] Traditional artificial synthesis methods have poor accuracy. The method of pasting crack images with PS can only simply superimpose crack shapes and cannot match the texture features of the substrate. This results in obvious brightness jumps and edge artifacts in the fused area. Traditional GAN-generated images have physical distortions. Simple PS pasting leads to edge artifacts. Moreover, existing solutions mostly extract the geometric features of cracks separately, ignoring key physical features such as fractal dimension and edge gradient. They also do not combine CAE stress field data for morphological constraints, resulting in cracks that are "similar in appearance but not in spirit" and cannot simulate the microscopic features of real material fracture.

[0004] In summary, existing defect data generation schemes suffer from drawbacks such as poor physical authenticity, low fusion quality, inflexible operation, and insufficient efficiency. There is an urgent need for a generation method that integrates physical features with a high-precision fusion algorithm to solve the core problems of data scarcity and insufficient detection accuracy. Summary of the Invention

[0005] To address the aforementioned technical problems, a method for generating synthetic defect data based on physical feature fusion is provided. This technical solution solves the problems mentioned above.

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

[0007] A method for generating synthetic defect data based on physical feature fusion includes:

[0008] Establish a database of real crack feature parameters for cracking defects in stamped parts, generate a crack distribution probability map based on CAE stress field data of stamped parts, and construct a basic data system for generating synthetic defects.

[0009] The basic crack morphology is generated by using a parameterized fractal function, and the crack morphology is adapted to the stress field distribution by combining an elastic deformation algorithm to ensure the physical reality of the crack.

[0010] The initial synthetic defect image is personalized by using a semi-automated defect generation tool to control the crack size, angle and fusion position, and generate the final synthetic defect data.

[0011] The generated synthetic defect data is used to train a deep learning model, and the defect generation parameters are optimized by combining model feedback to improve the applicability of the data.

[0012] Preferably, the step of establishing a database of real crack feature parameters for stamping defects, generating a crack distribution probability map based on CAE stress field data of stamping parts, and constructing a basic data system for generating synthetic defects specifically includes:

[0013] Real cracked defect samples of stamped parts were collected, and the sample images were segmented using a YOLOV8 segmentation network to extract the fractal dimension, main orientation angle distribution, and edge gradient features of the real cracks. The fractal dimension ranged from 1.25 to 0.15, the main orientation angle distribution was statistically analyzed in the range of 0° to 180°, and the edge gradient features were obtained by calculating using the Sobel operator.

[0014] Mechanical analysis of the stamped part was performed using Abaqus simulation software to obtain von Mises stress field data. Based on the stress values, the probability of crack formation was calculated, and a crack distribution probability map was generated. The calculation formula is as follows:

[0015]

[0016] In the formula, Let be the probability of crack generation. This is the von Mises stress value. Unit;

[0017] The extracted crack feature parameters are standardized, outliers are removed using the 3σ criterion, and stored according to fractal dimension, orientation angle, and gradient features to construct a structured real crack feature parameter library for subsequent crack morphology generation parameter calls.

[0018] The Poisson fusion algorithm is used to achieve material-aware fusion of cracks and stamping substrate, eliminate edge artifacts, and generate an initial synthetic defect image.

[0019] Preferably, the step of generating the basic crack morphology using a parameterized fractal function and combining it with an elastic deformation algorithm to adapt the crack morphology to the stress field distribution and ensure the physical realism of the crack specifically includes:

[0020] The Weierstrass function is chosen as the parameterized fractal function, and its function expression is:

[0021]

[0022] In the formula, The independent variable is defined as [0,1], corresponding to the normalized coordinates along the crack length direction. For the summation item index, from 0 to , To calculate the number of terms (10-15 terms, the more terms, the richer the crack details). =0.7, which is the amplitude attenuation coefficient, controlling the amplitude ratio of details at each level of the crack. =2.5, which is the frequency growth factor, controlling the rate of frequency change of crack details. Pi;

[0023] The stress gradient direction is extracted from the generated crack distribution probability map to determine the high-stress region, which is... Distribution range ≥0.6;

[0024] An elastic deformation algorithm was used to adjust the basic shape of the crack. Based on the thin plate spline interpolation method, the main direction of the crack was made consistent with the stress gradient direction of the high stress area. After adjustment, the consistency between the crack and the stress field distribution was ≥92%.

[0025] Preferably, the step of adjusting the basic crack morphology using an elastic deformation algorithm, based on a thin plate spline interpolation method, ensures that the main crack orientation aligns with the stress gradient direction in the high-stress region, achieving a consistency of ≥92% between the adjusted crack and the stress field distribution. Specifically, this includes:

[0026] Obtain the coordinate set of high-stress regions from the crack distribution probability map, and calculate the stress gradient vector of these regions.

[0027] Based on the stress gradient vector, an elastic deformation matrix is ​​constructed to transform the coordinates of the control points of the crack foundation morphology, so that the crack curvature is positively correlated with the stress value.

[0028] Through iterative optimization, the coverage ratio of the adjusted cracks in the high-stress area is ≥85%, thus achieving the adaptation of crack morphology to the stress field.

[0029] Preferably, the step of using the Poisson fusion algorithm to achieve material-aware fusion of the crack and the stamping substrate, eliminating edge artifacts, and generating an initial synthetic defect image specifically includes:

[0030] Acquire images of the stamping substrate, extract the texture gradient field V of the substrate (calculated by the difference of Gaussians operator), and determine the brightness and texture density characteristics of the substrate material.

[0031] Construct the Poisson fusion objective function, expressed as:

[0032]

[0033] In the formula, The optimal synthetic defect image obtained by the Poisson fusion algorithm is the final output fusion result without edge artifacts. The gradient field of the fused image. Let be the fused image variables to be solved. This is an initial superimposed image of the crack's basic morphology and the substrate. This is a weighting coefficient, ranging from 0.8 to 1.2, dynamically adjusted based on the complexity of the substrate texture. For substrate texture gradient field, It is an L2 norm;

[0034] The Poisson equation is solved using the conjugate gradient method, iterating until the objective function converges. The convergence condition is that the residual ≤ 10⁻ 4 Generate an initial synthetic defect image without edge artifacts;

[0035] Peak signal-to-noise ratio (PSNR) is detected on the initial synthesized defect image to ensure that the PSNR is >42dB. If it does not meet the requirement, the weight coefficient values ​​are adjusted and the image is re-fused until it meets the requirements.

[0036] Preferably, the step of using a semi-automated defect generation tool to personalize the initial synthetic defect image, controlling the crack size, angle, and fusion position, to generate the final synthetic defect data specifically includes:

[0037] Start the semi-automatic defect generation tool and load the feature parameter library built by S103 and the initial synthetic defect image generated by S304;

[0038] It provides a visual operation interface and supports the following functions: selecting mask style, adjusting mask angle, controlling mask scaling ratio, and loading single or folder target substrate images;

[0039] The manual input of crack fusion location in substrate image, tool automatically calls elastic deformation algorithm to adapt to local substrate texture, and generates adjusted synthetic defect image, supports image rollback, mask clearing, and current image saving operations to ensure traceability of generation process;

[0040] The adjusted synthetic defect images can be exported in batches, with a generation efficiency of 1200 images per minute, meeting the needs of millions of deep learning datasets.

[0041] Preferably, the manual specification of the crack fusion location in the substrate image, and the tool automatically calls an elastic deformation algorithm to adapt to the local texture of the substrate, generating an adjusted synthetic defect image, supporting image rollback, mask clearing, and current image saving operations, ensuring the traceability of the generation process, specifically including:

[0042] Once the fusion location is manually specified, the tool automatically extracts the local texture gradient of the substrate at that location and matches it with the gradient field of the crack morphology.

[0043] If the local texture complexity is high (gradient variance > 50), the λ value is automatically increased to enhance texture blending; if the local texture is simple (gradient variance ≤ 50), the λ value is decreased. Values ​​preserve crack details;

[0044] After adjustments are made, a preview image is generated, which can be manually confirmed. If the confirmation is successful, it is saved as the final synthesized defect data; otherwise, the parameters are readjusted.

[0045] Preferably, the step of using the generated synthetic defect data for deep learning model training, and optimizing the defect generation parameters based on model feedback to improve data applicability specifically includes:

[0046] The final synthesized defect data was divided into training set, validation set and test set in a ratio of 7:1:2, and the crack type was labeled as a tag.

[0047] The training set was input into the ResNet-50 deep learning model for detecting cracking defects in stamped parts, and the model was trained using the Adam optimization algorithm.

[0048] The model performance is evaluated using a validation set to obtain accuracy, recall, and F1-score. If F1-score < 0.95, the model returns to the point where a parameterized fractal function is used to generate the basic crack morphology. The elastic deformation algorithm is then used to adapt the crack morphology to the stress field distribution to ensure the physical authenticity of the crack. The fractal function parameters are then adjusted, and the defect data is regenerated.

[0049] The optimized model was finally tested using the test set to ensure that the model's F1-score was ≥ 0.97, the false positive rate was ≤ 5.3%, and the training convergence speed was ≤ 75 epochs.

[0050] Preferably, the step of evaluating model performance using a validation set to obtain accuracy, recall, and F1-score, and if F1-score < 0.95, returning to the method of generating the basic crack morphology using a parameterized fractal function, combining it with an elastic deformation algorithm to adapt the crack morphology to the stress field distribution to ensure the physical reality of the crack, adjusting the fractal function parameters, and regenerating the defect data specifically includes:

[0051] If the validation set evaluation shows that the model's accuracy in identifying cracks is <90%, then in S101, the number of crack samples collected will be increased, and the number of parameters of the corresponding type in the feature parameter library will be expanded.

[0052] If the model's training set accuracy minus the validation set accuracy is greater than 10%, then increase the texture diversity of the synthetic defect data in S4.

[0053] After regenerating the defect data, repeat the training and evaluation until the model performance meets the target.

[0054] Preferably, the real crack feature parameter library for establishing the stamping part cracking defect, generating a crack distribution probability map based on the CAE stress field data of the stamping part, and constructing the basic data system for generating synthetic defects, the real crack samples collected need to cover different stamping part types, including wheel arch reinforcement plates and door inner panels, with ≥500 samples for each type;

[0055] The method of generating the basic crack morphology using parametric fractal functions and combining it with elastic deformation algorithms to adapt the crack morphology to the stress field distribution and ensure the physical reality of the crack. The number of summation terms in the parametric fractal function can be adjusted according to the material of the stamping part: 12-15 terms for metal stamping parts and 10-12 terms for non-metallic materials.

[0056] The method utilizes the Poisson fusion algorithm to achieve material-aware fusion of cracks and stamping substrate, eliminates edge artifacts, and generates an initial synthetic defect image with an iterative solution time of ≤0.5 seconds per image for Poisson fusion, ensuring batch generation efficiency. The final generated synthetic defect data must meet the following requirements: crack edge continuity PSNR≥73.6dB and stress field compliance≥92%.

[0057] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0058] This invention effectively solves the problem of scarce defect samples in stamping parts, and can generate millions of data points in batches, adapting to various stamping part scenarios. It integrates stress field constraints and fractal functions, with over 92% of cracks located in high-stress areas and their microstructures closely matching real fracture patterns. It eliminates edge artifacts through Poisson fusion, achieving an F1-score of 0.97 and reducing the false detection rate to 5.3% in the trained model. The tool supports flexible adjustment of crack parameters and can optimize data applicability through closed-loop feedback, reducing enterprise quality losses and data construction costs while promoting the intelligent and digital upgrade of industrial inspection. Attached Figure Description

[0059] Figure 1 This is a flowchart outlining the steps of the present invention.

[0060] Figure 2 This is the core flowchart of the present invention;

[0061] Figure 3 This is the overall flowchart of the present invention. Detailed Implementation

[0062] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.

[0063] Reference Figure 1 As shown, the method for generating synthetic defect data based on physical feature fusion includes:

[0064] S1: Establish a database of real crack feature parameters for stamping parts cracking defects, generate a crack distribution probability map based on CAE stress field data of stamping parts, and construct a basic data system for generating synthetic defects.

[0065] S2: The basic crack morphology is generated using a parameterized fractal function, and the crack morphology is adapted to the stress field distribution by combining an elastic deformation algorithm to ensure the physical reality of the crack.

[0066] S3: The initial synthetic defect image is personalized by using a semi-automated defect generation tool to control the crack size, angle and fusion position, and generate the final synthetic defect data.

[0067] S4: Use the generated synthetic defect data for deep learning model training, and combine model feedback to optimize defect generation parameters and improve data applicability.

[0068] S1 specifically includes:

[0069] S101: Collect real crack defect samples of stamped parts, use the YOLOV8 segmentation network to segment the sample images, and extract the fractal dimension, main direction angle distribution and edge gradient features of the real cracks; where the fractal dimension ranges from 1.25±0.15, the main direction angle distribution is statistically analyzed in the range of 0°-180°, and the edge gradient features are obtained by calculating using the Sobel operator.

[0070] S102: Mechanical analysis of the stamped part was performed using Abaqus simulation software to obtain von Mises stress field data. Based on the stress values, the crack formation probability was calculated, and a crack distribution probability map was generated. The calculation formula is as follows:

[0071]

[0072] In the formula, Let be the probability of crack generation. This is the von Mises stress value. Unit;

[0073] S103: The extracted crack feature parameters are standardized, outliers are removed using the 3σ criterion, and stored according to fractal dimension, orientation angle, and gradient features to build a structured real crack feature parameter library for subsequent crack morphology generation parameter calls.

[0074] The YOLOV8 segmentation network is introduced to accurately extract multi-dimensional features (fractal dimension, orientation angle, edge gradient) of real cracks. Combined with Abaqus mechanical simulation, crack distribution probability maps are generated. The parameter library is standardized by the 3σ criterion to solve the problems of coarse traditional feature extraction and lack of physical and mechanical basis, thus laying a data foundation for the realism of synthetic cracks.

[0075] S104: The Poisson fusion algorithm is used to realize the material-aware fusion of the crack and the stamping substrate, eliminate edge artifacts, and generate an initial synthetic defect image.

[0076] S2 specifically includes:

[0077] S201: The Weierstrass function is selected as the parameterized fractal function, and its function expression is:

[0078]

[0079] In the formula, The independent variable is defined as [0,1], corresponding to the normalized coordinates along the crack length direction. For the summation item index, from 0 to , To calculate the number of terms (10-15 terms, the more terms, the richer the crack details). =0.7, which is the amplitude attenuation coefficient, controlling the amplitude ratio of details at each level of the crack. =2.5, which is the frequency growth factor, controlling the rate of frequency change of crack details. Pi;

[0080] S202: Extract the stress gradient direction from the crack distribution probability map generated in S102 to determine the high-stress region. The high-stress region is... Distribution range ≥0.6;

[0081] S203: The crack foundation morphology is adjusted using an elastic deformation algorithm. Based on the thin plate spline interpolation method, the main crack orientation is aligned with the stress gradient direction in the high-stress region. After adjustment, the consistency between the crack and the stress field distribution is ≥92%.

[0082] By selecting the Weierstrass fractal function and precisely controlling the richness of crack details through parameters (number of summation terms, amplitude / frequency coefficient), and combining it with the stress field to determine the high-stress region (≥0.6), the elastic deformation algorithm of thin plate spline interpolation is used to make the consistency between the crack and the stress field ≥92%, thus solving the problem of the disconnect between traditional fractal cracks and actual stress distribution and poor physical rationality.

[0083] S203 specifically includes:

[0084] Obtain the coordinate set of high-stress regions from the crack distribution probability map, and calculate the stress gradient vector of these regions.

[0085] Based on the stress gradient vector, an elastic deformation matrix is ​​constructed to transform the coordinates of the control points of the crack foundation morphology, so that the crack curvature is positively correlated with the stress value.

[0086] Through iterative optimization, the coverage ratio of the adjusted cracks in the high-stress area is ≥85%, thus achieving the adaptation of crack morphology to the stress field.

[0087] S104 specifically includes:

[0088] S1041: Acquire images of stamping substrates, extract the texture gradient field V of the substrate (calculated by the difference of Gaussians operator), and determine the brightness and texture density characteristics of the substrate material.

[0089] S1042: Construct the Poisson fusion objective function, the expression of which is:

[0090]

[0091] In the formula, The optimal synthetic defect image obtained by the Poisson fusion algorithm is the final output fusion result without edge artifacts. The gradient field of the fused image. Let be the fused image variables to be solved. This is an initial superimposed image of the crack's basic morphology and the substrate. This is a weighting coefficient, ranging from 0.8 to 1.2, dynamically adjusted based on the complexity of the substrate texture. For substrate texture gradient field, It is an L2 norm;

[0092] S1043: Solve the Poisson equation using the conjugate gradient method, iterating until the objective function converges. The convergence condition is that the residual ≤ 10⁻. 4 Generate an initial synthetic defect image without edge artifacts;

[0093] S1044: Perform peak signal-to-noise ratio (PSNR) detection on the initial synthesized defect image to ensure that the PSNR is >42dB. If it does not meet the requirement, adjust the weight coefficient values ​​and re-fuse until it meets the requirement.

[0094] A Poisson fusion objective function with dynamic weighting coefficients (0.8-1.2) is constructed, and material-aware fusion is achieved by combining it with the substrate texture gradient field. The conjugate gradient method is used to achieve fast convergence (residual ≤10⁻). 4 By eliminating edge artifacts through quantization detection with PSNR>42dB, the problem of texture disjointness and harsh edges in traditional fusion algorithms is solved, thereby improving the visual realism of the synthesized image.

[0095] S3 specifically includes:

[0096] S301: Start the semi-automatic defect generation tool and load the feature parameter library constructed in S103 and the initial synthetic defect image generated in S304;

[0097] S302: Provides a visual operation interface, supporting the following functions: selecting Mask style, adjusting Mask angle, controlling Mask scaling ratio, and loading single or folder target substrate images;

[0098] S303: Manually specify the crack fusion position in the substrate image, and the tool automatically calls the elastic deformation algorithm to adapt to the local texture of the substrate and generate an adjusted synthetic defect image. It supports image rollback, mask clearing and current image saving operations to ensure that the generation process is traceable.

[0099] S304: Batch export of adjusted synthetic defect images with a generation efficiency of 1200 images per minute, meeting the needs of million-level deep learning datasets;

[0100] A semi-automated defect generation tool was designed, which allows for flexible adjustment of crack parameters (style, angle, scaling) through a visual interface, supports operation traceability (rollback, saving), and achieves a batch export efficiency of 1200 images / minute. This solves the problems of low efficiency, inflexible parameter adjustment, and difficulty in meeting the needs of large-scale datasets in traditional manual generation.

[0101] S303 specifically includes:

[0102] Once the fusion location is manually specified, the tool automatically extracts the local texture gradient of the substrate at that location and matches it with the gradient field of the crack morphology.

[0103] If the local texture complexity is high (gradient variance > 50), the λ value is automatically increased to enhance texture blending; if the local texture is simple (gradient variance ≤ 50), the λ value is decreased. Values ​​preserve crack details;

[0104] After adjustments are made, a preview image is generated, which can be manually confirmed. If the confirmation is successful, it is saved as the final synthesized defect data; otherwise, the parameters are readjusted.

[0105] S4 specifically includes:

[0106] S401: Divide the final synthetic defect data into training set, validation set and test set in a ratio of 7:1:2, and label the crack type as a label;

[0107] S402: Input the training set into the ResNet-50 deep learning model for detecting cracking defects in stamped parts, and train the model using the Adam optimization algorithm;

[0108] S403: Evaluate the model performance using the validation set, and obtain the accuracy, recall, and F1-score. If the F1-score < 0.95, return to S2 to adjust the fractal function parameters and regenerate the defect data.

[0109] S404: Perform a final test on the optimized model using the test set to ensure that the model's F1-score is ≥ 0.97, the false positive rate is ≤ 5.3%, and the training convergence speed is ≤ 75 epochs.

[0110] S403 specifically includes:

[0111] If the validation set evaluation shows that the model's accuracy in identifying cracks is <90%, then in S101, the number of crack samples collected will be increased, and the number of parameters of the corresponding type in the feature parameter library will be expanded.

[0112] If the model's training set accuracy minus the validation set accuracy is greater than 10%, then increase the texture diversity of the synthetic defect data in S4.

[0113] After regenerating the defect data, repeat the training and evaluation process according to S501-S503 until the model performance meets the standards.

[0114] We propose targeted model performance optimization strategies: expanding the sample size of the real feature library when accuracy is low, increasing the texture diversity of synthetic data when overfitting occurs, accurately locating problems in the data generation process and making targeted adjustments, avoiding blind optimization, and improving data iteration efficiency and model performance improvement.

[0115] The real crack samples collected in S1 need to cover different types of stamped parts, including wheel arch reinforcement plates and door inner panels, with ≥500 samples for each type;

[0116] The number of summation terms in the parameterized fractal function in S2 can be adjusted according to the material of the stamping part: 12-15 terms for metal stamping parts and 10-12 terms for non-metallic materials.

[0117] The iterative solution time for Poisson fusion in S104 is ≤0.5 seconds per frame to ensure batch generation efficiency. The final generated synthetic defect data must meet the following requirements: crack edge continuity PSNR≥73.6dB and stress field compliance≥92%.

[0118] In summary, the advantages of this invention are:

[0119] Relying on semi-automated defect generation tools and parameterized fractal functions, the batch generation efficiency reaches 1200 images per minute, and a defect dataset of millions can be built in a few hours, completely solving the problem of insufficient real samples;

[0120] It supports the generation of defects for multiple types of stamped parts (wheel cover reinforcement plates, door inner panels, etc.), with a sample coverage of ≥500 real features for each type, and the scene adaptability of the generated data is more than 3 times better than the existing solutions.

[0121] By integrating von Mises stress field data from Abaqus simulations and constraining crack locations using crack generation probability formulas, it is ensured that over 92% of cracks occur in high-stress areas, fully conforming to the mechanical mechanism of material fracture.

[0122] Fractal cracks were generated using the Weierstrass fractal function, with the fractal dimension controlled at 1.25±0.15, which is highly consistent with the microscopic fracture morphology of real cracks, thus solving the problem of "similar in form but not in spirit".

[0123] Based on the Poisson fusion algorithm, material-aware fusion of cracks and substrate is achieved. The fused image PSNR is >42dB (40.7% improvement compared to the traditional PS pasting of 52.3dB), completely eliminating artifacts such as edge brightness jumps and texture discontinuity.

[0124] The size and fusion position of the crack can be freely controlled, and the fusion weight can be dynamically adjusted according to the local texture complexity of the substrate to adapt to the surface morphology differences of different stamped parts.

[0125] It supports loading substrate images in single or batch formats, and the operation process is traceable. Data generation can be completed without professional algorithm knowledge, thus lowering the barrier to entry for junior engineers.

[0126] To reduce product recalls and rework costs caused by "missed or false detections due to insufficient data," a certain auto parts company has found that this can reduce quality losses by more than 30%.

[0127] It does not rely on the collection of a large number of real defect samples and has high batch generation efficiency. The cost of building defect data for a single production line is reduced by 60%, which helps the manufacturing industry upgrade from "manual inspection" to "intelligent technical prevention" and is in line with the trend of industrial digital transformation.

[0128] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.

Claims

1. A method for generating synthetic defect data based on fusion of physical characteristics, characterized in that, The method comprises the following steps: S1: Establish a real crack feature parameter library of stamping part cracking defects, generate a crack distribution probability graph based on CAE stress field data of the stamping part, and construct a basic data system for generating synthetic defects; S2: Generate a crack basic form using a parameterized fractal function, and adapt the crack form to the stress field distribution using an elastic deformation algorithm to ensure the physical reality of the crack; S3: Adjust the initial synthetic defect image through a semi-automatic defect generation tool to control the size, angle and fusion position of the crack, and generate the final synthetic defect data; S4: Use the generated synthetic defect data for deep learning model training, optimize the defect generation parameters based on model feedback, and improve the data applicability. 2.The method of claim 1, wherein, S101: Collect real cracking defect samples of stamping parts, segment the sample images using a YoloV8 segmentation network, and extract the fractal dimension, main strike angle distribution and edge gradient features of the real cracks; wherein the fractal dimension value range is 1.25±0.15, the main strike angle distribution is counted according to the 0°-180° interval, and the edge gradient feature is calculated by a Sobel operator; S102: Perform mechanical analysis on the stamping part using Abaqus simulation software to obtain von Mises stress field data, calculate the crack generation probability based on the stress value, and generate a crack distribution probability graph, with the calculation formula being: S103: Standardize the extracted crack feature parameters, remove outliers using the 3σ criterion, store them according to the fractal dimension, strike angle and gradient feature, and construct a structured real crack feature parameter library for subsequent parameter calling for crack form generation; wherein is the crack generation probability, is the von Mises stress value, is the unit; S104: Use Poisson fusion algorithm to realize the material perception fusion of the crack and the stamping part substrate, eliminate edge artifacts, and generate an initial synthetic defect image. S201: Select Weierstrass function as the parameterized fractal function, with the function expression being: 3.The method of claim 1, wherein, S203: Adjust the crack basic form using an elastic deformation algorithm, and make the crack main strike direction consistent with the stress gradient direction of the high stress area based on the thin plate spline interpolation method, with the consistency of the adjusted crack and stress field distribution being ≥92%. S203 specifically comprises: wherein, is the normalized coordinate along the length of the crack, with value range [0, 1], is the summation index, from 0 to , is the summation number, = 0.7, is the amplitude decay coefficient, controlling the amplitude proportion of each level of crack details, = 2.5, is the frequency growth coefficient, controlling the frequency variation rate of crack details, is the constant of the circle; S202: Extract the stress gradient direction from the crack distribution probability map generated in S102, determine the high stress area, which is a distribution range of ≥ 0.

6. Obtain the coordinate set of the high stress area in the crack distribution probability graph, and calculate the stress gradient vector of the area; 4.The method of claim 3, wherein, Take the stress gradient vector as the reference to construct an elastic deformation matrix, transform the control point coordinates of the crack basic form, and make the crack curvature positively correlated with the stress value; Through iterative optimization, the coverage ratio of the adjusted crack in the high stress area is ≥85%, and the adaptation of the crack form and the stress field is completed. S104 specifically comprises: Construct a Poisson fusion objective function, with the expression being: 5.The method of claim 2, wherein, Perform peak signal-to-noise ratio detection on the initial synthetic defect image to ensure that the peak signal-to-noise ratio is >42dB, and if not, adjust the weight coefficient value for re-fusion until the requirement is met. Collecting a stamping substrate image, calculating a texture gradient field of the substrate by a Gaussian difference operator , determining brightness and texture density features of the substrate material S3 specifically comprises: In the formula, is the optimal synthetic defect image obtained by the Poisson fusion algorithm, that is, the final output fusion result without edge artifacts, is the gradient field of the fused image, is the to-be-solved fusion image variable, is the initial superimposed image of the crack basic form and the substrate, is a weight coefficient, and the value is 0.8-1.2, which is dynamically adjusted according to the substrate texture complexity, is the substrate texture gradient field, is an L2 norm; The Poisson equation is solved by using a conjugate gradient method, and iteration is performed until the objective function converges, with a convergence condition of residual error ≤10⁻ 4 , to generate an initial synthetic defect image without edge artifacts; S301: Start the semi-automatic defect generation tool, load the feature parameter library constructed in S103 and the initial synthetic defect image generated in S304; 6.The method of claim 1, wherein, ​ ​ S302: Provide a visual operation interface to support the following functions: select Mask style, adjust Mask angle, control Mask scaling ratio, and load single and folder target substrate image; S303: Manually specify the crack fusion position in the substrate image, and the tool automatically calls the elastic deformation algorithm to adapt to the local texture of the substrate to generate an adjusted synthesized defect image. Support image rollback, Mask emptying, and current image saving operation to ensure traceability during generation; S304: Batch export the adjusted synthesized defect image to generate an efficiency of 1200 images per minute, meeting the needs of million-level deep learning data sets. 7.The method of claim 6, wherein, The S303 specifically includes: After manually specifying the fusion position, the tool automatically extracts the local texture gradient of the substrate at that position and matches it with the gradient field of the crack morphology; If the local texture complexity is high, the gradient variance is greater than 50, the value of λ is automatically increased to enhance the texture fusion degree; if the local texture is simple, the gradient variance is less than or equal to 50, the value of λ is reduced to retain the crack details ​ After adjustment, a preview image is generated to support manual confirmation. If the confirmation is passed, the final synthesized defect data is saved, otherwise the parameters are adjusted again. 8.The method according to claim 1, wherein, The S4 specifically includes: S401: Divide the final synthesized defect data into training set, validation set, and test set in a ratio of 7:1:2, and label the crack type as the label; S402: Input the training set into the stamping part cracking defect detection ResNet-50 deep learning model, and use the Adam optimization algorithm to train the model; S403: Evaluate the model performance with the validation set to obtain the accuracy, recall rate, and F1-score. If the F1-score is less than 0.95, return to S2 to adjust the fractal function parameters and regenerate the defect data; S504: Finally test the optimized model with the test set to ensure that the model F1-score is greater than or equal to 0.97, the false detection rate is less than or equal to 5.3%, and the training convergence speed is less than or equal to 75 epochs. 9.The method of claim 8, wherein, The S403 specifically includes: If the validation set evaluation shows that the model's crack identification accuracy is less than 90%, increase the sample collection amount of cracks in S101 to expand the number of parameters of the corresponding type in the feature parameter library; If the model's accuracy on the training set minus the accuracy on the validation set is greater than 10%, increase the texture diversity of the synthesized defect data in S4; After regenerating the defect data, repeat the training and evaluation according to the S501-S503 process until the model performance meets the standards.

10. The synthesized defect data generation method based on physical feature fusion according to claim 1, wherein: The real crack samples collected in S1 need to cover different stamping part types, including wheel cover reinforcement plates and door inner plates, and the number of samples for each type is greater than or equal to 500; The number of summation terms of the parameterized fractal function in S2 can be adjusted according to the stamping part material: 12-15 terms for metal stamping parts and 10-12 terms for non-metal stamping parts; The iteration solving time of Poisson fusion in S104 is less than or equal to 0.5 seconds per image to ensure batch generation efficiency. The synthesized defect data generated finally needs to meet the crack edge continuity PSNR greater than or equal to 73.6dB and the stress field coincidence degree greater than or equal to 92%.

Citation Information

Cited By

  • Road long-tail disease data synthesis method based on pavement degradation logic and linkage evolution

    CN121937308A

  • Road long-tail disease data synthesis method based on pavement degradation logic and chain evolution

    CN121937308B