Industrial bearing data enhancement method based on visual words and diffusion model
By generating rich bearing fault data based on visual words and diffusion models, the problems of unstable GAN model training and single generated samples are solved, and the accuracy of fault diagnosis is improved.
Patent Information
- Application Number
- CN202510628432.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-05-15
AI Technical Summary
In the existing technology, the generative adversarial network (GAN) model is prone to non-convergence during training, the generative model and the discriminative model are highly coupled, and the problem of missing fault types is not considered, resulting in poor data augmentation effect.
A method based on visual words and diffusion model is adopted to generate grayscale images through continuous wavelet transform, extract interest points and cluster them, increase mapping relationships, and use diffusion model to generate rich samples. It is independent of the discriminant model and solves the problems of training instability and singleness of generated samples of GAN model.
The stability of the training process and the diversity of generated samples are achieved, which avoids model non-convergence and overfitting. The generated data can better support the accuracy of the fault diagnosis model.
Smart Images

Figure CN120705627A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of bearing fault detection, and in particular relates to an industrial bearing data enhancement method based on visual words and a diffusion model. Background Art
[0002] In industry, rolling bearings, as an integral rotating component of mechanical equipment, are highly susceptible to failure due to uneven force when operating conditions are disturbed. Failure to detect a fault promptly can lead to further damage, seriously threatening the safe operation of the mechanical system and even causing significant economic losses. Therefore, effective and accurate bearing fault diagnosis is crucial to ensuring the stable operation and productivity of rotating machinery systems.
[0003] Fault signals in rotating machinery primarily manifest as vibration signals. Traditional fault diagnosis methods focus on the natural frequency of vibration signals. However, methods based on machine learning and signal processing require manual acquisition of extensive expert knowledge, which varies depending on the fault mode. This results in lengthy preparation times and inaccurate accuracy. In recent years, fault diagnosis methods based on deep learning have demonstrated excellent performance and are widely used, capable of adaptively extracting features directly from fault data.
[0004] Generally speaking, deep learning methods require a large amount of balanced data from different categories for training when learning features. However, in industry, because mechanical equipment is often in a healthy state or the data is poorly stored, it is difficult to obtain a sufficient number of labeled fault samples. Conversely, a large number of healthy samples leads to an imbalance in data types, which poses a significant challenge for diagnostic models to learn features to identify faults.
[0005] An effective way to address this challenge is to sample new data from the original data distribution using a generative model. This involves expanding the number of faulty samples in the minority class. Currently, the main approach used to address this problem is the Generative Adversarial Network (GAN). While GANs have achieved some initial success in addressing imbalanced data, the difficulty of training adversarial generative models remains unresolved.
[0006] FDD is a fault monitoring technology for complex systems, designed to detect incipient faults and predict their impact on future system behavior. Deep learning, with its automated feature extraction and integrated classifiers, has garnered widespread attention in the field of fault diagnosis. Within bearing fault diagnosis, fault diagnosis based on vibration signals is a relatively mature area. Processing vibration signals using continuous wavelet transforms to convert time-frequency data into images, leveraging the advantages of neural networks in image recognition for fault diagnosis, has become a mainstream approach.
[0007] However, deep learning-based fault diagnosis generally faces problems such as insufficient data volume, insufficient fault types, lack of data universality, and single modality. With the continuous improvement of reliability and quality, in actual industrial scenarios, machines are in a healthy state most of the time, which means that obtaining sufficient fault samples is difficult. To address the shortcomings of the dataset, scholars have tried to incorporate expert knowledge systems, transfer learning, digital twins, and data augmentation. Data augmentation, by increasing the dataset, can completely solve the problem of insufficient data from the root, and has become a common method used by scholars. Compared with variant data generated by replication and interpolation techniques, synthetic data can take into account the influence of data distribution and generate more diverse samples. Synthetic data is data obtained by sampling from the original data distribution.
[0008] In the study of synthetic data, the Gan model has been widely adopted. Shao (Shao, Wang & Yan, 2018) developed a Gan-based ACGAN generation framework to generate one-dimensional raw data, and verified the effectiveness of the generated samples by training the classifier with generated samples. Gao (Gao, Deng & Yue, 2018) designed WGAN-GP and redesigned the loss function through Wasserstein distance to make the training process more stable. Fu (Fu & Wang, 2020) proposed a fault diagnosis method that combines GAN and SDAE, adding a penalty gradient to avoid the mode collapse of GAN. Li (Li, Zhong & Shao, 2022) proposed MACGAN based on ACGAN, and improved the compatibility between classification and discrimination by introducing a new framework. Chen (Chen, Shao & Dou, 2023) proposed ILoFGAN, which achieved data enhancement with very few samples on the planetary gearbox dataset through a local feature fusion strategy. As a relatively mature generative model, Gan was able to perform data augmentation tasks well in the early stages of research. However, its training process still encountered problems such as difficulty in convergence and vanishing gradients. Furthermore, previous research also suffered from the high coupling between data augmentation models and fault diagnosis models, making it difficult to transfer data augmentation models to other diagnostic models.
[0009] DDPM is a new diffusion model that has emerged in recent years, and its generation is more stable than Gan. Yu (Yu, Li & Huang, 2024) designed a reparameterized residual denoising model (ReF-DDPM) to achieve better feature representation by enhancing intra-layer and inter-layer features. Yang (Yang, Ye & Yuan, 2024) converted the original vibration signal into a time-frequency image input diffusion model and proposed a new data enhancement method based on the denoising diffusion probability model (DDPM). Zhao (Zhao, Zhang & Cao, 2024) achieved data enhancement on the Paderborn bearing dataset by converting one-dimensional vibration data into a two-dimensional time series graph through DDPM. Although the stability of the model has been improved, in the conditional generation process, there is only a mapping relationship between pre-set labels and images, and the effect is unknown in the type-missing enhancement task.
[0010] Combined with the above content, the shortcomings of the existing technology can basically be summarized as follows:
[0011] 1. The Gan model is prone to non-convergence: As a relatively mature generative model, the Gan model can effectively perform data augmentation tasks in the early stages of research. However, during training, the dynamic balance between the generator and the discriminator is often difficult to accurately grasp. The optimization objectives of the two constrain each other, making it easy for model parameters to fall into local optimal solutions during updates. As a result, the entire training process cannot steadily progress in the ideal direction, consuming a large amount of computing resources and time costs but failing to achieve the expected convergence effect.
[0012] 2. High coupling between the generative model and the discriminative model: In some research architectures, the generative model is embedded as a module within the discriminative model, resulting in a high degree of coupling between the generative model and the discriminative model. This makes data augmentation results difficult to transfer to other discriminative models.
[0013] 3. Failure to consider the lack of fault types: The existing generative model only has a mapping relationship between pre-set labels and images. The mapping relationship is simple and the generated data types are single, which can easily lead to overfitting of the discriminant model. Summary of the Invention
[0014] In response to the above-mentioned problems existing in the prior art, the purpose of the present invention is to provide an industrial bearing data enhancement method based on visual words and diffusion models. The generative model designed by this method is independent of the discriminative model, and the diffusion model is used to solve the problem that the Gan model is difficult to train. The feature vectors generated by visual words enrich the mapping relationship in the generation process, making the generated data more diverse.
[0015] In order to solve the above problems, the technical solutions adopted by the present invention are as follows:
[0016] A method for industrial bearing data enhancement based on visual words and diffusion model includes the following steps:
[0017] (1) Using an acceleration sensor to collect the vibration acceleration signal of the bearing as time series data, and converting the time series data into image data through continuous wavelet transform to obtain a grayscale image;
[0018] (2) Taking the extreme points of pixel density of the grayscale image as points of interest, extracting visual words and clustering the extracted results, and using the clustering results as sample features;
[0019] (3) Count the features of various samples in the grayscale image to obtain a histogram, and normalize the histogram to obtain the feature vector of each grayscale image;
[0020] (4) First, the diffusion model 1 is trained to obtain the mapping from the fault type label to the feature vector; then the diffusion model 2 is trained to obtain the mapping from the feature vector to the grayscale image.
[0021] Furthermore, in step (1), the process of performing continuous wavelet transform is:
[0022] (1.1) Slice the original one-dimensional vibration signal x[t] and divide x[t] into multiple lists x according to the window length L and step size S. i [t], where i is the index of the split list;
[0023] (1.2) Calculate the wavelet scale sequence where f c is the center frequency of the mother wavelet, totalscal is the scale size, and scale indices is the sequence of scale sizes;
[0024] (1.3) For each signal slice, The wavelet function is defined as in For the obtained W i (a,b), splicing to get:
[0025]
[0026] Then, for each matrix element Get the normalized matrix W X (a,b), and finally convert the matrix into a grayscale image.
[0027] Furthermore, in step (2), the process of detecting points of interest is as follows: for an image I whose pixel intensity is defined as I(x,y), a scale space L(x,y,σ)=G(x,y,σ)*I(x,y) is constructed by Gaussian kernels of different scales, where For the Gaussian blurred image L(x,y,σ), calculate its second-order partial derivative:
[0028]
[0029] Then the image corners are found through the corresponding Hessian matrix, where By calculating the determinant of the Hessian matrix, we can get:
[0030] det(H)=L xx (x,y,σ)×L yy (x,y,σ)-L xy (x,y,σ) 2
[0031] det(H) is used to describe the local intensity change of pixels and is expressed by Normalization is performed, and finally the points of interest (x, y) are filtered out according to P{(x, y, σ)|det(H)>threshold.
[0032] Furthermore, in step (2), after extracting the interest points, a descriptor is constructed by describing the pixel density around the interest points. The process is as follows: first, the main direction θ of each interest point (x, y, σ) is calculated. dominant , with the point of interest (x, y) as the center and 6σ as the radius to define the area Calculate the gradient amplitude magnitude(u,v) and angle angle(u,v) for each point (u,v) in the region:
[0033]
[0034] angle(u,v)=arctan2(G x (u,v),G y (u,v))
[0035]
[0036] Then divide the region R into six sector regions, each sector region bin[k] contains an angle interval of Calculate the gradient and histogram[k] for each sector bin[k]:
[0037]
[0038]
[0039] Determine the main direction θ based on the calculation results dominant =bin_center[k *], where k * is the largest index of histogram[k], bin_center[k * ] is the center direction of the corresponding angle interval;
[0040] Complete the main direction θ dominant After the calculation of , a side length patchsize = 20σ is selected according to the scale parameter σ, the center is the point of interest (x, y), and the eccentricity angle is θ dominant The square area S is rotated counterclockwise by θ dominant get Then the square area Divided into 16 small square blocks of equal size S i , each cell is divided into 25 equal-sized sub-blocks S i [j], calculate the pixel density partial derivative d along the u direction according to its center pixel (u,v) u and the partial derivative of pixel density along the v direction d v , for each block S i ,calculate:
[0041]
[0042] Finally As a square area Descriptor of .
[0043] Furthermore, the process of clustering the descriptors and describing the image is as follows: assuming that there are N descriptors B after extraction, k clusters C are defined. p , giving each cluster a center point Repeat this process until the cluster centers converge. In the clustering results, the clusters are visual words. The number of visual words in image I is counted to obtain the feature vector h of the image, where Among them, count(C j ) represents the visual word C in the image j The number of occurrences of .
[0044] Furthermore, in this method, both diffusion model 1 and diffusion model 2 include a diffusion phase and a sampling phase, where the target sample is defined as x t , t represents the current sample x t The step length from the final target x0, the label that controls the generation process is defined as C;
[0045] In the diffusion stage, the data distribution q(x) is transformed into a standard Gaussian distribution N(0,I) by adding Gaussian noise to the sample. The diffusion process is defined as:
[0046]
[0047] Among them, β t are predefined parameters;
[0048] Repeat the above process to get the transformation of original data into noise:
[0049]
[0050] By re-parameterizing, we can get the value of x0 at any time step. t Distribution:
[0051]
[0052] Thus we get a string of sample time pairs (x t ,∈ t ,t),t∈{0,1,2,...,T}, where∈ t is the noise actually added during the diffusion process;
[0053] In the sampling stage, by back-diffusion of a completely Gaussian noise, the final cost is:
[0054]
[0055] By re-parameterizing, we get x t-1 =μ θ (x t ,t,c)+σ t ∈,∈~N(0,I), according to the reverse formula, the mean is expressed as:
[0056]
[0057] θ represents the parameters in U-Net, The loss function is:
[0058]
[0059] Compared with the prior art, the present invention has the following beneficial effects:
[0060] (1) The training process of the present invention is more stable: DDPM is more stable than the Gan model, and the DDPM training mechanism has a clear and single goal, does not require complex adversarial balance, can solve the saddle point problem based on mathematical principles, and the loss function is simple and effective. The data processing process is asymptotically stable. These characteristics make the diffusion model less likely to experience instability such as imbalance, non-convergence, mode collapse, gradient vanishing or explosion during training;
[0061] (2) The samples of the present invention are richer: By adding mapping relationships, the present model can generate a richer sample model based on DDPM, implicitly covering the sample types missing in the training set. The richer samples can effectively avoid the overfitting problem of the classification model;
[0062] (3) The model architecture of the present invention is simple: the structure of the diffusion model is relatively simple, and is mainly designed around the process of adding and removing noise, such as denoising learning based on network structures such as U-Net. This relatively simple structure is not prone to complex internal conflicts and unstable factors during the training process. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 Schematic diagram of the model flow of the method in this embodiment;
[0064] Figure 2 Schematic diagram of the mapping relationship of the diffusion model in this embodiment; DETAILED DESCRIPTION
[0065] The present invention will be further described below with reference to specific embodiments.
[0066] The industrial bearing data enhancement method based on visual words and diffusion model described in the present invention mainly includes two parts: feature vector generation and image data generation. The specific steps are as follows:
[0067] (1) Using an acceleration sensor to collect the vibration acceleration signal of the bearing as time series data, the time series data is converted into image data through continuous wavelet transform to obtain a grayscale image;
[0068] Among them, the process of continuous wavelet transform is:
[0069] (1.1) Slice the original one-dimensional vibration signal x[t] and divide x[t] into multiple lists x according to the window length L and step size S. i [t], where i is the index of the split list;
[0070] (1.2) Calculate the wavelet scale sequence where f c is the center frequency of the mother wavelet, totalscal is the scale size, and scale indices is the sequence of scale sizes;
[0071] (1.3) For each signal slice, The wavelet function is defined as in For the obtained W i (a,b), splicing to get:
[0072]
[0073] Then, for each matrix element Get the normalized matrix W X (a,b), and finally convert the matrix into a grayscale image.
[0074] (2) Taking the extreme points of pixel density of the grayscale image as points of interest, extracting visual words and clustering the extracted results, and using the clustering results as sample features;
[0075] This process involves extracting feature vectors. Image processing in computer vision often relies on local features. We aim to develop a method for describing local features that balances uniqueness and robustness. Visual words are generated by detecting sparse, prominent points of interest in an image and constructing corresponding descriptors to describe the pixel density variations near these points. Finally, these descriptors are clustered to generate a "visual word" feature vector for each image.
[0076] Specifically, the detection process of interest points is as follows: for an image I whose pixel intensity is defined as I(x,y), a scale space L(x,y,σ)=G(x,y,σ)*I(x,y) is constructed by Gaussian kernels of different scales, where For the Gaussian blurred image L(x,y,σ), calculate its second-order partial derivative:
[0077]
[0078] Then the image corners are found through the corresponding Hessian matrix, where By calculating the determinant of the Hessian matrix, we can get:
[0079] det(H)=L xx (x,y,σ)×L yy (x,y,σ)-L xy (x,y,σ) 2
[0080] det(H) is used to describe the local intensity change of pixels and is expressed by Normalization is performed, and finally the points of interest (x, y) are filtered out according to P{(x, y, σ)|det(H)>threshold}.
[0081] The second step is to construct the descriptor. First, the main direction θ of each interest point (x, y, σ) is calculated. dominant , with the point of interest (x, y) as the center and 6σ as the radius to define the area Calculate the gradient amplitude magnitude(u,v) and angle angle(u,v) for each point (u,v) in the region:
[0082]
[0083] angle(u,v)=arctan2(G x (u,v),G y (u,v))
[0084]
[0085] Then divide the region R into six sector regions, each sector region bin[k] contains an angle interval of Calculate the gradient and histogram[k] for each sector bin[k]:
[0086]
[0087] Determine the main direction θ based on the calculation results dominant =bin_center[k * ], where k * is the largest index of histogram[k], bin_center[k * ] is the center direction of the corresponding angle interval;
[0088] Complete the main direction θ dominant After the calculation of , a side length patchsize = 20σ is selected according to the scale parameter σ, the center is the point of interest (x, y), and the eccentricity angle is θ dominant The square area S is rotated counterclockwise by θ dominant get Then the square area Divided into 16 small square blocks of equal size S i , each cell is divided into 25 equal-sized sub-blocks S i [j], calculate the pixel density partial derivative d along the u direction according to its center pixel (u,v) u and the partial derivative of pixel density along the v direction d v , for each block S i ,calculate:
[0089] b i =(∑d u ,∑d v ,∑|d u |,∑|d v |)∈R 4
[0090]
[0091] Finally As a square area Descriptor of .
[0092] The third step is to cluster the descriptors and describe the image. Assume that there are N descriptors B after extraction, and k clusters C are defined. p , giving each cluster a center point Repeat this process until the cluster centers converge. In the clustering results, the clusters are visual words. The number of visual words in image I is counted to obtain the feature vector h of the image, where Among them, count(C j ) represents the visual word C in the image j The number of occurrences of .
[0093] (3) Count the features of various samples in the grayscale image to obtain a histogram, and normalize the histogram to obtain the feature vector of each grayscale image;
[0094] (4) First, the diffusion model 1 is trained to obtain the mapping from the fault type label to the feature vector; then the diffusion model 2 is trained to obtain the mapping from the feature vector to the grayscale image.
[0095] In the training process of the diffusion model, both diffusion model 1 and diffusion model 2 include a diffusion phase and a sampling phase. Here, the target sample is defined as x t , t represents the current sample x t The step length from the final target x0, the label that controls the generation process is defined as C;
[0096] In the diffusion stage, the data distribution q(x) is transformed into a standard Gaussian distribution N(0,I) by adding Gaussian noise to the sample. The diffusion process is defined as:
[0097]
[0098] Among them, β t are predefined parameters;
[0099] Repeat the above process to get the transformation of original data into noise:
[0100]
[0101] By re-parameterizing, we can get the value of x0 at any time step. t Distribution:
[0102]
[0103] Thus we get a string of sample time pairs (x t ,∈t,t),t∈{0,1,2,...,T}, where∈ t is the noise actually added during the diffusion process;
[0104] In the sampling stage, by back-diffusion of a completely Gaussian noise, the final cost is:
[0105]
[0106] By re-parameterizing, we get x t-1 =μ θ (x t ,t,c)+σ t ∈,∈~N(0,I), according to the reverse formula, the mean is expressed as:
[0107]
[0108] θ represents the parameters in U-Net, The loss function is:
[0109]
[0110] This shows that the present invention adds a layer of mapping relationship to the diffusion process, that is, the generation process of the diffusion model is a Markov process, and the samples are generated step by step. Based on this principle, extending the generation process can improve the diversity of generated samples to a certain extent, but this improvement has an upper limit. This method improves the diversity of generated samples by modifying the mapping relationship of F(lable)→Picture to F1(lable)→F2(Feature Vector)→Picture without modifying the model.
[0111] like Figure 1 and Figure 2 As shown, an embodiment is selected as a reference for description.
[0112] Figure 1 The following figure shows a schematic diagram of the model flow for this method used in this embodiment. In the Data Preproccessing section, under Original Data, the bearing vibration signal extraction device is shown. The image source is the CWRU public dataset. The blue image on the right is a time-domain and frequency-domain plot of the vibration signal, representing a visualization of the original data. The blue image under Wavelet Transformation is obtained by applying a continuous wavelet transform to the vibration signal. This blue image is then converted to a grayscale image, resulting in the black-and-white image on the right.
[0113] In the Feature Extraction section, the grayscale image on the left is the final output from the Data Preprocessing section. The image to the right of the grayscale image represents points of interest, indicated by red circles. By constructing sample features for the detected points of interest, performing clustering, statistics, and normalization, we obtain the feature vector on the right.
[0114] In the DataAugmentation section, the original data is a vibration signal with original labels. The vibration signal is converted into a grayscale image through wavelet transform, and then the grayscale image is converted into a feature vector through Feature Extraction. The intuitive data structure is as follows:
[0115] Label FeatureVector Picture Normal 【0.1,0.2,···,1】 Picture1
[0116] Part a treats the feature vector as the target, represented in the figure as Y, where Y is the label, representing the original label of the image, such as normal, inner, etc. The diffusion model inputs the label as a conditional guide and outputs the corresponding feature vector.
[0117] Part b treats the grayscale image as the target and the feature vector as the conditional guide. The diffusion model inputs the feature vector as the conditional guide and outputs the grayscale image.
[0118] In the Fault Diagnosis section, add the grayscale images generated in the DataAugmentation section to the original dataset (there are only three grayscale images in the Data Preprocessing section, but the number is increased to six in the Fault Diagnosis section). Use the augmented dataset to train a classification model (independent of the model designed in this method) to improve its accuracy.
[0119] Figure 2As shown, in this embodiment, a schematic diagram of the mapping relationship of the diffusion model. Among them, the upper figure shows the mapping relationship of the traditional DDPM, and the black dot on the left represents the meaningless Gaussian noise sampled at the beginning. Using label guidance, through the sampling process, meaningful samples (pictures) are obtained, represented by red dots. The diversity of samples is related to the sampling step length. The longer the step length, the higher the diversity of samples. However, increasing the sampling step length cannot increase the diversity of samples indefinitely. According to the sampling formula on the upper right, it can be observed that as α approaches 1, the changes brought to the samples by each sampling step are smaller (this process is reasonable because the model tends to converge in the end. Otherwise, if a Gaussian noise turns back into noise after sampling, it means that the training of the model has failed). The limited sampling generation range is represented by the red dotted circle.
[0120] The following figure illustrates the generation process used by this method. Since increasing the sampling step size only increases diversity to a certain limit, increasing the mapping relationship can be used to increase the upper limit of sampling diversity. First, using labels as a guide, sampling generates feature vectors, completing the first mapping step. Then, using feature vectors as a guide, sampling generates images, completing the second mapping step, achieving richer image generation.
Claims
1. A method for industrial bearing data enhancement based on visual words and diffusion model, characterized in that: The following steps are involved: (1) Using an acceleration sensor to collect the vibration acceleration signal of the bearing as time series data, and converting the time series data into image data through continuous wavelet transform to obtain a grayscale image; (2) Taking the extreme points of pixel density of the grayscale image as points of interest, extracting visual words and clustering the extracted results, and using the clustering results as sample features; (3) Count the features of various samples in the grayscale image to obtain a histogram, and normalize the histogram to obtain the feature vector of each grayscale image; (4) First, train diffusion model 1 to obtain the mapping from fault type label to feature vector; Then the diffusion model 2 is trained to obtain the mapping from feature vector to grayscale image.
2. The industrial bearing data enhancement method based on visual words and diffusion model according to claim 1 is characterized in that: In step (1), the process of continuous wavelet transform is: (1.1) Slice the original one-dimensional vibration signal x[t] and divide x[t] into multiple lists x according to the window length L and step size S. i [t], where i is the index of the split list; (1.2) Calculate the wavelet scale sequence where f c is the center frequency of the mother wavelet, totalscal is the scale size, and scale indices is the sequence of scale sizes; (1.3) For each signal slice, The wavelet function is defined as in For the obtained W i (a,b), splicing to get: Then, for each matrix element Get the normalized matrix W X (a,b), and finally convert the matrix into a grayscale image.
3. The industrial bearing data enhancement method based on visual words and diffusion model according to claim 2 is characterized in that: In step (2), the process of detecting points of interest is as follows: for an image I whose pixel intensity is defined as I(x,y), a scale space L(x,y,σ)=G(x,y,σ)*I(x,y) is constructed by Gaussian kernels of different scales, where For the Gaussian blurred image L(x,y,σ), calculate its second-order partial derivative: Then the image corners are found through the corresponding Hessian matrix, where By calculating the determinant of the Hessian matrix, we can get: det(H)=L xx (x,y,σ)×L yy (x,y,σ)-L xy (x,y,s) 2 det(H) is used to describe the local intensity change of pixels and is expressed by Normalization is performed, and finally the points of interest (x, y) are filtered out according to P{(x, y, σ)|det(H)>threshold}.
4. The industrial bearing data enhancement method based on visual words and diffusion model according to claim 3 is characterized in that: In step (2), after extracting the interest point, the descriptor is constructed by describing the pixel density around the interest point. The process is as follows: first, the main direction θ of each interest point (x, y, σ) is calculated. dominant , with the point of interest (x, y) as the center and 6σ as the radius to define the area Calculate the gradient amplitude magnitude(u,v) and angle angle(u,v) for each point (u,v) in the region: angle(u,v)=arctan2(G x (u,v),G y (u,v)) Then divide the region R into six sector regions, each sector region bin[k] contains an angle interval of Calculate the gradient and historam[k] for each sector bin[k]: Determine the main direction θ based on the calculation results dominant =bin_center[k * ], where k * is the largest index of histogram[k], bin_center[k * ] is the center direction of the corresponding angle interval; Complete the main direction θ dominant After the calculation of , a side length patchsize = 20σ is selected according to the scale parameter σ, the center is the point of interest (x, y), and the eccentricity angle is θ dominant The square area S is rotated counterclockwise by θ dominant get Then the square area Divided into 16 small square blocks of equal size S i , each cell is divided into 25 equal-sized sub-blocks S i [j], calculate the pixel density partial derivative d along the y direction according to its center pixel (u, v) u and the partial derivative of pixel density along the v direction d v , for each block S i ,calculate: b i =(∑d u ,∑d v ,∑|d u |,∑|d v |∈R 4 Finally As a square area Descriptor of .
5. The industrial bearing data enhancement method based on visual words and diffusion model according to claim 4 is characterized in that: The process of clustering descriptors and describing images is as follows: assuming that there are N descriptors B after extraction, there are k clusters C defined. p , giving each cluster a center point Repeat this process until the cluster centers converge. In the clustering results, the clusters are visual words. The number of visual words in image I is counted to obtain the feature vector h of the image, where Among them, count(C j ) represents the visual word C in the image j The number of occurrences of .
6. The industrial bearing data enhancement method based on visual words and diffusion model according to claim 5 is characterized in that: In step (4), both diffusion model 1 and diffusion model 2 include a diffusion phase and a sampling phase. Here, the target sample is defined as x t , t represents the current sample x t The step length from the final target x0, the label that controls the generation process is defined as C; In the diffusion stage, the data distribution q(x) is transformed into a standard Gaussian distribution N(0,I) by adding Gaussian noise to the sample. The diffusion process is defined as: Among them, β t are predefined parameters; Repeat the above process to get the transformation of original data into noise: By re-parameterizing, we can get the value of x0 at any time step. t Distribution: Thus we get a string of sample time pairs (x t ,∈ t ,t),t∈{0,1,2,...,T}, where∈ t is the noise actually added during the diffusion process; In the sampling stage, by back-diffusion of a completely Gaussian noise, the final cost is: By re-parameterizing, we get x t-1 =μ θ (x t ,t,c)+σ t ∈,∈~N(0,I), according to the reverse formula, the mean is expressed as: θ represents the parameters in U-Net, The loss function is:
Citation Information
Patent Citations
Time-varying working condition transfer learning bearing fault diagnosis method based on diffusion model
CN119202794A
Systems and methods for joint learning of complex visual inspection tasks using computer vision
US20200372625A1