Introduction

Turning is one of the fundamental machining methods. This method makes it possible to produce many engineering parts with various features such as precise dimensional accuracy, tight geometric tolerance, and high surface quality. However, turning is a complex process affected by many factors, such as cutting speed, depth of cut, and feed (Groover, 2020). These factors should be carefully selected depending on the material, desired geometric tolerance, desired surface quality, vibration, and machine power capacity to achieve an appropriate turning (Anicic et al., 2017). In particular, feed is regarded as the most significant factor among the others, according to many authorities (Chinchanikar & Choudhury, 2013; Jovic et al., 2017; Maruda et al., 2016; Sadeghifar et al., 2022). Thus, proper feed values are essential for a proper turning process which produces the desired chip morphology. In practice, the catalogues offered by the cutting tool manufacturers can be used to determine the appropriate feed values. However, in an ongoing turning process, the cutting conditions also affect the quality of the product and the morphology of the chips produced. For example, the tool wear during an ongoing turning process may lead to chips with different morphological characteristics than expected. Therefore, continuous monitoring is required by considering the changes in the chip morphology for a desired turning process.

Chip morphology in machining processes is a subject of both commercial and academic importance. By examining the chip morphology resulting from machining operations, machine operators can draw conclusions about the cutting conditions and, if necessary, change the cutting conditions. However, the correct evaluation of chip morphology requires expertise, and incorrect decisions can often be made (Pagani et al., 2020). In addition, loss of chip control is an important issue that can cause damage to the machine, the workpiece, or the operator. It is very important to make the correct evaluation in order to prevent the machine operator from making the incorrect decisions. Chip classification methods may prove to be an important method in solving these problems.

Machining methods and chip morphology

There have been extensive attempts in the literature to investigate chip morphology and its effects. Chip morphology is known to be both a result of machining and a factor affecting machining. Long chip morphologies can be dangerous to the workpiece, the operator, and the machine itself. On the other hand, short chips can be easily removed from the cutting area, allowing the machining process to continue uninterrupted (Rubio et al., 2006). Moreover, various chip breaker geometries are also utilized to reduce the size of chips during the machining process at specific feeds and depths of cut (Eapen et al., 2017). Nonetheless, the chip breaker geometries may not be able to function, and as a result, long chips may cause various harmful effects (Viharos et al., 2003). The cooling or lubricating fluids used during machining also affect chip morphology (Das et al., 2021; Sadeghifar et al., 2022). Das et al. (Das et al., 2021) claimed that various plastic deformations occur in the cutting tool-workpiece contact, and different serration rates occur depending on the properties of the cooling or lubricating fluids used in their study. In addition, the authors proposed that chip thickness changes with cutting speed. At low cutting speeds, the chip thickness increases, and the chips break more quickly. Similarly, as the feed increases, the chip thickness increases, and the chips break faster. Besides, Sadeghifar et al. (Sadeghifar et al., 2022) investigated the effect of different lubrication quantities versus the shape and surface integrity in low-speed and high-speed turning. Pacella (Pacella, 2019) discussed the effect of cutting conditions on chip morphology and introduced a new low-feed chip breaking tool. The author also presents the experimental results based on the temperature, deformation, feed, strain hardening, and yield stress of the workpiece material. In (Cui et al., 2015), Cui et al. examined the temperature of the chip and the relationship between the morphology of the hardened steel. Moreover, the surface roughness and cutting forces are also discussed versus the chip morphology and temperature at high feed values. According to the literature on chip morphology, it can be asserted that a healthy turning process can be perceived based on the morphological characteristics of the chips produced from different workpiece materials.

