Grinding robot image data quality evaluation method and device
Through continuous wavelet transformation and Swin-Transformer model, the vibration signal of the grinding robot is converted into time-frequency images, and the comprehensive quality evaluation index is constructed, which solves the problems of reduced accuracy and poor data quality of the grinding robot, and improves analysis efficiency and accurate control. sex.
Patent Information
- Application Number
- CN202411241891.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-09-05
AI Technical Summary
Grinding robots wear during long-term use leads to reduced accuracy, manual judgment on the replacement of grinding wheels is not accurate enough, and weak equipment stiffness leads to inconsistent processing, and there is a lot of noise and interference in the vibration signal, affecting the quality of image data.
Using algorithms based on continuous wavelet transformation and Swin-Transformer model, the vibration signal of the grinding robot equipment is converted into time-frequency images. Combined with generation time, classification accuracy and image quality evaluation, comprehensive quality evaluation indicators of data sets are constructed and the most comprehensive quality evaluation indicators are selected. Excellent image datasets to improve analysis and decision-making efficiency.
Ensure the representativeness and diversity of the data set, provide high-quality samples for subsequent algorithm training, and provide more accurate basis for grinding robot optimization and control in actual industrial applications.
Smart Images

Figure CN119168977A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing, and in particular relates to a method and a device for evaluating the quality of image data of a grinding robot. Background Art
[0002] Grinding technology is widely used in various fields in intelligent manufacturing, such as wind turbine blades and automotive mold manufacturing. As an efficient automation solution, robotic grinding has become an important way to replace traditional manual grinding, providing a superior solution for the precision machining of complex surfaces and the efficient machining of large structures.
[0003] Grinding tools will continue to wear out during long-term use, which will lead to reduced grinding accuracy. Previously, people mostly relied on manual experience to determine whether the grinding wheel needed to be replaced, but this was often not accurate enough and would cause downtime losses. Therefore, signal-based and machine learning-based fault methods are currently widely used in the field of fault diagnosis. However, due to the weak rigidity of the grinding robot, it is difficult to ensure processing consistency during multiple grinding processes, which will cause slight deformation or displacement of the robot. In addition, the working conditions of the grinding robot are complex and diverse, which results in a lot of noise and interference in the collected robot vibration signal, resulting in the quality of the collected image data set being affected. Summary of the invention
[0004] The present invention provides a method and device for evaluating the quality of image data of a grinding robot. The method converts the vibration signal of a grinding robot device into a time-frequency image based on continuous wavelet transform and Swin-Transformer model algorithm, and constructs a comprehensive quality evaluation index of a data set under comprehensive consideration of generation time, classification accuracy, and image quality evaluation, so as to quickly measure and screen out the best image data set, and ensure that the selected best image data set can reflect the actual vibration characteristics of the grinding robot, thereby improving the efficiency of subsequent analysis and decision-making; at the same time, a high-quality data set can ensure the representativeness and diversity of the data, thereby providing high-quality samples for subsequent algorithm training, and also providing a more accurate basis for the optimization and control of the grinding robot in actual industrial applications.
[0005] A method for evaluating the quality of grinding robot image data comprises the following steps:
[0006] Collect the one-dimensional vibration signal of the grinding robot when it is working and perform preprocessing;
[0007] Based on different parameter combinations, continuous wavelet transform is performed on the preprocessed one-dimensional vibration signal to generate a CWT image data set, and the image data generation time is recorded;
[0008] Input the CWT image dataset into the pre-trained Swin-Transformer model, classify the CWT image data, and obtain the classification accuracy;
[0009] Based on the correlation coefficient, an image quality evaluation index is constructed to obtain an image quality evaluation score;
[0010] Combining the image data generation time, classification accuracy, and image quality evaluation score, the comprehensive quality score of the dataset is calculated to determine the best CWT image dataset.
[0011] Based on continuous wavelet transform and Swin-Transformer model algorithm, the vibration signal of the grinding robot equipment is converted into time-frequency image, and the comprehensive quality evaluation index of the data set is constructed under comprehensive consideration of generation time, classification accuracy, and image quality evaluation, so as to quickly measure and screen out the best image data set to ensure that the selected best image data set can reflect the actual vibration characteristics of the grinding robot, thereby improving the efficiency of subsequent analysis and decision-making; at the same time, high-quality data sets can ensure the representativeness and diversity of the data, thereby providing high-quality samples for subsequent algorithm training, and also providing a more accurate basis for the optimization and control of grinding robots in actual industrial applications.
[0012] Furthermore, preprocessing the collected one-dimensional vibration signal when the grinding robot is working refers to segmenting the one-dimensional vibration signal to generate multiple signal segments.
[0013] Furthermore, based on different parameter combinations, the process of performing continuous wavelet transform on the preprocessed one-dimensional vibration signal to generate a CWT image data set and recording the image data generation time specifically includes the following steps:
[0014] Select a suitable mother wavelet;
[0015] Based on adjusting the scale factor and translation factor, the mother wavelet is scaled and translated to generate wavelets of different scales and positions;
[0016] Apply continuous wavelet transform to each signal segment, calculate wavelet coefficients using the inner product of wavelet and signal, and form a two-dimensional time-frequency image;
[0017] Record multiple sets of CWT image data sets C under different combinations of mother wavelets and scale factors e , and record the generation time T of each group of CWT image data sets e .
[0018] Furthermore, the mother wavelet ψ α,τ The expression of (t) is:
[0019]
[0020] In the formula, ψ(t) represents the mother wavelet of the continuous wavelet, L 2 (R) represents the function space of all square-integrable functions on the real number set R; α represents the scale factor; τ represents the translation factor; t represents time; represents the normalization factor;
[0021] Given the input signal f(t) = L 2 (R), the expression of the continuous wavelet transform CWT f (α, τ) is defined as:
[0022]
[0023] In the formula, CWT f (α, τ) represents the wavelet coefficient; f(t) represents the input signal; ψ′ α,τ (t) represents the scaled and translated form of the mother wavelet; (f(t), ψ α,τ (t)) represents the inner product of the input signal f(t) and the mother wavelet ψ α,τ (t).
[0024] Furthermore, the process of inputting the CWT image dataset into the pre-trained Swin-Transformer model, classifying the CWT image data, and obtaining the classification accuracy specifically includes the following steps:
[0025] Based on the obtained CWT image dataset C e , use it as the input of the pre-trained Swin-Transformer model;
[0026] Use the pre-trained Swin-Transformer model for training and learning, and perform forward propagation;
[0027] Output the four-class prediction result, and perform backpropagation and parameter update;
[0028] Based on the number of samples in the CWT image dataset and the number of correct four-class prediction results, obtain the classification accuracy A e .
[0029] Furthermore, the expression of the classification accuracy A e is:
[0030]
[0031] In the formula, A e represents the classification accuracy of the dataset as e, e represents the dataset index, 0 < e ≤ b, b represents the total number of datasets; CP kIt represents the number of samples that the model predicts correctly for category k; J represents the total number of samples of all categories in the CWT image dataset.
[0032] Furthermore, based on the correlation coefficient, an image quality evaluation index is constructed, and the process of obtaining an image quality evaluation score specifically includes the following steps:
[0033] Based on two images, construct an image pair and calculate the correlation coefficient of the image pair;
[0034] Based on the correlation coefficient of image pairs of the same category, a similarity measurement index is constructed to characterize the similarity between all image pairs of the same category;
[0035] Based on the correlation coefficients of image pairs of different categories, a difference measurement index is constructed to characterize the differences between all image pairs of different categories.
[0036] Based on the similarity measurement index and the difference measurement index, an image quality evaluation index is constructed to obtain the image quality evaluation score.
[0037] By introducing an image quality evaluation index based on the correlation coefficient, it is possible to screen out images that are similar in the same category and have obvious differences in different categories.
[0038] Furthermore, the correlation coefficient expression of the image pair R(A,B) is:
[0039]
[0040] Where R(A,B) is the correlation coefficient between image A and image B, which is used to measure the linear correlation between the two images. That is, when |R(A,B)| is closer to 1, the two images are more similar, and when |R(A,A)| is closer to 0, the two images are more different. ij Represents the image pixel value of image A with i pixels in height and j pixels in width; represents the average pixel value of image A; B ij represents the image pixel value of image B with i pixels in height and j pixels in width; i = 1, 2, ... M, M represents the number of pixels in height; j = 1, 2, ... N, N represents the number of pixels in height;
[0041] Similarity metrics The expression is:
[0042]
[0043] In the formula, The similarity metric for the dataset e is used to measure the similarity between all image pairs of the same category, that is, The smaller the calculated value, the higher the similarity. The larger the calculated value of indicates, the greater the difference; x represents the image category index in any image category, x = 1, 2, ... p, p represents the total image category in the current image category; n, n both represent the image index in the current image category, n = 1, 2, ... q, q represents the total image in the current image category, m = n + 1, n + 2, ..., q; R (I x,n ,I x,m ) indicates that in image I x,n and image I x,m The correlation coefficient, I x,n Indicates the image with image category x and image index n, I x,m represents the image with image index m in image category x;
[0044] Dissimilarity measure The expression of the indicator is:
[0045]
[0046] In the formula, The difference metric that represents the dataset is e, which is used to measure the differences between all image pairs of different categories, that is, The smaller the calculated value, the greater the difference. The larger the calculated value, the higher the similarity; y represents the image category index in any image category, y = 1, 2, ... p, p represents the total image category in the current image category, y = x + 1, x + 2, ..., p; R (I x,n ,I y,n ) indicates that in image I x,n and image I y,n The correlation coefficient, I y,n Represents the image with image index n in image category y;
[0047] Image quality assessment score The expression is:
[0048]
[0049] In the formula, represents the image quality evaluation score of the dataset e, which is used to measure the image quality, that is The smaller the calculated value, the higher the image quality.
[0050] Furthermore, the calculation expression of the comprehensive quality score of the dataset is:
[0051]
[0052] In the formula, Q eIt represents the comprehensive quality score of the dataset e, that is, when Q e The larger the calculated value of indicates, the better the quality of the data set; Represents the classification accuracy of data set e, α represents the classification accuracy A e The weight coefficient of represents the generation time of the dataset e, and β represents the generation time T of the dataset e The weight coefficient of γ represents the image quality evaluation score. The weight coefficient of ; ε is a positive number used to prevent the denominator from approaching 0.
[0053] A device for evaluating the quality of image data of a grinding robot, comprising:
[0054] An acquisition module, used for acquiring a one-dimensional vibration signal when the grinding robot is working;
[0055] The image processing and generation module is used to pre-process the acquired one-dimensional vibration signal, perform continuous wavelet transform, generate a CWT image data set, and record the image data generation time; and input the generated CWT image data set into the Swin-Transformer model for classification, and obtain the classification accuracy;
[0056] The calculation and discrimination module is used to calculate the image quality evaluation score and the comprehensive quality score of the data set, and determine the best CWT image data set.
[0057] The beneficial effects of the present invention are:
[0058] The present invention converts the vibration signal of the grinding robot equipment into a time-frequency image based on continuous wavelet transform and Swin-Transformer model algorithm, and constructs a comprehensive quality evaluation index of the data set under comprehensive consideration of generation time, classification accuracy, and image quality evaluation, so as to quickly measure and screen out the best image data set, and ensure that the selected best image data set can reflect the actual vibration characteristics of the grinding robot, thereby improving the efficiency of subsequent analysis and decision-making; at the same time, high-quality data sets can ensure the representativeness and diversity of the data, thereby providing high-quality samples for subsequent algorithm training, and also providing a more accurate basis for the optimization and control of the grinding robot in actual industrial applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 is a flow chart of the present invention;
[0060] Figure 2 This is a schematic diagram of the network structure of the Swin-Transformer model;
[0061] Figure 3 It is a schematic diagram of the structure of Block;
[0062] Figure 4 Generate a temporal diagram for the dataset;
[0063] Figure 5 Schematic diagram of image quality evaluation score and classification accuracy;
[0064] Figure 6 A schematic diagram of the device structure. DETAILED DESCRIPTION
[0065] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0066] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.
[0067] In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples, and a person of ordinary skill in the art can understand the specific meanings of the above terms in this application under specific circumstances.
[0068] Example 1
[0069] Figure 1 The method shown is a method for evaluating the quality of image data of a grinding robot. Based on the continuous wavelet transform and Swin-Transformer model algorithm, the vibration signal of the grinding robot equipment is converted into a time-frequency image, and a comprehensive quality evaluation index of the data set is constructed under the comprehensive consideration of generation time, classification accuracy, and image quality evaluation, so as to quickly measure and select the best image data set to ensure that the selected best image data set can reflect the actual vibration characteristics of the grinding robot, thereby improving the efficiency of subsequent analysis and decision-making; at the same time, high-quality data sets can ensure the representativeness and diversity of the data, thereby providing high-quality samples for subsequent algorithm training, and also providing a more accurate basis for the optimization and control of grinding robots in actual industrial applications. The specific steps include the following:
[0070] S1: Collect the one-dimensional vibration signal of the grinding robot when it is working and perform preprocessing;
[0071] Specifically, preprocessing the one-dimensional vibration signal collected when the grinding robot is working refers to segmenting the one-dimensional vibration signal to generate multiple signal segments.
[0072] S2: Based on different parameter combinations, continuous wavelet transform is performed on the preprocessed one-dimensional vibration signal to generate a CWT image data set, and the image data generation time is recorded;
[0073] S21: Select a suitable mother wavelet;
[0074] Mother wavelet ψ α,τ The expression of (t) is:
[0075]
[0076] Where ψ(t) represents the mother wavelet of the continuous wavelet, L 2 (R) represents the space of all square-integrable functions on the real number set R; α represents the scale factor; τ represents the translation factor; t represents time; represents the normalization factor;
[0078] S22: Based on the adjustment of the scale factor and translation factor, the mother wavelet is scaled and translated to generate different scales and
[0079] Wavelet of position;
[0080] S23: applying continuous wavelet transform to each signal segment, calculating wavelet coefficients using the inner product of the wavelet and the signal, and forming a two-dimensional time-frequency image;
[0081] Given an input signal f(t) = L 2 (R), define continuous wavelet transform CWT f The expression of (α,τ) is:
[0082]
[0083] In the formula, CWT f (α,τ) represents the wavelet coefficients; f(t) represents the input signal; ψ′ α,τ (t) represents the scaled and translated form of the mother wavelet; (f(t),ψ α,τ (t)) represents the input signal f(t) and the mother wavelet ψ α,τ (t) is the inner product of
[0084] S24: Record multiple sets of CWT image data sets C under different combinations of mother wavelets and scale factorse , and record the generation time T of each group of CWT image data sets e .
[0085] Among them, T e Indicates the generation time of the dataset e.
[0086] S3: Input the CWT image dataset into the pre-trained Swin-Transformer model, classify the CWT image data, and obtain the classification accuracy;
[0087] S31: Based on the acquired CWT image dataset C e , which is used as input to the pre-trained Swin-Transformer model;
[0088] Among them, the CWT image dataset C e The image dimensions are 224x224x3.
[0089] S32: Use the pre-trained Swin-Transformer model to train and learn, and perform forward propagation;
[0090] like Figure 2 As shown in the figure, in the Swin-Transformer model, after the 224x224x3-dimensional image data is input, Patch Partition is performed, and the feature dimension becomes 56x56x48. After continuously executing Stage1, Stage2, Stage3, and Stage4, the image width and height are continuously changed to half of the original, and the channel is continuously changed to twice the original. The number of blocks contained in Stage1, Stage2, Stage3, and Stage4 are 2, 2, 6, and 2 respectively, and the number of heads are 3, 6, 12, and 24 respectively; after the GlobalAvg pool average pooling layer, an image with a dimension of 1x1x768 is obtained and output.
[0091] like Figure 3 As shown in the figure, each layer of Block combines a multi-layer perceptron MLP, and two window attention mechanisms, W-MSA and SW-MSA. The training stability is enhanced through residual connection and layer normalization. The alternating use of attention mechanisms can not only enhance cross-window information interaction, but also improve the context capture ability of the model.
[0092] S33: Use the average pooling layer to output the four-classification prediction results, and perform back propagation and parameter update;
[0093] S34: Based on the number of samples in the CWT image dataset and the correct number of four-category prediction results, obtain the classification accuracy A e .
[0094] Classification accuracy A e The expression is as follows:
[0095]
[0096] In the formula, A e represents the classification accuracy of the dataset e, e represents the dataset index, 0 < e ≤ b, and b represents the total number of datasets; CP k represents the number of samples correctly predicted by the model for class k; J represents the total number of samples in all classes in the CWT image dataset.
[0097] S4: Based on the correlation coefficient, construct an image quality evaluation index and obtain the image quality evaluation score;
[0098] S41: Based on two images, construct an image pair and calculate the correlation coefficient of the image pair;
[0099] The expression for the correlation coefficient of the image pair R(A, B) is:
[0100]
[0101] In the formula, R(A, B) is the correlation coefficient between image A and image B, which is used to measure the linear correlation between two images. That is, when |R(A, B)| is closer to 1, it means the two images are more similar; when |R(A, B)| is closer to 0, it means the difference between the two images is greater; A ij represents the pixel value of image A at pixel position (i, j) in terms of height and width; represents the average pixel value of image A; B ij represents the pixel value of image B at pixel position (i, j) in terms of height and width; i = 1, 2,..., M, where M represents the number of pixels in height; j = 1, 2,..., N, where N represents the number of pixels in width.
[0102] S42: Based on the correlation coefficients of image pairs of the same category, construct a similarity metric index to characterize the similarity between all image pairs of the same category;
[0103] The similarity metric index R se The expression is as follows:
[0104]
[0105] In the formula, represents the similarity metric index of the dataset e, which is used to measure the similarity between all image pairs of the same category, that is the smaller the calculated value of The larger the calculated value of indicates, the greater the difference; x represents the image category index in any image category, x = 1, 2, ... p, p represents the total image category in the current image category; n, n both represent the image index in the current image category, n = 1, 2, ... q, q represents the total image in the current image category, m = n + 1, n + 2, ..., q; R (I x,n ,i x,m ) indicates that in image I x,x and image I x,m The correlation coefficient, I x,n Indicates the image with image category x and image index n, I x,m Represents the image with image index m in image category x.
[0106] S43: Based on the correlation coefficients of image pairs of different categories, a difference measurement index is constructed to characterize the differences between all image pairs of different categories;
[0107] Dissimilarity measure The expression of the indicator is:
[0108]
[0109] In the formula, The difference metric that represents the dataset is e, which is used to measure the differences between all image pairs of different categories, that is, The smaller the calculated value, the greater the difference. The larger the calculated value, the higher the similarity; y represents the image category index in any image category, y = 1, 2, ... p, p represents the total image category in the current image category, y = x + 1, x + 2, ..., p; R (I x,n ,I y,n ) indicates that in image I x,n and image T y,n The correlation coefficient, I y,n Represents the image with image index n in image category y.
[0110] S44: Based on the similarity measurement index and the difference measurement index, an image quality evaluation index is constructed to obtain an image quality evaluation score.
[0111] Image quality assessment score The expression is:
[0112]
[0113] In the formula, represents the image quality evaluation score of the dataset e, which is used to measure the image quality, that is The smaller the calculated value of indicates the higher the image quality.
[0114] S5: Combine the image data generation time, classification accuracy, and image quality evaluation score to calculate the comprehensive quality score of the dataset to determine the best CWT image dataset.
[0115] The calculation expression of the comprehensive quality score of the dataset is:
[0116]
[0117] In the formula, Q e It represents the comprehensive quality score of the dataset e, that is, when Q e The larger the calculated value of indicates, the better the quality of the data set; Represents the classification accuracy of data set e, α represents the classification accuracy A e The weight coefficient of represents the generation time of the dataset e, and β represents the generation time T of the dataset e The weight coefficient of γ represents the image quality evaluation score. The weight coefficient of ; ε is a positive number used to prevent the denominator from approaching 0.
[0118] Among them, when the classification accuracy A e The larger the value, the higher the comprehensive quality score of the dataset Q e The larger the value, the better the classification effect of the data set; when the generation time T e The smaller the value, the better the comprehensive quality score of the dataset Q e The larger the value, the higher the generation efficiency of the dataset; when the image quality evaluation score The smaller the value, the better the comprehensive quality score of the dataset Q e The larger the value, the smaller the difference between the same category images in the dataset and the greater the difference between different category images. e The maximum value of is used to determine the optimal CWT image dataset.
[0119] Example 2
[0120] In this embodiment, a method for evaluating the quality of grinding robot image data is provided, which specifically includes the following steps:
[0121] T1: Collect the one-dimensional vibration signal of the grinding robot when it is working and perform preprocessing;
[0122] T2: Based on different parameter combinations, continuous wavelet transform is performed on the preprocessed one-dimensional vibration signal to generate a CWT image data set, and the image data generation time is recorded;
[0123] T21: Select a suitable mother wavelet;
[0124] T22: Based on adjusting the scale factor and translation factor, the mother wavelet is scaled and translated to generate different scales and
[0125] Wavelet of position;
[0126] T23: Apply continuous wavelet transform to each signal segment, calculate the wavelet coefficients using the inner product of the wavelet and the signal, and form
[0127] Into a two-dimensional time-frequency image;
[0128] T24: Multiple CWT image datasets C with different combinations of mother wavelets and scale factors e , and record the generation time T of each group of CWT image data sets e .
[0129] T3: Input the CWT image dataset into the pre-trained Swin-Transformer model, classify the CWT image data, and obtain the classification accuracy;
[0130] T31: Based on the acquired CWT image dataset C e , which is used as input to the pre-trained Swin-Transformer model;
[0131] T32: Use the pre-trained Swin-Transformer model to train and learn, and perform forward propagation;
[0132] T33: Use the average pooling layer to output the four-category prediction results, and perform back propagation and parameter update;
[0133] T34: Based on the number of samples in the CWT image dataset and the correct number of four-category prediction results, obtain the classification accuracy A e .
[0134] T4: Based on the correlation coefficient, construct an image quality evaluation index and obtain the image quality evaluation score;
[0135] T41: Based on two images, construct an image pair and calculate the correlation coefficient of the image pair;
[0136] T42: Based on the correlation coefficient of the same category image pairs, construct a similarity measurement index to characterize all the same category images.
[0137] Similarity between pairs of images;
[0138] T43: Based on the correlation coefficients of image pairs of different categories, construct a difference measurement index to characterize the
[0139] There is difference between image pairs;
[0140] T44: Based on the similarity measurement index and the difference measurement index, an image quality evaluation index is constructed to obtain the image quality evaluation score.
[0141] T5: Combine the image data generation time, classification accuracy, and image quality evaluation score to calculate the comprehensive quality score of the dataset to determine the best CWT image dataset.
[0142] Example 3
[0143] In this embodiment, a method for evaluating the quality of image data of a grinding robot is provided.
[0144] In this embodiment, the grinding robot adopts a UR5 robot, which is installed on a movable base so that the robot can move in a specific direction. A grinding head is installed at the grinding end of the grinding robot to grind the workpiece; an acceleration sensor is installed on the workpiece and connected to a signal collector to collect vibration signals, and then the health status of the robot grinding end is evaluated by collecting vibration signals of workpieces in different fault states.
[0145] Among them, the grinding speed of the grinding head is 5000RPM; the workpiece is an aluminum plate with a thickness of 3mm; the sampling frequency of the signal acquisition instrument is 10KHz; and according to the degree of damage, it can be divided into 4 different fault states, namely healthy state F1, point wear state F2, linear wear state F3, and hole damage state F4.
[0146] In this embodiment, based on the Pytorch1.7.0 deep learning framework, the experimental configuration is GPU GeForceRTX3090. The Swin-Transformer model network adopts the stochastic gradient descent SDG algorithm. Among them, the weight decay is set to 0.00001, the initial learning rate is set to 0.001, and the learning rate scheduler (StepLR) is used to multiply the learning rate by 0.1 every 100 epochs; batchsize is set to 16; epoch is set to 500; the ratio of training set to test set is set to 7:3; the loss function adopts the cross entropy loss function; the number of experiments is 10, and the average value of 10 experiments is selected as the calculated value.
[0147] In this embodiment, the mother wavelet functions include Cgau8, Cmor3-3 and Morl; the scale factor (Totalscale) includes 2 k (k=5,6,…,13) 9 types in total; classification accuracy A e The weight coefficient α is set to 1; the dataset generation time T e The weight coefficient β is set to 10 -5 ; Image quality evaluation score The weight coefficient γ is set to 10-5 ; ε is set to 10 -6 , the mother wavelet function and the scale factor are combined without repetition, that is, the generation time T of 27 groups of CWT image data sets are obtained respectively. e , classification accuracy A e , Image quality evaluation score in, Figure 4 Shown is the generation time T of the CWT image dataset e Schematic diagram of Figure 5 Shown is the classification accuracy A e and image quality assessment scores Table 1 shows the generation time T of the CWT image dataset. e Table 2 shows the classification accuracy under different parameter combinations. e and image quality assessment scores result.
[0148] Table 1 shows the generation time T of the CWT image dataset. e
[0149]
[0150] Table 2 Classification accuracy under different parameter combinations A e and image quality assessment scores
[0151]
[0152] based on Figure 4 and Figure 5 ,Combined with Table 1, it can be seen that as the scale factor increases, the image quality evaluation score It keeps decreasing, which means that a larger scale can capture more details in the vibration signal, especially the Cmor3-3 wavelet function can capture the phase information of the vibration signal to make its image quality evaluation score It is significantly lower than the other two wavelet functions. However, when the size factor increases to a certain extent, the classification accuracy A e The improvement is no longer obvious, the generation time T e It increases exponentially, which means that by only reducing the image quality evaluation score It is not feasible to obtain the best dataset. Since the image resolution limits the expression of image details and the accuracy is already very high, the additional details captured by the image have limited effect on improving the accuracy at larger scales.
[0153] The generation time T based on the acquired CWT image dataset e , classification accuracy A e , Image quality evaluation score The comprehensive quality score of the CWT image dataset is calculated and the results are shown in Table 3.
[0154] Table 3 Comprehensive quality scores of CWT image dataset
[0155]
[0156] As shown in the above table, the scale factor is set to 2. 9 =512, the comprehensive quality score Q of the image data set generated when the mother wavelet function selects Cmor3-3 e =0.998, which is the best CWT image dataset selected. The image dataset generated by this parameter combination obtains 100% accuracy, and the dataset generation time is short and the classification accuracy is high, that is, the image dataset has high image quality.
[0157] Example 4
[0158] Based on the same technical concept, such as Figure 6 As shown, this embodiment provides a device for evaluating the quality of grinding robot image data, including:
[0159] An acquisition module, used for acquiring a one-dimensional vibration signal when the grinding robot is working;
[0160] The image processing and generation module is used to pre-process the acquired one-dimensional vibration signal, perform continuous wavelet transform, generate a CWT image data set, and record the image data generation time; and input the generated CWT image data set into the Swin-Transformer model for classification, and obtain the classification accuracy;
[0161] The calculation and discrimination module is used to calculate the image quality evaluation score and the comprehensive quality score of the data set, and determine the best CWT image data set.
[0162] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0163] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for evaluating the quality of grinding robot image data. It is characterized in that The steps include: Collect the one-dimensional vibration signal of the grinding robot when it is working and perform preprocessing; Based on different parameter combinations, continuous wavelet transform is performed on the preprocessed one-dimensional vibration signal to generate a CWT image data set, and the image data generation time is recorded; Input the CWT image dataset into the pre-trained Swin-Transformer model, classify the CWT image data, and obtain the classification accuracy; Based on the correlation coefficient, an image quality evaluation index is constructed to obtain an image quality evaluation score; Combining the image data generation time, classification accuracy, and image quality evaluation score, the comprehensive quality score of the dataset is calculated to determine the best CWT image dataset.
2. A method for evaluating the quality of grinding robot image data according to claim 1, It is characterized in that Preprocessing the one-dimensional vibration signal collected when the grinding robot is working refers to segmenting the one-dimensional vibration signal to generate multiple signal segments.
3. A grinding robot image data quality evaluation method according to claim 2, It is characterized in that Based on different parameter combinations, the process of performing continuous wavelet transform on the preprocessed one-dimensional vibration signal to generate a CWT image data set and recording the image data generation time specifically includes the following steps: Select a suitable mother wavelet; Based on adjusting the scale factor and translation factor, the mother wavelet is scaled and translated to generate wavelets of different scales and positions; Apply continuous wavelet transform to each signal segment, calculate wavelet coefficients using the inner product of wavelet and signal, and form a two-dimensional time-frequency image; Record multiple sets of CWT image data sets C under different combinations of mother wavelets and scale factors e , and record the generation time T of each group of CWT image data sets e .
4. A method for evaluating the quality of grinding robot image data according to claim 3, It is characterized in that Mother wavelet ψ α,τ The expression of (t) is: Where ψ(t) represents the mother wavelet of the continuous wavelet, L 2 (R) represents the space of all square-integrable functions on the real number set R; α represents the scale factor; τ represents the translation factor; t represents time; represents the normalization factor; Given an input signal f(t) = L 2 (R), define continuous wavelet transform CWT f The expression of (α,τ) is: In the formula, CWT f (α, τ) represents the wavelet coefficients; f(t) represents the input signal; ψ′ α,τ (t) represents the scaled and translated form of the mother wavelet; (f(t), ψ α,τ (t)) represents the input signal f(t) and the mother wavelet ψ α,τ (t) is the inner product of 5. A method for evaluating the quality of grinding robot image data according to claim 4, It is characterized in that The process of inputting the CWT image dataset into the pre-trained Swin-Transformer model, classifying the CWT image data, and obtaining the classification accuracy includes the following steps: Based on the acquired CWT image dataset C e , which is used as input to the pre-trained Swin-Transformer model; Use the pre-trained Swin-Transformer model to train and learn, and perform forward propagation; Output the four-classification prediction results, and perform back propagation and parameter update; Based on the number of samples in the CWT image dataset and the correct number of four-category prediction results, the classification accuracy A is obtained. e .
6. A method for evaluating the quality of grinding robot image data according to claim 5, It is characterized in that Classification accuracy A e The expression is: In the formula, A e represents the classification accuracy of the dataset e, where e represents the dataset index, 0<e≤b, and b represents the total number of datasets; CP k It represents the number of samples that the model predicts correctly for category k; J represents the total number of samples of all categories in the CWT image dataset.
7. A method for evaluating the quality of grinding robot image data according to claim 6, It is characterized in that Based on the correlation coefficient, the image quality evaluation index is constructed, and the process of obtaining the image quality evaluation score specifically includes the following steps: Based on two images, construct an image pair and calculate the correlation coefficient of the image pair; Based on the correlation coefficient of image pairs of the same category, a similarity measurement index is constructed to characterize the similarity between all image pairs of the same category; Based on the correlation coefficients of image pairs of different categories, a difference measurement index is constructed to characterize the differences between all image pairs of different categories. Based on the similarity measurement index and the difference measurement index, an image quality evaluation index is constructed to obtain the image quality evaluation score.
8. A method for evaluating the quality of grinding robot image data according to claim 7, It is characterized in that The correlation coefficient expression of the image pair R(A, B) is: Where R(A, B) is the correlation coefficient between image A and image B, which is used to measure the linear correlation between the two images. That is, when |R(A, B)| is closer to 1, the two images are more similar, and when |R(A, B)| is closer to 0, the two images are more different. ij Represents the image pixel value of image A with i pixels in height and j pixels in width; Represents the average pixel value of image A; B ij represents the image pixel value of image B with i pixels in height and j pixels in width; i=1, 2, ...M, M represents the number of pixels in height; j=1, 2, ...N, N represents the number of pixels in height; Similarity metrics The expression is: In the formula, The similarity metric for the dataset e is used to measure the similarity between all image pairs of the same category, that is, The smaller the calculated value, the higher the similarity. The larger the calculated value of indicates, the greater the difference; x represents the image category index in any image category, x = 1, 2, ... p, p represents the total image category in the current image category; n, n both represent the image index in the current image category, n = 1, 2, ... q, q represents the total image in the current image category, m = n + 1, n + 2, ..., q; R(i x,n , I x,m ) indicates that in image i x,n and image I x,m The correlation coefficient, I x,n Indicates the image with image category x and image index n, I x,m represents the image with image index m in image category x; Dissimilarity measure The expression of the indicator is: In the formula, The difference metric that represents the dataset is e, which is used to measure the differences between all image pairs of different categories, that is, The smaller the calculated value, the greater the difference. The larger the calculated value of indicates, the higher the similarity; y represents the image category index in any image category, y=1, 2, ..., p, p represents the total image category in the current image category, y=x+1, x+2, ..., p; R(I x,n , I y,n ) indicates that in image I x,n and image I y,n The correlation coefficient, I y,n Represents the image with image index n in image category y; Image quality assessment score The expression is: In the formula, represents the image quality evaluation score of the dataset e, which is used to measure the image quality, that is The smaller the calculated value of indicates the higher the image quality.
9. A method for evaluating the quality of grinding robot image data according to claim 8, It is characterized in that The calculation expression of the comprehensive quality score of the dataset is: In the formula, Q e It represents the comprehensive quality score of the dataset e, that is, when Q e The larger the calculated value of indicates, the better the quality of the data set; Represents the classification accuracy of data set e, α represents the classification accuracy A e The weight coefficient of represents the generation time of the dataset e, and β represents the generation time T of the dataset e The weight coefficient of γ represents the image quality evaluation score. The weight coefficient of ; ε is a positive number used to prevent the denominator from approaching 0.
10. A device for the grinding robot image data quality evaluation method according to claim 1, It is characterized in that include: An acquisition module, used for acquiring a one-dimensional vibration signal when the grinding robot is working; An image processing and generation module is used to pre-process the acquired one-dimensional vibration signal, perform continuous wavelet transform, generate a CWT image data set, and record the image data generation time; And input the generated CWT image data set into the Swin-Transformer model for classification, and obtain the classification accuracy; The calculation and discrimination module is used to calculate the image quality evaluation score and the comprehensive quality score of the data set, and determine the best CWT image data set.
Citation Information
Patent Citations
Non-reference image quality evaluation method based on multi-scale feature fusion
CN116128807A
Swin-Transform-based numerical control turning tool wear state classification method and device under variable working conditions
CN117972476A
