A turning tool wear classification method based on an improved MobileNet_V2 network model

By improving the MobileNet_V2 network model, introducing the ECA_Net attention mechanism and LeakyRelu activation function, and performing transfer learning, the problem of inaccurate identification of tool wear information was solved, achieving efficient wear classification and improving accuracy and computational efficiency.

CN116704258BActive Publication Date: 2026-03-03JILIN INST OF CHEM TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310763255.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-27
Publication Date
2026-03-03
Estimated Expiration
2043-06-27

AI Technical Summary

Technical Problem

In existing technologies, the identification of tool wear information is inaccurate and the calculation of model parameters is large, resulting in low classification accuracy and affecting machining precision.

Method used

An improved MobileNet_V2 network model is adopted, and a lightweight attention mechanism ECA_Net is introduced into the bottleneck residual module. The activation function is modified to LeakyRelu, and transfer learning is performed to optimize the hyperparameters of the training process.

Benefits of technology

It improved the accuracy of tool wear classification to 96%, reduced the amount of computation, and improved the model's generalization ability and training speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116704258B_ABST
    Figure CN116704258B_ABST
Patent Text Reader

Abstract

The application provides a turning tool wear classification method based on an improved MobileNet_V2 network model, and specifically comprises the following steps: 1. Under the condition of multi-working-condition turning operation, a turning tool surface wear image is collected, a turning tool wear dataset is established, wear grades are divided into two categories of normal wear and sharp wear, initial data sets are preprocessed to form input images; 2. An improved MobileNet_V2 network is built, which comprises the following steps: introducing a lightweight attention mechanism ECA_Net into a reverse residual module of the MobileNet_V2 model; modifying parameters of a classifier; modifying activation functions of all network layers except a bottleneck layer, and replacing Relu6 with LeakyRelu; adding transfer learning, freezing all weights of a feature extraction part, learning parameters of a rear network, optimizing parameters involved in a training process; 3. The input image is input into the improved MobileNet_V2 model, the wear degree of the input image is identified to be normal wear or sharp wear, the identification and classification of the turning tool wear degree are completed, and it is determined whether the turning tool can continue to be used. The method can be used for low-cost identification of tool wear states in the turning process, has the advantages of fast calculation speed, high wear degree classification precision and strong model generalization ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology, specifically relating to a method for classifying tool wear based on an improved MobileNet_V2 network model. Background Technology

[0002] During turning, the machining accuracy and surface quality of the workpiece are affected by the wear condition of the cutting tool. To prevent a decline in machining accuracy due to rapid tool wear during processing, research on tool wear is essential. However, tool wear is actually a real-time and dynamic process, making accurate assessment of the tool wear condition during machining a challenging task.

[0003] In recent years, numerous studies have discussed methods for monitoring tool wear, primarily focusing on two categories: indirect and direct methods. Indirect methods mainly utilize sensors to collect vibration signals, motor current, and other signals during the turning process, then analyze the collected operating parameters to indirectly identify the tool wear condition. Direct methods primarily use machine vision systems to directly monitor tool wear, or acquire images using industrial cameras, followed by further image analysis. This method is clearly more intuitive and accurate. Determining the wear condition by analyzing the input features of tool wear images is currently the main research and exploration method.

[0004] Currently, methods for determining wear status by analyzing wear image features often fail to obtain accurate wear information, resulting in low classification accuracy. Convolutional neural networks (CNNs) can automatically select features, achieving higher classification accuracy. This method is clearly more intuitive and accurate. Therefore, applying CNNs to the classification and recognition of tool wear types is of great significance for classifying the wear status of lathe tools and improving machining accuracy. Summary of the Invention

[0005] The purpose of this invention is to provide a tool wear classification method based on an improved MobileNet_V2 network model, which mainly solves the problems of inaccurate wear information identification, large number of model parameters and high computational load, and low classification accuracy.

[0006] The objective of this invention is achieved through the following technical solution:

[0007] A method for classifying tool wear based on an improved MobileNet_V2 network model, mainly including:

[0008] Step 1: Use an image acquisition device to acquire images of the wear surface of the cutting tool and establish a cutting tool wear dataset; divide the wear level into two categories: normal wear and acute wear; preprocess the initial dataset to form input images; and perform data augmentation on the two types of wear images.

[0009] Step 2: Build the improved MobileNet_V2 network model;

