A method and system for classifying tool wear images
By using a lightweight multi-branch residual network with multi-view acquisition and adaptive view weight fusion, the problem of single-view images being susceptible to changes in lighting and posture is solved, achieving high precision and stability in tool wear detection and adapting to real-time online recognition in industrial settings.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAMEN UNIV
- Filing Date
- 2026-02-12
- Publication Date
- 2026-06-02
AI Technical Summary
Existing tool wear detection technologies rely on single-view images, which are easily affected by changes in lighting and posture, resulting in low classification accuracy and stability. Furthermore, multi-view information fusion models have not been effectively implemented, making it difficult to deploy them in real time on edge computing terminals.
By acquiring tool cutting edge images from multiple perspectives, a lightweight multi-branch residual network with adaptive perspective weight fusion is adopted, combined with knowledge distillation technology, to achieve intelligent weighted fusion of multi-perspective features and lightweight model, adapting to industrial deployment needs.
It improves the accuracy and robustness of tool wear type identification, meets the real-time online identification needs of industrial sites, and reduces the number of model parameters and inference latency.
Smart Images

Figure CN122135089A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of tool wear detection, and in particular to a method and system for classifying tool wear images. Background Technology
[0002] As a critical actuator in machine tool processing, the wear state of cutting tools directly affects the dimensional accuracy, surface quality, and tool life of the workpiece. If tool wear cannot be identified accurately and promptly, it can lead to fluctuations in machining quality, sudden tool breakage, and even machine tool accidents. Therefore, online monitoring and intelligent identification of tool wear has always been an important research direction in the field of intelligent manufacturing.
[0003] Existing tool wear detection technologies include various methods such as visual inspection, force signal detection, vibration signal detection, and acoustic emission detection. Traditional visual inspection often relies on manual observation of wear morphology using microscopes or image measuring instruments, with operators judging the wear type and degree based on experience. This method is labor-intensive and highly subjective, making it difficult to meet the needs of large-scale automated production.
[0004] With the development of deep learning and convolutional neural networks, some studies have utilized single-view tool images combined with deep neural networks to achieve automatic tool wear classification. However, since the cutting edge of a tool is a three-dimensional curved surface structure, the texture and contour features of different wear patterns vary significantly from different viewing angles. Using only a single-view image often cannot fully represent the spatial morphology of the wear area, and the classification accuracy and robustness of single-view models are limited when illumination or tool clamping posture changes.
[0005] In practical applications, vision devices such as image measuring instruments can easily acquire images of the tool from multiple perspectives by rotating the worktable or rotating the camera. However, existing methods mostly use multi-view images for manual assistance in judgment, lack a unified deep learning recognition model designed for multi-view information, and fail to effectively achieve feature-level fusion of multi-view images.
[0006] Furthermore, industrial environments often require models to run in real-time on edge computing terminals, which is constrained by computing resources, power consumption, and latency. While multi-branch deep networks can improve recognition accuracy, their large number of parameters and inference latency make direct deployment difficult. Although existing technologies include compression techniques such as pruning and quantization, achieving feasible model compression while ensuring accuracy and robustness in multi-view fusion tasks remains a challenge that requires further research. Summary of the Invention
[0007] The main objective of this invention is to overcome the shortcomings of existing technologies in tool wear recognition, which rely on single-view images, are easily affected by changes in lighting and posture, and have low classification accuracy and stability. This invention proposes a tool wear image classification method and system that acquires tool cutting edge images from multiple perspectives, mines complementary information through adaptive perspective weight fusion, and combines knowledge distillation to achieve model lightweighting, balancing accuracy, robustness, and industrial deployment requirements, thereby achieving efficient online tool wear recognition.
[0008] The present invention adopts the following technical solution:
[0009] A method for classifying tool wear images, comprising:
[0010] The tool is rotated relative to the acquisition viewpoint to acquire multi-view images of the area containing the tool edge under the same wear state under multiple preset viewpoints, and preprocessed to obtain preprocessed images.
[0011] The preprocessed image is input into a pre-trained lightweight multi-branch residual network. The corresponding viewpoint feature vectors are extracted by each feature extraction branch of the network. The normalized weight coefficients are calculated by the adaptive viewpoint weight learning module and the feature weight fusion is completed. Then, the probability distribution of each wear type is output by the classification sub-network to realize intelligent identification of tool wear status.
[0012] The adaptive viewpoint weight learning module includes a feature concatenation unit and a weight generation unit. The feature concatenation unit is used to concatenate the feature vectors output by multiple feature extraction branches in the channel dimension to form a joint feature vector. The weight generation unit is a neural network containing at least one fully connected layer, used to receive the joint feature vector and output multiple weight parameters corresponding to the number of viewpoints, which are normalized by the softmax function and used as the normalized weight coefficients.
[0013] The adaptive viewpoint weight learning module has an optional equal-weight fusion mode, in which the fused feature vector is the arithmetic mean of the feature vectors output by multiple feature extraction branches.
[0014] The feature extraction branch backbone structure of the lightweight multi-branch residual network is ResNet-18 or ResNet-34, and the lightweight multi-branch residual network is obtained by transfer training from a multi-branch residual teacher network through knowledge distillation technology.
[0015] The training process of the lightweight multi-branch residual network includes teacher network construction training and student network distillation training, as detailed below:
[0016] A multi-branch residual teacher network is constructed, containing feature extraction branches corresponding to a preset number of viewpoints. Each feature extraction branch has independent parameters and a global average pooling layer is configured at the end. The weights of the convolutional layers are initialized using pre-trained parameters. The multi-branch residual teacher network is trained under supervision using a multi-view tool wear image dataset. During training, a gradient-based optimization algorithm is used. The classification accuracy or macro-average F1 value on the validation set reaches a preset threshold as the criterion for judging whether the model performance meets the preset conditions, thus completing the teacher network training.
[0017] A lightweight multi-branch residual student network with fewer parameters than a multi-branch residual teacher network is constructed. Training samples are input into both the teacher and student networks, and the logits output of the teacher network are used as soft labels. The logits output of the student network are used as the soft labels. A total loss function is constructed, comprising a soft label distillation loss Lkd and a cross-entropy loss Lce based on the true labels. The total loss L is calculated as follows: λ is the distillation weight coefficient; the total loss function is optimized using the gradient descent algorithm to complete the student network training.
[0018] The total loss function may also include a feature distillation loss Lf, which is calculated based on the mean square error of the teacher network fused feature vector and the student network fused feature vector. In this case, the total loss... μ is the characteristic distillation weight coefficient.
[0019] The backbone structure of each feature extraction branch of the multi-branch residual teacher network is ResNet-50 or ResNet-101.
[0020] The preprocessing includes size normalization and pixel standardization; size normalization is to uniformly scale the multi-view images to a preset pixel size; pixel standardization is to subtract a preset mean from each of the three color channels and divide by a preset standard deviation.
[0021] The wear types include one or more of the following: tip plastic deformation, back face wear, chipping, crater wear, groove wear, and breakage.
[0022] A tool wear image classification system, comprising:
[0023] The multi-view image acquisition and preprocessing module controls the relative rotation of the tool and the acquisition viewpoint to acquire multi-view images of the tool edge area under the same wear state under multiple preset viewpoints, and performs preprocessing to obtain preprocessed images.
[0024] The wear state inference module inputs the pre-processed image into a pre-trained lightweight multi-branch residual network. The feature vectors corresponding to the viewpoints are extracted by each feature extraction branch of the lightweight multi-branch residual network. The normalized weight coefficients are calculated by the adaptive viewpoint weight learning module and the feature weight fusion is completed. Finally, the classification sub-network outputs the probability distribution of each wear type to realize intelligent identification of tool wear state.
[0025] As can be seen from the above description of the present invention, compared with the prior art, the present invention has the following beneficial effects:
[0026] 1. In this invention, by simultaneously acquiring tool edge images from multiple perspectives and combining them with a feature extraction structure of a multi-branch residual network, tool image information from multiple perspectives is introduced, which can more completely characterize the three-dimensional wear morphology of the tool edge. This breaks through the limitations of single-view images in characterizing wear features and effectively improves the accuracy and robustness of tool wear type identification compared to single-view identification methods.
[0027] 2. In this invention, the adaptive viewpoint weight learning module performs intelligent weighted fusion of the feature vectors extracted from multiple branches. It can automatically adjust the contribution weight of each viewpoint feature in the fusion process according to the feature differences of different wear patterns of the tool, strengthen the representation ability of effective wear features, enhance the ability to distinguish easily confused categories such as tool tip plastic deformation and back face wear, and further improve the accuracy of wear identification.
[0028] 3. In this invention, a knowledge distillation mechanism is introduced to guide the learning of a lightweight multi-branch residual student network with a high-precision multi-branch residual teacher network. While reducing the number of model parameters and inference latency, the high-order feature learning and classification capabilities of the teacher network are effectively preserved. This enables the trained model to adapt to the deployment requirements of industrial computers and edge computing terminals in industrial settings and meet the needs of online real-time identification of tool wear status. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of the method flow of the present invention;
[0030] Figure 2 This is a schematic diagram of the knowledge distillation training block diagram and the adaptive perspective weight learning module structure of the teacher network-student network in an embodiment of the invention.
[0031] Figure 3(a) is a schematic diagram of multi-view image acquisition of the cutting tool in this embodiment;
[0032] Figure 3(b) is a magnified view of a portion of Figure 3(a);
[0033] Figure 4 This is a schematic diagram comparing the classification performance of the multi-view teacher network, the distilled student network, and the single-view baseline model in an embodiment of the present invention.
[0034] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Detailed Implementation
[0035] The present invention will be further described below through specific embodiments.
[0036] See Figure 1 This embodiment proposes a method for classifying tool wear images, including:
[0037] S1 controls the relative rotation of the tool and the acquisition viewpoint to acquire multi-view images of the tool edge region under the same wear state from multiple preset viewpoints, and then preprocesses them to obtain preprocessed images.
[0038] The core of this step is to acquire effective images from multiple perspectives under the same tool wear condition through a standardized image acquisition process. The core acquisition logic of the training phase and the online recognition phase is consistent, providing high-quality data support for subsequent model training and inference.
[0039] Multi-view image acquisition is achieved through an image measuring instrument or industrial camera system. During tool machining intervals, the tool is rotated sequentially to multiple preset viewing angles to acquire multi-view images of the tool under the same wear condition. Specifically, multi-view image acquisition is achieved through an image measuring instrument equipped with a high-resolution industrial camera and a rotatable stage. The rotatable stage drives the tool to rotate precisely around its own axis, while the high-resolution camera ensures clear capture of minute wear characteristics of the tool edge. Before acquisition, the turning insert to be tested is securely mounted on the rotatable stage. Taking the structural characteristics of the tool edge and areas prone to wear as an example, three preset viewing angles are set to achieve comprehensive coverage of key areas of the cutting edge.
[0040] First preset view (core view of the cutting tip): Located at the intersection of the cutting edge and the adjacent side edge at the front end of the blade, focusing on capturing the wear state of the cutting tip. This area is the core of the cutting force and is prone to wear such as plastic deformation and chipping.
[0041] Second preset view (proximal cutting edge view): the cutting edge located in the area near the tool tip, focusing on the wear of the cutting edge around the tool tip, supplementing the transition area features not covered by the tool tip view;
[0042] The third preset perspective (far-end cutting edge perspective): located on the cutting edge extending outward from the main cutting edge, it captures the wear information at the far end of the main cutting edge, realizes the zonal geometric feature description of the entire cutting edge, and provides comprehensive data support for subsequent tool condition determination and machining process control.
[0043] In actual turning machining scenarios, to avoid interference with the machining process during the acquisition process, the machining gap acquisition mode is adopted in both the training and recognition stages: the machine stop interval is preset according to the machining length or machining time. After each machine stop, the control system drives the rotatable worktable to rotate the tool to the first preset view, the second preset view and the third preset view in sequence. After the view is accurately positioned, the tool cutting edge area image under each view is acquired by a high-resolution industrial camera, as shown in Figure 3(a) and Figure 3(b), where A is the tool, and A1, A2 and A3 represent the first preset view, the second preset view and the third preset view, respectively.
[0044] After data acquisition, images are stored according to viewpoint in both the training and recognition phases. The three images are stored in dedicated folders named angle1, angle2, and angle3, respectively, with a unified naming rule of processing number + tool number (e.g., "processing 001 times_tool number T003.jpg") to ensure that images of the same tool have completely consistent filenames in the three viewpoints. The training phase is used for rapid alignment and combination of multi-view samples, and the recognition phase is used for synchronous input and feature matching of multi-view images.
[0045] The essence of data collection during the training phase is sample data construction. After completing the unified collection process described above, the following additional steps need to be performed: After completing a preset number of processing batches, the tools corresponding to all collected images are labeled offline: The actual wear morphology of the tool edge is observed through professional detection equipment. Based on the wear characteristics, each tool sample is divided into one of six categories: tip plastic deformation, back face wear, chipping, crater wear, groove wear, and breakage. This classification result serves as the wear type label for the sample and is combined with the corresponding multi-view images to form a complete multi-view tool wear image dataset, which is used for the subsequent supervised training of the teacher network and the distillation training of the student network.
[0046] After the acquired three-view images are stored and named according to a unified rule, preprocessing is performed. Image preprocessing during the training phase focuses on unifying the format, increasing sample diversity, and eliminating environmental interference to provide high-quality input for stable training of both the teacher and student networks. Specifically, it includes the following steps:
[0047] Size normalization: The original cutting edge images of the tool acquired from various perspectives are uniformly scaled to a preset pixel size (such as 224×224 pixels) to ensure that the spatial dimensions of the images are consistent;
[0048] Data augmentation: Perform targeted data augmentation operations to horizontally flip the image with a probability of 0.5, and rotate it at angles randomly selected in a uniform distribution within the range of -10° to 10° to reduce the risk of model overfitting by expanding sample diversity.
[0049] Pixel normalization: For images that have undergone size normalization and data augmentation, the three color channels of the RGB color channels are processed by subtracting the preset mean and dividing by the preset standard deviation (e.g., mean [0.485, 0.456, 0.406], standard deviation [0.229, 0.224, 0.225]) to eliminate the pixel value distribution shift caused by changes in illumination and map the pixel values to a uniform numerical range.
[0050] Image preprocessing in the online recognition phase includes size normalization, pixel normalization, etc.
[0051] Size normalization: Using the preset pixel size (e.g., 224×224 pixels) from the training phase, the real-time acquired three-view tool cutting edge images are uniformly scaled to ensure that the image spatial dimension matches the network input requirements and to avoid abnormal feature extraction caused by size differences.
[0052] Pixel normalization: Using a preset mean and standard deviation similar to those used in the training phase, the mean is subtracted and the standard deviation is divided for the three RGB color channels of the scaled image, respectively, to eliminate the interference of lighting fluctuations during real-time acquisition and to ensure that the distribution of image data is consistent with the distribution of training samples.
[0053] S2 inputs the pre-processed image into the pre-trained lightweight multi-branch residual network. The corresponding viewpoint feature vectors are extracted by each feature extraction branch of the network. The normalized weight coefficients are calculated by the adaptive viewpoint weight learning module and the feature weight fusion is completed. Then, the classification sub-network outputs the probability distribution of each wear type to realize intelligent identification of tool wear status.
[0054] In this approach, a feature extraction branch is set up for each viewpoint. Each branch uses a convolutional neural network with residual connection structure (such as the ResNet series) as the backbone. After removing the original fully connected layers, a fixed-dimensional feature vector is output through a global average pooling layer.
[0055] The feature extraction branch backbone structure of the lightweight multi-branch residual network is ResNet-18 or ResNet-34, and the lightweight multi-branch residual network is obtained by knowledge distillation technique from the transfer training of the multi-branch residual teacher network.
[0056] The training process of a lightweight multi-branch residual network includes teacher network construction training and student network distillation training, as detailed below:
[0057] A multi-branch residual teacher network was constructed, containing feature extraction branches matching the preset number of viewpoints. The backbone structure of each feature extraction branch in the multi-branch residual teacher network is either ResNet-50 or ResNet-101, with independent parameters for each branch and a global average pooling layer at the end. Convolutional layer weights were initialized using pre-trained parameters. The multi-branch residual teacher network was trained under supervision using a multi-view tool wear image dataset, employing the Adam optimization algorithm with an initial learning rate of 5×10⁻⁶. -5 The weight decay coefficient is set to 1×10. -4 The batch size was set to 16, the number of training rounds was set to 40, and the classification accuracy or macro average F1 value on the validation set reached a preset threshold as the criterion for judging whether the model performance met the preset conditions, thus completing the teacher network training.
[0058] A lightweight multi-branch residual student network with fewer parameters than the multi-branch residual teacher network is constructed. The feature extraction branch backbone of the lightweight multi-branch residual student network is ResNet-18 or ResNet-34. Training samples are input into the teacher network and student network respectively. The logits output of the teacher network are obtained as soft labels, and the logits output of the student network are obtained as logits. Based on the above information, a total loss function is constructed, which includes soft label distillation loss Lkd and cross-entropy loss Lce based on the real labels. The total loss L is calculated as follows: λ is the distillation weight coefficient; the total loss function is optimized by the gradient descent algorithm to complete the distillation training of the lightweight multi-branch residual student network, and finally the distilled student network is deployed on the industrial edge terminal.
[0059] Specifically, the logits output by the teacher network and the student network are first softened by the temperature coefficient T to make their probability distributions smoother and enhance the transferability of feature information. Then, the difference between the two probability distributions after softening is calculated to determine the value of the soft label distillation loss Lkd, ensuring that the feature learning ability of the teacher network is effectively transferred to the student network.
[0060] To further enhance the feature alignment between teacher and student networks and improve the student network's ability to accurately extract tool wear features, the overall loss function can be further enhanced by introducing an optional feature distillation loss Lf. This feature distillation loss is calculated based on the mean square error between the fused feature vectors of the teacher and student networks, thereby constraining the student network's learning of the teacher network's higher-order feature representations. After introducing the feature distillation loss, the overall loss function is updated as follows: μ is the feature distillation weight coefficient, which is used to adjust the contribution ratio of feature distillation loss to the total loss. It can be flexibly set according to the model training effect.
[0061] In this embodiment, the adaptive viewpoint weight learning module achieves intelligent weighted fusion of multi-viewpoint features through dual-unit collaboration, specifically including a feature concatenation unit and a weight generation unit. The feature concatenation unit is used to concatenate the feature vectors output by multiple feature extraction branches in the channel dimension to form a joint feature vector. The weight generation unit is a neural network containing at least one fully connected layer, used to receive the joint feature vector and output multiple weight parameters corresponding to the number of views, which are normalized by the softmax function and used as normalized weight coefficients.
[0062] In the subsequent fusion and classification process, feature vectors from multiple perspectives are input into the adaptive perspective weight learning module. The neural network automatically learns and outputs the corresponding weight coefficients. Then, the feature vectors from each perspective are weighted and fused according to the weight coefficients to obtain a fused feature vector that is both comprehensive and targeted. Finally, the fused feature vector is input into the classification sub-network, which maps it to the tool wear category space to complete the determination of the wear type, forming a complete logical chain of feature input, weight learning, weighted fusion, and category determination.
[0063] Furthermore, the adaptive viewpoint weight learning module can also be equipped with an optional equal-weight fusion mode as a supplementary solution to the intelligent weighted fusion. In equal-weight fusion mode, the fused feature vector is directly obtained as the arithmetic mean of the feature vectors output by multiple feature extraction branches. That is, there is no need to calculate the weights through the above two-unit method; the fused feature vector can be obtained by directly taking the arithmetic mean of the feature vectors output by each feature extraction branch.
[0064] Taking the specific structure and inference process of a lightweight multi-branch residual network as an example, this paper illustrates the complete logic of multi-view feature extraction, adaptive weighted fusion, and classification. (See [link to relevant documentation]). Figure 2 The details are as follows:
[0065] The lightweight multi-branch residual network comprises three feature extraction branches with independent parameters: branch1, branch2, and branch3. Each branch receives a preprocessed image from its corresponding viewpoint and performs feature extraction. Each feature extraction branch uses ResNet-50 as its backbone network, which contains a deep residual block structure. To adapt to the tool wear recognition task of this application, the ResNet-50 structure is specifically adjusted—retaining its original convolutional layers and residual blocks, removing the fully connected layers at the end of the network, adding a global average pooling layer, and compressing the feature maps of each channel into feature vectors with a fixed length of 2048. Finally, the three branches output the first feature vector f1, the second feature vector f2, and the third feature vector f3, respectively.
[0066] After feature extraction, the first feature vector f1, the second feature vector f2, and the third feature vector f3 are input into the adaptive viewpoint weight learning module. This module dynamically calculates the weight coefficients of each viewpoint feature to obtain the first viewpoint weight coefficient a1, the second viewpoint weight coefficient a2, and the third viewpoint weight coefficient a3. First, f1, f2, and f3 are concatenated along the channel dimension to form a joint feature vector g that integrates the feature information of the three views. Then, g is input into a weight generation structure consisting of two fully connected layers. The output dimension of the first fully connected layer is set to 128, and a ReLU activation function is used for nonlinear transformation. The second fully connected layer outputs a 3-dimensional unnormalized weight vector. Finally, a softmax operation is performed on the 3-dimensional weight vector to obtain non-negative viewpoint weight coefficients a1, a2, and a3 that satisfy the normalization constraint (a1+a2+a3=1), which correspond to the importance of the three feature vectors, respectively.
[0067] Based on the aforementioned weighting coefficients, f1, f2, and f3 are linearly weighted and fused, and the fusion formula is as follows: This yields a fused feature vector f that combines the advantages of various perspectives with targeted features. The fused feature vector f is then fed into a classification sub-network, which includes Dropout layers and fully connected layers. The Dropout layers suppress overfitting, and the fully connected layers map the output to a 6-dimensional classification result, corresponding to six wear types, including tip plastic deformation and flank wear. The specific type of tool wear can be determined based on the output result. Wear types include one or more of the following: tip plastic deformation, flank wear, chipping, crater wear, groove wear, and breakage.
[0068] In this embodiment, the trained lightweight multi-branch residual student network is deployed to target terminals in industrial settings, which may include industrial computers or edge computing terminals (such as the NVIDIA Jetson series), adapting to the lightweight deployment requirements of industrial scenarios. During the online operation phase of the system, the lightweight network receives and preprocesses multi-view tool images in real time. After completing wear type identification, based on the identification results (such as detecting severe wear types like chipping or breakage), it automatically sends alarm or stop commands to the machine tool control system, achieving closed-loop control of tool wear status and ensuring the stability and safety of the machining process.
[0069] This embodiment also proposes a tool wear image classification system to execute the aforementioned tool wear image classification method. It includes a multi-view image acquisition and preprocessing module and a wear state inference module, etc. The hardware and software of each module are deeply integrated and have clear division of labor, adapting to the processing cycle and deployment requirements of industrial sites. The specific module functions and execution flow are as follows:
[0070] The multi-view image acquisition and preprocessing module controls the relative rotation of the tool and the acquisition viewpoint to acquire multi-view images of the tool edge region under the same wear state from multiple preset viewpoints. Preprocessing is then performed to obtain a preprocessed image. This achieves the transformation from the original image to a preprocessed image that meets the network input requirements.
[0071] The hardware of the multi-view image acquisition and preprocessing module includes an image measuring instrument and an industrial computer. The hardware and software work together to perform the operation: the image measuring instrument is equipped with a high-resolution industrial camera and a rotatable worktable. It can automatically control the relative rotation of the tool and the acquisition viewpoint according to the processing rhythm during the tool processing interval, and precisely rotate the tool to multiple preset viewpoints in sequence to acquire multi-view images of the tool edge area under the same wear state. The acquired raw images are sent to the industrial computer in real time via the network. The industrial computer is equipped with a preprocessing program to perform size normalization and pixel standardization processing on the received raw images, which is consistent with the parameters in the model training stage. This eliminates environmental and format interference such as lighting and size, and obtains preprocessed images that meet the input requirements of lightweight multi-branch residual networks, providing standardized data support for subsequent wear state inference.
[0072] The wear state inference module inputs the pre-processed image into the pre-trained lightweight multi-branch residual network. The feature vectors of the corresponding viewpoints are extracted by each feature extraction branch of the lightweight multi-branch residual network. The normalized weight coefficients are calculated by the adaptive viewpoint weight learning module and the feature weight fusion is completed. Then, the classification sub-network outputs the probability distribution of each wear type to realize the intelligent recognition of tool wear state.
[0073] Specifically, this module is the core intelligent recognition unit of the system, deployed on an industrial computer. It incorporates a pre-trained lightweight multi-branch residual network. Its core function is to transform pre-processed images into specific tool wear type determination results. Its execution flow corresponds to the aforementioned classification method: the pre-processed images output from the multi-view image acquisition and pre-processing module are input one-to-one into each feature extraction branch of the lightweight multi-branch residual network. Each branch extracts a fixed-length feature vector from its corresponding viewpoint through a backbone convolutional neural network. The feature vectors from all views are then synchronously input into the network's adaptive viewpoint weight learning module, and after channel dimension feature concatenation... After weight generation network operations and softmax function normalization, viewpoint weight coefficients that satisfy the normalization constraints are obtained. Based on these weight coefficients, linear weighted fusion is performed on the multi-viewpoint feature vectors to generate a fused feature vector that integrates the effective features of each viewpoint. Finally, the fused feature vector is input into the classification sub-network. After Dropout layer to suppress overfitting and fully connected layer feature mapping, the probability distribution of six wear types corresponding to the tool tip plastic deformation, back face wear, chipping, crater wear, groove wear, and breakage is output. The final tool wear type determination result is determined based on the probability distribution, thus completing the intelligent identification of wear status.
[0074] In this embodiment, a control module can also be added as a closed-loop management unit, which is linked in real time with the wear state inference module. Its core function is to execute the corresponding control logic based on the wear state inference results to realize intelligent closed-loop management of tool status. For example, this module receives the tool wear type judgment results output by the wear state inference module in real time. For sudden and severe tool failure types such as chipping and breakage, it automatically sends an alarm command to the machine tool control system. If emergency handling is required, it directly sends a stop command to avoid the failure tool from continuing to process and causing workpiece scrapping and machine tool damage. For progressive wear types such as tool tip plastic deformation, flank wear, crater wear, and groove wear, it can automatically record wear state data and perform wear trend analysis to provide data basis for on-site operators to change tools and adjust processing parameters, ensuring the stability and continuity of the processing process.
[0075] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0076] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this disclosure.
[0077] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein.
[0078] The above are merely specific embodiments of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial modifications made to the present invention using this concept shall be considered as infringing upon the protection scope of the present invention.
Claims
1. A method for classifying tool wear images, characterized in that, include: The tool is rotated relative to the acquisition viewpoint to acquire multi-view images of the area containing the tool edge under the same wear state under multiple preset viewpoints, and preprocessed to obtain preprocessed images. The preprocessed image is input into a pre-trained lightweight multi-branch residual network. The corresponding viewpoint feature vectors are extracted by each feature extraction branch of the network. The normalized weight coefficients are calculated by the adaptive viewpoint weight learning module and the feature weight fusion is completed. Then, the probability distribution of each wear type is output by the classification sub-network to realize intelligent identification of tool wear status.
2. The tool wear image classification method as described in claim 1, characterized in that, The adaptive viewpoint weight learning module includes a feature concatenation unit and a weight generation unit. The feature concatenation unit is used to concatenate the feature vectors output by multiple feature extraction branches in the channel dimension to form a joint feature vector. The weight generation unit is a neural network containing at least one fully connected layer, used to receive the joint feature vector and output multiple weight parameters corresponding to the number of viewpoints, which are normalized by the softmax function and used as the normalized weight coefficients.
3. The tool wear image classification method as described in claim 1, characterized in that, The adaptive viewpoint weight learning module has an optional equal-weight fusion mode, in which... The fused feature vectors are the arithmetic mean of the feature vectors output by multiple feature extraction branches.
4. The tool wear image classification method as described in claim 1, characterized in that, The feature extraction branch backbone structure of the lightweight multi-branch residual network is ResNet-18 or ResNet-34, and the lightweight multi-branch residual network is obtained by transfer training from a multi-branch residual teacher network through knowledge distillation technology.
5. The tool wear image classification method as described in claim 4, characterized in that, The training process of the lightweight multi-branch residual network includes teacher network construction training and student network distillation training, as detailed below: A multi-branch residual teacher network is constructed, containing feature extraction branches corresponding to a preset number of viewpoints. Each feature extraction branch has independent parameters and a global average pooling layer is configured at the end. The weights of the convolutional layers are initialized using pre-trained parameters. The multi-branch residual teacher network is trained under supervision using a multi-view tool wear image dataset. During training, a gradient-based optimization algorithm is used. The classification accuracy or macro-average F1 value on the validation set reaches a preset threshold as the criterion for judging whether the model performance meets the preset conditions. The teacher network training is then completed. A lightweight multi-branch residual student network with fewer parameters than a multi-branch residual teacher network is constructed. Training samples are input into both the teacher and student networks, and the logits output of the teacher network are used as soft labels. The logits output of the student network are used as the soft labels. A total loss function is constructed, comprising a soft label distillation loss Lkd and a cross-entropy loss Lce based on the true labels. The total loss L is calculated as follows: λ is the distillation weight coefficient; the total loss function is optimized using the gradient descent algorithm to complete the student network training.
6. The tool wear image classification method as described in claim 5, characterized in that, The total loss function may also include a feature distillation loss Lf, which is calculated based on the mean square error of the teacher network fused feature vector and the student network fused feature vector. In this case, the total loss... μ is the characteristic distillation weight coefficient.
7. The tool wear image classification method as described in claim 5, characterized in that, The backbone structure of each feature extraction branch of the multi-branch residual teacher network is ResNet-50 or ResNet-101.
8. The tool wear image classification method as described in claim 1, characterized in that, The preprocessing includes size normalization and pixel standardization; size normalization is to uniformly scale the multi-view images to a preset pixel size; pixel standardization is to subtract a preset mean from each of the three color channels and divide by a preset standard deviation.
9. The tool wear image classification method as described in claim 1, characterized in that, The wear types include one or more of the following: tip plastic deformation, back face wear, chipping, crater wear, groove wear, and breakage.
10. A tool wear image classification system, characterized in that, include: The multi-view image acquisition and preprocessing module controls the relative rotation of the tool and the acquisition viewpoint to acquire multi-view images of the tool edge area under the same wear state under multiple preset viewpoints, and performs preprocessing to obtain preprocessed images. The wear state inference module inputs the pre-processed image into a pre-trained lightweight multi-branch residual network. The feature vectors corresponding to the viewpoints are extracted by each feature extraction branch of the lightweight multi-branch residual network. The normalized weight coefficients are calculated by the adaptive viewpoint weight learning module and the feature weight fusion is completed. Finally, the classification sub-network outputs the probability distribution of each wear type to realize intelligent identification of tool wear state.