원시데이터 수집 시스템
선정목록으로

Efficient Cutting Tool Wear Segmentation Based on Segment Anything Model

관련 모빌리티 소재 · (4) 카시트 모듈

기본 정보

저자
  1. Li Zongshuo
  2. Huo, Ding
  3. Meurer, Markus
  4. Bergs, Thomas
DOI
10.48550/arxiv.2407.01211
저널
arXiv (Cornell University)
발행년도
2024
발행기관
Cornell University
피인용수
0
라이선스
0
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.48550/arxiv.2407.01211
토픽
Surface Roughness and Optical Measurements
OpenAlex ID
W6910698385

평가 내용

관련도
관련
사업분야
모빌리티 소재 · (4) 카시트 모듈
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '모빌리티 소재 > 카시트 모듈' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

Tool wear conditions impact the surface quality of the workpiece and its final geometric precision. In this research, we propose an efficient tool wear segmentation approach based on Segment Anything Model, which integrates U-Net as an automated prompt generator to streamline the processes of tool wear detection. Our evaluation covered three Point-of-Interest generation methods and further investigated the effects of variations in training dataset sizes and U-Net training intensities on resultant wear segmentation outcomes. The results consistently highlight our approach's advantage over U-Net, emphasizing its ability to achieve accurate wear segmentation even with limited training datasets. This feature underscores its potential applicability in industrial scenarios where datasets may be limited.

본문 48,654자

