Belt scratch and offset monitoring method based on machine vision
Through technologies such as conjugated gradient feature fusion, ring dynamic optimization and autoencoder, the insufficient data volume and limitations of feature extraction methods in belt scratch and offset monitoring are solved, and more efficient and accurate belt monitoring is achieved.
Patent Information
- Application Number
- CN202411209431.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-27
AI Technical Summary
The existing belt scratch and offset monitoring technology has problems such as insufficient data volume, weak generalization ability of the model, feature extraction methods rely on global gradient information to cause overfitting and local optimization, and traditional feature dimensionality reduction methods ignore data structure information. Impacts the accuracy and efficiency of monitoring.
Using the belt scratch and offset monitoring method based on machine vision, data expansion is performed through the generative adversarial network of conjugated gradient feature fusion, the circular dynamic optimization algorithm optimizes the feature extraction model parameters, and the feature dimensionality reduction is performed based on the dual loss autoencoder. And use the limit learning machine with adaptive quantum state superposition for classification.
It improves the diversity and quality of the training data, reduces the risk of overfitting, retains the intrinsic structural information of the data, improves the model's ability to handle complex belt scratches and offset features, and enhances the accuracy and efficiency of monitoring.
Smart Images

Figure CN119206721A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of belt scratch and deviation recognition, and in particular to a belt scratch and deviation monitoring method based on machine vision. Background Art
[0002] In modern industrial production, belt conveyor systems are widely used in many industries, including mining, logistics, food processing, etc. Their safety and efficiency are crucial to the stable operation of the production process. However, due to long-term operation and the influence of various external factors, belts often have scratches, damage or deviation. If these problems are not detected and handled in time, they may lead to more serious equipment failures or production accidents.
[0003] Traditional monitoring methods mainly rely on manual inspection or simple sensor monitoring, which are not only time-consuming and labor-intensive, but also inefficient and limited in accuracy, especially in continuous operation and complex environments. Therefore, developing an efficient and automated monitoring system that can accurately identify tiny scratches and slight deviations on the belt in real time is of great significance to improving production safety and efficiency.
[0004] The Chinese invention patent with application number CN202410487208.4 proposes a belt tear detection method and system for mining conveyors. First, the adaptive echo sampling method is used to collect ultrasonic signals, the drift compensation algorithm is used to correct the drift of the baseline signal, and the overlapping echo separation technology is used to separate the overlapping echoes; then, the environmental adaptation algorithm is introduced to build a machine learning model; the micro-tear recognition technology is used to identify the ultrasonic signal processed by the machine learning-based environmental adaptation algorithm, and the mutation point detection algorithm and pattern recognition and classification algorithm are introduced to perform tear feature recognition and tear pattern recognition; finally, the tear event confirmation algorithm is introduced, the logical rules are set, the tear position positioning technology is introduced to locate the tear position, and the tear degree assessment algorithm is introduced to assess the tear degree. The technical problems of inaccurate data processing, poor accuracy in belt longitudinal tear detection, and low sensitivity in the prior art are solved.
[0005] The Chinese invention patent with application number CN202010653788.1 proposes a method and system for identifying coal flow in a transport belt based on video surveillance. Through real-time video image analysis, the belt image in the video image and the coal in the belt are extracted and separated to realize the extraction of the coal flow image, and the real-time coal flow rate is displayed to the user intuitively and clearly. In this process, the abnormal behaviors such as belt deviation, sudden overexposure and darkening can be identified, and the actual real-time width of the coal flow can also be displayed, which can simply and intuitively detect overload and no-load behaviors; including the following steps: S1, system construction; S2, real-time image acquisition; S3, analysis area extraction and conversion; S4, image clarity processing; S5, texture extraction: S6, coal-belt separation; S7, coal flow ratio calculation; S8, overload and no-load identification.
[0006] The Chinese invention patent with application number CN202410211358.2 proposes a coal mine underground belt foreign body recognition algorithm based on improved YOLOv8. The algorithm specifically includes an improved YOLOv8 model integrating a triple attention mechanism module, an EfficientViT network architecture, and an acceleration algorithm based on TensorRT-Alpha. The triple attention mechanism module mainly refers to adding a triple attention mechanism module to the basic YOLOv8 model. By integrating the triple attention mechanism module, the improved model can capture the interaction relationship between the three elements, thereby better understanding the input information, improving the target recognition accuracy, and reducing the amount of calculation and time complexity, and improving the calculation efficiency; the fusion of the EfficientViT network architecture refers to the use of the EfficientViT network architecture in the YOLOv8 model, introducing overlapping image blocks to embed C1 labels, and enhancing the ability of the YOLOv8 model in visual representation learning; the TensorRT-Alpha algorithm specifically refers to the use of TensorRT combined with Cuda c++ to achieve GPU computing acceleration of the training process and the reasoning process. The improved YOLOv8 model further improves the confidence and speed of foreign body identification in coal mine belts, and the identification effect is efficient and accurate.
[0007] The above technical solutions are innovative, but the following problems still need to be further solved:
[0008] 1. In traditional methods, due to the limitations of on-site monitoring conditions and data acquisition equipment, there is often a problem of insufficient data, which results in the trained model not being able to generalize well to new or rare working conditions, affecting the effectiveness and reliability of the model.
[0009] 2. Conventional feature extraction methods rely on global gradient information, which can easily cause the model to overfit or fall into local optimality during training, making it impossible for the model to fully learn the key information in the data, limiting the further improvement of model performance.
[0010] 3. Traditional feature dimensionality reduction methods mainly focus on reducing the dimension and complexity of data, and often ignore the preservation of the internal structure of the data, resulting in the loss of important structural information in the dimensionality reduction process, affecting the accuracy and explanatory power of the model in practical applications.
[0011] 4. When dealing with complex scratches and offset phenomena, traditional classification algorithms often cannot effectively distinguish similar fault types due to the lack of in-depth analysis capabilities of high-dimensional data features, thus reducing the accuracy and efficiency of diagnosis. Summary of the invention
[0012] The purpose of the present invention is to overcome the shortcomings of the prior art. To achieve the above purpose, a belt scratch and deviation monitoring method based on machine vision is adopted to solve the problems raised in the above background technology.
[0013] A belt scratch and deviation monitoring method based on machine vision comprises the following steps:
[0014] Step S1, collecting image data during the belt running process to form a training data set;
[0015] Step S2, generating samples based on a generative adversarial network algorithm based on conjugate gradient feature fusion to obtain an expanded training data set;
[0016] Step S3, inputting the expanded training data set into the feature extraction model for training to obtain a training data set after feature extraction;
[0017] Step S4, inputting the training data set after feature extraction into the feature dimensionality reduction model for training to obtain a training data set after dimensionality reduction;
[0018] Step S5, inputting the dimension-reduced training data set into the classifier model for training to obtain a trained model;
[0019] Step S6: Use the model trained in steps S3 to S5 to process the new sample, identify and monitor the belt scratches and deviations, and output the identification and monitoring results.
[0020] As a further solution of the present invention: the specific steps in step S1 include:
[0021] The image data of the belt during operation is collected through a real-time monitoring system, which uses a high-resolution industrial camera installed at key positions of the belt mechanical structure to capture detailed images of the belt surface;
[0022] The collected image data are annotated, wherein the annotated categories include no damage, scratch damage, left offset phenomenon, and right offset phenomenon.
[0023] As a further solution of the present invention: the specific steps in step S2 include:
[0024] Step S201, expanding the data of the training data set based on the generative adversarial network algorithm of conjugate gradient feature fusion, and initializing the parameters of the generator and the discriminator;
[0025] Step S202: Before the training step begins, the generator weights are pre-adjusted using a conjugate gradient algorithm to optimize the weight direction;
[0026] Step S203: Perform adversarial training. First, update the generator. The generator attempts to generate new images to minimize the adversarial loss with the discriminator.
[0027] Step S204: Each time the weight of the generator is updated, the momentum term is used to increase the inertia of the weight adjustment, so as to help escape from the local optimum and accelerate convergence;
[0028] Step S205, repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed.
[0029] As a further solution of the present invention: the specific steps in step S3 include:
[0030] Step S301, optimizing the parameters of the neural network based on the circular dynamic optimization neural network algorithm, initializing the neural network model, wherein a 3-layer fully connected neural network is used for feature extraction, the number of hidden layers of the neural network is 2, the first hidden layer includes 100 neurons, the second hidden layer includes 50 neurons, and the activation function is the ReL_RU activation function;
[0031] Initialize the weights w of the neural network r and bias b r , and set the initial learning rate The initial weights and biases are set as follows:
[0032]
[0033]
[0034] In the formula, ~ means obeying a specific distribution, The mean is 0 and the variance is σ r 2 The normal distribution of r 2 is the variance of the initial distribution;
[0035] Step S302: During the growth period, the algorithm quickly adapts to the data characteristics by fine-tuning the accelerated weights. The present invention uses an accelerated gradient descent algorithm to update the neural network parameters. The update method is expressed as:
[0036]
[0037]
[0038] In the formula, γ r is the acceleration factor, L R is the loss function for neural network training, is the gradient of the loss function with respect to the weight parameter, is the gradient of the loss function with respect to the bias parameter, is the weight parameter of the tth iteration, is the bias parameter of the tth iteration, is the weight parameter for the t+1th iteration, is the bias parameter for the t+1th iteration, is the symbol of partial derivative, η r is the learning rate during the growth phase;
[0039] Step S303: In the synthesis phase, the algorithm performs weight synthesis at this stage, that is, multiple weight parameters are synthesized into new parameters through specific operations to improve the generalization ability of the network. The synthesis function S(w r ) is calculated as:
[0040]
[0041] In the formula, is the weight The importance coefficient of , nr is the number of weight parameters;
[0042] Step S304: During the evaluation period, the algorithm evaluates the current network performance and decides whether to adjust the periodic optimization strategy. The performance evaluation function P(w r , b r ), outputs whether to enter the next cycle in the form of a decision function, and the decision method is expressed as:
[0043]
[0044] In the formula, θ r is the performance threshold; if P(w r , b r ) is calculated as 1, then it enters the next cycle, that is, the growth phase; otherwise, it enters the prophase of division;
[0045] Step S305: In the early stage of division, simulating the cell's preparation for division, the weights are slightly adjusted using the perturbation method Δw r and Δb r As the adjustment increment of weights and biases, the calculation method is expressed as:
[0046]
[0047]
[0048] In the formula, Δw r is the adjustment increment of the weight parameter, Δb r is the adjustment increment of the bias parameter, ξ r and β r are the amplitude and frequency parameters for fine tuning;
[0049] Step S306: During the splitting period, the algorithm implements a major structural adjustment by using weight pruning to constrain weights. The weight pruning function R(w r ) is calculated as:
[0050]
[0051] In the formula, λ r is the gradient threshold;
[0052] Step S307: During the dormant period, when the network gradually reaches a stable state based on the existing weights, the learning rate η is adjusted. r , so that the learning rate decreases, and the adjustment method is expressed as:
[0053]
[0054] In the formula, δ r is the attenuation coefficient, k r is the number of completed cycles;
[0055] Step S308: Repeat the above steps until the preset stop iteration condition is met, indicating that the model training is completed.
[0056] As a further solution of the present invention: the specific steps in step S4 include:
[0057] Step S401: Initialize network parameters. For encoder E and decoder D, set θ E is the encoder parameter, θ D For the decoder parameters, the weights and biases of the encoder and decoder are initialized randomly;
[0058] Step S402: Input feature vector x aThe encoder transforms the representation z into a low-dimensional space, and then reconstructs the output of the original dimension through the decoder, expressed as:
[0059] z=E(x a θ E )
[0060] And, the decoder D reconstructs the low-dimensional representation z into x a ^, which means:
[0061] x a ^=D(z;θ D )
[0062] In the formula, x a is the input feature vector, z is the encoded low-dimensional representation, x a ^ is the reconstructed output;
[0063] Step S403: Calculate the dual loss, where the dual loss is L A Including reconstruction error and sparse self-expression error It is expressed as:
[0064]
[0065] The reconstruction error loss measures the difference between the original input and the reconstructed output and is calculated as:
[0066]
[0067] The sparse self-representation error calculates the error between the encoded low-dimensional representation and its sparse linear combination, calculated as:
[0068]
[0069] In the formula, n is the number of samples, λ is ed and α ed is the regularization parameter, S is the self-expression matrix, For a single sample, is the corresponding reconstructed sample, z i is the encoded representation;
[0070] Step S404: Calculate the loss L using the chain rule based on the dual loss A About θ E and θ D The gradient of , and the parameter update, is expressed as:
[0071]
[0072]
[0073] Where η ed is the learning rate, is the dual loss L A About θ E The gradient of is the dual loss L A ;
[0074] Step S405, repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed.
[0075] As a further solution of the present invention: the specific steps in step S5 include:
[0076] Step S501: Initialize the weights and biases of the hidden layer of the extreme learning machine. The initialization method is expressed as:
[0077]
[0078]
[0079] In the formula, is the initial value of the hidden layer weight, with a variance of σ 2 Normal distribution of is the initial value of the hidden layer bias, with a variance of σ 2 Normal distribution of elm represents standard deviation;
[0080] Step S502: for each input sample after feature dimensionality reduction, the expression of data in high-dimensional quantum space is simulated using the principle of quantum computing, and the diversity and robustness of feature expression are enhanced through superposition and interference, which is expressed as:
[0081]
[0082] In the formula, Φ(x) represents the feature representation after quantum state superposition; x is the input data after feature dimensionality reduction; μ i and σ i are the mean and standard deviation of the ith quantum site, respectively; d represents the number of quantum sites; represents the superposition operation of quantum states; φ(x) is the Gaussian kernel nonlinear mapping function;
[0083] Step S503: After calculating the linear transformation from the input layer to the hidden layer, a nonlinear activation function is used for nonlinear mapping, and then a linear transformation to the output layer is performed, which is expressed as:
[0084]
[0085] Where z is the output of the hidden layer; is the weight from the hidden layer to the output layer; is the bias term; tanh() is the hyperbolic tangent activation function;
[0086] Step S504: Calculate the gradient of the weight of the output layer according to the loss function. The calculation method of the loss function is expressed as:
[0087]
[0088] Where L is the loss function; y c is the one-hot encoding representation of the true label; is the output probability predicted by the model, calculated by the softmax function; q is the regularization parameter; is the output layer weight; C is the number of categories;
[0089] Step S505: Use the gradient descent method to update the weight of the output layer. The weight update method is expressed as:
[0090]
[0091] Where η elm is the learning rate; is the loss function L with respect to weights The gradient of
[0092] Step S506, repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed.
[0093] As a further solution of the present invention: the specific steps in step S6 include:
[0094] Input the newly collected belt image into the trained feature extraction model to extract key visual features from the input belt image;
[0095] Then, the feature vector output by the feature extraction model is input into the trained data dimensionality reduction model to reduce the high-dimensional feature vector to a low-dimensional representation.
[0096] Finally, the reduced feature vector is input into the trained classifier model to classify the belt image and output the result.
[0097] Compared with the prior art, the present invention has the following technical effects:
[0098] By adopting the above technical solution, data expansion is performed by using a generative adversarial network based on conjugate gradient feature fusion. Through competitive optimization of the generator and the discriminator, the diversity and quality of training data are effectively improved, and the problem of weak model generalization ability caused by insufficient data in traditional methods is solved.
[0099] A circular dynamic optimization algorithm is used to optimize the parameters of the feature extraction model to simulate the biological cell cycle. Through the weight adjustment strategies at different stages, the overfitting and local optimal problems caused by the global gradient dependence of the conventional gradient descent method are solved.
[0100] The dual loss-based autoencoder is used for feature dimensionality reduction, which not only focuses on the reconstruction error, but also strengthens the structural information of the encoded features through the sparse self-expression layer, effectively dealing with the intrinsic structural characteristics of the data that traditional autoencoders may ignore.
[0101] The extreme learning machine based on adaptive quantum state superposition is used for classification, and the data feature capture capability of the model is enhanced by using the principle of quantum computing. It is particularly suitable for processing complex belt scratches and offset features. BRIEF DESCRIPTION OF THE DRAWINGS
[0102] The specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings:
[0103] Figure 1 A schematic diagram of the steps of the monitoring method disclosed in the present application;
[0104] Figure 2 A training flow chart of a neural network algorithm according to an embodiment disclosed in this application;
[0105] Figure 3 A training flow chart of the autoencoder neural network algorithm of the disclosed embodiment of the present application;
[0106] Figure 4 This is a flowchart of model training and application of the embodiment disclosed in this application. DETAILED DESCRIPTION
[0107] 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.
[0108] Please refer to Figure 1 In an embodiment of the present invention, a belt scratch and deviation monitoring method based on machine vision includes the following steps:
[0109] Step S1, collecting image data during the belt running process to form a training data set;
[0110] The image data of the present invention is collected in the real-time monitoring system during the operation of the belt, using a high-resolution industrial camera installed at a key position of the belt mechanical structure to capture detailed images of the belt surface. Each collected image data is stored in the jpg format with a pixel of 1920x1080.
[0111] Furthermore, the collected image data is annotated. The present invention uses manual labeling to assign labels to each image. Specific labeling categories include: no damage, scratch damage, left offset phenomenon, right offset phenomenon, a total of 4 fault categories.
[0112] Step S2, generating samples based on a generative adversarial network algorithm based on conjugate gradient feature fusion to obtain an expanded training data set;
[0113] In the task of this embodiment, the collection, acquisition, labeling and preprocessing of training data are time-consuming and labor-intensive, and insufficient training samples can easily lead to poor generalization ability of the model, while affecting the accuracy of the model. The present invention uses a generative adversarial network algorithm based on conjugate gradient feature fusion to generate samples, thereby achieving data expansion. The generative adversarial network based on conjugate gradient feature fusion consists of two parts: a generator (G) and a discriminator (D). The purpose of the generator is to produce a synthetic image that is visually close to the real belt image, and the discriminator attempts to distinguish the generated image from the actual collected image; the generator and the discriminator compete with each other during the training process, thereby improving the quality of the generated image. Based on the traditional generative adversarial network, the present invention uses a momentum term loss function to optimize the learning process of the generator. The momentum term loss function can help the algorithm to quickly decrease in the early stage of training, avoid local minima, and simulate data distribution more accurately.
[0114] Specifically, the training process of the generative adversarial network algorithm based on conjugate gradient feature fusion is as follows:
[0115] Step S201, initialize the parameters of the generator and the discriminator. In one embodiment, the parameters are initialized by small random numbers. Specifically, taking the weight parameter as an example, the weight θ of the generator G and the discriminator D is initialized. G and θ D The way is expressed as:
[0116]
[0117]
[0118] In the formula, θ G is the generator weight; θ D is the discriminator weight; Indicates that the mean is 0 and the variance is σ 2 Normal distribution of yris the initialization standard deviation. Preferably, σ yr Set to 0.1.
[0119] Step S202: Before the training step begins, the generator weight θ is pre-adjusted using the conjugate gradient algorithm. G , in order to optimize the weight direction and improve the training efficiency, the adjustment method is expressed as:
[0120]
[0121] In the formula, is the updated generator weight; α yr is the learning rate; CG() represents the conjugate gradient method; is the generator loss L G About θ G Preferably, α yr Set to 0.01.
[0122] Furthermore, the calculation method of the conjugate gradient method update term is expressed as:
[0123]
[0124] In the formula, r k is the residual of the current gradient and the previous gradient; β k is the direction update coefficient; p k-1 is the search direction of the previous step.
[0125] In one embodiment, β k The calculation method is:
[0126]
[0127] Based on this, in the pre-adjustment stage of the generator, the gradient update can be effectively guided to proceed along mutually orthogonal directions, thereby accelerating convergence and improving efficiency.
[0128] Step S203: Perform adversarial training. First, update the generator. The generator attempts to generate a new image x. gen , minimize the adversarial loss with the discriminator D, and the parameter update method is expressed as:
[0129]
[0130] In the formula, β yr is the learning rate of the generator; Represents the G The gradient of ; log represents the natural logarithm; D(G(z)) represents the score of the discriminator on the generator output. Preferably, β yr Set to 0.03.
[0131] Furthermore, the discriminator is updated and its weights are updated to accurately distinguish the generated image x gen and the real image x real , train its ability to distinguish between the two, then the discriminator parameter update method is:
[0132]
[0133] In the formula, γ yr is the learning rate of the discriminator; Represents the D gradient.
[0134] Step S204: Further, each time the weight of the generator is updated, the momentum term is used to increase the inertia of the weight adjustment, which helps to jump out of the local optimum and accelerate convergence, thereby improving learning efficiency. The updating strategy of the parameters of the generator is expressed as:
[0135]
[0136] In the formula, λ yr is the momentum adjustment factor; mr is the momentum ratio; is the gradient of the previous step; L G is the current generator loss. Preferably, λ yr Set to 0.1.
[0137] In one embodiment, the calculation method of the momentum ratio mr is expressed as:
[0138]
[0139] In the formula, ρ yr is the momentum decay coefficient. Preferably, ρ yr Set to 0.3.
[0140] Step S205, repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.
[0141] Step S3, inputting the expanded training data set into the feature extraction model for training to obtain a training data set after feature extraction;
[0142] After the expanded data is stretched into a one-dimensional vector, it is input into the feature extraction model for training the feature extraction model. The traditional gradient descent method relies on global gradient information to update the weights. Inspired by the periodic metabolic process of biological cells, different mechanisms are used to optimize the response and adaptability of organisms at different stages. The present invention uses a circular dynamic optimization algorithm to optimize the parameters of the neural network. The circular dynamic optimization algorithm adjusts the optimization strategy at different training stages to simulate the various stages in the cell cycle. Different strategies are used in each stage to adjust the weights and biases of the neural network, so that the algorithm can adapt to changes in training data more flexibly, reduce the risk of overfitting, and effectively jump out of the local optimal solution.
[0143] Specifically, Figure 2 As shown, the diagram is a training flow chart of a neural network algorithm based on circular dynamic optimization;
[0144] Step S301, initialize the neural network model. The present invention adopts a 3-layer fully connected neural network for feature extraction. The number of hidden layers of the neural network is 2. The first hidden layer includes 100 neurons, the second hidden layer includes 50 neurons, and the activation function is the ReL_RU activation function.
[0145] Furthermore, initialize the weights w of the neural network r and bias b r , and set the initial learning rate In one embodiment, the initial weights and biases are set as follows:
[0146]
[0147]
[0148] In the formula, ~ means obeying a specific distribution, The mean is 0 and the variance is σ r 2 The normal distribution of r 2 is the variance of the initial distribution. Preferably, σ r 2 Set to 0.01.
[0149] Step S302: During the growth period, the algorithm quickly adapts to the data characteristics by fine-tuning the accelerated weights. The present invention uses an accelerated gradient descent algorithm to update the neural network parameters. The update method is expressed as:
[0150]
[0151]
[0152] In the formula, γr is the acceleration factor, L R is the loss function for neural network training, is the gradient of the loss function with respect to the weight parameter, is the gradient of the loss function with respect to the bias parameter, is the weight parameter of the tth iteration, is the bias parameter of the tth iteration, is the weight parameter for the t+1th iteration, is the bias parameter for the t+1th iteration, is the symbol of partial derivative, η r is the learning rate during the growth phase. Preferably, the loss function L R Using cross entropy loss, η r Set to 0.01.
[0153] Furthermore, the acceleration factor γ r According to the decline rate and curvature of the loss function, in order to avoid over-adjustment, the calculation method is:
[0154]
[0155] In the formula, is the preset maximum acceleration coefficient, and min(,) is the minimum value function.
[0156] Step S303: In the synthesis phase, the algorithm performs weight synthesis, that is, synthesizes multiple weight parameters into new parameters through specific operations to improve the generalization ability of the network. In one embodiment, the synthesis function S(w r ) is calculated as:
[0157]
[0158] In the formula, is the weight The importance coefficient, n r is the number of weight parameters.
[0159] Furthermore, the importance coefficient α r Based on the previous stage w r The gradient size is dynamically calculated. For the i-th weight parameter, the calculation method of its importance coefficient is expressed as:
[0160]
[0161] In the formula, σ wr is the decay rate parameter.
[0162] Furthermore, the decay rate parameter σ wr The calculation method of control is:
[0163]
[0164] Step S304: During the evaluation period, the algorithm evaluates the current network performance and decides whether to adjust the periodic optimization strategy. In one embodiment, the performance evaluation function P(w r , b r ), outputs whether to enter the next cycle in the form of a decision function, and the decision method is expressed as:
[0165]
[0166] In the formula, θ r is the performance threshold. Preferably, θ r Set to 0.5. If P(w r , b r ) is calculated as 1, it enters the next cycle, that is, the growth phase; otherwise it enters the prophase of division.
[0167] Step S305: In the early stage of division, simulating the cell's preparation for division, the weights are slightly adjusted. In one embodiment, the perturbation method Δw r and Δb r As the adjustment increment of weights and biases, the calculation method is expressed as:
[0168]
[0169]
[0170] In the formula, Δw r is the adjustment increment of the weight parameter, Δb r is the adjustment increment of the bias parameter, ξ r and β r are the fine-tuned amplitude and frequency parameters. Preferably, ξ r Set to 5, β r Set to 3.14.
[0171] Furthermore, r and β r The setting method is expressed as:
[0172]
[0173]
[0174] In the formula, ρ r is a scaling factor for the perturbation amplitude. Preferably, ρ r Set to 0.95.
[0175] Step S306: During the splitting phase, the algorithm implements a major structural adjustment. In one embodiment, the adjustment is to use weight pruning to constrain the weights. The weight pruning function R(w r ) is calculated as:
[0176]
[0177] In the formula, λ r is the gradient threshold. Preferably, λ r Set to 0.01, that is, only parameters with weights greater than 0.01 are retained.
[0178] Step S307: During the dormant period, the network gradually reaches a stable state based on the existing weights. In this stage, the learning rate η is adjusted. r , so that the learning rate decreases, and the adjustment method is expressed as:
[0179]
[0180] In the formula, δ r is the attenuation coefficient, k r is the number of completed cycles. Preferably, δ r Set to 0.95.
[0181] Step S308, repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.
[0182] Step S4, inputting the training data set after feature extraction into the feature dimensionality reduction model for training to obtain a training data set after dimensionality reduction;
[0183] The data after feature extraction is input into the feature dimension reduction model to train the feature dimension reduction model. The present invention adopts an autoencoder algorithm for feature dimension reduction. Different from the traditional autoencoder algorithm, the present invention adopts an autoencoder neural network based on dual loss as a feature dimension reduction algorithm. The autoencoder neural network based on dual loss optimizes the feature dimension reduction process by utilizing the duality property of the encoder and the decoder. The encoder part compresses the input feature vector to a low-dimensional representation, and the decoder part attempts to reconstruct the input feature from this low-dimensional representation. The traditional autoencoder uses the reconstruction error as the optimization target. The autoencoder of the present invention not only minimizes the difference between the input and the reconstructed output, but also forces more structural information to be revealed in the encoded feature representation through a sparse self-expression layer, thereby realizing in-depth mining of the intrinsic structural characteristics of the data.
[0184] Specifically, Figure 3As shown, the diagram is a training flow chart of the autoencoder neural network algorithm based on dual loss;
[0185] Step S401: Initialize network parameters. In one embodiment, for encoder E and decoder D, let θ E is the encoder parameter, θ D The decoder parameters are initialized by random initialization of the weights and biases of the encoder and decoder.
[0186] Step S402: Input feature vector x a The encoder transforms them into low-dimensional representations z, which are then reconstructed into outputs of the original dimensions by the decoder, expressed as:
[0187] z=E(x a θ E )
[0188] And, the decoder D reconstructs the low-dimensional representation z into x a ^, which means:
[0189] x a ^=D(z;θ D )
[0190] In the formula, x a is the input feature vector, z is the encoded low-dimensional representation, x a ^ is the reconstructed output.
[0191] Step S403: Calculate the dual loss, where the dual loss L A Including reconstruction error and sparse self-expression error It is expressed as:
[0192]
[0193] The reconstruction error loss measures the difference between the original input and the reconstructed output and is calculated as:
[0194]
[0195] The sparse self-representation error calculates the error between the encoded low-dimensional representation and its sparse linear combination, calculated as:
[0196]
[0197] In the formula, n is the number of samples, λ is ed and α ed is the regularization parameter, S is the self-expression matrix, For a single sample, is the corresponding reconstructed sample, z iis the encoded representation.
[0198] Furthermore, the construction method of the self-expression matrix S is expressed as:
[0199] S=D(Z,γ pe )
[0200] D(Z,γ pe )=Softmax(-γ pe ||ZZ T ||)
[0201] In the formula, Z is the code of all samples z i The matrix, γ pe is a hyperparameter that controls the matrix density, || || represents the Euclidean distance calculation, and Softmax() is the Softmax function.
[0202] Step S404: Calculate the loss L using the chain rule based on the dual loss A About θ E and θ D The gradient of , and the parameter update, is expressed as:
[0203]
[0204]
[0205] Where η ed is the learning rate, is the dual loss L A About θ E The gradient of is the dual loss L A About θ D Preferably, η ed Set to 0.01.
[0206] Step S405, repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.
[0207] Step S5, inputting the dimension-reduced training data set into the classifier model for training to obtain a trained model;
[0208] The reduced-dimensional data is input into the classifier model for training. The present invention adopts an extreme learning machine algorithm based on adaptive quantum state superposition as the classification algorithm. Aiming at the problems of unstable classification accuracy and easy overfitting of the traditional extreme learning machine algorithm, the present invention adopts the state superposition and interference mechanism in the principle of quantum computing to enhance the model's ability to capture data features, which is particularly effective in processing complex belt scratches and offset features.
[0209] Specifically, the training process of the extreme learning machine algorithm based on adaptive quantum state superposition is as follows:
[0210] Step S501: Initialize the weights and biases of the hidden layer of the extreme learning machine. In one embodiment, the initialization method is expressed as:
[0211]
[0212]
[0213] In the formula, is the initial value of the hidden layer weight, with a mean of 0 and a variance of σ 2 Normal distribution of is the initial value of the hidden layer bias, with a mean of 0 and a variance of σ 2 Normal distribution of elm represents the standard deviation. Preferably, σ elm Set to 0.1.
[0214] Step S502: for each input sample after feature dimensionality reduction, the expression of data in high-dimensional quantum space is simulated using the principle of quantum computing, and the diversity and robustness of feature expression are enhanced through superposition and interference, which is expressed as:
[0215]
[0216] In the formula, Φ(x) represents the feature representation after quantum state superposition; x is the input data after feature dimensionality reduction; μ i and σ i are the mean and standard deviation of the ith quantum site, respectively; d represents the number of quantum sites; represents the superposition operation of quantum states; φ(x) is a Gaussian kernel nonlinear mapping function. In one embodiment, the number of quantum sites d is set to be the same as the dimension of the feature vector after dimensionality reduction.
[0217] Furthermore, the mean and standard deviation μ of the i-th quantum site i and σ i The calculation method is expressed as:
[0218]
[0219] In the formula, μ i is the mean value of the ith quantum site, calculated as all input samples x j The average value of i is the standard deviation of the ith qubit, calculated as the standard deviation of all input samples; N is the total number of samples.
[0220] Step S503: After calculating the linear transformation from the input layer to the hidden layer, a nonlinear activation function is used for nonlinear mapping, and then a linear transformation to the output layer is performed, which is expressed as:
[0221]
[0222] Where z is the output of the hidden layer; is the weight from the hidden layer to the output layer; is the bias term; tanh() is the hyperbolic tangent activation function.
[0223] Step S504: Calculate the gradient of the weight of the output layer according to the loss function. The calculation method of the loss function is expressed as:
[0224]
[0225] Where L is the loss function; y c is the one-hot encoding representation of the true label; is the output probability predicted by the model, calculated by the softmax function; q is the regularization parameter; is the output layer weight; C is the number of categories.
[0226] Furthermore, the regularization term It is used to precisely control the complexity of weights. The calculation method is expressed as:
[0227]
[0228] In the formula, is the square of the L2 norm of the output layer weight; w ij is the weight matrix The element in the i-th row and j-th column in ; m is the number of neurons in the output layer; k is the number of neurons in the previous layer.
[0229] Step S505: Use the gradient descent method to update the weights of the output layer. Since the weights and biases of the hidden layer do not participate in the training, only the weights of the output layer are involved, and the weight update method is expressed as:
[0230]
[0231] Where η elm is the learning rate; is the loss function L with respect to weights Preferably, η elm Set to 0.04.
[0232] Step S506, repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.
[0233] Step S6, using the model trained in steps S3 to S5 to process new samples, identify and monitor belt scratches and deviations, and output the identification and monitoring results;
[0234] The trained model is used to process new samples to achieve accurate identification and monitoring of belt scratches and deviations. In one embodiment, feature extraction model training, data dimension reduction model training and classifier model training have been completed, and these trained models are used to process newly collected belt images.
[0235] In this embodiment, Figure 4 As shown, the diagram is a model training and application flow chart, the newly collected belt image is input into the trained feature extraction model, and the key visual features are extracted from the input belt image. Further, the feature vector output by the feature extraction model is input into the trained data dimension reduction model, and the high-dimensional feature vector is reduced to a low-dimensional representation. Further, the reduced-dimensional feature vector is input into the trained classifier model to classify the belt image. In this embodiment, the classification categories include: no damage, scratch damage, left offset phenomenon, right offset phenomenon, a total of 4 fault categories.
[0236] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents, and all should be included within the scope of protection of the present invention.
Claims
1. A belt scratch and deviation monitoring method based on machine vision, characterized in that: The following steps are involved: Step S1, collecting image data during the belt running process to form a training data set; Step S2, generating samples based on a generative adversarial network algorithm based on conjugate gradient feature fusion to obtain an expanded training data set; Step S3, inputting the expanded training data set into the feature extraction model for training to obtain a training data set after feature extraction; Step S4, inputting the training data set after feature extraction into the feature dimensionality reduction model for training to obtain a training data set after dimensionality reduction; Step S5, inputting the dimension-reduced training data set into the classifier model for training to obtain a trained model; Step S6: Use the model trained in steps S3 to S5 to process the new sample, identify and monitor the belt scratches and deviations, and output the identification and monitoring results.
2. The belt scratch and deviation monitoring method based on machine vision according to claim 1, characterized in that: The specific steps in step S1 include: The image data of the belt during operation is collected through a real-time monitoring system, which uses a high-resolution industrial camera installed at key positions of the belt mechanical structure to capture detailed images of the belt surface; The collected image data are annotated, wherein the annotated categories include no damage, scratch damage, left offset phenomenon, and right offset phenomenon.
3. The belt scratch and deviation monitoring method based on machine vision according to claim 1, characterized in that: The specific steps in step S2 include: Step S201, expanding the data of the training data set based on the generative adversarial network algorithm of conjugate gradient feature fusion, and initializing the parameters of the generator and the discriminator; Step S202: Before the training step begins, the generator weights are pre-adjusted using a conjugate gradient algorithm to optimize the weight direction; Step S203: Perform adversarial training. First, update the generator. The generator attempts to generate new images to minimize the adversarial loss with the discriminator. Step S204: Each time the weight of the generator is updated, the momentum term is used to increase the inertia of the weight adjustment, so as to help escape from the local optimum and accelerate convergence; Step S205, repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed.
4. The belt scratch and deviation monitoring method based on machine vision according to claim 1, characterized in that: The specific steps in step S3 include: Step S301, optimizing the parameters of the neural network based on the circular dynamic optimization neural network algorithm, initializing the neural network model, wherein a 3-layer fully connected neural network is used for feature extraction, the number of hidden layers of the neural network is 2, the first hidden layer includes 100 neurons, the second hidden layer includes 50 neurons, and the activation function is the ReL_RU activation function; Initialize the weights w of the neural network r and bias b r , and set the initial learning rate The initial weights and biases are set as follows: In the formula, ~ means obeying a specific distribution, The mean is 0 and the variance is σ r 2 The normal distribution of r 2 is the variance of the initial distribution; Step S302: During the growth period, the algorithm quickly adapts to the data characteristics by fine-tuning the accelerated weights. The present invention uses an accelerated gradient descent algorithm to update the neural network parameters. The update method is expressed as: In the formula, γ r is the acceleration factor, L R is the loss function for neural network training, is the gradient of the loss function with respect to the weight parameter, is the gradient of the loss function with respect to the bias parameter, is the weight parameter of the tth iteration, is the bias parameter of the tth iteration, is the weight parameter for the t+1th iteration, is the bias parameter for the t+1th iteration, is the symbol of partial derivative, η r is the learning rate during the growth phase; Step S303: In the synthesis phase, the algorithm performs weight synthesis at this stage, that is, multiple weight parameters are synthesized into new parameters through specific operations to improve the generalization ability of the network. The synthesis function S(w r ) is calculated as: In the formula, is the weight The importance coefficient of , nr is the number of weight parameters; Step S304: During the evaluation period, the algorithm evaluates the current network performance and decides whether to adjust the periodic optimization strategy. The performance evaluation function P(w r ,b r ), outputs whether to enter the next cycle in the form of a decision function, and the decision method is expressed as: In the formula, θ r is the performance threshold; if P(w r ,b r ) is calculated as 1, then it enters the next cycle, that is, the growth phase; otherwise, it enters the prophase of division; Step S305: In the early stage of division, simulating the cell's preparation for division, the weights are slightly adjusted using the perturbation method Δw r and Δb r As the adjustment increment of weights and biases, the calculation method is expressed as: In the formula, Δw r is the adjustment increment of the weight parameter, Δb r is the adjustment increment of the bias parameter, ξ r and β r are the amplitude and frequency parameters for fine tuning; Step S306: During the splitting period, the algorithm implements a major structural adjustment by using weight pruning to constrain weights. The weight pruning function R(w r ) is calculated as: In the formula, λ r is the gradient threshold; Step S307: During the dormant period, when the network gradually reaches a stable state based on the existing weights, the learning rate η is adjusted. r , so that the learning rate decreases, and the adjustment method is expressed as: In the formula, δ r is the attenuation coefficient, k r is the number of completed cycles; Step S308: Repeat the above steps until the preset stop iteration condition is met, indicating that the model training is completed.
5. The belt scratch and deviation monitoring method based on machine vision according to claim 1, characterized in that: The specific steps in step S4 include: Step S401: Initialize network parameters. For encoder E and decoder D, set θ E is the encoder parameter, θ D For the decoder parameters, the weights and biases of the encoder and decoder are initialized randomly; Step S402: Input feature vector x a The encoder transforms the representation z into a low-dimensional space, and then reconstructs the output of the original dimension through the decoder, expressed as: z=E(x a ;θ E ) And, the decoder D reconstructs the low-dimensional representation z into x a ^, which means: x a &=D(z;θ D ) In the formula, x a is the input feature vector, z is the encoded low-dimensional representation, x a ^ is the reconstructed output; Step S403: Calculate the dual loss, where the dual loss L A Including reconstruction error and sparse self-expression error It is expressed as: The reconstruction error loss measures the difference between the original input and the reconstructed output and is calculated as: The sparse self-representation error calculates the error between the encoded low-dimensional representation and its sparse linear combination, calculated as: In the formula, n is the number of samples, λ is ed and α ed is the regularization parameter, S is the self-expression matrix, is a single sample, x a ^ i is the corresponding reconstructed sample, z i is the encoded representation; Step S404: Calculate the loss L using the chain rule based on the dual loss A About θ e and θ D The gradient of , and the parameter update, is expressed as: Where η ed is the learning rate, is the dual loss L A About θ e The gradient of is the dual loss L A ; Step S405, repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed.
6. The belt scratch and deviation monitoring method based on machine vision according to claim 1, characterized in that: The specific steps in step S5 include: Step S501: Initialize the weights and biases of the hidden layer of the extreme learning machine. The initialization method is expressed as: In the formula, is the initial value of the hidden layer weight, with a variance of σ 2 Normal distribution of is the initial value of the hidden layer bias, with a variance of σ 2 The normal distribution of elm represents standard deviation; Step S502: for each input sample after feature dimensionality reduction, the expression of data in high-dimensional quantum space is simulated using the principle of quantum computing, and the diversity and robustness of feature expression are enhanced through superposition and interference, which is expressed as: In the formula, Φ(x) represents the feature representation after quantum state superposition; x is the input data after feature dimensionality reduction; μ i and σ i are the mean and standard deviation of the ith quantum site, respectively; d represents the number of quantum sites; Represents the superposition operation of quantum states; φ(x) is the Gaussian kernel nonlinear mapping function; Step S503: After calculating the linear transformation from the input layer to the hidden layer, a nonlinear activation function is used for nonlinear mapping, and then a linear transformation to the output layer is performed, which is expressed as: Where z is the output of the hidden layer; is the weight from the hidden layer to the output layer; is the bias term; tanh() is the hyperbolic tangent activation function; Step S504: Calculate the gradient of the weight of the output layer according to the loss function. The calculation method of the loss function is expressed as: Where L is the loss function; y c is the one-hot encoding representation of the true label; is the output probability predicted by the model, calculated by the softmax function; q is the regularization parameter; is the output layer weight; C is the number of categories; Step S505: Use the gradient descent method to update the weight of the output layer. The weight update method is expressed as: Where η elm is the learning rate; is the loss function L with respect to weights The gradient of Step S506, repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed.
7. The belt scratch and deviation monitoring method based on machine vision according to claim 1, characterized in that: The specific steps in step S6 include: Input the newly collected belt image into the trained feature extraction model to extract key visual features from the input belt image; Then, the feature vector output by the feature extraction model is input into the trained data dimensionality reduction model to reduce the high-dimensional feature vector to a low-dimensional representation. Finally, the reduced feature vector is input into the trained classifier model to classify the belt image and output the result.
Citation Information
Cited By
Digital human image copying method and system based on NeRF
CN119399603A
A digital human image reproduction method and system based on NeRF
CN119399603B
Building digital twin data processing method based on artificial intelligence
CN119809467A
Method for monitoring gas leakage based on spectral vector data processing
CN119961656A
A method for monitoring gas leakage based on spectral vector data processing
CN119961656B