There is also a pervasive effort in the literature to provide a classification of chips since it is important to classify the different morphological characteristics that occur due to various factors in a turning process. The types of chips produced during machining are classified and coded in ISO 3685 (ISO 3685:1993) (International Organization for Standardization, 1993). This classification provided by ISO has been utilized in many studies in the existing literature. In their study, Jovic et al. (Jović et al., 2017) used the adaptive neuro-fuzzy technique (ANFIS) to perform chip shape classification according to ISO 3685 standard. For this purpose, the authors carried out machining experiments with different cutting speeds, feeds, and depth of cut parameters on AISI 304 material. As a result of the research, it was revealed that the ANFIS approach is successful in determining the dominant parameters for chip recognition and chip morphology, i.e., the feed. Similarly, Anicic et al. (Anicic et al., 2017) investigated the ANFIS approach on a steel material, 30CrNiMo8, to estimate the chip shape and surface roughness. In their experiments, the authors observed that two different chip shapes are formed, and these chip shapes are differentiated by the effect of cutting forces. In (Pagani et al., 2020), Pagani et al. investigated the tool wear prediction by deep learning mechanisms using chip shapes and chip colors. For this purpose, 25CrMo4 (EN 10083-3) low-carbon steel material was turned by a CNMM 120612 insert with an 80° approach angle. In the experiments, the cutting speed was set at 180 m/min, the feed was 0.3 mm/rev, and the depth of cut was 1.5 mm. The chips obtained during machining were acquired by a 10.1-megapixel camera using a setup with four red light sources. As a result of the analyzes made on the RGB (Red Green Blue) and HSV (Hue Saturation Value) channels of the obtained images, it was emphasized that the Hue (H) channel is the most successful one. Ngerntong and Butdee (Ngerntong & Butdee, 2020) proposed a fuzzy logic model to obtain accurate estimations between chip morphology and surface roughness. For this purpose, the authors define some fuzzy parameters, including chip continuation, chip thickness, and chip deformation, to construct an accurate and reliable prediction model. Yameogo et al. (Yameogo et al., 2017) offered a microstructure coupled model to predict chip morphology and cutting forces for the machining of Ti6Al4V alloy. They showed that a relationship between recrystallization and chip segmentation is established and discussed according to the evaluation outcomes. Rath et al. (Rath et al., 2018) demonstrated that the nodal temperature is strongly correlated with the machined surface as regarded by the surface roughness characteristics. Moreover, the authors also took the chip morphology into account to increase the prediction performance between surface quality and nodal temperature. It was stated in the study that considering the chip morphology increases the success rate of the predictions obtained during their evaluations. Eventually, it can be concluded from the literature that machine learning-based models have been heavily consulted in turning processes recently.

The contribution

Even though the theoretical background of chip morphology has been extensively studied, and the success of learning-based solutions has been legitimated on different materials, a practical application is required to provide a real-time reaction in the field. Considering the aforementioned motivations above, it can be asserted that reactive monitoring is essential for addressing processing-related real-time concerns.

In this study, we offer to develop a practical mobile application accommodating an embedded learning model to specifically classify the chip morphology of AISI 4140 material according to ISO 3685 standards. To this end, the detailed contributions of the study are listed below:

  • A novel dataset was obtained and made publicly available in AISI 4140 by machining a set of workpiece materials with 20 different feed values, and each sample in the dataset is manually labelled according to ISO 3685 standards.

  • Different convolutional neural network (CNN) models were trained with respect to a set of varying hyperparameters and evaluated according to the accuracy and loss parameters by using the TensorFlow Lite library and Teachable Machine platform.

  • A practical mobile application was developed and tested in the field, where the best TensorFlow Lite model was embedded and consulted for chip classification of captured images.

The rest of the paper is organized as follows. Firstly, Sect. 2 introduces the material selection and the proposed method. Afterwards, Sect. 3 explains the data acquisition for the experiments conducted in the study. Accordingly, Sect. 4 presents the performance evaluation of the learning models by describing the evaluation methodology and by illustrating the evaluation outcomes obtained, respectively. Finally, Sect. 5 discusses the inferences from the study and concludes the work by implying the future directions.

Material and method

Material selection

In this study, AISI 4140 material, which is frequently used in machining processes, is employed. The chemical composition of the material is shown in Table 1. AISI 4140 (42CrMo4) has many advantages as a chromium-molybdenum alloy steel. The principal advantages are versatility, reasonable toughness, sufficient atmospheric corrosion resistance, good strength, heat treatability, wear resistant, and easy to machine. Therefore, AISI 4140 alloy materials are extensively utilized in many engineering applications (Akkuş, 2019; Elbah et al., 2013).

Table 1 Chemical composition and mechanical properties of AISI 4140

The proposed method

