A method and system for industrial image data enhancement and defect generation based on diffusion model
By using a deep learning-based diffusion model in industrial image data augmentation, image data containing simulated defects is generated, and the problem of lack of flexibility and diversity in the prior art is solved, and a more efficient defect detection effect is achieved.
Patent Information
- Application Number
- CN202411354537.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-09-27
AI Technical Summary
The prior art lacks flexibility and diversity in industrial image data augmentation and defect detection, making it difficult to effectively generate image data containing various potential defects.
The original industrial image data is processed using a diffusion model based on deep learning, defect image data containing simulated defects is generated, and the distribution characteristics of image data are adjusted by controlling the attributes of the generated defects to improve the generation quality.
It improves the flexibility and diversity of defect detection, and the generated defect image data is closer to the real defect image data, which enhances the training effect of machine learning models.
Smart Images

Figure CN118887117B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of defect detection technology, and in particular to a method and system for industrial image data enhancement and defect generation based on a diffusion model. Background Art
[0002] With the development of Industry 4.0, smart manufacturing has put forward higher requirements for product quality control. Traditional rule-based manual inspection methods can no longer meet the speed and accuracy requirements of modern production lines. Automated quality inspection systems have become an inevitable choice, and high-quality training data is one of the key factors to ensure the performance of these systems. However, in actual production environments, due to the low frequency or difficulty in reproducing certain types of defects, the amount of data available for training is insufficient, which limits the effectiveness of machine learning models. Therefore, it is particularly important to develop an industrial image data enhancement method that can efficiently generate various types of potential defects.
[0003] Currently, industrial image data enhancement mainly relies on geometric transformations (such as rotation, scaling, flipping, etc.) and changes in lighting conditions to increase the diversity of training sets.
[0004] For defect detection, known defect samples are added to normal product images through synthesis technology, but this method is usually limited to predefined defect types and appearances and lacks flexibility and diversity. Summary of the invention
[0005] The embodiments of the present application provide a method and system for industrial image data enhancement and defect generation based on a diffusion model, so as to solve the problem of lack of flexibility and diversity in defect detection in the prior art.
[0006] In a first aspect, an embodiment of the present application provides an industrial image data enhancement and defect generation method based on a diffusion model, comprising:
[0007] Obtain original industrial image data;
[0008] Processing the original industrial image data using a diffusion model based on deep learning to generate defect image data including simulated defects;
[0009] Controlling the properties of generated defects through the diffusion model to adjust the distribution characteristics of the defect image data;
[0010] evaluating the generation quality of the diffusion model according to the distribution characteristics of the defect image data, wherein the generation quality is used to indicate the ability of the diffusion model to generate simulated defects under different noise levels;
[0011] The diffusion model is adjusted according to the generated quality, and the acquired current industrial image data is input into the adjusted diffusion model, and the current industrial image data is enhanced or corresponding image defects are generated through the adjusted diffusion model to output target industrial image data.
[0012] Optionally, controlling the properties of the generated defects by the diffusion model to adjust the distribution characteristics of the defect image data includes:
[0013] Analyzing the distribution law of the defect image data;
[0014] Collecting and recording the distribution law data;
[0015] Wherein, the analyzing the distribution law of the defect image data includes:
[0016] Using a multi-scale feature extraction method to extract local features and global features of the defect image data;
[0017] Applying a high-dimensional space mapping technology to map the local features and the global features into a high-dimensional space to enhance the expressiveness of the local features and the global features;
[0018] The importance weights of the local features and the global features are adjusted using an adaptive learning mechanism to determine the distribution law of the defect image data.
[0019] Optionally, the processing of the original industrial image data using a diffusion model based on deep learning to generate defect image data containing simulated defects includes:
[0020] Converting the raw industrial image data into an input format suitable for the diffusion model;
[0021] Using the diffusion model, adding random noise to the original industrial image data;
[0022] gradually removing random noise from the original industrial image data, determining simulated defects based on a difference between a process of adding random noise and a process of removing random noise, and generating defect image data containing the simulated defects based on the simulated defects;
[0023] Wherein, the stepwise removal of random noise in the original industrial image data comprises: according to a predetermined noise reduction strategy, gradually reducing the random noise until the similarity between the defect image data containing simulated defects generated by the diffusion model and the original industrial image data meets a preset threshold;
[0024] The noise reduction strategy includes: adopting a non-uniform sampling strategy to dynamically adjust the step size and frequency of noise reduction according to the generation error of the diffusion model.
[0025] Optionally, the evaluating the generation quality of the diffusion model according to the distribution characteristics of the defect image data includes:
[0026] Calculating the similarity between the defect image data generated by the diffusion model and the real defect image data according to the distribution characteristics of the defect image data;
[0027] measuring a convergence rate of the diffusion model;
[0028] calculating a training time of the diffusion model in a process of generating defect image data;
[0029] measuring a recovery time required for the diffusion model to recover to a stable state after generating defect image data;
[0030] Measuring interference changes of defect image data generated by the diffusion model, wherein the interference changes at least include a divergence of a feature vector field, a gradient of the feature vector field, and a Laplace operator of the feature vector field;
[0031] Based on the similarity, the convergence speed, the training time, the recovery time and the interference change, the generation quality of the diffusion model is calculated by a generation quality calculation formula;
[0032] Wherein, the generated quality calculation formula includes:
[0033] ;
[0034] in, is the generated quality of the diffusion model, represents the first The feature vector of defect image data, Represents the feature vector of the corresponding real defect image data, It is represented as the diffusion model generating the first The noise level when the defect image data is Expressed as the sample size, and They represent the divergence of the eigenvector field and the weight coefficient of the gradient of the eigenvector field, respectively. represents the divergence of the eigenvector field, represents the gradient of the eigenvector field, represents the Laplacian of the eigenvector field, is the weight coefficient of the Laplace term;
[0035] in, It is used to measure the similarity between the defect image data generated by the diffusion model and the real defect image data. represents the convergence speed, Indicates the training time, represents the recovery time, where , represents the number of iterations required to reach convergence, Represents the weight coefficient of convergence speed, training time and recovery time, Represented as a small positive number to prevent division by zero errors.
[0036] Optionally, it also includes:
[0037] By formula: , calculating the generation time stability of the diffusion model;
[0038] in, represents the generation time stability, Indicates the generation of The duration of the iteration, represents the expected iteration duration, is the smoothness weight coefficient, Indicates the smoothness of the iteration duration series;
[0039] Based on the generation time stability of the diffusion model, modifying the generation quality;
[0040] Among them, the revised generation quality formula is expressed as:
[0041] ;
[0042] in, represents the corrected build quality, represents the generation time stability, Represents a weight coefficient between 0 and 1, which is used to adjust the influence of temporal stability on the generated quality.
[0043] Optionally, the processing of the original industrial image data by using a diffusion model based on deep learning to generate defect image data containing simulated defects further includes:
[0044] In the process of processing the original industrial image data, the rate of change of the noise level in the diffusion model is controlled to generate defect image data containing simulated defects;
[0045] The controlling of the noise level change rate in the diffusion model includes: simulating a nonlinear noise change path by setting a starting point, an end point and a turning point in the middle of the noise change; and using the formula: , calculating the consistency of the noise change path; adjusting the noise level change rate in the diffusion model based on the consistency of the noise change path;
[0046] in, represents the consistency of the noise change path, represents the noise level at the jth turning point, represents the initial noise level, represents the number of turning points, is the consistency weight coefficient, represents the variance of the noise level variation, is the weight coefficient of the skewness term, Indicates the skewness of the variation in the noise level.
[0047] Optionally, after adjusting the diffusion model according to the generated quality, the method further includes:
[0048] Record the generative effects of the adjusted diffusion model at different noise levels;
[0049] analyzing the development of defects in the generated effect to determine the generative capability of the diffusion model;
[0050] The analyzing the defect development in the generated effect includes: recording the development trend of defects under different noise levels, wherein the development trend includes at least the number, size, shape and change rate of defects; and using the formula: , assess the complexity of the defect development;
[0051] in, Indicates the complexity of the defect development situation. represents the development degree of the k-th defect, Indicates the degree of development of the real defect, Indicates the number of defects, is the complexity weight coefficient, complexity Indicates the complexity of defect development;
[0052] By formula: , predict the adaptability of the adjusted diffusion model in specific application scenarios;
[0053] in, Expressed as adaptability, Expressed as a constant related to the model complexity, is the generated quality, Expressed as the rate of change of the noise level, Expressed as the sample size, is another weight coefficient, entropy Represents probability distribution The entropy of is the robustness weight coefficient, robustness Indicates the robustness of the model to disturbances;
[0054] By formula: , predict the comprehensive performance of the adjusted diffusion model in a specific application scenario;
[0055] in, Indicates comprehensive performance, Indicates adaptability, is the proportion of adaptability contribution in the comprehensive performance, Indicates functional evaluation, is the reliability weight coefficient, Indicates the reliability of the model prediction.
[0056] In a second aspect, an embodiment of the present application provides an industrial image data enhancement and defect generation system based on a diffusion model, comprising:
[0057] An acquisition module, used to acquire original industrial image data;
[0058] A generation module, configured to process the original industrial image data using a diffusion model based on deep learning to generate defect image data containing simulated defects;
[0059] An adjustment module, configured to control the properties of generated defects through the diffusion model to adjust the distribution characteristics of the defect image data;
[0060] An evaluation module, configured to evaluate the generation quality of the diffusion model according to the distribution characteristics of the defect image data, wherein the generation quality is used to indicate the ability of the diffusion model to generate simulated defects under different noise levels;
[0061] A processing module is used to adjust the diffusion model according to the generated quality, and input the acquired current industrial image data into the adjusted diffusion model, perform image enhancement on the current industrial image data or generate corresponding image defects through the adjusted diffusion model to output target industrial image data.
[0062] In a third aspect, an embodiment of the present application provides a computing device, comprising a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement an industrial image data enhancement and defect generation method based on a diffusion model as described in any one of the first aspects.
[0063] In a fourth aspect, an embodiment of the present application provides a computer storage medium storing a computer program. When the computer program is executed by a computer, it implements an industrial image data enhancement and defect generation method based on a diffusion model as described in any one of the first aspects.
[0064] In an embodiment of the present application, original industrial image data is acquired; the original industrial image data is processed using a diffusion model based on deep learning to generate defect image data containing simulated defects; the properties of generated defects are controlled by the diffusion model to adjust the distribution characteristics of the defect image data; the generation quality of the diffusion model is evaluated according to the distribution characteristics of the defect image data, and the generation quality is used to indicate the ability of the diffusion model to generate simulated defects under different noise levels; the diffusion model is adjusted according to the generation quality, and the acquired current industrial image data is input into the adjusted diffusion model, and the current industrial image data is enhanced or the corresponding image defects are generated by the adjusted diffusion model to output the target industrial image data. The technical solution provided by the present application can improve the flexibility of defect detection.
[0065] These and other aspects of the present application will become more apparent from the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0067] Figure 1 A flowchart of a method and system for industrial image data enhancement and defect generation based on a diffusion model provided in an embodiment of the present application;
[0068] Figure 2 A schematic diagram of the structure of a method and system for industrial image data enhancement and defect generation based on a diffusion model provided in an embodiment of the present application;
[0069] Figure 3 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0070] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0071] In some of the processes described in the specification and claims of this application and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.
[0072] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0073] Figure 1 A flowchart of a method for industrial image data enhancement and defect generation based on a diffusion model is provided for an embodiment of the present application, such as Figure 1 As shown, the method includes:
[0074] 101. Obtain original industrial image data;
[0075] In this step, the main concept involved is "raw industrial image data". Raw industrial image data refers to image data collected directly from industrial production lines without any processing, usually used for quality inspection, fault diagnosis and other purposes. These images can contain the appearance and internal structure of the product and other information that is helpful for analysis. Obtaining raw industrial image data is the basis for subsequent image processing and analysis, ensuring the authenticity and integrity of the data.
[0076] In the embodiments of the present application, in order to ensure the representativeness and reliability of the image data, it is necessary to obtain the original image data from an actual industrial production line. The specific embodiments are as follows:
[0077] Image acquisition:
[0078] Select a representative area from an actual production line, such as the body welding area on an automobile manufacturing line. The production situation in this area is stable, the product quantity is sufficient, and it is suitable for image acquisition.
[0079] Image acquisition equipment:
[0080] Use professional industrial cameras for image acquisition. Industrial cameras usually have high resolution and high speed, and can adapt to harsh industrial environments. For example, the ICM-2000 industrial camera has a pixel of up to 5 million and a frame rate of up to 60fps, which can capture clear images.
[0081] Image acquisition settings:
[0082] Make necessary settings for the camera, including exposure time, gain and other parameters, to ensure the quality of the acquired image. Assume that the exposure time is 10ms and the gain is set to 12dB, so that a clear and stable image can be obtained under changing lighting conditions.
[0083] Image acquisition process:
[0084] During the operation of the production line, the industrial camera is started regularly to collect images. Assume that an image is collected every 10 seconds, and a total of 100 images are collected so that there is enough data for subsequent processing.
[0085] Image Storage:
[0086] The captured images are saved to a local server to ensure data security and integrity. For example, a data storage server model DS-5000 is used to store large amounts of image data and support fast access.
[0087] Image data format:
[0088] The collected images are stored in JPEG format, which is a common image compression format that can reduce storage space while retaining image quality. Assuming that the resolution of each image is 1280×960 pixels and the compression ratio is set to 80%, each image occupies approximately 200KB of storage space.
[0089] Image data preprocessing:
[0090] Before the image is officially used for defect detection, it needs to be preprocessed, such as grayscale, noise reduction, etc. For example, grayscale processing is performed using functions in OpenCV (open source computer vision library) so that subsequent defect detection algorithms can more accurately identify potential defects.
[0091] Image data annotation:
[0092] The collected images are annotated to mark the known defect locations as part of the training data set. Assume that 10 out of 100 images contain known defects, and an average of 5 defect locations are annotated on each image.
[0093] Through the above steps, we can obtain a batch of complete original industrial image data, providing a reliable data foundation for the subsequent deep learning-based defect detection model training.
[0094] 102. Processing the original industrial image data using a diffusion model based on deep learning to generate defect image data containing simulated defects;
[0095] Optionally, in step 102, “processing the original industrial image data using a diffusion model based on deep learning to generate defect image data containing simulated defects” includes: converting the original industrial image data into an input format suitable for the diffusion model; adding random noise to the original industrial image data using the diffusion model; gradually removing the random noise in the original industrial image data, and determining simulated defects based on the difference between the process of adding random noise and removing random noise, and generating defect image data containing simulated defects based on the simulated defects;
[0096] Among them, the stepwise removal of random noise in the original industrial image data includes: according to a predetermined noise reduction strategy, gradually reducing the random noise until the similarity between the defect image data containing simulated defects generated by the diffusion model and the original industrial image data meets a preset threshold; the noise reduction strategy includes: adopting a non-uniform sampling strategy to dynamically adjust the step size and frequency of noise reduction according to the generation error of the diffusion model.
[0097] Optionally, in step 102, “processing the original industrial image data using a diffusion model based on deep learning to generate defect image data containing simulated defects” further includes:
[0098] In the process of processing the original industrial image data, the rate of change of the noise level in the diffusion model is controlled to generate defect image data containing simulated defects;
[0099] Wherein, controlling the noise level change rate in the diffusion model includes: simulating a nonlinear noise change path by setting a starting point, an end point and a turning point in the middle of the noise change;
[0100] By formula: , calculating the consistency of the noise change path; adjusting the noise level change rate in the diffusion model based on the consistency of the noise change path;
[0101] in, represents the consistency of the noise change path, represents the noise level at the jth turning point, represents the initial noise level, represents the number of turning points, is the consistency weight coefficient, represents the variance of the noise level variation, is the weight coefficient of the skewness term, Indicates the skewness of the variation in the noise level.
[0102] In this step, the main concepts involved are "diffusion model based on deep learning", "random noise", "noise reduction strategy" and "noise level change rate".
[0103] The deep learning-based diffusion model is a machine learning technique that generates new data samples by adding random noise to the data and gradually removing the noise. This model is able to learn the data distribution and generate new samples that are similar to the real data.
[0104] Random noise is a random variation added to the original data to disrupt the original data patterns, so that the diffusion model can learn how to restore these patterns in the process of removing noise.
[0105] Noise reduction strategy refers to a method to gradually remove random noise in the diffusion model. This method allows the model to start from a highly noisy state and gradually recover to a state close to the original data, which helps the model learn the true distribution of the data.
[0106] The noise level change rate refers to the speed at which the amount of noise changes during the diffusion process. Controlling this rate can help the model better simulate real-world defect conditions.
[0107] In the embodiment of the present application, data preparation:
[0108] First, we select a portion of defect-free images from the original industrial image dataset obtained in step 101 as input. Assume that we select 500 such images, each with a size of 256x256 pixels.
[0109] Data format conversion:
[0110] In order to make these images processable by the diffusion model, we need to convert them into a format suitable for model input. Usually this means normalizing the images to between 0 and 1, and it may be necessary to convert the images into tensor form. For example, this can be easily done using the PyTorch library in Python.
[0111] Noise addition:
[0112] Next, we add random noise to these images using a deep learning-based diffusion model. The addition of random noise can be achieved by adding random numbers from a normal distribution to the image data. For example, a noise matrix with a mean of 0 and a standard deviation of 1 can be generated using the numpy library and added to the image data.
[0113] Noise reduction strategies:
[0114] The noise reduction process follows a non-uniform sampling strategy, which dynamically adjusts the step size and frequency of noise reduction according to the model's generation error at each denoising stage. This means that the model will reduce the noise more carefully where the generation error is large.
[0115] Control the rate at which the noise level changes:
[0116] In order to control the rate of change of the noise level, we define a nonlinear noise change path and use the formula , to calculate the consistency of this path. Suppose we set 3 turning points , the initial noise level is , the noise levels at the turning points are , the consistency weight coefficient is , the weight coefficient of the skewness term is Based on these parameters, we can calculate the consistency value at each turning point and adjust the rate of change of the noise level in the model accordingly.
[0117] Generate defect image data:
[0118] Finally, the diffusion model will generate defect image data containing simulated defects according to the process of adding and removing random noise. The process is considered complete when the similarity between the generated image and the original industrial image data reaches a preset threshold. Assuming the preset threshold is 0.95, we measure the similarity by comparing the Structural Similarity Index (SSIM) between the generated image and the original image.
[0119] In this way, we are able to generate a batch of defect image data containing simulated defects for training detection models or evaluating the performance of existing models.
[0120] 103. Controlling the properties of generated defects through the diffusion model to adjust the distribution characteristics of the defect image data;
[0121] Optionally, in step 103, “the step of controlling the properties of the generated defects by the diffusion model to adjust the distribution characteristics of the defect image data” includes: analyzing the distribution law of the defect image data; collecting and recording the distribution law data;
[0122] Among them, the analysis of the distribution law of the defect image data includes: using a multi-scale feature extraction method to extract local features and global features of the defect image data; applying high-dimensional space mapping technology to map the local features and the global features into a high-dimensional space to enhance the expression ability of the local features and the global features; using an adaptive learning mechanism to adjust the importance weights of the local features and the global features to determine the distribution law of the defect image data.
[0123] In this step, the main concepts involved include "multi-scale feature extraction method", "high-dimensional space mapping technology" and "adaptive learning mechanism".
[0124] Multi-scale feature extraction method: This is an image processing technique that aims to extract features of images from different scales. In this scenario, it can be used to extract local features (such as edges, textures, etc.) and global features (such as overall shape, structural layout, etc.) from defect image data.
[0125] High-dimensional space mapping technology: This refers to the technology of mapping data in low-dimensional space to high-dimensional space, with the purpose of enhancing the expressiveness of features. In machine learning, common high-dimensional space mapping technologies include principal component analysis (PCA) and locally linear embedding (LLE).
[0126] Adaptive learning mechanism: This is a machine learning method that automatically adjusts algorithm parameters to better suit the characteristics of the data set. In this step, it is used to adjust the importance weights of features to optimize the distribution law analysis of defect image data.
[0127] In the embodiment of the present application, it is assumed that we have obtained defect image data containing simulated defects, and the next step is to analyze the distribution law of these image data. First, a multi-scale feature extraction method is used to extract local features and global features in the image. For example, different levels of convolutional neural networks (CNNs) can be used to extract features of different scales.
[0128] Specifically, a pre-trained ResNet-50 model is used, which has multiple convolutional layers that can extract information at different scales from images. For example, the first few layers may focus on the edges and textures in the image (local features), while the deeper layers focus more on the overall shape and structure (global features).
[0129] In order to enhance the expressive power of features, we map the extracted features to a high-dimensional space. This can be achieved by increasing the feature dimension, such as using PCA technology to map features to a higher-dimensional space, so that different types of features can be more clearly distinguished.
[0130] Next, we use an adaptive learning mechanism to adjust the importance weights of local and global features. This can be achieved by continuously updating the model parameters during the training process, ensuring that those features that can better describe the defect distribution pattern are given higher weights. For example, if certain local features (such as edges) are found to be particularly important for identifying specific types of defects, these features can be given higher weights.
[0131] Finally, we record the distribution law data obtained from the analysis as a basis for adjusting the distribution characteristics of the defect image data in the future. For example, if the analysis results show that edge features are crucial for the identification of a certain type of defect, then we will strengthen this feature when generating new defect image data.
[0132] Suppose we use the ResNet-50 model to extract the features of 500 defect image data and map them to a higher dimensional space using PCA technology. Under the action of the adaptive learning mechanism, we find that the weight of edge features is significantly higher than other features. Therefore, when recording the distribution law data, we emphasize the importance of edge features and strengthen the performance of edge features when generating new defect image data, thereby adjusting the distribution characteristics of the defect image data.
[0133] 104. Evaluate the generation quality of the diffusion model according to the distribution characteristics of the defect image data, wherein the generation quality is used to indicate the ability of the diffusion model to generate simulated defects under different noise levels;
[0134] Optionally, the step 104 of “evaluating the generation quality of the diffusion model according to the distribution characteristics of the defect image data” includes: calculating the similarity between the defect image data generated by the diffusion model and the real defect image data according to the distribution characteristics of the defect image data; measuring the convergence speed of the diffusion model; calculating the training time of the diffusion model in the process of generating defect image data; measuring the recovery time required for the diffusion model to recover to a stable state after generating the defect image data; measuring the interference change to the defect image data generated by the diffusion model, wherein the interference change includes at least the divergence of the feature vector field, the gradient of the feature vector field and the Laplace operator of the feature vector field; and calculating the generation quality of the diffusion model by generating a quality calculation formula based on the similarity, the convergence speed, the training time, the recovery time and the interference change; wherein the generation quality calculation formula includes:
[0135] ;
[0136] in, is the generated quality of the diffusion model, represents the first The feature vector of defect image data, Represents the feature vector of the corresponding real defect image data, It is represented as the diffusion model generating the first The noise level when the defect image data is Expressed as the sample size, and They represent the divergence of the eigenvector field and the weight coefficient of the gradient of the eigenvector field, respectively. represents the divergence of the eigenvector field, represents the gradient of the eigenvector field, represents the Laplacian of the eigenvector field, is the weight coefficient of the Laplace term;
[0137] in, It is used to measure the similarity between the defect image data generated by the diffusion model and the real defect image data. represents the convergence speed, Indicates the training time, represents the recovery time, where , represents the number of iterations required to reach convergence, Represents the weight coefficient of convergence speed, training time and recovery time, Represented as a small positive number to prevent division by zero errors.
[0138] In this step, the main concepts involved include "similarity", "convergence speed", "training time", "recovery time", "interference change" and their corresponding weight coefficients.
[0139] Similarity: refers to the similarity between the generated defect image data and the real defect image data in terms of features. It is measured by comparing the difference in feature vectors between the two.
[0140] Convergence speed: It is a measure of the speed at which the model reaches the predetermined standard during training. It is usually expressed by the number of iterations.
[0141] Training time: refers to the total time required for the model to complete one training.
[0142] Recovery time: refers to the time required for the model to return to a stable state after generating defect image data. This indicator reflects the stability and efficiency of the model.
[0143] Interference changes: This refers to the interference changes to the generated defect image data, including the divergence, gradient, and Laplace operator of the feature vector field. These changes reflect the quality and stability of the generated data.
[0144] In the embodiment of the present application, similarity calculation: Assume that we have a set of generated defect image datasets and corresponding real defect image datasets. To calculate the similarity, we first extract the feature vector of each image, and then use the Euclidean distance to measure the difference between the generated image and the real image. For example, for the feature vector of the generated i-th image and the corresponding real image feature vector , the similarity can be calculated by the following formula:
[0145] ;
[0146] in, is the noise level when the image was generated, represents the number of samples, is a small positive number to avoid division by zero errors.
[0147] Convergence speed measurement: Convergence speed The number of iterations required to reach convergence can be calculated by To measure the convergence speed is defined as:
[0148] ;
[0149] here Also to prevent division by zero errors.
[0150] Training time and recovery time: Training time Refers to the time required for a model to complete one round of training. Recovery time It refers to the time required for the model to return to a stable state after generating defect image data.
[0151] Disturbance variation measure: Disturbance variation through the divergence of the eigenvector field ,gradient And the Laplace operator laplacian These indicators reflect the stability of the generated image data relative to the real data.
[0152] Finally, the generated quality Q is calculated by the following formula:
[0153] ;
[0154] in, is the generated quality of the diffusion model, represents the first The feature vector of defect image data, Represents the feature vector of the corresponding real defect image data, It is represented as the diffusion model generating the first The noise level when the defect image data is Expressed as the sample size, and They represent the divergence of the eigenvector field and the weight coefficient of the gradient of the eigenvector field, respectively. represents the divergence of the eigenvector field, represents the gradient of the eigenvector field, represents the Laplacian of the eigenvector field, is the weight coefficient of the Laplace term;
[0155] in, It is used to measure the similarity between the defect image data generated by the diffusion model and the real defect image data. represents the convergence speed, Indicates the training time, represents the recovery time, where , represents the number of iterations required to reach convergence, Represents the weight coefficient of convergence speed, training time and recovery time, Represented as a small positive number to prevent division by zero errors.
[0156] The following is a specific embodiment:
[0157] Suppose we have 100 samples, the average difference in the feature vector of each sample is 0.01, and the noise level Both are 0.1, and the divergence ,gradient , Laplace laplacian , the number of iterations required for convergence , training time Seconds, recovery time seconds. The weight coefficients are set to: .
[0158] Substitute the formula to calculate the generated quality Q:
[0159] ;
[0160] Assume here Both are set to 0.001 to prevent division by zero errors.
[0161] but: ;
[0162] In this way, we are able to comprehensively evaluate the ability of the diffusion model to generate simulated defects at different noise levels.
[0163] 105. Adjust the diffusion model according to the generated quality, and input the acquired current industrial image data into the adjusted diffusion model, perform image enhancement on the current industrial image data or generate corresponding image defects through the adjusted diffusion model to output target industrial image data.
[0164] Optionally, in step 105, “after said adjusting the diffusion model according to said generation quality”, further comprises: recording the generation effect of the adjusted diffusion model under different noise levels; analyzing the development of defects in said generation effect to determine the generation capability of said diffusion model;
[0165] The analyzing the defect development in the generated effect includes: recording the development trend of defects under different noise levels, wherein the development trend includes at least the number, size, shape and change rate of defects; and using the formula: , assess the complexity of the defect development;
[0166] in, Indicates the complexity of the defect development situation. represents the development degree of the k-th defect, Indicates the degree of development of the real defect, Indicates the number of defects, is the complexity weight coefficient, complexity Indicates the complexity of defect development;
[0167] Among them, complexity This function is used to measure the complexity of defect development. You can consider defining this function from multiple perspectives, such as the diversity of defects (such as different shapes or patterns): a possible definition is to calculate the number of types of all defect types, or to calculate the entropy of the probability distribution of different defect types. Another idea is based on the complexity of the relationship between defects, such as dependencies or chain reactions between defects.
[0168] For example, for defect complexity in image generation, it can be defined as follows:
[0169] ;
[0170] in, is the defect distribution Pick, is an adjustment factor used to balance the effects of abstraction and variance. is the defect distribution The variance of .
[0171] By formula: , predict the adaptability of the adjusted diffusion model in specific application scenarios;
[0172] in, Expressed as adaptability, Expressed as a constant related to the model complexity, is the generated quality, Expressed as the rate of change of the noise level, Expressed as the sample size, is another weight coefficient, entropy Represents probability distribution The entropy of is the robustness weight coefficient, robustness Indicates the robustness of the model to disturbances;
[0173] Among them, robustness It is usually used to measure the robustness of the model to small changes in the input data. One possible definition method is to measure it based on the change in the output after the disturbance:
[0174] For classification tasks, it can be defined by the percentage of accuracy drop or the change in classification boundaries; for regression tasks, the variance or mean square error of the predicted value after adding a small perturbation to the input can be calculated. The specific form depends on the specific application scenario and technical implementation details.
[0175] For example, suppose you are working on an image classification task and want to measure how robust your model is to small perturbations of the input images.
[0176] Specific expression:
[0177] ;
[0178] in, is the number of test samples, It is The predicted probability distribution of clean images is It is The predicted probability distribution of an image after a small perturbation, represents the L2 norm (such as Euclidean distance).
[0179] By formula: , predict the comprehensive performance of the adjusted diffusion model in a specific application scenario;
[0180] in, Indicates comprehensive performance, Indicates adaptability, is the proportion of adaptability contribution in the comprehensive performance, Indicates functional evaluation, is the reliability weight coefficient, Indicates the reliability of the model prediction.
[0181] in, Functional evaluation: Functional evaluation can be a measure of the functional requirements for a specific application. This will depend on what the target function of the model is. For example, in an image generation task, This may involve the consistency of the generated image with the target style, or in speech synthesis, It could be something like the similarity of the synthesized speech to natural speech.
[0182] For example, suppose we are evaluating the functionality of an image generation model, we can define the functionality evaluation as follows:
[0183] ;
[0184] in, is the number of test samples, It is A real image, is the image generated by the model, yes and The mean square error between .
[0185] in, The reliability of model predictions usually refers to the stability and trustworthiness of the model's predictions. This can be measured by the consistency of the model's performance on different data sets, or by estimating the model's generalization ability through cross-validation methods. A common approach is to calculate statistics of the model's performance fluctuations on the validation set, such as the standard deviation or the width of the confidence interval.
[0186] In order to evaluate the reliability of the model prediction, it can be defined as follows:
[0187] ;
[0188] in, is an adjustment factor used to control the impact of standard deviation. Is the adaptability of the model on different data sets The standard deviation of .
[0189] The above are some possible examples of specific expressions. In actual applications, these expressions need to be adjusted according to specific application scenarios and technical requirements to ensure that they can accurately reflect the issues of concern.
[0190] In addition, the parameters in these formulas (such as and )The optimal value needs to be determined through experiments.
[0191] In this step, the following concepts are mainly involved:
[0192] Generation quality: Generation quality is a measure of the similarity between the data generated by the generative model and the real data. It reflects how well the model can capture and reproduce the characteristics of the real data.
[0193] Diffusion model: Diffusion model is a machine learning model that is often used to generate data. It generates new samples by gradually adding noise, and then removes the noise through a reverse process to restore the original data.
[0194] Defect development: In the process of generating images, some features that do not meet expectations may appear. These features are called defects. Defect development refers to the situation where these defects change as the model is trained or the noise level changes.
[0195] Adaptability: Adaptability measures the effectiveness of a model in a specific application environment, taking into account factors such as the model's generation quality, noise handling capabilities, and the complexity of the model itself.
[0196] Comprehensive performance: Comprehensive performance evaluates the overall performance of the model based on multiple dimensions such as model adaptability, functional evaluation, and reliability.
[0197] Generation time stability: Generation time stability refers to the consistency of the iteration time when the model generates data. A stable model should have a relatively consistent generation time, which is very important for practical applications.
[0198] In this embodiment of the application, assume that we are developing an image generation system for industrial inspection, which aims to assist the learning of inspection equipment by generating high-quality defect images. We will use the above steps to train and evaluate the model.
[0199] Generation Quality Adjustment: First, we adjust the diffusion model according to the generation quality (Q). The generation quality may be evaluated in many ways, such as by comparing the Structural Similarity Index (SSIM), Peak Signal-to-Noise Ratio (PSNR) or other image quality metrics between the generated images and the real images.
[0200] Defect development analysis: Next, we run the adjusted model at different noise levels and record the defect development in the generated images. Suppose we choose five different noise levels and generate 100 images at each noise level. We calculate the number, size, shape, and rate of change of defects at each noise level and use the formula:
[0201] ;
[0202] To evaluate the complexity of defect development, we assume that we find that defect development is more severe at a certain noise level, so we adjust the model parameters at that noise level to improve the situation.
[0203] In order to predict the adaptability of the model in a specific application scenario, we use the formula:
[0204] ;
[0205] in, is a constant related to the complexity of the model, is the generated quality, is the rate of change of the noise level, is the sample size, and is the weight coefficient, Represents probability distribution Entropy, robustness Indicates the robustness of the model to disturbances.
[0206] Suppose we have , ,but:
[0207] ;
[0208] Finally, we use the formula:
[0209] ;
[0210] To predict the comprehensive performance of the adjusted diffusion model in a specific application scenario. ,but:
[0211] ;
[0212] Optionally, it also includes:
[0213] By formula: , calculating the generation time stability of the diffusion model;
[0214] in, represents the generation time stability, Indicates the generation of The duration of the iteration, represents the expected iteration duration, is the smoothness weight coefficient, Indicates the smoothness of the iteration duration series;
[0215] Based on the generation time stability of the diffusion model, modifying the generation quality;
[0216] Among them, the revised generation quality formula is expressed as:
[0217] ;
[0218] in, represents the corrected build quality, represents the generation time stability, Represents a weight coefficient between 0 and 1, which is used to adjust the influence of temporal stability on the generated quality.
[0219] In this step, the main concepts involved include "generation quality", "defect development", "adaptability", "comprehensive performance" and "generation time stability".
[0220] Generation quality: It is a comprehensive evaluation of multiple factors such as the similarity between the data generated by the diffusion model and the real data, the model convergence speed, and the training time.
[0221] Defect development: refers to the trend of defect image data generated by the model changing with the noise level, including the number, size, shape and change rate of defects.
[0222] Adaptability: refers to the degree of applicability of the adjusted model in a specific application scenario, taking into account factors such as model complexity, generation quality, and the rate of change of noise levels.
[0223] Comprehensive performance: It is an overall performance evaluation of the model based on adaptability, combined with functional evaluation and model prediction reliability.
[0224] Generation time stability: It measures the consistency of iteration time when the model generates data, and is usually associated with the stability and efficiency of the model.
[0225] In the embodiment of the present application, the calculation generation time stability , and based on this correction, the generated mass is generated. Assume that we have represents the time of each iteration, It is the expected time, , smoothness ,but:
[0226] ;
[0227] Assumptions The values are:
[0228] ;
[0229] ,
[0230] but: ;
[0231] Finally, we generate time stability based on Correction of build quality :
[0232] ;
[0233] Assumptions ,but:
[0234] ;
[0235] Through the above examples, we demonstrated how to adjust the diffusion model based on the generation quality and use a series of evaluation metrics to ensure the effectiveness and reliability of the adjusted model in specific applications.
[0236] Figure 2 A structural diagram of an industrial image data enhancement and defect generation system based on a diffusion model is provided for an embodiment of the present application, such as Figure 2 As shown, the device comprises:
[0237] An acquisition module 21 is used to acquire original industrial image data;
[0238] A generating module 22, configured to process the original industrial image data using a diffusion model based on deep learning to generate defect image data containing simulated defects;
[0239] An adjustment module 23, configured to control the properties of generated defects through the diffusion model to adjust the distribution characteristics of the defect image data;
[0240] An evaluation module 24, configured to evaluate the generation quality of the diffusion model according to the distribution characteristics of the defect image data, wherein the generation quality is used to indicate the ability of the diffusion model to generate simulated defects under different noise levels;
[0241] The processing module 25 is used to adjust the diffusion model according to the generated quality, and input the acquired current industrial image data into the adjusted diffusion model, perform image enhancement on the current industrial image data or generate corresponding image defects through the adjusted diffusion model to output target industrial image data.
[0242] Figure 2 The industrial image data enhancement and defect generation system based on the diffusion model can be performed Figure 1 The implementation principle and technical effects of the industrial image data enhancement and defect generation method and system based on the diffusion model described in the illustrated embodiment are not repeated here. The specific manner in which each module and unit performs operations in the industrial image data enhancement and defect generation system based on the diffusion model in the above embodiment has been described in detail in the embodiment of the method, and will not be elaborated here.
[0243] In one possible design, Figure 2 The industrial image data enhancement and defect generation method and system based on the diffusion model of the embodiment shown can be implemented as a computing device, such as Figure 3 As shown, the computing device may include a storage component 31 and a processing component 32;
[0244] The storage component 31 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 32 .
[0245] The processing component 32 is used to: acquire original industrial image data; process the original industrial image data using a diffusion model based on deep learning to generate defect image data containing simulated defects; control the properties of generated defects through the diffusion model to adjust the distribution characteristics of the defect image data; evaluate the generation quality of the diffusion model based on the distribution characteristics of the defect image data, and the generation quality is used to indicate the ability of the diffusion model to generate simulated defects under different noise levels; adjust the diffusion model based on the generation quality, and input the acquired current industrial image data into the adjusted diffusion model, and perform image enhancement on the current industrial image data or generate corresponding image defects through the adjusted diffusion model to output target industrial image data.
[0246] The processing component 32 may include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing component may also be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0247] The storage component 31 is configured to store various types of data to support operations at the terminal. The storage component can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0248] Of course, the computing device may also include other components, such as input / output interfaces, display components, communication components, etc.
[0249] The input / output interface provides an interface between the processing component and the peripheral interface module, which may be an output device, an input device, etc.
[0250] The communication component is configured to facilitate, among other things, wired or wireless communications between the computing device and other devices.
[0251] Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processing components, storage components, etc. can be basic server resources rented or purchased from the cloud computing platform.
[0252] The present application also provides a computer storage medium storing a computer program, wherein the computer program can achieve the above-mentioned Figure 1 The illustrated embodiment provides a method and system for industrial image data enhancement and defect generation based on a diffusion model.
[0253] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0254] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0255] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0256] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for industrial image data enhancement and defect generation based on a diffusion model, characterized in that: include: Obtain original industrial image data; Processing the original industrial image data using a diffusion model based on deep learning to generate defect image data including simulated defects; Controlling the properties of generated defects through the diffusion model to adjust the distribution characteristics of the defect image data; evaluating the generation quality of the diffusion model according to the distribution characteristics of the defect image data, wherein the generation quality is used to indicate the ability of the diffusion model to generate simulated defects under different noise levels; adjusting the diffusion model according to the generated quality, inputting the acquired current industrial image data into the adjusted diffusion model, performing image enhancement on the current industrial image data or generating corresponding image defects through the adjusted diffusion model, so as to output target industrial image data; The controlling the properties of the generated defects by the diffusion model to adjust the distribution characteristics of the defect image data includes: Analyzing the distribution law of the defect image data; Collecting and recording the distribution law data; Wherein, the analyzing the distribution law of the defect image data includes: Using a multi-scale feature extraction method to extract local features and global features of the defect image data; Applying a high-dimensional space mapping technology to map the local features and the global features into a high-dimensional space to enhance the expressiveness of the local features and the global features; The importance weights of the local features and the global features are adjusted using an adaptive learning mechanism to determine the distribution law of the defect image data.
2. The method according to claim 1, characterized in that The processing of the original industrial image data by using a diffusion model based on deep learning to generate defect image data containing simulated defects includes: Converting the raw industrial image data into an input format suitable for the diffusion model; Using the diffusion model, adding random noise to the original industrial image data; gradually removing random noise from the original industrial image data, determining simulated defects based on a difference between a process of adding random noise and a process of removing random noise, and generating defect image data containing the simulated defects based on the simulated defects; Wherein, the stepwise removal of random noise in the original industrial image data includes: according to a predetermined noise reduction strategy, gradually reducing the random noise until the similarity between the defect image data containing simulated defects generated by the diffusion model and the original industrial image data meets a preset threshold; The noise reduction strategy includes: adopting a non-uniform sampling strategy to dynamically adjust the step size and frequency of noise reduction according to the generation error of the diffusion model.
3. The method according to claim 1, characterized in that The step of evaluating the generation quality of the diffusion model according to the distribution characteristics of the defect image data includes: Calculating the similarity between the defect image data generated by the diffusion model and the real defect image data according to the distribution characteristics of the defect image data; measuring a convergence rate of the diffusion model; calculating a training time of the diffusion model in a process of generating defect image data; measuring a recovery time required for the diffusion model to recover to a stable state after generating defect image data; Measuring interference changes of defect image data generated by the diffusion model, wherein the interference changes at least include a divergence of a feature vector field, a gradient of the feature vector field, and a Laplace operator of the feature vector field; Based on the similarity, the convergence speed, the training time, the recovery time and the interference change, the generation quality of the diffusion model is calculated by a generation quality calculation formula; Wherein, the generated quality calculation formula includes: ; in, is the generated quality of the diffusion model, represents the first The feature vector of defect image data, Represents the feature vector of the corresponding real defect image data, It is represented as the diffusion model generating the first The noise level when the defect image data is Expressed as the sample size, and They represent the divergence of the eigenvector field and the weight coefficient of the gradient of the eigenvector field, respectively. represents the divergence of the eigenvector field, represents the gradient of the eigenvector field, represents the Laplacian of the eigenvector field, is the weight coefficient of the Laplace term; in, It is used to measure the similarity between the defect image data generated by the diffusion model and the real defect image data. represents the convergence speed, Indicates the training time, represents the recovery time, where , represents the number of iterations required to reach convergence, Represents the weight coefficient of convergence speed, training time and recovery time, Represented as a small positive number to prevent division by zero errors.
4. The method according to claim 3, characterized in that Also includes: By formula: , calculating the generation time stability of the diffusion model; in, represents the generation time stability, Indicates the generation of The duration of the iteration, represents the expected iteration duration, is the smoothness weight coefficient, Indicates the smoothness of the iteration duration series; Based on the generation time stability of the diffusion model, modifying the generation quality; Among them, the revised generation quality formula is expressed as: ; in, represents the corrected build quality, represents the generation time stability, Represents a weight coefficient between 0 and 1, which is used to adjust the influence of temporal stability on the generated quality.
5. The method according to claim 1, characterized in that The method of processing the original industrial image data by using a diffusion model based on deep learning to generate defect image data containing simulated defects also includes: In the process of processing the original industrial image data, the rate of change of the noise level in the diffusion model is controlled to generate defect image data containing simulated defects; Wherein, controlling the noise level change rate in the diffusion model includes: simulating a nonlinear noise change path by setting a starting point, an end point and a turning point in the middle of the noise change; By formula: , calculating the consistency of the noise change path; adjusting the noise level change rate in the diffusion model based on the consistency of the noise change path; in, represents the consistency of the noise change path, represents the noise level at the jth turning point, represents the initial noise level, represents the number of turning points, is the consistency weight coefficient, represents the variance of the noise level variation, is the weight coefficient of the skewness term, Indicates the skewness of the variation in the noise level.
6. The method according to claim 1, characterized in that After adjusting the diffusion model according to the generated quality, the method further includes: Record the generative effects of the adjusted diffusion model at different noise levels; analyzing the development of defects in the generated effect to determine the generative capability of the diffusion model; The analyzing the defect development in the generated effect includes: recording the development trend of defects under different noise levels, wherein the development trend includes at least the number, size, shape and change rate of defects; and using the formula: , assess the complexity of the defect development; in, Indicates the complexity of the defect development situation. represents the development degree of the k-th defect, Indicates the degree of development of the real defect, Indicates the number of defects, is the complexity weight coefficient, complexity Indicates the complexity of defect development; By formula: , predict the adaptability of the adjusted diffusion model in specific application scenarios; in, Expressed as adaptability, Expressed as a constant related to the model complexity, is the generated quality, Expressed as the rate of change of the noise level, Expressed as the sample size, is another weight coefficient, entropy Represents probability distribution The entropy of is the robustness weight coefficient, robustness Indicates the robustness of the model to disturbances; By formula: , predict the comprehensive performance of the adjusted diffusion model in a specific application scenario; in, Indicates comprehensive performance, Indicates adaptability, is the proportion of adaptability contribution in the comprehensive performance, Indicates functional evaluation, is the reliability weight coefficient, Indicates the reliability of the model prediction.
7. An industrial image data enhancement and defect generation system based on a diffusion model, characterized in that: include: An acquisition module, used to acquire original industrial image data; A generation module, configured to process the original industrial image data using a diffusion model based on deep learning to generate defect image data containing simulated defects; An adjustment module, configured to control the properties of generated defects through the diffusion model to adjust the distribution characteristics of the defect image data; An evaluation module, configured to evaluate the generation quality of the diffusion model according to the distribution characteristics of the defect image data, wherein the generation quality is used to indicate the ability of the diffusion model to generate simulated defects under different noise levels; a processing module, configured to adjust the diffusion model according to the generated quality, input the acquired current industrial image data into the adjusted diffusion model, perform image enhancement on the current industrial image data or generate corresponding image defects through the adjusted diffusion model, so as to output target industrial image data; The controlling the properties of the generated defects by the diffusion model to adjust the distribution characteristics of the defect image data includes: Analyzing the distribution law of the defect image data; Collecting and recording the distribution law data; Wherein, the analyzing the distribution law of the defect image data includes: Using a multi-scale feature extraction method to extract local features and global features of the defect image data; Applying a high-dimensional space mapping technology to map the local features and the global features into a high-dimensional space to enhance the expressiveness of the local features and the global features; The importance weights of the local features and the global features are adjusted using an adaptive learning mechanism to determine the distribution law of the defect image data.
8. A computing device, characterized in that It comprises a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement an industrial image data enhancement and defect generation method based on a diffusion model as described in any one of claims 1 to 6.
9. A computer storage medium, characterized in that A computer program is stored, and when the computer program is executed by a computer, an industrial image data enhancement and defect generation method based on a diffusion model as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Part surface defect generation and embedding method based on diffusion model
CN117671429A
Small sample surface defect image generation method and system based on feedback reinforcement learning
CN117710349A