[0010] Step 3: Input the image from Step 1 into the improved MobileNet_V2 model, train it, and identify the wear level in the input image as a certain type of wear to determine whether the tool can continue to be used;

[0011] In step 1, the image acquisition device includes a lens, a light source, an industrial camera, and a display screen;

[0012] In step 1, the two types of wear levels are divided into two categories based on thresholds: a wear value VB of 0-0.4mm is set as the normal wear stage of the carbide turning tool, during which the tool can be used for normal machining; 0.4-0.6mm is set as the rapid wear stage, before which the tool needs to be replaced in time.

[0013] In step 1, the data preprocessing includes: randomly cropping the training data images into 224×224 input feature images; cropping the validation data images into 224×224; and standardizing the training and validation sets.

[0014] In step 2, the improved MobileNet_V2 includes: introducing the lightweight attention mechanism ECA_Net into the bottleneck residual module of the MobileNet_V2 model; modifying the activation function; adding transfer learning to the MobileNet_V2 model to learn the parameters of the later network; modifying the number of classifier outputs; and optimizing the hyperparameters involved in the training process.

[0015] Furthermore, ECA_Net refers to a novel channel attention mechanism that removes the fully connected layers of SENet and learns through one-dimensional convolutions. ECA_Net is used to insert into convolutional neural networks to enhance model performance.

[0016] Furthermore, the bottleneck residual module transforms the implementation channel. In this structure, the first layer uses a 1x1 convolutional kernel size and a ReLU6 linear activation function after the convolutional layer; the second layer uses depthwise convolution with a 3x3 kernel size and a ReLU6 activation function, and the number of convolutional kernels is the same as the depth of the input feature matrix; the third layer uses a regular 1x1 convolutional layer with a linear activation function.

[0017] Furthermore, the activation functions of other network layers, except for the inverted residual structure, were modified, with Relu6 replaced by LeakyRelu.

[0018] Furthermore, transfer learning includes importing a weight file, freezing all weights in the feature extraction part, freezing all layers except the fully connected layers, and saving the weights after training.

[0019] Furthermore, the number of outputs of the classifier was modified to 2, and the Adam optimizer was selected for optimization. The cross-entropy loss function was used to measure the difference between the probability distributions of the predicted and true values.

[0020] The beneficial effects of this invention are as follows:

[0021] The beneficial effects of this invention are as follows: a method for classifying lathe tool wear based on an improved MobileNet_V2 network model, compared to other network models, adds a lightweight attention mechanism, achieving higher recognition accuracy with a small increase in model computation parameters; by modifying the activation function ReLU6 to LeakyReLU, the slow convergence speed during training is solved; and transfer learning is introduced, resulting in faster computation speed, stronger model generalization ability, and shorter training time. Experimental verification shows that the improved model achieves a classification accuracy of up to 96%, efficiently realizing accurate classification of lathe tool wear. Attached Figure Description

[0022] Figure 1 The diagram shown is a flowchart illustrating a tool wear classification method based on an improved MobileNet_V2 network model according to the present invention.

[0023] Figure 2 The diagram shown is a structural diagram of the ECA module.

[0024] Figure 3 The improved reverse residual module shown

[0025] Figure 4 The following are the detailed input and output parameters of the improved MobileNet_V2. Detailed Implementation

[0026] The following is a detailed description of the tool wear classification method based on the improved MobileNet_V2 network model of the present invention, with reference to the accompanying drawings.

[0027] This invention provides a method for classifying tool wear based on an improved MobileNet_V2 network model, the specific steps of which are as follows:

[0028] Figure 1 A schematic flowchart illustrating a tool wear classification method based on an improved MobileNet_V2 network model provided for the implementation of this invention includes:

[0029] Step 1: Construct and process the tool wear dataset.

[0030] Use an image acquisition device to acquire images of the wear surface of a lathe tool and establish a lathe tool wear dataset.

[0031] Wear levels are divided into two categories based on threshold values: wear values ​​VB of 0-0.4mm are set as the normal wear stage for carbide turning tools, and 0.4-0.6mm are set as the rapid wear stage.

[0032] The dataset was divided into a training set and a validation set with a ratio of 0.9 and 0.1, respectively.

[0033] The training data images are randomly cropped into 224×224 input feature images, and the validation data images are cropped into 224×224.

[0034] Standardize the training and validation sets;

[0035] The two types of wear images were augmented with mirror data to a total of 2706 images;