A systematic experimental design is adopted in the study. The components and the design of the proposed model followed in the experiments are shown in Fig. 1. A TNMG160404-M3 cutting insert (Grade: TP2500) and a PTGNR2020K16 tool holder are utilized for the turning experiments. The approach angle between the cutting tool and the workpiece is set at 90°. The experiments are conducted on a CNC turning center under dry machining conditions. Machining depends on numerous factors and is a complex process that requires careful management. In this study, the depth of cut value is selected as 1 mm, which is the recommended depth of cut value in ISO 3685. Finally, the cutting speed is selected as 180 m/min.

Fig. 1
figure 1

The proposed model for the classification based on the chip morphology

Although chip formation depends on many factors, the primary factors affecting chip size vary with feed and depth of cut. In particular, the effect of feed was attributed as the most influential factor in many studies (Chinchanikar & Choudhury, 2013; Jovic et al., 2017; Sadeghifar et al., 2022). Therefore, in this study, feed is determined as the principal parameter.

The AISI 4140 workpieces were turned from Ø80 mm down to Ø42 mm. Since the cutting speed is constant, the number of revolutions (RPM) changes depending on the workpiece diameter according to Eq. 1.

$$ \begin{aligned} & V = \frac{\pi \times D \times N}{{1000}} \\ & V = Cutting \,speed \left( {m/min} \right) \\ & D = Workpiece \,diameter \left( {mm} \right) \\ & N = RPM \left( {rev/{\text{min}}} \right) \end{aligned} $$
(1)

In order to have a systematic approach to determining feed values, a fixed feed rate (mm/min) value of 126 mm/min was used. Thus, different feed (mm/rev) values can be obtained depending on the diameter of the workpiece, and the following equation (Eq. 2) is used to convert between these two expressions.

$$ \begin{aligned} & fr = f \times N \\ & fr = Feed \,rate \left( {mm/rev} \right) \\ & f = Feed\, \left( {mm/rev} \right) \\ & N = RPM\, \left( {rev/{\text{min}}} \right)\end{aligned} $$
(2)

The experiments were repeated 20 times with respect to different feed values. The other parameters stated above remain the same, whereas the feed parameter was changed as presented in Table 2. Hence, different chips are produced and classified during the turning process.

Table 2 The feed values

As shown in Table 2, the feed values used in each cutting experiment vary between 0.176 and 0.092 mm/rev. Chip morphology is influenced by multiple factors. Since only the feed values were varied in the experiments, the change in chip morphology was only altered as a function of the feed values.

Once the chips were generated throughout the machining process, chip images were captured, and a dataset was constructed for the learning process. CNN models are utilized for model training since they produce broad success in image classification, even though they were initially designed for computer vision (Cao et al., 2020; Chen et al., 2021; Law et al., 2020). There are several common CNN architectures, such as AlexNet, VGG16, ResNet50, InceptionV3, MobileNet, etc. These architectures are widely used in the literature for image-based classification in various problem domains (Zhou et al., 2022). Nonetheless, in this study, we prepared different custom CNN models on the application-specific chip dataset instead of general-purpose CNN architectures. The custom CNN models are evaluated with respect to different hyperparameters, and the performance analyzes among them are presented. The data was trained by using TensorFlow Lite, i.e., a machine learning library that mitigates high cost, slow training process, and provides lightweight models for embedded hardware (Li et al., 2022). The framework is established upon a well-known TensorFlow library to enable machine learning, especially on mobile devices (Sallang et al., 2021). On the other hand, it does not require a decent GPU on contrary to existing learning schemes (Failed, 2021). Therefore, TensorFlow Lite is widely preferred for low power mobile hardware and facilitates learning models for various platforms including Android, iOS, Linux, etc. (Sahin et al., 2022). We prefer to utilize TensorFlow Lite for the learning models considering its aforementioned capabilities to fulfill the contributions of the study. An open-source no-code machine learning platform, Teachable Machine, developed by Google LLC, is also utilized to implement the learning models (Carney et al., 2020). Thus, the advantages of no-code machine learning operations (MLOps) are utilized to simplify the establishment of learning models (Sundberg & Holmström, 2023). Accordingly, the trained models are embedded into an Android application to classify chips in real-time on the field. The development environment, dependencies, and the output of the practical application development performed in the study are given in Fig. 2, respectively.

Fig. 2
figure 2

The development environment and dependencies of the proposed chip classifier application

The development environment for the practical Android application is Android Studio. Android Software Development Kit (SDK) and Java programming languages are utilized to create and test the application.

