Intelligent classification method for tool damage grayscale image based on adaptive noise reduction
By jointly training an adaptive noise reduction image pre-training model and an intelligent classification module, the problems of low recognition efficiency and parameter complexity in tool damage image classification under complex environments are solved, achieving efficient and accurate image classification results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-05
- Publication Date
- 2026-03-24
AI Technical Summary
Existing tool damage image classification methods have low recognition efficiency in complex environments, complex parameter settings, and are sensitive to noise, making them difficult to apply to various machining scenarios.
An adaptive noise reduction method is adopted. By jointly training an image noise reduction pre-training model and an intelligent classification module, image noise is automatically identified and the noise reduction level is adaptively adjusted, simplifying the network structure and improving classification accuracy.
It achieves efficient and accurate tool damage image classification in complex environments, reduces model training time, and improves classification performance and adaptability.
Smart Images

Figure CN115345872B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent image classification, specifically a method for intelligent classification of grayscale images of tool damage based on adaptive noise reduction. Background Technology
[0002] Image classification is an important application of computer vision technology, while image recognition primarily involves processing information of considerable complexity. It mainly relies on researchers' practical experience, combined with computer programs to simulate and implement relevant content. The computer implementation of this technology is fundamentally similar to the basic principles of human image recognition. Unlike human perception, which is greatly affected by external factors, computers are unaffected by any external influences. Humans don't just rely on stored image memories for recognition; they classify image features and then use these features to identify the image. Computers employ the same image recognition principles, classifying and extracting important image features and effectively eliminating useless or redundant features to achieve image recognition. However, the computer's ability to extract these features is unstable, significantly impacting the efficiency of image recognition. It typically requires various software programs to process images differently, extract their inherent image features, and then use image classification models. This process is time-consuming, making image recognition highly subjective and labor-intensive.
[0003] Chinese Patent Publication No. CN109635856A discloses an intelligent classification system and method for production line defect images. It utilizes a multi-level intelligent classification module for image classification, achieving excellent results. However, it consumes significant computational resources, exhibits poor stability in practical use, and has low recognition efficiency. Chinese Patent Publication No. CN112418357A discloses an artificial intelligence-based image classification method. This method achieves automatic image detection, recognition, and classification through the Dssd_ResNet_coco model and the Bi-LSTM-Attention model. However, it requires manual parameter setting. Tool damage images, due to their small damaged areas and similar damage types, demand high network feature extraction capabilities and a large number of parameters for classification, making practical application difficult. Chinese Patent Publication No. CN114331944A discloses an artificial intelligence-based defect image classification method and system. This method can perform detailed comparison and classification of defect images, but its application scenarios are limited to microelectromechanical microphone products. It has poor resistance to interference from oil and dust during actual machine tool processing, and the classification results are easily affected. In summary, current tool damage image classification methods all have certain limitations, and there is an urgent need for a reliable tool image classification method with strong feature extraction capabilities that can be applied to various machining process scenarios. Summary of the Invention
[0004] The purpose of this invention is to provide an intelligent classification method for grayscale images of tool damage based on adaptive noise reduction. This method can automatically identify whether the input image contains noise and predict the type of tool damage. At the same time, it can adaptively adjust the noise reduction level based on the prediction results and the backpropagation algorithm to improve the model classification accuracy, thereby optimizing the intelligent classification performance of grayscale images of tool damage.
[0005] The technical solution to achieve the objective of this invention is as follows:
[0006] A method for intelligent classification of tool damage grayscale images based on adaptive noise reduction includes the following steps: a clean image and a noise image that corresponds to it at the pixel level are grayscaled and used as a training sample, with the noise image as input and the clean image as output, thus forming a training set;
[0007] A pre-trained image denoising model is established, which includes a step for determining whether the input image contains noise, a module M for feature channel-level fusion of feature maps, which can fuse feature maps obtained under different convolutional layers; thus obtaining the noise residual, and subtracting the noise residual from the noise image through a loss function to obtain the denoised image, and finally obtaining the pre-trained model;
[0008] The pre-trained model and the intelligent classification module are jointly trained end-to-end. The network model is constructed using training, validation, and test sets to jointly optimize the model parameters. At the same time, an α-balance parameter is added to the denoising module. After denoising the noisy image, a preliminary classification result is obtained. Using the α-loss balance parameter, the error backpropagation algorithm is used to return the preliminary prediction result and adaptively adjust the denoising level based on the classification performance, ultimately achieving optimal classification performance.
[0009] Compared to existing intelligent classification methods for grayscale images of tool damage, this invention has the following significant advantages:
[0010] (1) The network structure of this invention is simple, the number of network layers is shallow, and the model training time is much shorter than that of mainstream classification networks.
[0011] (2) The present invention has two functions: image noise reduction and classification. It can also achieve a certain classification effect for tool damage images obtained in actual processing environment.
[0012] (3) The present invention can automatically determine whether an image has noise, eliminating the redundant processing of noiseless image denoising. At the same time, it can adaptively adjust the denoising level according to the prediction feedback results to improve the prediction accuracy of the model. Attached Figure Description
[0013] Figure 1 A schematic diagram illustrating the overall implementation of an intelligent classification method for tool damage images based on adaptive noise reduction;
[0014] Figure 2 for Figure 1 A schematic diagram of the specific process of the adaptive noise reduction module;
[0015] Figure 3 for Figure 1 A schematic diagram illustrating the specific process of the intelligent classification module;
[0016] Figure 4 for Figure 1 A schematic diagram of the structure of the feature fusion module M;
[0017] Figure 5 The flowchart illustrates the implementation of an intelligent classification model for tool damage images using adaptive noise reduction for image prediction. Detailed Implementation
[0018] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the scope of protection of this invention.
[0020] To achieve intelligent classification of grayscale images of tool damage, this embodiment provides an intelligent classification method for grayscale images of tool damage based on adaptive denoising. Specifically, it includes two parts: establishing an adaptive image denoising pre-trained model and using the graph model and the intelligent classification model for end-to-end joint training to obtain the final model.
[0021] Pre-established adaptive image denoising model, such as Figure 2 As shown, the process includes the following:
[0022] First, prepare the training set by adding different types of noise combinations to the clean image using a fixed noise level, including: 1) Gaussian noise; 2) salt and pepper noise, to obtain the noise image corresponding to the clear image. Then, convert the clean image and the noise image corresponding to the clear image to grayscale to use as a training sample. The noise image is the input and the clean image is the output, thus constructing the training set.
[0023] To accommodate the input image size of the pre-trained model, the size of each set of clear images and the corresponding noisy images is uniformly set to 224×224, and they are used as a training sample.
[0024] Then, an adaptive image denoising model is built, which includes a feedforward propagation path for amplifying the number of channels in the input image feature map and a feedback propagation path for channel-level stitching and feature mapping alignment of adjacent feature maps.
[0025] The feedforward propagation path consists of five sequentially connected 3×3 convolutional layers, four activation functions, and four batch normalization layers, specifically, as follows: Figure 2 As shown, the kernel size is set to 3×3 and the padding is set to padding=0. Except for the output of the convolutional layer C1, which is only connected by the activation layer Rclu, the other activation layers Relu are connected to the output of the convolutional layers, and the normalization layer BN is connected to the output of the activation layers.
[0026] The feedback propagation path consists of four sequentially connected 3×3 convolutional layers, four activation functions, four batch normalization layers, and a module M interspersed between every two convolutional layers, which includes upsampling and feature channel-level concatenation. Specifically, as shown... Figure 3 As shown, in the feedback propagation path, a feature fusion module M is inserted between the BN layer and the convolutional layer, the convolutional layer CONV connected to the feature fusion module M is connected to the activation layer Rclu output of the convolutional layer, and the batch normalization layer BN output of the activation layer is connected to the activation layer Rclu output of the activation layer.
[0027] Specifically, the activation functions of the activation layers are all Rclu activation functions. Except for the first and last convolutional layers, each ReLU activation function is followed by a batch normalization layer.
[0028] Intelligent classification model establishment, such as Figure 3 As shown, the process includes the following:
[0029] First, prepare at least two training sets to meet the training needs of the denoising module and the joint training network. The images used by the two can overlap. The two networks require at least two optimization algorithms and two iterations to obtain two network models.
[0030] Then, an intelligent classification model is built, defining four categories: chipped edge, broken edge, flank wear, and crack. The classification module includes four convolutional layers, each followed by a pooling layer, and the last pooling layer is followed by a fully connected layer and a mapping layer. Specifically, as follows... Figure 3 As shown, the activation function used in all cases is ReLU.
[0031] Specifically, the adaptive noise reduction module has 9 convolutional layers, including 5 convolutional layers in the feedforward path and 4 convolutional layers in the feedback path. Each convolutional layer is followed by an activation layer, and the activation function used in all layers is ReLU. A feature fusion module M is interspersed between the feedforward and feedback paths to perform cross-layer connections, and the convolutional layers C1-C9, C2-C8, C3-C7, and C4-C6 are fused at the feature map channel level to maximize the fusion effect.
[0032] During training, the image denoising model established by training set is used to obtain the trained image denoising model. That is, during the training process, the noisy image is reduced in size and increased in number of channels by the feedforward propagation network, and then the feature map size is enlarged by the feedback propagation network. Then the feature map channel-level splicing is performed by the feature fusion module M. Finally, the network learns the noise residual, subtracts it from the noisy image, and obtains the clear image. The denoising principle is shown in Equation (1). Then, the network loss is calculated based on the clear image, and each loss is weighted and superimposed to obtain the final loss. Then, the network weight parameters are updated by backpropagation using the final loss function to obtain the final prediction result. The principle is shown in Equation (2).
[0033]
[0034] here For a clear image, For noisy images, The noise residual is learned.
[0035]
[0036] Here vector c represents the category. Here, c is set to 4.
[0037] In this embodiment, the training set used for adaptive noise reduction pre-training consists of 1000 grayscale images of tool damage. Of these, 450 images have Gaussian noise added, 450 images have salt-and-pepper noise added, and the remaining 100 images are used as clean images to train noisy image recognition. These images are divided into training and test sets in a 9:1 ratio, with a learning rate of 1e. -4 The momentum was set to 0.9, and the SGD optimizer was used for training. Considering GPU performance and classification accuracy, each batch of training data was required to include 16 224×224 image patches, and the loss function was... As shown in Equation (3), the pre-trained adaptive noise reduction model is saved after 2000 iterations.
[0038] After the model is trained, it is jointly trained end-to-end with an image intelligent classification module. The classification module consists of four convolutional layers, each followed by a pooling layer, and the last pooling layer is followed by a fully connected layer and a mapping layer. The loss function of the classification module is... As shown in equation (4); when training the image denoising model, the input image size is the original image size, the input layer size is uniformly set to 224×224, the learning rate used during training is 1e-1 to 1e-4, the momentum is set to 0.9, and the training optimizer used is the SGD optimizer. Considering the limitations of different computer performance and to prevent training failure, it is required that each batch of training data includes 16 224×224 (2≤n≤128) image blocks, and the loss function of the jointly trained network is... As shown in Equation (5), the training data is used to calculate the loss between the training data and the denoised image through feedforward propagation, and then the denoising level is updated through the backpropagation algorithm. The number of iterations is 8000, and the model parameters are saved.
[0039]
[0040] Here, H, W, and C represent the height, width, and number of channels of the feature map, respectively. Indicates the input image. This indicates the output image.
[0041]
[0042] Here v i This indicates the value output by the classifier, which is between 0 and 1.
[0043]
[0044] Here, an α-balanced loss parameter is set. This value is used to automatically adjust the noise reduction level to reduce the value of the loss function.
[0045] Once the jointly trained model is trained, when using it, such as Figure 5 As shown, the noisy image is input into the intelligent classification model of tool damage grayscale image with adaptive denoising. The pre-trained model is loaded, and a preliminary prediction result is obtained through noise recognition and denoising processing. The preliminary prediction result is returned by the error backpropagation algorithm through the α loss balance parameter of the network and the denoising level is adaptively adjusted. After obtaining the optimal classification result, it is output to obtain the final prediction result.
[0046] The image denoising model described above has a simple structure and is relatively fast. Compared with similar classification networks, it has higher prediction accuracy while also performing image denoising. It is also effective for classifying difficult samples. Furthermore, the adaptive denoising module enhances the model's transferability.
[0047] The specific embodiments described above illustrate the technical solution and beneficial effects of the present invention in detail. It should be understood that the above description is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, additions, and equivalent substitutions made within the scope of the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for intelligent classification of tool damage grayscale images based on adaptive noise reduction, characterized in that, Adaptive noise reduction module and intelligent image classification module; The adaptive noise reduction module steps include using a clean grayscale image and its corresponding noisy image as training samples, with the noisy image as input and the clean image as output, and using this as a training set for training to obtain a pre-trained model of the noise reduction module. The pre-trained model is combined with the classification module for end-to-end joint training; the network model is constructed using training, validation, and test sets. The adaptive noise reduction module has a convolutional layer, where 7 ≤ a ≤ 11, and a is an odd number. Each convolutional layer has the same stride, and the image edge padding is set to 0. The feature fusion module M is used to stitch and fuse the feature maps. The noise reduction module consists of feedforward and feedback paths, with the number of convolutional layers in the feedforward and feedback paths set to [values to be filled in]. The feature maps obtained in the feedforward path contain shallow spatial information, while the feature maps obtained in the feedback path contain deep semantic information. Channel-level fusion of the feature maps obtained after the convolutional layers C1-C9, C2-C8, C3-C7, and C4-C6 can maximize the balance between spatial and semantic advantages. During training, the image denoising model established by training set is used to obtain the trained image denoising model. That is, during the training process, the noisy image is reduced in size and increased in number of channels by the feedforward propagation network, and then the feature map size is enlarged by the feedback propagation network. Then the feature map channel-level splicing is performed by the feature fusion module M. Finally, the network learns the noise residual, subtracts it from the noisy image, and obtains the clear image. The denoising principle is shown in Equation (1). Then, the network loss is calculated based on the clear image, and each loss is weighted and superimposed to obtain the final loss. Then, the network weight parameters are updated by backpropagation using the final loss function to obtain the final prediction result. The principle is shown in Equation (2). here For a clear image, For noisy images, The noise residuals learned; Here vector c represents the category. Here, c is set to 4; When in use, a grayscale image of the tool damage is input. Before processing, the network has a priori step, which determines whether the image needs noise reduction. Noise-free images are directly classified and predicted to improve the model training speed and save training memory. Noisy images are processed by the preliminary noise reduction and classification module to obtain a preliminary prediction result. Through the network's loss balance parameter, the error backpropagation algorithm is used to return the preliminary prediction result and adaptively adjust the noise reduction level to improve the final classification performance.
2. The intelligent classification method for tool damage grayscale images based on adaptive noise reduction as described in claim 1, characterized in that: According to the module, at least two types of training sets are required to satisfy the use of the denoising pre-training module and the joint training network. The images in the former training set are all noisy images, while the latter training set contains both noisy and denoising images. The images used by the two overlap. Depending on the characteristics of the network, different optimization algorithms can be selected to speed up the convergence of the model. Two different iteration numbers are set. The joint training images are numerous, and the training task is difficult, requiring a large number of iterations. Therefore, at least two optimization algorithms and two iteration numbers are needed to obtain two network models.
3. The intelligent classification method for tool damage grayscale images based on adaptive noise reduction as described in claim 2, characterized in that: For the noise reduction pre-trained model: set the number of iterations b for different situations, 1000≤b≤3000, b∈N; select according to the number of training set images, no less than 1000 images.
4. The intelligent classification method for tool damage grayscale images based on adaptive noise reduction as described in claim 3, characterized in that... ∶ The number of classification categories in the image intelligent classification module is set to c, where c ≥ 2, c ∈ N, and the setting of c is based on the tool damage category.
5. The intelligent classification method for tool damage grayscale images based on adaptive noise reduction as described in claim 4, characterized in that: The stride of each convolutional layer in the image intelligent classification module is random, but it must correspond to the pooling layer. Finally, the feature map size input to the fully connected layer must be 1×1.
6. The intelligent classification method for tool damage grayscale images based on adaptive noise reduction as described in claim 5, characterized in that: The model performance was evaluated using internationally recognized performance evaluation metrics: PSNR, peak signal-to-noise ratio, SSIM, and structural similarity were selected as the performance evaluation criteria for the adaptive noise reduction module; Top-1 accuracy was selected as the evaluation criterion for the classification results.
7. The intelligent classification method for tool damage grayscale images based on adaptive noise reduction as described in claim 6, characterized in that: For jointly trained network models: there are many images and the training task is difficult, requiring a large number of iterations. Let the number of iterations be d, 6000≤d≤10000, d∈N. The number of iterations is based on the number of training sets. This interval is the interval of the number of iterations required for the model to converge.
8. The intelligent classification method for tool damage grayscale images based on adaptive noise reduction as described in claim 7, characterized in that: The adaptive noise reduction module and the joint training network only input the original image size during training. The network uniformly sets the training size to n×n, 50≤n≤500, n∈N; the value of n is based on the graphics card performance, and here n=224; the batch size of the two networks during training is set to m, 2≤m≤128, m∈N, and the value of m is also based on the graphics card performance.
Citation Information
Patent Citations
Production line defect image intelligent classification system and classification method
CN109635856A
Image classification method based on artificial intelligence
CN112418357A
Artificial intelligence flaw image classification method and system
CN114331944A