[0036] Step 2: Build the improved MobileNet_V2 neural network

[0037] An improved MobileNet_V2 neural network layer was constructed, including an input layer, convolutional layers, an improved bottleneck layer, an average pooling downsampling layer, a fully connected layer, and an output layer.

[0038] The bottleneck layer mainly introduces a linear bottleneck inverse residual structure. The improved structure is to embed the ECA_Net lightweight attention mechanism into the MobileNet_V2 inverse residual structure.

[0039] The bottleneck layer consists of three layers, each containing three composite structures:

[0040] The inverse residual structure uses a regular convolution in the first layer with a 1x1 kernel and a ReLU6 activation function; the second layer uses a depthwise convolution with a 3x3 kernel and a ReLU6 activation function, with the number of kernels equal to the depth of the input feature matrix; the third layer is a regular 1x1 convolutional layer with a linear activation function.

[0041] ECA_Net includes an average pooling layer (avgpool), 1×1 convolutional layers, and a sigmoid activation function to normalize the weights, such as... Figure 2 As shown;

[0042] The implementation process of the ECA_Net attention mechanism is as follows:

[0043] The input h×w×c feature map matrix is ​​transformed into 1×1×c through average pooling; the number of channels in the feature map is calculated to obtain the adaptive one-dimensional convolution kernel size; the convolution kernel is used in one-dimensional convolution to obtain the weights for each channel of the feature map; the weights are normalized by the Sigmoid activation function, and the weights are multiplied with the original input feature map channel by channel to generate the weighted feature map.

[0044] The improved inverse residual structure embeds the ECA_Net lightweight attention mechanism, namely ECA_bottleneck, as follows: Figure 3 As shown, the specific implementation is as follows:

[0045] The ECA_bottleneck structure adds an ECA module before the first layer of the original inverse residual structure, including avgpool, a 1×1 convolutional layer, and a sigmoid activation function; the second layer includes a 1×1 convolution and a batch normalization (BN) layer, replacing the original ReLU6 activation function with Leaky ReLU; the third layer includes a 3×3 convolution, a batch normalization (BN) layer, and Leaky ReLU; the fourth layer includes a 3×3 convolution, a BN layer, and a linear activation function (Linear).

[0046] Detailed input and output parameters for the improved MobileNet_V2, such as... Figure 4 As shown, the specific implementation is as follows:

[0047] The input image size is 224*224*3. After passing through a conv2d layer with a kernel size of 3*3*3*32, a stride of 2, and 32 output channels, the output image size is 112*112*32. This is then fed into an ECA_Bottleneck1 layer with 16 channels, a stride of 1, and a spread factor of 1, resulting in an output size of 112*112*16. The input image size is 112*112*16. After passing through an ECA_Bottleneck2 layer with 24 channels, a spread factor of 6, and a stride of 2, the output is 56*56*24. After the previous layer's output, the input image is 56*56*24. After passing through the next layer, ECA_Bottleneck3, with 32 channels, a stride of 2, and a spread factor of 6, the output is 28*28*32. With an input of 28*28*32, passing through 64 channels, a step size of 2, and a spread factor of 6 in ECA_Bottleneck4, the output is 14*14*64. With an input of 14*14*64, passing through 96 channels, a spread factor of 6, and a step size of 1 in ECA_Bottleneck5, the output is 14*14*96. After the previous layer's output, with an input of 14*14*96, passing through 160 channels, a step size of 2, and a spread factor of 6 in ECA_Bottleneck6, the output is 7*7*160. With an input of 7*7*160, passing through 320 channels, and a step size of 1 in ECA_Bottleneck7, the output is 7*7*320. An input of 7*7*320 pixels, after passing through a pw convolutional layer with a kernel of 1*1*160*1280 and a stride of 1, outputs a value of 7*7*1280. An input of 7*7*1280 pixels, after passing through a 7*7 avgpooling layer, outputs a value of 1*1*1280. An input of 1*1*1280 pixels, after passing through a convolutional layer with a kernel of 1*1*1280*1000 and a stride of 1, outputs a value of 1*1*1280.

[0048] The improved MobileNet_V2 neural network, except for the ECA_bottleneck structure, modifies the activation function by replacing Relu6 with LeakyRelu. During backpropagation, gradients can be calculated even for the less-than-zero input portions of the LeakyRelu activation function, thus addressing the slow convergence issue.