Data acquisition

The chip samples produced throughout the experiments were obtained in a CNC turning center (Goodway GLS-1500 M), as shown in Fig. 3. In addition, the workpieces were held with appropriate pressure between the chuck and the tailstock to ensure stable cutting conditions.

Fig. 3
figure 3

The CNC machine in which the chips are collected for the data acquisition

In practice, chip breaker geometries with different geometric shapes for various cutting conditions are utilized in turning processes. Hence, we considered using an M3-type chip breaker geometry to obtain a realistic and proper machining on AISI 4140. Figure 4 presents sample chip breaker geometries produced by cutting tool manufacturers. Figure 4a shows the negative insert chip breaker geometries recommended by SECO company for various cutting conditions, Fig. 4b shows the M3-type chip breaker form geometry used in the experiments, and Fig. 4c shows the cutting values recommended by the cutting tool manufacturer for the M3 chip geometry (SECO, 2014).

Fig. 4
figure 4

The chip breakers a various chip breakers, b M3 chip breakers geometric features, c recommended cutting values (SECO, 2014)

Significant changes were observed in the length and morphology (shape) of the chips obtained with different feed values. Considering that all the experimental parameters were kept constant except for the feed, the effect of the feed values became evident. In particular, the feed values below approximately 0.1 mm/rev., the chip lengths were significantly increased. The reason for this is that the cutting values recommended by the cutting tool manufacturer were exceeded, as shown in Fig. 2c. Although the cutting conditions are affected by many factors, the minimum feed recommended by the tool manufacturer in Fig. 2c for the 1 mm depth of cut used in the experiments is approximately 0.13 mm/rev. When the feed is decreased, the M3 chip breaker shape of the cutting tool cannot perform its function, and the chip breaker function is disabled. After the experiments were carried out according to the determined cutting conditions, chip analyses were performed. At the end of 20 experiments with different feeds, different chip morphologies were achieved, and chip images were captured, as shown in Fig. 5.

Fig. 5
figure 5

Dataset construction a capturing chip images, b samples for collected chips with respect to different feed values

A camera capable of 15 MP resolution was used to capture chip images. Accordingly, the preprocessing was applied to the images to resize them to 224 × 224 pixels because of the prerequisite of the Google Teachable Machine tool. The entire types according to the standards and the ones obtained as a result of the machining experiments in the study are presented in Fig. 6. Six different chip morphologies were spotted in the dataset when all the types defined in ISO 3685 were considered. The red rectangles in Fig. 6 indicate the ones used in the labelling of the constructed dataset.

Fig. 6
figure 6

The entire chip morphology types defined in ISO 3685 standard (International Organization for Standardization, 1993) and 6 different chip morphologies detected during the machining experiments

The dataset includes a different but similar number of samples for each of the six different chip classes. The exact number of samples is given in Table 3. The percentage of each chip class is also stated in the table. According to the table, it can be strongly asserted that the dataset is balanced according to the number of instances included for each class label.

Table 3 The distribution of classes in the dataset

Performance evaluation

Evaluation methodology

The evaluation environment includes a validation stage where computer-aided performance investigation is conducted for different learning models and a test stage in which the application, including the best learning model, is verified in the field.

For the validation stage, three different hyperparameters, i.e., epochs, batch size, and learning rate, are changed through a set of experiments in order to construct custom CNN models. The number of epochs is a hyperparameter that determines how many times a model will loop over the training data (Pandey & Jain, 2022). An epoch means presenting all the training data to the model and updating the weights with the back-propagation algorithm. More epochs allow the model to see and learn more data, but they also lead to a longer training duration and a risk of overfitting to the data learned (Zhang et al., 2022). The batch size is another hyperparameter that determines the number of samples used in each training step. Samples are presented to the network by dividing into small groups, and weight updates are performed for each group. Large batch sizes can provide faster training times but may require more memory usage and processing power. On the other hand, small batch sizes, provide slower training times, but have the potential for better generalization and more stable training results (Tian et al., 2021). The learning rate is the last hyperparameter changed in the experiments, which controls weight updates. Choosing the right learning rate allows the model to converge quickly and effectively to achieve the best performance. A high learning rate can cause large strides in weight updates and cause the model to make undesirable jumps. A low learning rate can cause the model to learn slowly and inefficiently. The optimal learning rate value can be determined by trial-and-error methods (Tang et al., 2021). The experiments are conducted on a machine with 16 GB RAM and 3,70 GHz processing speed. Eventually, each custom CNN model is evaluated considering two different parameters: the accuracy and the loss given by Eq. 3 and Eq. 4, respectively. Moreover, the test accuracy and test loss values are also calculated by considering the data reserved for the tests and not used in the model training.