본문 펼치기
Proceedings of the ASME 2024 19th International Manufacturing Science and Engineering Conference MSEC2024 June 17 – June 21, 2024, Knoxville, Tennessee ## MSEC2024-124455 EFFICIENT CUTTING TOOL WEAR SEGMENTATION BASED ON SEGMENT ANYTHING MODEL Zongshuo Li <sup>1,∗</sup> , Ding Huo <sup>1</sup> , Markus Meurer <sup>1</sup> , Thomas Bergs <sup>1,2</sup> 1Manufacturing Technology Institute (MTI) of RWTH Aachen University, Aachen, Germany 2Fraunhofer Institute for Production Technology IPT, Aachen, Germany ABSTRACT _Tool wear conditions impact the surface quality of the work-_ _piece_ _and_ _its_ _final_ _geometric_ _precision._ _In_ _this_ _research,_ _we_ _propose_ _an_ _efficient_ _tool_ _wear_ _segmentation_ _approach_ _based_ _on_ _Segment_ _Anything_ _Model,_ _which_ _integrates_ _U-Net_ _as_ _an_ _auto-_ _mated prompt generator to streamline the processes of tool wear_ _detection._ _Our evaluation covered three Point-of-Interest gener-_ _ation methods and further investigated the effects of variations in_ _training dataset sizes and U-Net training intensities on resultant_ _wear segmentation outcomes._ _The results consistently highlight_ _our approach’s advantage over U-Net, emphasizing its ability to_ _achieve_ _accurate_ _wear_ _segmentation_ _even_ _with_ _limited_ _training_ _datasets._ _This_ _feature_ _underscores_ _its_ _potential_ _applicability_ _in_ _industrial scenarios where datasets may be limited._ Keywords: Tool wear detection, Semantic segmentation, Segment Anything Model, Computer vision, Intelligent manufacturing NOMENCLATURE SAM Segment Anything Model PoI Point-of-Interest CV Computer Vision ML Machine Learning CNN Convolutional Neural Network FCN Fully Convolutional Network IoU Intersection over Union ReLU Rectified Linear Unit LLM Large Language Model CoG Center of Gravity MS Mask Shrink CoGA Center of Gravity Adjustment RCoGA Recursive Center of Gravity Adjustment BCE Binary Cross-Entropy Tr. Training Dataset ANOVA Analysis of Variance ∗Corresponding author: z.li@mti.rwth-aachen.de 1. INTRODUCTION Tool wear is an inevitable phenomenon in the actual machining process. It leads to alterations in the cutting zone’s process variables like the forces and temperatures exerted on both the tool and workpiece. These conditions not only influence the rate of tool wear but also affect the surface quality and geometric precision of the workpiece [1]. Therefore, tool wear is one of the key determinants of both tool costs and the quality of the finished workpiece, emphasizing the necessity for monitoring during the machining process to ensure optimal outcomes [1, 2]. Tool wear measurement is broadly classified into two categories: Direct and Indirect methods [3]. Indirect methods use sensors, such as dynamometers, to consistently track tool wear through wear model [4, 5]. A fundamental requisite for indirect methods is the execution of tool wear experiments, paired with direct tool wear measurements, to comprehend the actual tool state [6]. Direct tool wear measurements predominantly use optical sensors, such as optical microscopes, with subsequent manual or automated tool wear detection. In data-intensive automated production systems, automated tool wear detection driven by classical Computer Vision (CV) and/or Machine Learning (ML) offer advantages over manual methods. Classical CV like Sobel and Canny algorithms, along with the active contour method [7–9], have been extensively utilized for detecting tool wear [10–12]. Their primary benefit lies in the ability to obtain reasonable outcomes with only a minimal dataset [13]. However, these methods are sensitive to challenging lighting conditions and varied background environments, complicating the robust feature extraction [14]. In contrast, considering the common challenges in metal cutting, such as fluctuating lighting conditions, coating colors, and variations in tool geometries, ML algorithms demonstrate superior performance in tool wear detection through their advanced adaptive capabilities and outperforms traditional image processing methods [10, 15, 16]. Hou et al. [17] developed a self-matching algorithm to measure milling cutter wear, achieving a mean absolute error of less than 7 µm of maximum width 1 Copyright © 2024 by ASME of the flank wear land, and a maximum error under 57 µm for severe wear and breakage scenarios. Tool wear detection inherently aligns with semantic segmentation tasks, for which U-Net has increasingly become one of the favored solutions due to its effectiveness [18–21]. In our previous research, we proposed a methodology based on U-Net for the classification of tool types and the detection of tool wear areas in microscopic images. This approach yielded promising outcomes, achieving a mean Intersection over Union (IoU) of 0.73 on the test dataset of hybrid multiple tools [6]. Subsequently, we developed a comprehensive pipeline integrating U-Net to process tool wear images captured with a digital microscope and employed a rule-based methodology to quantify wear along the tool cutting edge. This approach facilitates fully automated tool wear detection and measurement, showing a high alignment ( _?_ <sup>2</sup> = 0.99) with manual measurement benchmarks [22]. The application of U-Net for tool wear segmentation was further refined and advanced. Xia et al. [14] introduced an enhanced SE-U-Net, supplementing network outputs with morphological processing to achieve an average segmentation accuracy of 92%. Furthermore, Chen et al. [23] utilized a generative adversarial network to augment the dataset and employed transfer learning to boost the segmentation network’s generalization capacity. Compared to training with only small samples, this approach improves the mean IoU by 8.97%. However, U-Net encounters limitations, particularly in the low accuracy of tool wear recognition for unknown and disturbed tool images. On one hand, the method needs a substantial dataset to ensure the model’s generalization capacity, enabling it to make reliable predictions even with data disturbances. This challenge involves not only deviations in images of the same tool captured under varying conditions, but also deviations across tools with different geometries. On the other hand, the requirement for these substantial data volumes inherently leads to an extensive need for manual annotation [6]. Such demands, both in terms of dataset size and extensive labeling, are often impractical in industrial environments. For any specific tool, the number of images obtainable from experiments and suitable for training the network, is typically limited. This paucity of data leads to a limitation of this method for direct industrial applications. In recent years, there has been notable progress in the development of pre-trained large language models (LLM). These models, trained on expansive datasets, exhibit remarkable zeroshot generalization abilities, which means they can handle previously unseen tasks without retraining. A common technique employed with these models is prompt engineering, which directs the model to address specific tasks. Drawing inspiration from LLMs, Meta introduced a promptable semantic segmentation model, Segment Anything Model (SAM), in CV. Pre-trained on an extensive dataset comprising 1 billion masks and 11 million images, this model demonstrates robust generalization [24]. Therefore, building on previous research, this study introduces a novel approach to tool wear segmentation, integrating U-Net with SAM. This approach takes advantage of SAM’s robust generalization capabilities to post-process U-Net’s outputs, ensuring high accuracy in tool wear segmentation even with limited datasets and the lower quality outputs of U-Net. We have also explored the impact of various factors on the final tool wear segmentation accuracy, including the methods for generating the Point-of-Interest (PoI), the volume of training data, and the U-Net training intensity. Chapter 2 describes our newly proposed approach. Chapter 3 details the prepared dataset, the model parameters, and the evaluation strategy. Chapter 4 is dedicated to a comprehensive analysis and discussion of results. The last chapter summarizes our work and gives an outlook on its future development. 2. SEGMENTATION OF TOOL WEAR BASED ON SAM This chapter begins with an introduction to U-Net and SAM, followed by the description of our proposed approach. 2.1 U-Net U-Net stands out as an FCN architecture. Characterized by a substantial number of feature channels, U-Net effectively propagates contextual information to its higher resolution layers. The architecture follows a U-shaped structure, with its symmetric contraction and expanding paths. The training process of U-Net is end-to-end, which enables the network to produce image segmentation masks directly from the original input image [18]. U-Net’s contraction path uses a classical Convolutional Neural Network (CNN) architecture. Within each stage, it incorporates two 3×3 convolution units, immediately succeeded by a rectified linear unit (ReLU) activation function, and a subsequent 2×2 max-pooling operation for downsampling. Conversely, in the expanding path, a 2×2 up-convolution unit is employed. A special attribute of U-Net is the incorporation of skip connections, which facilitate the addition of the output from the contraction path on the same stage into the expanding path. This structural feature of combining low-level features with high-level features helps to avoid information loss [19]. The final layer of the network employs a 1×1 convolution to map all feature channels associated with each pixel to the class corresponding to that pixel. This elegant architecture ensures its applicability extends beyond its initial biomedical segmentation domain and can be easily applied to other tasks like tool wear semantic segmentation. Figure 1 shows an example of U-Net on a tool wear segmentation task. Contraction Expanding FIGURE 1: U-NET ON TOOL WEAR SEGMENTATION TASK 2.2 SAM SAM, serving as a foundation model for image segmentation, can efficiently produce accurate image segmentation masks with prompts that indicate segmentation targets in the image. The prompts can be in various formats, including target or background PoI, boxes, masks, or even free-form text [24]. SAM consists of three parts: an image encoder, a prompt encoder, and a mask decoder. Figure 2 shows an overview of SAM’s structure. 2 Copyright © 2024 by ASME Mask Decoder SAM Points, Boxes, Text, etc. Image Encoder Prompt Encoder FIGURE 2: OVERVIEW OF SAM’S STRUCTURE The image encoder uses a vision transformer proposed by Dosovitskiy et al. [25] and is pre-trained with a mask autoencoder [26]. Through attention blocks, the image encoder can process high-resolution inputs and produce a downscaled image embedding with dimensions of 64 <sup>2</sup> × 256. This image embedding is a numerical representation of the image that captures their semantic meaning and visual features. The prompt encoder convolves dense prompts (masks) to match the dimensionality of the image embedding and adds them element-wise up. For sparse prompts, including points and boxes, the prompt encoder maps them into a 256-dimensional vectorial embedding by positional encodings and representations indicating the prompt type. The resulting prompt embedding serve as a vectorized representation of the prompts. The mask decoder begins with a two-layer modified transformer decoder with cross-attention mechanisms to update both the image and prompt embeddings. Subsequently, the updated image embedding is upscaled through two transposed convolutional layers, while the updated prompt embedding undergoes alignment via a three-layer multilayer perceptron (MLP) to match the upscaled image’s channel dimension. The final output mask is the spatially pointwise product of the upscaled image embedding and the MLP output [24]. This design allows the mask decoder to produce specific segmentations corresponding to varying prompts with the identical image embedding from the image encoder. The prompt engineering enables SAM to be adapted for a broad range of applications beyond its initial scope with appropriate prompts [27, 28]. For example, Osco et al. [29] demonstrated its capability in remote sensing by evaluating SAM’s performance across multiscale datasets with diverse input prompts, including bounding boxes, individual points, and text. Image Encoder 2.3 Our Approach In our previous research, U-Net has demonstrated effective performance in specific tasks. With a training dataset comprising similar data, U-Net can achieve precise tool wear segmentation results for either individual tools or multiple tools within a composite test set [6]. This observation aligns with findings from other studies as well [14, 19–21, 23]. However, a notable decline in U-Net’s performance is observed when applied to tools dissimilar from those in the training set. This indicates the necessity of additional, scene-specific training datasets for each unique scenario encountered [6]. Therefore, the direct deployment of U-Net in an industrial context faces challenges due to limited training data and its weak generalization capability for unfamiliar data. Despite these constraints, U-Net is still capable of providing preliminary, albeit semi-accurate, tool wear segmentation. On the other hand, although SAM has the robust zero-shot generalization capability, its direct application to the tool wear segmentation task yields suboptimal performance. This shortfall is primarily due to SAM’s inability to accurately segment tool wear without appropriate prompt guidance. Therefore, the use of appropriate prompts offers potential to improve SAM’s performance, e.g., when combined with U-Net. Consequently, in this approach, we employ U-Net as an automated prompt generator. Figure 3 illustrates the concept of our proposed approach. Initially, U-Net provides an initial image segmentation mask. This mask undergoes binarization as the first step. Following this, employing a PoI generator, this binarized mask is used to produce a set of PoI, including target points (representing tool wear) and background points (indicating non-wear). The resulting PoI, in combination with the initial binarized mask, is processed by SAM’s prompt encoder. Finally, SAM’s mask decoder will process the prompts to output the precise tool wear segmentation mask. 2.4 Point of Interest Generator The goal of the PoI generator is to generate positive points in the center of the foreground region of the image segmentation mask, thereby prompting the segmentation target. In this regard PoI generator also generate negative points in the background region of the mask to enhance the prompt. We employed three different methods to identify the location of the positive point. These include the Mask Shrink (MS) method [30], the Center of Gravity Adjustment (CoGA) method, and the Recursive Center of Gravity Adjustment (RCoGA) method. Mask Decoder Prompt Encoder Points-of-Interest Generator SAM Conv U-Net Mask from U-Net Points-of-Interest FIGURE 3: THE CONCEPT OF THE PROPOSED APPROACH 3 Copyright © 2024 by ASME MS. The MS method is derived from morphological image processing, aimed at enhancing image quality by shrinking the foreground region through successive erosion operations [30]. MS can also deduce the central point or line of a mask following multiple iterations of shrinking. Figure 4 shows the procedural flow of MS. To initiate, an appropriate structuring element is chosen. This element is then systematically slid across the input mask. If the mask segment beneath the structuring element does not align with it, that segment is designated as the background. Conversely, pixels located at the central position of the structuring element are assigned as the foreground, with the remaining as the background. Successive repetitions of this operation yield the image’s central point or line. Structuring element Sliding across mask Positive points FIGURE 4: PROCEDURAL FLOW OF MS CoGA. We propose a simple method for determining the single center of gravity (CoG), aiming for a fast identification of the positive point within the foreground region. Figure 5 shows the procedural flow of CoGA. Initially, the mask’s foreground CoG is calculated. If this CoG locates within the mask region, it is directly returned as the positive point. Conversely, if it locates outside, the nearest point on the foreground contour (contour point1) to this CoG is identified. Drawinga linebetween thisCoG and contour point 1 intersects the foreground region at another contour point 2, producing a line segment contour point 1 to 2. The midpoint of this segment is then returned as the final positive point. Contour point 2 Positive point Contour point 1 CoG FIGURE 5: PROCEDURAL FLOW OF COGA RCoGA. Based on CoGA, we propose RCoGA as a method to generate multiple positive points. This approach aims to counteract potential prompt deficiencies in single positive point derived from CoGA. Figure 6 shows the procedural flow of RCoGA. Initially, the CoG of the mask’s foreground is computed. Same as CoGA, if this CoG locates within the mask region, it is directly returned as the positive point. Otherwise, the nearest point on point Negative point 4 FIGURE 7: GENERATION OF NEGATIVE POINTS 3. MATERIALS AND METHODS This chapter details the prepared dataset, the model parameters, and the evaluation strategy. 3.1 Dataset In this study, the image dataset was sourced from micrographs of the flank face of cutting tools, captured utilizing a Keyence VHX-6000 series microscope in prior experimental trials. Six different tools, including different end mills and inserts, are included in this dataset. They vary in coating, substrate, material being machined and process. This provides a comprehensive view of various tool types and their wear patterns. The focus of this study was specifically on flank wear. These images are stored in an RGB three-channel format, with a consistent 4 Copyright © 2024 by ASME the foreground contour (contour point) to this CoG is identified. Drawing a line through this CoG and this contour point cuts the foreground into several smaller segments. This CoG calculation and cutting process is recursively executed on each segment until every segment returns a positive point. The depth of this recursive process can be controlled by capping the number of iterations. CoG CoG Segment 1 (Positive point 1) Contour point Segment 2 CoG (Positive point 2) FIGURE 6: PROCEDURAL FLOW OF RCOGA Generation of Negative Points. Building upon the identified positive points, we find four contour points on the foreground contour, horizontally and vertically for each positive point. Subsequently, four extrapolated points are derived by extending a specified pixel distance along the direction from the positive point to the contour points. If these extrapolated points locate within the foreground mask, they are dropped. Otherwise, they are returned as negative points. Figure 7 shows the negative points generation process. Negative point 1 Negative Negative point 2 Positive point 3 Negative point 2 Positive resolution of 1024 x 1024 pixels. Within the dataset corresponding to each tool, 20% of the images are stochastically selected as the test dataset, with selection criteria predicated upon wear area distribution. This selection ensures homogeneity in wear area distribution between both training and test datasets. Model performance evaluation will be conducted on this designated test dataset to endure the comparability between different models. The residual 80% constitutes the training dataset. A detailed enumeration of tool types and the corresponding number of images is presented in Table 1. Additionally, Figure 8 exhibits a selection of representative images. TABLE 1: SPECIFICATIONS OF TRAINING AND TEST DATASET Tool types Training dataset Test dataset End Mill 1 177 37 End Mill 2 207 45 End Mill 3 90 19 Insert 1 192 37 Insert 2 192 40 Insert 3 54 12 (a) End Mill 1 (b) End Mill 2 (c) End Mill 3 (d) Insert 1 (e) Insert 2 (f) Insert 3 FIGURE 8: SAMPLE OF DIFFERENT TOOLS IN THE DATASET Data augmentation plays an important role in enhancing the network’s robustness, especially in scenarios with limited training samples [31]. Through data augmentation, there is not only an expansion in the volume of images with diversified distributions during model training, but also an enhancement in model generalization and a consequential reduction in overfitting [32]. Given the limited quantity of available images in this study, we have incorporated specific data augmentation operations. Table 2 delineates those operations. TABLE 2: SPECIFICATIONS OF AUGMENTATION OPERATIONS Augmentation operations Settings Horizontal flip probability of 50% Vertical flip probability of 50% Rotate -20 to 20 degrees Translate -10% to 10% IoU’s value spans from 0 to 1: a value of 0 signifies no overlapping area, while a value of 1 indicates perfect match between the model’s segmentation and the ground truth. Figure 10 offers examples of IoU values for some sample segmentation results: Red denotes area where the model’s segmentation is exclusive of the ground truth, green signifies correct segmentation area and yellow represents area the model failed to segment. Correct Wrong Missing IoU = 0.249 IoU = 0.881 FIGURE 10: EXAMPLES OF IOU VALUES 3.3 U-Net Parameter The foundational architecture of original U-Net [18] is preserved in our implementation, maintaining the same convolutional units positioned along both the contracting and expanding paths, as well as the sampling unit. Given that our input consists of an image dimensioned at 1024×1024×3, the resolution for each convolutional unit within the network has been amplified by a factor of 4. Table 3 shows the implemented U-Net’s structure. Furthermore, we have modified the loss function to incorporate both binary cross-entropy (BCE) loss and IoU loss. The pixel-level BCE loss is typically employed in training networks 5 Copyright © 2024 by ASME Pixel-level labeling is necessary for training semantic segmentation models. Therefore, all images are manually labeled with worn regions. The resultant label is a binarized image, wherein each pixel is categorized as either ’worn’ or ’non-worn’. Figure 9 presents an example: the original image of an end mill, the corresponding binarized labels, and an overlaid result of them. (a) Original Image (b) Binarized Label (c) Overlaid Result FIGURE 9: EXAMPLE OF PIXEL-LEVEL LABELING 3.2 Metrics The IoU metric, also known as Jaccard index [33], stands as a prevalent performance metric in image segmentation tasks. IoU computes the ratio of the intersecting area between the model’s segmentation and the ground truth to the cumulative area of both within the image, with the Eq. (1), where _?_ is the number of pixels, _??_ is the ground truth, and _??_ is the model output. 2 <sup><u>∑</u></sup> _?_ <sup>︁</sup> <sup>_?_</sup> <u>=1</u> <sup>_????_</sup> IoU = <u>∑︁</u> _??_ =1 <sup>(</sup> <sup>_??_</sup> <sup>+</sup> <sup>_??_</sup> <sup>)</sup> (1) TABLE 3: THE IMPLEMENTED U-NET S STRUCTURE Layer Convolution Sampling Input 1024×1024×3 Down1 2×ReLU(Conv3-64) Max-Pooling-2 Down2 2×ReLU(Conv3-128) Max-Pooling-2 Down3 2×ReLU(Conv3-256) Max-Pooling-2 Down4 2×ReLU(Conv3-512) Max-Pooling-2 Center 2×ReLU(Conv3-1024) Up1 2×ReLU(Conv3-512) Up Sampling Up2 2×ReLU(Conv3-256) Up Sampling Up3 2×ReLU(Conv3-128) Up Sampling Up4 2×ReLU(Conv3-64) Up Sampling Output Softmax(Conv1-2) for standard image segmentation tasks where the misclassification of fewer pixels only has minimal impact. The entire loss function, employed throughout the network’s training phase, is shown in Eq. (2). _????_ = _?_ BCE + _?_ IoU = − _?_ ∑︂ _?_ =1 ( _??_ log _??_ + (1 − _??_ ) log (1 − _??_ )) (2) 3.5 Evaluation Strategy The generation of expansive datasets and their subsequent manual annotation are often impractical in industrial environments, limiting the direct industrial application of U-Net. Given this challenge, this study aims to ascertain the feasibility of the proposed approach in achieving tool wear segmentation, even with limited dataset volumes. In the initial phase, several representative PoI generation methods were compared. The U-Net model is initially trained utilizing the entire training dataset. Subsequently, its segmentation outputs on the test dataset will serve as foundational data for PoI generation, with methods delineated in Chapter 2. These generated PoI, together with the U-Net’s image segmentation outputs, serve as input prompts for the SAM model. A comparative analysis is then conducted to evaluate SAM’s image segmentation performance relative to different PoI generation methods. During the second phase, subsets of the original training dataset, ranging from 20% to 100%, are stochastically selected to constitute new training datasets of varied sizes. Several U-Nets are trained on these varied-size training datasets. PoI generation based on the outputs of U-Nets on the test dataset are then be executed, with the optimal method identified during the first phase. These points and segmentation outputs of U-Net serve as input prompts for SAM. A comparative assessment of SAM’s image segmentation performance relative to U-Net’s is undertaken to evaluate the proposed approach’s feasibility in tool wear segmentation with reduced dataset sizes. Figure 11 shows the entire evaluation strategy. 4. RESULTS AND DISCUSSION This chapter initiates with a comparative analysis of the performance metrics of three distinct PoI generation methods. Subsequently, the most efficacious PoI generation method will be employed to examine the impact of training data volume on the performance of our proposed approach. Ultimately, we will assess the impact of varying U-Net training intensities on the proposed approach’s performance, particularly with limited training data. 2 <sup><u>∑︁</u></sup> _?_ <sup>_?_</sup> <u>=1</u> <sup>_????_</sup> + 1 − <u>∑︁</u> _??_ =1 <sup>(</sup> <sup>_??_</sup> <sup>+</sup> <sup>_??_</sup> <sup>)</sup> 3.4 SAM Parameter We retained the original configuration of the SAM without modifications and training. We selected the ViT-L SAM [24] in our implementation. Given that the U-Net’s output size is 1024×1024, a 2×2 max-pooling operation was employed to reduce the dimension to 256×256, which matches the SAM’s prompt encoder input. From the three potential masks produced by the mask decoder, the mask with the highest probability was selected as the model’s final output. <mark>Test Dataset</mark> 20% Training 40% Dataset 60% (Tr.) 80% U-Net 100% <mark>Tr. 1</mark> U-Net 1 <mark>Tr. 2</mark> U-Net 2 <mark>Tr. 3</mark> U-Net 3 <mark>Tr. 4</mark> U-Net 4 <mark>Tr. 5</mark> U-Net 5 Training Dataset (Tr.) PoI PoI PoI Best PoI Generator Gen. 1 Gen. 2 Gen. 3 PoI Gen. 2 PoI Gen. 3 IoU U-Net 2 IoU PoI 1 IoU PoI 2 IoU PoI 3 Segment Anything Model IoU U-Net 1 IoU U-Net 3 IoU U-Net 4 IoU U-Net 5 Phase I Phase II FIGURE 11: THE ENTIRE EVALUATION STRATEGY 6 Copyright © 2024 by ASME 4.1 Impact of the Points of Interest Generator (Phase I) Figure 12 shows the performance of three different PoI generation methods: MS, CoGA and RCoGA, evaluated on the test dataset. The U-Net underwent training for 100 epochs utilizing the entire training dataset and achieved convergence. As shown in Fig. 12, all three PoI generation methods exhibit comparable performance across the entire test dataset, each yielding an IoU of about 0.87. However, a variance in performance is observed across the test datasets for different tools. Specifically, End Mill 1 and Insert 3 exhibit suboptimal outcomes relative to the other four tools. This disparity is attributed to End Mill 1’s wear area, characterized by its small and elongated nature, leading to a single positive point that proves less effective in prompting distal wear areas. Figure 13 shows an example of PoI generation for End Mill 1 with CoGA method. The results of other methods are similar. The performance on Insert 3 is compromised by the presence of unclean cutting edges like built-up edges and residual chips, impacting the model’s ability to accurately segment the real wear region. Notably, in the case of End Mill 2, CoGA has an IoU advantage of 0.01 over its counterparts, while it incurs a deficit of 0.01 in End Mill 1. An Analysis of Variance (ANOVA) conducted for the PoI generation methods yielded a pvalue of 0.999, indicating an absence of significant performance differences among the three methods. End Mill 1 End Mill 2 employing three PoI generation methods, across varied U-Net training intensities. At training intensities of both 80 and 100 epochs, all three methods exhibit near-identical performance. However, for epochs below 60, RCoGA consistently matches or outperforms both CoGA and MS, registering an approximate 0.03 advantage in comparison to the least effective method. This suggests that in case of rougher tool wear segmentations, RCoGA’s strategy of generating multiple positive points by segmenting finer tool wear regions helps to provide better prompt quality. Consequently, RCoGA has been selected for PoI generation subsequent analyses. 0.90 FIGURE 14: IOU OF THE PROPOSED APPROACH ON DIFFERENT U-NET TRAINING EPOCH USING DIFFERENT POI GENERATORS 4.2 Impact of the Training Dataset Size (Phase II) Figure 15 shows the performance differences between UNet and our proposed approach, setting U-Net’s results as the referential baseline. U-Net undergoes training on datasets of varying sizes, with the PoI generated by RCoGA. The generated prompt from different U-Nets is fed into SAM to deliver the final tool wear segmentation outcomes. 0.85 0.80 0.75 0.70 <u>RGoCA</u> <u>GoCA</u> ~~MS~~ 0 20 40 60 80 100 U-Net Training Epoch End Mill 3 Insert 1 Insert 2 Insert 3 Mean End Mill 3 RCoGA CoGA MS 20% End Mill 1 40% 60% End Mill 2 80% 100% End Mill 2 0.73 0.78 0.83 0.88 0.93 IoU FIGURE 12: IOU OF THE PROPOSED APPROACH ON SINGLE TOOLS USING DIFFERENT POI GENERATORS Positive point Negative point Flank wear FIGURE 13: EXAMPLE OF POI GENERATION FOR END MILL 1 WITH COGA METHOD Figure 14 shows the performance of the proposed approach, Insert 1 Insert 2 Insert 3 Mean -0.02 U-Net 0.02 0.04 0.06 0.08 0.1 IoU FIGURE 15: IOU DIFFERENCE BETWEEN THE PROPOSED AP- PROACH AND U-NET ON DIFFERENT TRAINING DATA VOLUME As shown in Fig. 15, our proposed approach consistently demonstrates better performance relative to U-Net. The perfor 7 Copyright © 2024 by ASME mance difference is especially prominent when using a small training dataset (20%), with a difference ranging between 0.03 and 0.09. However, as the dataset’s magnitude escalates, this advantage diminishes incrementally. For a 60% training dataset, the advantage narrows to a range of 0.02 to 0.05, and with a full 100% training dataset, it reduces further to less than 0.01. This performance advantage is particularly evident in the case of Insert 3, with a representative example illustrated in Fig. 16. In this example, the IoU of the U-Net’s segmentation result is only 0.65, while our approach achieves an IoU of 0.88. This outperformance can be attributed to U-Net’s susceptibility to image blurring, while our approach exhibits enhanced robustness to blurring. A subsequent ANOVA conducted for training dataset size yielded a p-value of 0.001, indicating a statistically significant impact of the volume of training dataset on the observed performance discrepancy. (a) Original Image (b) U-Net (c) Prop. Approach FIGURE 16: EXAMPLE OF PERFORMANCE ADVANTAGE Figure 17 shows the performance of both U-Net and our proposed approach on the entire test dataset across the different training dataset sizes. The results clearly indicate a consistent IoU advantage for our approach, particularly pronounced at 20% training dataset, where it reaches an advantage of 0.04. This advantage persists up to the 60% training dataset. From 80% onwards, the advantage narrows to a margin of less than 0.01. Notably, our approach registers an IoU of 0.83 at a 20% training dataset. This metric attains on U-Net only when it trained with a more substantial 60% dataset. Furthermore, our approach outperformances U-Net with a 40% training dataset compared to U-Net’s 80% dataset. On a 40% training dataset, our approach already achieves a higher IoU even when U-Net is trained with a larger 80% dataset. These observations emphasize that our proposed approach efficiently leverages smaller training datasets to match or even exceed the performance levels that U-Net achieves only with considerably larger datasets. Crucially, our approach consistently retains its performance advantage over U-Net, irrespective of training dataset size. 4.3 Impact of the U-Net Training Intensity Our approach has demonstrated pronounced advantages with limited training datasets. Based on this, we delve deeper into examining the impact of various U-Net training intensities on our approach when training with a 20% training dataset. This simulates the performance of our approach at initial segmentations with lower quality. Figure 18 contrasts the performance between U-Net and our approach, with U-Net’s performance serving as the reference baseline. Different colors represent various UNet training epochs. The output of U-Net on the test dataset, U-Net 0.05 0.1 0.15 0.2 0.25 IoU FIGURE 18: IOU DIFFERENCE BETWEEN THE PROPOSED AP- PROACH AND U-NET ON DIFFERENT U-NET TRAINING EPOCH Figure 19 shows the performance of both U-Net and our proposed approach on the entire test dataset across the different U-Net’s training epochs. Our approach consistently outperforms 8 Copyright © 2024 by ASME 0.88 0.86 0.84 0.82 0.80 0.78 ~~Our Approach~~ ~~U-Net~~ 20% 40% 60% 80% 100% Training Data Volume FIGURE 17: IOU OF THE PROPOSED APPROACH AND U-NET ON DIFFERENT TRAINING DATA VOLUME across these epochs, undergoes PoI generation with RCoGA and is subsequently processed by SAM to produce the final tool wear segmentation results. As depicted, our approach exhibits substantial dominance over U-Net, accentuated at U-Net’s lower training epochs. With merely 10 epochs of U-Net training, our approach achieves an average advantage of 0.16, peaking to an advantage exceeding 0.23. At 20 epochs, this average reduces to 0.11, and further reduces to 0.06 at 40 epochs. This advantage incrementally narrows with more advanced epochs, settling between 0.03 and 0.07 at the 100-epoch. An ANOVA conducted on U-Net’s training epochs returned a p-value of 3 _._ 7 × 10 <sup>−6</sup>, indicating the significant impact of U-Net’s training intensities on performance discrepancies. A notable exception arises with the tool Insert 3 at the 10-epoch mark, where the advantage is only 0.02. This can be attributed to U-Net’s worse tool wear segmentation performance at this epoch, registering a low IoU of 0.37. Such low-quality segmentations introduce flawed prompts, detrimentally impacting our approach’s efficacy. 10 End Mill 1 20 40 End Mill 2 End Mill 3 Insert 1 Insert 2 Insert 3 Mean 60 80 100 U-Net. Similar conclusions can be drawn that our approach consistently outperforms U-Net, although this advantage reduces as U-Net undergoes extended training. Notably, after 20 epochs, our approach can already achieve an IoU nearing 0.8, with only a marginal improvement of 0.04 observed at the 100 epochs. Such performance underscores our approach’s capacity to substantially refine U-Net’s initial rough tool wear segmentation outputs, even with limited training datasets. 0.8 0.7 0.6 <u>Our Approach</u> <u>U-Net</u> 0.5 10 20 40 60 80 100 U-Net Training Epoch FIGURE 19: IOU OF THE PROPOSED APPROACH AND U-NET ON DIFFERENT U-NET TRAINING EPOCH 5. CONCLUSION AND OUTLOOK In this study, we propose an efficient tool wear segmentation approach based on SAM and U-Net. Our approach employs U-Net as an automated prompt generator for SAM, subsequently leveraging SAM’s capabilities for accurate tool wear segmentation. An evaluation of three PoI generation methods revealed RCoGA as the optimal choice. Further analyses, benchmarked against U-Net’s performance, evaluated the impacts of variations in training dataset sizes and U-Net training intensities on the final segmentation outcomes. The results show that our approach consistently outperformed U-Net, particularly when working with smaller training datasets and at initial stages of U-Net training. These results underscore our approach’s capability to deliver accurate tool wear segmentations even with limited training datasets, indicating its potential for swift integration into industrial practices with limited datasets. It is imperative to emphasize that our work represents a preliminary attempt to employ SAM for tool wear segmentation. The use of U-Net for preliminary wear segmentation demonstrates one of many potential approaches, with alternatives including manual prompts or object detection models that may better meet the zero-shot requirements of industrial scenarios. Moreover, to optimize SAM’s zero-shot performance specifically for tool wear segmentation, SAM itself needs to be retrained within this domain. Therefore, future research will encompass assessing model performance with expansive datasets and exploring the potential for retraining and transferring SAM to enhance its accuracy and robustness specifically for the tool wear segmentation domain. ACKNOWLEDGMENTS The authors appreciate the funding of this work by the Deutsche Forschungsgemeinschaft (DFG) - German Research Foundation for the project 509813741 “Entwicklung und Erforschung eines lernfähigen Systems zur Werkzeugverschleißüberwachung auf Basis künstlicher Intelligenz”. REFERENCES [1] Wang, Bing and Liu, Zhanqiang. “Influences of tool struc ture, tool material and tool wear on machined surface integrity during turning and milling of titanium and nickel alloys: a review.” _The_ _International_ _Journal_ _of_ _Advanced_ _Manufacturing Technology_ Vol. 98 No. 1 (2018): pp. 1925– 1975. [DOI 10.1007/s00170-018-2314-1.](https://doi.org/10.1007/s00170-018-2314-1) [2] Ezugwu, E.O., Wang, Z.M. and Machado, A.R. “The machinability of nickel-based alloys: a review.” _Journal_ _of Materials Processing Technology_ Vol. 86 No. 1 (1999): pp. 1–16. [DOI 10.1016/S0924-0136(98)00314-8.](https://doi.org/10.1016/S0924-0136%0x2898%0x2900314-8) [3] Jeon, J.U. and Kim, S.W. “Optical flank wear monitoring of cutting tools by image processing.” _Wear_ Vol. 127 No. 2 (1988): pp. 207–217. [DOI 10.1016/0043-1648(88)90131-](https://doi.org/10.1016/0043-1648%0x2888%0x2990131-7) [7.](https://doi.org/10.1016/0043-1648%0x2888%0x2990131-7) [4] Abellan-Nebot, Jose Vicente and Subirón, Fernando Romero. “A review of machining monitoring systems based on artificial intelligence process models.” _The_ _International_ _Journal_ _of_ _Advanced_ _Manufacturing_ _Technology_ Vol. 47 No. 1 (2010): pp. 237–257. DOI [10.1007/s00170-009-2191-8.](https://doi.org/10.1007/s00170-009-2191-8) [5] Zhou, Yuqing and Xue, Wei. “Review of tool condition monitoring methods in milling processes.” _The Inter-_ _national_ _Journal_ _of_ _Advanced_ _Manufacturing_ _Technology_ Vol. 96 No. 5 (2018): [pp. 2509–2523. DOI 10.1007/s00170-](https://doi.org/10.1007/s00170-018-1768-5) [018-1768-5.](https://doi.org/10.1007/s00170-018-1768-5) [6] Bergs, Thomas, Holst, Carsten, Gupta, Pranjul and Augspurger, Thorsten. “Digital image processing with deep learning for automated cutting tool wear detection.” _Pro-_ _cedia_ _Manufacturing_ Vol. 48 (2020): pp. 947–958. DOI [10.1016/j.promfg.2020.05.134. 48th SME North American](https://doi.org/10.1016/j.promfg.2020.05.134) Manufacturing Research Conference, NAMRC 48. [7] Canny, John. “A Computational Approach to Edge Detec tion.” _IEEE Transactions on Pattern Analysis and Machine_ _Intelligence_ Vol. PAMI-8 No. 6 (1986): pp. 679–698. DOI [10.1109/TPAMI.1986.4767851.](https://doi.org/10.1109/TPAMI.1986.4767851) [8] Kanopoulos, N., Vasanthavada, N. and Baker, R.L. “Design of an image edge detection filter using the Sobel operator.” _IEEE Journal of Solid-State Circuits_ Vol. 23 No. 2 (1988): pp. 358–367. [DOI 10.1109/4.996.](https://doi.org/10.1109/4.996) [9] Kass, Michael and Terzopoulos, Demetri. “Snakes: Ac tive contour models.” _International_ _Journal_ _of_ _Com-_ _puter_ _Vision_ Vol. 1 No. 4 (1988): pp. 321–331. DOI [10.1007/BF00133570.](https://doi.org/10.1007/BF00133570) [10] D’Addona, D.M., Ullah, A. M. M. Sharif and Matarazzo, D. “Tool-wear prediction and pattern-recognition using artificial neural network and DNA-based computing.” _Journal of_ _Intelligent Manufacturing_ Vol. 28 No. 6 (2017): pp. 1285– 1301. [DOI 10.1007/s10845-015-1155-0.](https://doi.org/10.1007/s10845-015-1155-0) [11] Peng, Ruitao, Pang, Haolin, Jiang, Haojian and Hu, Yunbo. “Study of Tool Wear Monitoring Using Machine Vision.” _Automatic Control and Computer Sciences_ Vol. 54 (2020): pp. 259–270. [DOI 10.3103/s0146411620030062.](https://doi.org/10.3103/s0146411620030062) [12] Bagga, P.J., Makhesana, M.A., Patel, Kavan and Patel, K.M. “Tool wear monitoring in turning using image processing techniques.” _Materials Today:_ _Proceedings_ Vol. 44 (2021): 9 Copyright © 2024 by ASME pp. 771–775. DOI [10.1016/j.matpr.2020.10.680.](https://doi.org/10.1016/j.matpr.2020.10.680) International Conference on Materials, Processing and Characterization., [13] García-Pérez, Alberto, Ziegenbein, Amina, Schmidt, Eric, Shamsafar, Faranak, Fernández-Valdivielso, Asier, Llorente-Rodríguez, Raúl and Weigold, Matthias. “CNNbased in situ tool wear detection: A study on model training and data augmentation in turning inserts.” _Journal_ _of_ _Manufacturing_ _Systems_ Vol. 68 (2023): pp. 85–98. DOI [10.1016/j.jmsy.2023.03.005.](https://doi.org/10.1016/j.jmsy.2023.03.005) [14] Xia, Linzhi, Shi, Yizhu, Lin, Hongjie, Zheng, Houyuan, Cao, Xincheng, Chen, Binqiang, Zhou, Yuqing and Sun, Weifang. “Segmentation and quantitative evaluation for tool wear condition via an improved SE-U-Net.” _The Inter-_ _national_ _Journal_ _of_ _Advanced_ _Manufacturing_ _Technology_ [(2022)DOI 10.1007/s00170-022-09338-2.](https://doi.org/10.1007/s00170-022-09338-2) [15] Friedrich, Markus, Gerber, Theresa, Dumler, Jonas and Döpper, Frank. “A system for automated tool wear monitoring and classification using computer vision.” _Pro-_ _cedia_ _CIRP_ Vol. 118 (2023): pp. 425–430. DOI [10.1016/j.procir.2023.06.073.](https://doi.org/10.1016/j.procir.2023.06.073) 16th CIRP Conference on Intelligent Computation in Manufacturing Engineering. [16] García-Ordás, María Teresa, Alegre, Enrique, González Castro, Víctor and Alaiz-Rodríguez, Rocío. “A computer vision approach to analyze and classify tool wear level in milling processes using shape descriptors and machine learning techniques.” _The_ _International_ _Journal_ _of_ _Ad-_ _vanced_ _Manufacturing_ _Technology_ Vol. 90 (2016): pp. 1947–1961. [DOI 10.1007/s00170-016-9541-0.](https://doi.org/10.1007/s00170-016-9541-0) [17] Hou, Qiulin, Sun, Jie and Huang, Panling. “A novel al gorithm for tool wear online inspection based on machine vision.” _The International Journal of Advanced Manufac-_ _turing_ _Technology_ Vol. 101 (2018): pp. 2415–2423. DOI [10.1007/s00170-018-3080-9.](https://doi.org/10.1007/s00170-018-3080-9) [18] Ronneberger, Olaf, Fischer, Philipp and Brox, Thomas. “U Net: Convolutional Networks for Biomedical Image Seg[mentation.” (2015). URL https://arxiv.org/abs/1505.04597.](https://arxiv.org/abs/1505.04597) [19] Miao, Huihui, Zhao, Zhibin, Sun, Chuang, Li, Bing and Yan, Ruqiang. “A U-Net-Based Approach for Tool Wear Area Detection and Identification.” _IEEE Transactions on_ _Instrumentation_ _and_ _Measurement_ Vol. 70 (2021): pp. 1– 10. [DOI 10.1109/TIM.2020.3033457.](https://doi.org/10.1109/TIM.2020.3033457) [20] Schlegel, Clemens, Molitor, Dirk Alexander, Kubik, Chris tian, Martin, Daniel Michael and Groche, Peter. “Tool wear segmentation in blanking processes with fully convolutional networks based digital image processing.” _Journal of Ma-_ _terials Processing Technology_ Vol. 324 (2024): p. 118270. [DOI 10.1016/j.jmatprotec.2023.118270.](https://doi.org/10.1016/j.jmatprotec.2023.118270) [21] Wu, Cheng and Wang, Shenlong. “Tool wear assessment and life prediction model based on image processing and deep learning.” _The_ _International_ _Journal_ _of_ _Advanced_ _Manufacturing_ _Technology_ Vol. 126 (2023): pp. 1303– 1315. [DOI 10.1007/s00170-023-11189-4.](https://doi.org/10.1007/s00170-023-11189-4) [22] Holst, Carsten, Yavuz, Taha Berk, Gupta, Pranjul, Ganser, Philipp and Bergs, Thomas. “Deep learning and rulebased image processing pipeline for automated metal cutting tool wear detection and measurement.” _IFAC-_ _PapersOnLine_ Vol. 55 No. 2 (2022): pp. 534–539. DOI [10.1016/j.ifacol.2022.04.249.](https://doi.org/10.1016/j.ifacol.2022.04.249) 14th IFAC Workshop on Intelligent Manufacturing Systems IMS 2022. [23] Chen, Chang, Lin, Chen, Meng, Zhen, Ni, Jing, Sun, Jiteng and Li, Zuji. “Semantic segmentation of end mill wear area based on transfer learning with small dataset.” _The_ _Inter-_ _national_ _Journal_ _of_ _Advanced_ _Manufacturing_ _Technology_ Vol. 127 (2023): pp. 3599–3609. DOI [10.1007/s00170-](https://doi.org/10.1007/s00170-023-11725-2) [023-11725-2.](https://doi.org/10.1007/s00170-023-11725-2) [24] Kirillov, Alexander, Mintun, Eric, Ravi, Nikhila, Mao, Hanzi, Rolland, Chloe, Gustafson, Laura, Xiao, Tete, Whitehead, Spencer, Berg, Alexander C., Lo, Wan-Yen, Dollár, Piotr and Girshick, Ross. “Segment Anything.” (2023). [URL https://arxiv.org/abs/2304.02643.](https://arxiv.org/abs/2304.02643) [25] Dosovitskiy, Alexey, Beyer, Lucas, Kolesnikov, Alexander, Weissenborn, Dirk, Zhai, Xiaohua, Unterthiner, Thomas, Dehghani, Mostafa, Minderer, Matthias, Heigold, Georg, Gelly, Sylvain, Uszkoreit, Jakob and Houlsby, Neil. “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale.” (2021). URL [https://arxiv.org/abs/2010.](https://arxiv.org/abs/2010.11929) [11929.](https://arxiv.org/abs/2010.11929) [26] He, Kaiming, Chen, Xinlei, Xie, Saining, Li, Yanghao, Dollár, Piotr and Girshick, Ross. “Masked Autoencoders Are Scalable Vision Learners.” (2021). [URL https://arxiv.](https://arxiv.org/abs/2111.06377) [org/abs/2111.06377.](https://arxiv.org/abs/2111.06377) [27] Zhang, Yichi, Shen, Zhenrong and Jiao, Rushi. “Segment Anything Model for Medical Image Segmentation: Current Applications and Future Directions.” (2024). URL [https:](https://arxiv.org/abs/2401.03495) [//arxiv.org/abs/2401.03495.](https://arxiv.org/abs/2401.03495) [28] Ji, Wei, Li, Jingjing, Bi, Qi, Liu, Tingwei, Li, Wenbo and Cheng, Li. “Segment Anything Is Not Always Perfect: An Investigation of SAM on Different Real-world Applications.” (2023). [URL https://arxiv.org/abs/2304.05750.](https://arxiv.org/abs/2304.05750) [29] Osco, Lucas Prado, Wu, Qiusheng, de Lemos, Ed uardo Lopes, Gonçalves, Wesley Nunes, Ramos, Ana Paula Marques, Li, Jonathan and Marcato, José. “The Segment Anything Model (SAM) for remote sensing applications: From zero to one shot.” _International_ _Journal_ _of Applied Earth Observation and Geoinformation_ Vol. 124 (2023): p. 103540. [DOI 10.1016/j.jag.2023.103540.](https://doi.org/10.1016/j.jag.2023.103540) [30] Said, K A M and Jambek, A B. “Analysis of Image Process ing Using Morphological Erosion and Dilation.” _Journal_ _of_ _Physics:_ _Conference_ _Series_ Vol. 2071 No. 1 (2021): p. 012033. [DOI 10.1088/1742-6596/2071/1/012033.](https://doi.org/10.1088/1742-6596/2071/1/012033) [31] Hernández-García, Alex and König, Peter. “Data augmentation instead of explicit regularization.” (2020). URL [https://arxiv.org/abs/1806.03852.](https://arxiv.org/abs/1806.03852) [32] Perez, Luis and Wang, Jason. “The Effectiveness of Data Augmentation in Image Classification using Deep Learning.” (2017). [URL https://arxiv.org/abs/1712.04621.](https://arxiv.org/abs/1712.04621) [33] Jaccard, Paul. “The Distribution of the Flora in the Alpine Zone.” _The_ _New_ _Phytologist_ Vol. 11 No. 2 (1912): pp. 37–50. Accessed 2023-10-17, URL [http://www.jstor.org/](http://www.jstor.org/stable/2427226) [stable/2427226.](http://www.jstor.org/stable/2427226) 10 Copyright © 2024 by ASME

섹션 본문

섹션 본문이 없습니다.

참고문헌

참고문헌 정보가 없습니다.