[0049] Modify the classifier parameters. Since the output contains two wear types, change the number of outputs of the classifier to 2.

[0050] Step 3: Train the improved model and optimize the training parameters to identify the wear level in the input image as a specific type of wear.

[0051] The training process uses transfer learning, as detailed below:

[0052] Import pre-trained weight files from the ImageNet dataset for transfer learning;

[0053] The weights of all feature extraction components in the back network parameters are frozen by learning, except for the fully connected layers.

[0054] The training set is input into the improved MobileNet_V2 neural network. The CrossEntropyLoss function is used to measure the difference between the probability distributions of the predicted and true values. The obtained loss is backpropagated, and the gradient is calculated to adjust the weights of the neural network. The Adam optimizer is used for optimization, and the weights after training are saved.

[0055] Choose the most suitable training parameters, set the learning rate to 0.0001, the batch size used in one iteration to 32, and stop training the model after 100 epochs.

[0056] After obtaining the trained model, a validation set is input into the model to verify its accuracy. The output identifies whether the wear in the input image is normal wear or rapid wear, thus completing the identification and classification of the wear degree of the cutting tool and determining whether the tool can continue to be used.

[0057] Any aspects not covered in this invention are applicable to existing technologies.

Claims

1. A turning tool wear classification method based on an improved MobileNet_V2 network model, characterized in that, Specifically comprising the following steps: Step S1, through the turning operation under multiple working conditions, using an image acquisition device to collect the tool surface wear image, and establishing a tool wear dataset; Step S2, the wear grade is divided into normal wear and rapid wear, the initial dataset is preprocessed to form an input image, and the two types of wear images are data enhanced; Step S3, an improved MobileNet_V2 network model is built; The improved MobileNet_V2 network model comprises: (1) building each network layer, introducing a lightweight attention mechanism ECA_Net into the inverted residual module of the MobileNet_V2 model; (2) modifying the activation function; (3) adding transfer learning to the MobileNet_V2 model to learn the network parameters in the rear part; (4) modifying the output number of the classifier; (5) optimizing the hyperparameters involved in the training process; The network layer comprises an input layer, a convolution layer, an improved bottleneck layer, an average pooling down-sampling layer, a full connection layer and an output layer, wherein the bottleneck refers to a bottleneck structure, and the specific improvement comprises: embedding the ECA_Net lightweight attention mechanism in the inverted residual stacking block and the MobileNet_V2 classifier; modifying the activation function of other network layers except the inverted residual structure, replacing Relu6 with LeakyRelu; using transfer learning to train the data, which includes importing the weight file, freezing all weights of the feature extraction part, freezing all layers except the full connection layer, saving the trained weights; the optimization parameters include modifying the output number of the classifier to 2; selecting the Adam optimizer for optimization, selecting appropriate training parameters, and using the cross-entropy loss function CrossEntropyLoss to measure the difference between the predicted value and the true value probability distribution, the calculation formula is, Wherein, n represents the batch of experimental data, bi represents the expected output, and pi represents the actual output of the convolutional neural network; Step S4, input the input image in step 2 into the improved MobileNet_V2 model to identify the wear degree in the input image as the first type of wear.

2. The tool wear classification method based on the improved MobileNet_V2 network model according to claim 1, wherein: In step S1, each parameter is set as follows: cutting speed 80-200 m / min, cutting depth 1-2 mm, sampling time 40-120 s, feed rate 0.2 mm / r, tool path length 80 mm, and spindle speed 550 r / min; the image acquisition device comprises a lens, a light source, an industrial camera and a display screen.

3. The tool wear classification method based on the improved MobileNet_V2 network model according to claim 1, characterized in that, Step S2 specifically comprises: (1) threshold setting: setting the wear value VB in the range of 0-0.4 mm as the normal wear stage of the alloy turning tool, and 0.4-0.6 mm as the rapid wear stage; (2) dividing the collected tool wear images into training data and verification data; (3) data enhancement is performed on the training data, and horizontal mirror transformation is performed. (4) The training data image is randomly cropped to an input feature image of 224x224; (5) The validation data center is cropped to 224x224; (6) Standardization processing is performed on the training set and the validation set.

Citation Information

Patent Citations

  • Turning tool wearing identification method based on a convolutional residual network and transfer learning

    CN110488607A

  • Cutter wear state recognition system and recognition method based on data enhancement

    CN115903663A