$$Accuracy= \frac{\sum (TP+TN)}{\sum (TP+TN+FP+FN)}$$
(3)

where true positive (TP), true negative (TN), false positive (FP) and false negative (FN) predictions are calculated on the confusion matrix of predictions.

$${\text{Loss}}= -{\sum }_{i=1}^{n}{t}_{i}{\text{log}}{(p}_{i})$$
(4)

for n classes, where \({t}_{i}\) is the actual (truth) label and pi is the maximum probability of belonging to the \({i}_{th}\) class. According to the definitions of accuracy and loss parameters, it can be advocated that the lower the loss and the higher the accuracy correspond to a more successful learning model.

The verification stage is performed in the field to show that the application is able to classify chip samples with similar accuracy to the theoretical validation of the learning models. For this purpose, the application was installed on an Android device running Android OS 13 and equipped with a 12 MP back camera. The tests were conducted by randomly capturing chip samples produced by the machining, and the correctness of the classification was noted. Eventually, an overall of 100 samples were evaluated 10 times to present the accuracy of the application in the field.

The evaluation of the trained CNN models was initially considered for the number of epochs up to 300. However, it was found that there was no obvious difference after the number of epochs reached certain values. Moreover, it took too much time to train the model when the epochs increased to 300. The learning duration for the experiments took about six hours when the number of epochs was set to 300. Hence, in the recurring experiments, the number of epochs was limited to 100, where the learning was finished in nearly half the duration when the other hyperparameters were kept constant. Similarly, the batch size hyperparameter was changed to 8, 16, and 32, respectively. It was spotted that there was no evident performance difference with respect to the batch size. Therefore, the batch size was kept at 16 in all the remaining experiments conducted. On the other hand, it was seen and reported that the change in the learning rate hyperparameter directly affects the success of the learning models trained on the chip dataset constructed. The performance findings of different custom CNN models were compared with each other, considering the accuracy, test accuracy, loss, and test loss criteria. For the test accuracy and test loss, the test data was separated from the trained data, and a hold-out validation was performed, whereas all data was included within the tenfold cross-validation for accuracy and test criteria. In each experiment, approximately 15% of the samples in each chip class were reserved for testing, and 85% of them were used for training.

Evaluation results

The hyperparameters used in the evaluation were determined through a default "trial and error" procedure (Zatarain et al., 2020). The epochs parameter is changed in an interval between [0.300], and it is seen that after the value 100, there is a convergence in the evaluation metrics. Hence, it is used between the interval [0.100] in the presented performance outcomes. For another hyperparameter batch size, we prefer to use small values considering the advantages stated by the study of Kandel et al. (Kandel & Castelli, 2020). We repeated the performance evaluation according to different badge size parameters such as 8, 16, and 32. However, we did not observe notable changes in the evaluation metrics. Hence, we presented the results according to a badge size parameter determined as 16. The learning rate is also an important parameter that determines the optimization process and the speed of the learning model (Yu et al., 2020). A common approach to tuning the proper learning rate is trial and error depending on prior experience by changing the learning rate value repeatedly (Wen et al., 2020). It is recommended to use a very small value for learning rate to start the trial-and-error procedure as a default policy (Wu et al., 2019). For this purpose, 0.00001 was chosen as the initial learning rate since it is the smallest value that can be chosen in Teachable Machine no-code MLOps tool. Accordingly, the value was increased until convergence is achieved by repeated experiments.

Figure 7 shows the evaluation of a custom CNN model with a learning rate of 0.0001 and a batch size of 16, as the number of epochs increasing to 300. Figure 7a represents the confusion matrix for correctly predicted instances of each chip class. Hence, the diagonal in the matrix corresponds to the total number of correctly classified samples. On the other hand, other cells show misclassification based on the chip morphology types. For example, 12 of the 2.3 Snarled samples were misclassified as 1.3 Snarled chips. Figure 7b shows the change in the evaluation criteria. According to the findings, it was reported that an accuracy of 94.6% was obtained, whereas the test accuracy was around 81.9% when the number of epochs was 300. Similarly, the loss and test loss approached 0.20 and 0.42 when the number of epochs was increased, respectively. It was also seen from the figure that there was not an enormous gap between the test parameters and the validation parameters. Hence, it could be asserted that the model had a good fit to be used in a practical implementation, where the fitness of a model was described as the generalization of its performance to a similar data set.

Fig. 7
figure 7

Evaluation of the custom CNN model when the batch size is 16, the learning rate is 0.00001 and the number of epochs goes to 300 a the confusion matrix, b the change in evaluation criteria

The performance of another custom CNN model, when the batch size was 16 and the learning rate was 0.0001 again, but the number of epochs was limited to 100, is also evaluated and presented in Fig. 8. The confusion matrix and evaluation criteria are given in Fig. 8a and b, respectively. This time, the accuracy of the model was obtained as 86.8%, and the test accuracy was calculated as 81.4%. These values are lower than the ones obtained in the CNN model, where the number of epochs goes to 300. Similarly, the loss value corresponds to 0.40, and the test loss value equals 0.45, where both of them are higher than the ones obtained in the previous model. On the other hand, the training duration has decreased by half, and a model is obtained nearly within three hours. The fitness of the model can again be stated as proper when the small gaps between the test and validation parameters are taken into account.

Fig. 8
figure 8

Evaluation of the custom CNN model when the batch size is 16, the learning rate is 0.00001 and the number of epochs goes to 100 a the confusion matrix, b the change in evaluation criteria

When the learning rate was doubled and set to 0.00002, it is seen from Fig. 9 that the accuracy and test accuracy values increased, whereas the loss and test loss values decreased while the number of epochs approached 100 and the batch size is 16. The total number of correct predictions presented in the diagonal of Fig. 9a is greater than the number of correct predictions in Fig. 8a. The accuracy value reaches 91.5%, and the test accuracy value is 83.4% when the number of epochs is 100. The loss is obtained as 0.28, and the test loss is obtained as 0.42. Since the gap between the test criteria and the validation criteria gets bigger to compare with the experiment when the learning rate is 0.00001, it can be claimed that the model is getting away from optimal fit. However, there is not an obvious gap between the test and validation results. Hence, it can still be argued that the learning model is proper and is able to produce a convincing prediction performance on other test data.

Fig. 9
figure 9

Evaluation of the custom CNN model when the batch size is 16, the learning rate is 0.00002 and the number of epochs goes to 100 a the confusion matrix, b the change in evaluation criteria

When the learning rate was further increased to 0.001 for the same number of epochs and the batch size, it is seen from Fig. 10 that the accuracy and loss values got even better. Figure 10a shows the confusion matrix, and Fig. 10b shows the evaluation criteria against the increasing number of epochs. It was noted that an accuracy of 99.6% and a test accuracy of 85.4% were obtained when the number of epochs reached 100 through the experiments. On the other hand, the loss value and test loss value were calculated as 0.03 and 0.41, respectively. Even with the increase in accuracy rate and the decreased in loss value, the test accuracy and test loss parameters did not differ much from the previous ones. This situation pointed out a degradation of the fitness value of the model. In other words, the generalization of the success of the model for different test data could not be claimed anymore. The model became dataset specific, and the practical implementation might not have similar success to the theoretical evaluation. Nonetheless, 85.4% test accuracy was satisfying accuracy, and 0.41 was the lowest test loss recorded when the previous experiments were taken into account.

Fig. 10
figure 10

Evaluation of the custom CNN model when the batch size is 16, the learning rate is 0.0001 and the number of epochs goes to 100 a the confusion matrix, b the change in evaluation criteria

The summary of the performance evaluation depending on the experiments conducted is presented in Table 4. According to the findings, it can be claimed that decreasing the number of epochs provides less training duration for the custom model under consideration. However, this leads to a decrease in the accuracy rate of the model and an increase in the loss value. On the other hand, the other hyperparameters can be adjusted to endure the performance degradation against the decreasing number of epochs. The custom CNN models trained in the study did not show a remarkable performance change versus varying batch sizes, but they produced better performance outputs when the learning rate was increased and require less time when the number of epochs was decreased.

Table 4 The evaluation summary

The screenshots from the Android application used in the field are given in Fig. 11. Firstly, an operator selects an operation, as seen in Fig. 11a, to perform either taking a picture at that time or selecting a picture captured before. Figure 11b shows the real-time image captured through the application. Finally, in Fig. 11c, a chip image captured or selected from the gallery is classified according to the learning model embedded in the application. Moreover, there is another button to interpret the chip classification and to give some recommendations to the operator. In Fig. 11d, the main recommendations are shown to obtain the desired chip morphology in the turning process. For example, in the figure, it is recommended to investigate four different aspects of the turning process to avoid producing 1.3 Snarled type of chip morphology, which is an undesired chip type for the turning process under evaluation.

Fig. 11
figure 11

Sample usage of the Android application for chip classification a The menu of operation selection, b Taking picture screen, c Selecting picture from the gallery, d Main recommendations for the turning process with respect to the chip image classification

To sum up the findings from the study, it could be claimed that custom CNN models are promising to obtain a classification of different production images in manufacturing processing, such as turning. In particular, chip classification gives important insights to the operators about the properness of the turning process and can be astutely utilized for decision-making in machining. More specifically, when machine learning-based solutions are involved in such processes, the cognitive abilities of learning models are able to endow enhanced manufacturing. The study tried to present the feasibility of a CNN-based chip classifier in turning processes. The custom models trained during the experiments show promising results in predicting the class labels of different chip samples correctly. The validation accuracy of the models reached 99.6%, and the test accuracy got a value of 85.4% when proper hyperparameters were set. Moreover, a practical mobile application was also developed and tested in the field by utilizing embedded learning models. Eventually, it was claimed that, for the moment and probably in the foreseeable future as well, learning models will become ubiquitous in almost every aspect of manufacturing processes when successful findings of such applications are exposed.

Conclusion

Machine learning and its applications have promised great opportunities to improve manufacturing processes in the last decade. Turning is one of the application areas included in the scope of recent machine learning applications. In particular, chip morphological analyzes give beneficial information about the properness of the machining on different workpiece materials. Hence, in this study, we offer to develop a practical mobile application utilizing CNN for chip classification based on morphology. For this purpose, we first construct a dataset consisting of chip images produced on AISI 4140. More specifically, we repeated different experiments using a CNC turning center with respect to varying feed values, constant approach angle, depth of cut, and cutting speed since the feed is regarded as the most dominant factor on chip morphology. Accordingly, the chip images in the dataset are manually labeled concerning ISO 3685 standards. Once the labeling is completed, several custom CNN models are trained by TensorFlow Lite with respect to varying epochs, batch sizes, and learning rates. The prediction performance of each model is evaluated based on the accuracy and loss parameters. Eventually, the model with the highest accuracy and the lowest loss pair is embedded into an Android application based on the application stack presented. According to the evaluation results, a test accuracy of 85.4% is achieved by the custom CNN model trained with 100 epochs, 16 batch sizes, and a 0.0004 learning rate. Similar success ratios are also achieved in the practical tests conducted in the field by using the Android application. To sum up, it is shown in the study that application-specific learning models can be developed by using CNN to provide a high-performance classification in turning processes based on chip morphology. Moreover, easy-to-use mobile applications can be implemented to amend the manufacturing processes in real-time regarding the expectations in the field.

This study examined the results obtained under specific machining conditions. Chip morphology is influenced by many factors, such as material type, feed, depth of cut, cutting speed, cooling conditions, cutting tool characteristics, chip breaker form of the cutting tool, machine dynamics, and vibration. The experiments examined only the effect of feed on chip morphology. It was not possible to investigate the effect of cutting depth, cutting speed, and cooling conditions on chip morphology, as this would have required thousands of additional experiments. Not performing these experiments can be stated as a limitation of this study. In future work, the dataset is initially planned to be expanded by adding chip images obtained from further experiments. Moreover, the performance of the proposed model will be sought out on different materials widely used in the literature. Eventually, the mobile application will be improved with additional features. For instance, a recommendation ability is aimed to be developed to advise operations to the operator, such as slowing down the feed value, etc., for acquiring the desired chip morphology on the field.