Next Article in Journal
Detachment Energy Evaluation in Nano-Particle Cleaning Using Lateral Force Microscopy
Previous Article in Journal
Can Virtual Reality Cognitive Remediation in Bipolar Disorder Enhance Specific Skills in Young Adults through Mirror Neuron Activity?—A Secondary Analysis of a Randomized Controlled Trial
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Fourier Features and Machine Learning for Contour Profile Inspection in CNC Milling Parts: A Novel Intelligent Inspection Method (NIIM)

by
Manuel Meraz Méndez
1,*,†,
Juan A. Ramírez Quintana
2,†,
Elva Lilia Reynoso Jardón
3,†,
Manuel Nandayapa
3,† and
Osslan Osiris Vergara Villegas
3,†
1
Department of Industrial Maintenance, Technological University of Chihuahua, Chihuahua 31313, Mexico
2
Department of Digital Signal Processing, TecNM-Technological Institute of Chihuahua, Chihuahua 31200, Mexico
3
Department of Industrial Engineering, Autonomous University of Juarez City, Ciudad Juárez 32310, Mexico
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Appl. Sci. 2024, 14(18), 8144; https://doi.org/10.3390/app14188144
Submission received: 8 August 2024 / Revised: 29 August 2024 / Accepted: 4 September 2024 / Published: 10 September 2024

Abstract

:
Form deviation generated during the milling profile process challenges the precision and functionality of industrial fixtures and product manufacturing across various sectors. Inspecting contour profile quality relies on commonly employed contact methods for measuring form deviation. However, the methods employed frequently face limitations that can impact the reliability and overall accuracy of the inspection process. This paper introduces a novel approach, the novel intelligent inspection method (NIIM), developed to accurately inspect and categorize contour profiles in machined parts manufactured through the milling process by computer numerical control (CNC) machines. The NIIM integrates a calibration piece, a vision system ( R A M - S t a r l i t e T M ), and machine learning techniques to analyze the line profile and classify the quality of contour profile deformation generated during CNC milling. The calibration piece is specifically designed to identify form deviations in the contour profile during the milling process. The R A M - S t a r l i t e T M vision system captures contour profile images corresponding to curves, lines, and slopes. An algorithm generates a profile signature, extracting Fourier descriptor features from the contour profile to analyze form deviations compared to an image reference. A feed-forward neural network is employed to classify contour profiles based on quality properties. Experimental evaluations involving 60 machined calibration pieces, resulting in 356 images for training and testing, demonstrate the accuracy and computational efficiency of the proposed NIIM for profile line tolerance inspection. The results demonstrate that the NIIM offers 96.99% accuracy, low computational requirements, 100% inspection capability, and valuable information to improve machining parameters, as well as quality classification.

1. Introduction

Tool wear during the milling process can cause several adverse effects on machined parts, such as loss of dimensional accuracy, rougher surfaces, increased temperature, vibrations, and geometric defects [1,2]. Chatter, characterized by vibrations at the tool-workpiece interface, induces excessive cutting forces [3], tool damage, and higher removal rates [4]. Numerous studies delve into predicting form deviations caused by tool wear and chatter detection. For instance, refs. [5,6] posit that milling processes can generate form deviation, impacting the quality and functionality of machined parts. Myshkin et al. [7] stress the importance of characterizing form deviation using statistical parameters derived from surface profiles or 3D surface maps. Cheung and Bun [8] highlight the contributions of various components, such as tool feed rate, spindle rotational speed, tool geometry, material properties, and tool-work vibration, to the generation of profile deformation and resulting surface modulation variations.
Today, the quality of contour profiles plays a crucial role in the functionality of fixtures and assembly parts in manufacturing products across various applications, including automotive, aerospace, and household appliances [9]. The industry’s rapid adoption of the computer numerical control (CNC) process has prompted the development of stringent geometric tolerance standards for CNC milling parts, leading to rigorous inspection protocols designed to optimize functionality [10]. The protocols could include diagnostic technologies such as automated visual inspection (AVI), X-ray inspection, thermographic inspection, ultrasonic inspection, and laser inspection. In some instances, conducting a thorough inspection can be quite expensive.
Prabhakar et al. [11] outline common instruments for measuring contour profiles, including co-ordinate measuring machines (CMMs), optical profilometers, and 3D scanners. The choice of common instruments depends on specific measurement task requirements, such as precision, surface type, and contour profile complexity. While common instruments excel in measuring profile contour with excellent accuracy, they have limitations, including time-consuming measurements, stylus wear, and the potential for scratches on finished part surfaces. Conversely, non-contact methods, particularly those involving computer vision and machine learning, present innovative solutions for efficiently measuring and assessing form deviation. For instance, the study by Kochetkov et al. [12] underscores the transformative advancement of non-contact methods in contour profile inspection, offering benefits such as speed, accuracy, efficiency, and adaptability to complex geometries. In a similar vein, the authors of ref. [13] utilize multilayer perceptron (MLP) and 2D convolutional neural network (CNN) models to classify surface profiles with an average accuracy rate exceeding 99.6%. Ref. [14] harnesses pre-trained networks to classify and recommend cutting conditions, with an effectiveness rate of 99.4%.
According to the state-of-the-art presented in [15,16], the most common methods for preprocessing and feature extraction are principal component analysis (PCA), variational mode decomposition (VMD), empirical mode decomposition (EMD), wavelet transform (WT), and Fourier transform (FT). The most common classification methods are support vector machines (SVMs) because of their feasibility of implementation in lineal classification, convolutional neural networks (CNN) because they can find abstract features, and recurrent neural networks (RNNs). After all, they can find patterns in time series and historical information on profile deviation, texture, tool wear, or chatter features.
Various methods have been proposed for measuring contour profiles using signal processing and computer vision algorithms. Ali et al. [17] developed an algorithm using higher-order Wavelet transform coefficients to evaluate the form deviation in electric discharge machine (EDM) machining. Ketaki and Bhushan [18] and Sepehr and Masoud [19] developed other approaches for surface roughness evaluation involving the utilization of histograms, gray-level co-occurrence matrices, Fourier and Wavelet transforms, and neural networks. The works in [20,21,22] developed applications of Fourier-invariant moments and descriptors in geometric and profile property inspection, image retrieval, and object recognition. In addition, refs. [23,24] utilized Fourier descriptors for dimensional inspection, shape classification, and form deviation evaluation in machining processes. However, developing a system that tries to monitor form deviation, tool wear, and chatter with real-time processing and accurate methodology is necessary. Moreover, fixture design in CNC milling processes is crucial because it directly impacts various facets of the manufacturing workflow. Fixtures are the foundation for securing and positioning workpieces during milling operations, which ensures precision, repeatability, and efficiency.
Based on these principles, the novel intelligent inspection method (NIIM) is proposed to inspect the contour profile quality of machined parts. NIIM comprises a calibration piece, a vision system, and a machine learning method that analyzes the shape and quality of the contour profile deformation generated by the CNC machined process. The calibration piece is a machined part designed to find the contour profile deformation generated during the milling process with a profile composed of curve, line, and curve shapes. The vision system is a machine that captures three images, one for each shape of the calibration piece. The images are processed with a machine-learning method that employs Fourier descriptors and a feed-forward neural network (FFNN) that analyzes the form deviations to classify the quality of the shape deformation generated during the CNC milling process. For the experiments, 60 calibration pieces were machined to obtain a dataset of 356 images for training and testing.
The rest of the paper is organized as follows. Section 2 describes the methodology based on the vision inspection system and machine learning method. Section 3 explains the experimental setup, which consists of the machined process. Section 4 reports the results. Finally, Section 6 presents the conclusions.

2. Materials and Methods

A calibration piece was designed to inspect and classify the contour profile of CNC-machined parts using the NIIM. The aim is to inspect the form deviation presented in a curve, line, and slope along the contour profile from C to D for each cross-section within a 0.8 profile of a line tolerance referenced to datums A and B, as depicted in Figure 1. The design is based on the standards outlined by ASME Y14.5 [25] and ISO 1101 [26], which provide the framework for precisely inspecting the individual contour profile.
According to the standards ASME Y14.5 and ISO 1101, the tolerance zone for the profile of a line tolerance extends between points C and D at any given cross-section (not the entire surface). Figure 2 shows that the tolerance zone is distributed bilaterally concerning the true profile. The contour profile from C to D must lie between two profile boundaries 2 ε = 0.8 apart, referencing datum planes A and B. Then, the form deviations presented in the contour profile must lie within the specified size limits for acceptable tolerance.
Figure 3 presents the methodology of the NIIM, which is divided into three stages: (i) the manufacturing process, (ii) the system acquisition, and (iii) the intelligent inspection system. The manufacturing process stage includes computer-aided design (CAD), computer-aided manufacturing (CAM), and the CNC milling process to design and machine the profile of the calibration pieces. The system acquisition stage includes the calibration piece placement process, system calibration, and the image acquisition process to mount the calibration pieces, compute the positions, calibrate the camera, and capture the three images for each calibration piece: one for curve, one for line, and one for slope. Finally, the intelligent inspection system performs image processing, analyzes the form deviations with the Fourier features algorithm, and classifies the profile contour in defective and nondefective quality employing an artificial neural network (ANN). The following subsections explain the stages of the NIIM method.

2.1. Manufacturing Process

The manufacturing process comprises the CAD, CAM, and milling process to design, simulate, and manufacture the contour profile of the calibration pieces.

2.1.1. CAD

The calibration piece design was conducted using CAD software (Solidworks 2021), considering the contour profile and dimensions depicted in Figure 1. The contour profile is composed of a curve, defined as a quarter of a circle with a radius of 20 mm, a horizontal line with a length of 25 mm, and a slope represented by a line segment with a length of 12.5 mm inclined at an angle of 33.69 ° . The contour profile was designed to be contended in a 75 × 75 × 12 mm rectangular workpiece within a line profile tolerance of 0.8 mm to obtain the ideal profile shown in Figure 2. The definition of the calibration piece guarantees the accuracy and relevance required for the NIIM to inspect the contour profiles, facilitating a thorough assessment of the machining processes.
Material selection was guided by optical and contrast properties, considering delrin (black), nylon (white), aluminum (silver), and AISI 1018 (gray) due to their interaction with light and impact on image acquisition quality [27]. Additionally, the choice aligns with findings from [28], highlighting these materials as commonly used in industrial applications. Refer to Table 1 for detailed properties.

2.1.2. CAM

The CAM process was designed to generate the desired contour profile to inspect form deviation resulting from CNC milling processes. The CAM process considers tool-material compatibility and the sequence of operations shown in Figure 4.
The experimental machining conditions comprise the choice of materials, cutting tools, machining parameters, and the operations sequence to find the optimal performance and efficiency in machining to generate contour profiles within the tolerance zone. Table 2 details the cutting tools selected. Table 3 shows the machining parameters determined by the tools, milling material, and mechanical properties.
The cutting theory proposed by George et al. [29] was employed to determine the feeds (Equation (1)) and speed parameters (Equation (2)) for each milling operation.
F = f × Z × S
S = 1000 × V c / ( D × π )
where S is the spindle speed in revolutions per minute, V c is the speed surface in meters per minute, D is the tool diameter in millimeters, F is the feed rate in mm/min, f is the feed per tooth in millimeters, and Z is the number of flutes.
Table 4 shows the results of the feeds and speeds for each material by applying cutting theory [29].

2.1.3. Contour Profile Milling

The CNC contour profile milling process was executed on a Haas VF1 three-axis vertical machining center, following the tool path outlined in Figure 5. The workpiece was securely affixed to the milling fixture, maintaining a 30 mm overhang distance from the milling vice.
The milling conditions were carefully monitored and controlled throughout the machining process to maintain stability and minimize variations to obtain accurate and reliable results. The conditions considered were the coolant flow, tool wear, vibration, cutting speed, and feed rate. The sequential machining operations executed are detailed below:
  • The face milling operation was performed using a 16 mm coated solid carbide end mill, removing a depth of 1.5 mm from the workpiece with direct coolant flow.
  • A 12 mm coated solid carbide end mill performed a contour profile roughing operation, penetrating 1.5 mm each cut depth along the Zh axis until the total machined level was reached, leaving a 0.5 mm wall stock for finishing with direct coolant flow.
  • Contour profile finishing was performed utilizing a 9.52 mm coated solid carbide end mill to remove burrs and surface flaws. The cutting depth followed the same direction as the previous machining but with an increased cutting speed and a decreased feed rate with direct coolant flow.

2.2. System Acquisition

After machining the calibration pieces, the next stage encompasses the acquisition process essential for capturing high-quality images to conduct contour profile inspections and facilitate classification [30]. The process is structured into three layers: (i) calibration piece placement, (ii) system calibration, and (iii) image acquisition. The employed acquisition system consists of a machine vision system (MVS) R A M - S t a r l i t e T M   150 shown in Figure 6 that captures the calibration piece profile in the RGB image format designated as I α , β ( x , y ) R G B .
In the proposal, α takes on the value of either data (d) or ground truth (g), corresponding to the image profile. Meanwhile, β represents the profile of the image, with β encompassing L (line), S (slope), and C (curve). The image was acquired in the .bmp format within the RGB color space and a spatial resolution of 480 × 680 . The MVS boasts a maximum resolution distance of 62 mm and a dynamic field of view from 9.1 mm (low magnification) to 0.6 mm (high magnification), ensuring the capture of all relevant areas with precision and clarity.

2.2.1. Calibration Piece Placement

As an initial step, a fixture mechanism has been introduced to place the calibration piece in the MVS to align the calibration piece with specified datum references A and B to control the orientation and location of profiles, ensuring stable and accurate positioning during image acquisition. The fixture illustrated in Figure 7 was manufactured in 1020 Steel using CNC machining and grinding processes.

2.2.2. System Calibration

Following the placement of the calibration piece, the subsequent stage involves camera calibration and the establishment of reference points, which are essential for positioning the precise profiles of the pieces within the visual field, facilitating comparison with ideal profiles referred to as ground truth (GT) I g , β ( x , y ) , as depicted in Figure 8.
In the system calibration process, crucial steps were undertaken to ensure the acquisition of image profiles with precise co-ordinates of GTs. The calibration procedure is interconnected and includes the following key points. The first step involves camera calibration, encompassing adjusting parameters such as focal length, reference points, depth of field, white balance, lighting, and distortion coefficients (radial and tangential) to ensure the precision of image acquisition, especially considering the distinct material colors of aluminum, nylon, delrin, and steel 1018. After camera calibration, the X and Y axes of the system are set to their respective home positions, establishing a consistent starting point for all subsequent movements and measurements within the system. Further, each reference axis is set to a zero value, creating a baseline for positioning and measurement. Subsequently, the X and Y axes are moved to specific reference point positions defined by the WCS1, WCS2, and WCS3 co-ordinates established in Table 5, ensuring that the profiles align with the desired datum.
Lastly, the calibration data, including the camera’s intrinsic and distortion parameters, is saved for future use in all image analysis software.

2.2.3. Image Acquisition

After completing the system calibration, the vision system acquires three images for each piece: one for the curve profile, another for the line profile, and a third for the slope profile. Each image is denoted as I α , β ( x , y ) R G B . Figure 9 illustrates three images obtained from the black delrin calibration piece.

2.3. Intelligent Inspection System

The following subsections outline the functionality of the intelligent inspection system, which includes the stages of image processing, Fourier descriptors, profile analysis, and machine learning.

2.3.1. Image Processing

The color image I α , β ( x , y ) R G B generated by the acquisition system is processed and converted to the green channel I α , β ( x , y ) G for machine learning purposes. This conversion is based on our experiments with different color spaces, revealing that I α , β ( x , y ) G provides the best contrast between the calibration piece profile and the illumination of the vision system. Figure 10 illustrates an example of the conversion of I α , β ( x , y ) R G B .

2.3.2. Fourier Feature Algorithm

According to [1,2,4,15,16], PCA, WT, and FT are common methods for feature extraction in industrial applications. WT and FT require other statistical analyses, such as VMD or EMD, to generate features. However, PCA, VMD, and EMD cannot be used in real CNC monitoring and diagnosis online. On the other hand, Fourier descriptors are a set of methods for feature extraction based on the FT used in many industrial applications because they generate a one-dimensional feature vector composed of a low number of elements that represent the contour morphology of an object [31]. The feature vector is a highly compressed way of generating frequency signatures representing objects’ contours. Fourier descriptors generate results with precision similar to WT and other FT methods but with significantly low computational complexity in CNC monitoring, real time, and industrial applications [32,33]. Then, Fourier descriptors are the foundations for feature extraction for the NIIM.
Subsequently, I α , β ( x , y ) G is segmented using the method of [34], generating an output B α , β ( x , y ) that divides the image into two regions: the piece and the illumination of the vision machine. The next step is to find the piece profile that computes the edge between the part and the illumination, defining P α , β ( x , y ) = B α , β ( x , y ) h , where h = { 1 , 1 } . Next, P α , β ( x , y ) is scanned from left to right to determine the position ( x , y ) of pixels with values different from zero in P α , β ( x , y ) , as shown in Figure 11. This scanning generates a profile feature vector r α , β ( n ) described as the Euclidean distance [35] and defined by Equation (3).
r α , β ( n ) = x ( n ) 2 + y ( n ) 2
The contour profile feature vector r α , β ( n ) is converted into a signature I d , β ( x , y ) S G by the algorithm of NIIM using the “Canny” function for edge detection proposed by [36]. The I d , β ( x , y ) S G allows for extracting patterns, characteristics, and detailed information for analysis of the I d , β ( x , y ) S G intricacies, offering insights into the nuanced effects of the machining process on both shape and form.
The visual representations in Figure 12, Figure 13 and Figure 14 showcase how the signal r α , β ( n ) effectively highlights the form deviations within each I d , β ( x , y ) S G , providing a comprehensive understanding of the signature’s structural variations.
The I d , β ( x , y ) S G analysis serves as a foundation for the subsequent implementation of the fast Fourier transform (FFT) to extract Fourier descriptors, enhancing the quantitative characterization of the I d , β ( x , y ) S G features. The subsequent step involves implementing the FFT to determine the Fourier descriptors of r α , β ( n ) , as defined in Equation (4).
R α , β ( k ) = 1 N n = 0 N 1 r ( n ) α , β e x p j 2 π k n / N
where k is the frequency component, N is the size of the profile. Equation (4) is computed with the Fast Fourier transform radix 2. Based on different works that apply Fourier descriptors in shape analysis as [33,34], the representation of the calibration piece profile Fourier features is defined by Equation (5) as the magnitude of Equation (4) divided by N as follows:
M α , β ( k ) = R e ( R α , β ( k ) 2 + I m ( R α , β ( k ) 2 ) N
where M α , β ( k ) is a profile feature vector composed of a real number that describes the magnitude frequencies of r ( n ) contour properties. However, the profile feature is the Fourier spectrum signature (FSS). The FSS describes the signature form properties and the concentration of the energy of the frequency components in M α , β ( k ) .
In contrast, the energy components derived from the form deviations caused by the machining process have little energy. However, the form deviations have features that describe the shape deformations and quality generated by the profile milling process. Therefore, the next step is to generate an FSS that accurately characterizes the profile deformation I d , β ( x , y ) S G in a frequency domain spectral analysis. The FSS provides valuable insights into the frequency components contributing to the observed form deviations, aiding in a comprehensive understanding of the machining process and facilitating informed improvements for enhanced precision and quality control.

2.3.3. Profile Inspection

The contour profile inspection is conducted by comparing the FSS between the GT reference I g , β ( x , y ) and the I d , β ( x , y ) S G . The comparison is achieved by subtracting the two FSS to obtain a third signal, which describes the variation in the form of the profile in terms of frequency. Finally, the energy is obtained to represent the microscopic distribution of peaks and valleys.
Figure 15 presents r g , β ( n ) , its M g , β ( k ) , and the L M g , β ( k ) = L n ( M L g , β ( k ) + 1 ) of the GTs. As expected, the line profile generates frequencies with zero magnitudes except for M g , L ( 0 ) = 1 . The curve M g , C ( k ) and slope M g , S ( k ) generate frequencies with similar decreasing signatures.
Nevertheless, there are differences in the magnitude frequencies that can be known with the difference of M δ ( k ) = M g , C ( k ) M g , S ( k ) . The difference is shown in Figure 16, where M δ ( 0 ) < 0 , M δ ( k ) with 0 < k < 40 have magnitudes higher than zero and M δ ( k ) 0 for k > 40 . This behavior occurs because the GT curve is composed of a slope with less area than the GT slope and some frequencies that form the curve (see Figure 17).
The form deviation out of tolerance of the I d , β ( x , y ) S G is determined through the comparison of the FSS of the profile shapes with those of the I g , β ( x , y ) , according to the profile of a line tolerance based in ASME Y14.4 [25] defined by Equation (6).
D Δ , β ( k ) = ( M d , β ( k ) M g , β ( k ) ) 2
where M d , β ( k ) are the Fourier features defined in Equation (5) of the I d , β ( x , y ) S G , which is used for profile analysis. Each vector D Δ , β ( k ) comprises more than 300 frequency components, considering that the signatures consist of approximately 600 to 640 elements. Our experiments, guided by Fourier transform properties [11], have revealed the distinctive features of D Δ , β ( k ) :
Frequency k = 0 is specifically associated with millimetric errors resulting from the calibration piece’s placement on the fixture, primarily induced by profile shape deformations. For frequencies 1 > k > 250 , these components describe form deviations from the machining process employed to generate a curve, a line, and a slope. Notably, frequencies within the 1 > k > 40 range offer a more detailed characterization of the shape induced by the machining process, providing valuable insights into the shape and quality of milling.
Similarly, frequencies 1 > k > 100 delineate quality errors in the calibration piece attributable to burrs, defects caused by tool wear, and errors occurring during machining. The interconnected analysis of these frequency components contributes to a comprehensive understanding of the calibration piece’s characteristics and manufacturing processes.

2.3.4. Machine Learning

The processing method for shape and quality profile classification is a feed-forward neural network (FFNN) composed of three layers: input, hidden, and output. Figure 18 presents a diagram of the FFNN architecture, where the input is the feature vector, the hidden layer has a different number of neurons for each experiment in this work, and the output is just one neuron.
The D Δ , β ( k ) , M d , β ( k ) , and r d , β ( n ) are one-dimensional and single-channel feature vectors that can be codified with an FFNN. The FFNN is a less computationally complex classifier than the classifiers most used in the literature related to CNC process monitoring. These classifiers are SVM, RNN, and CNN [15,16]. Moreover, the FFNNs learn with hundreds of feature vectors, while SVM, RNN, and CNN require tens of thousands of feature vectors to learn. Then, the shape and quality profile classification method is an FFNN composed of three layers: input, hidden, and output. The inputs are the features of the profile, F ( k ) . The hidden layer is composed of N neurons, defined by Equation (7).
γ 1 , j 1 = f ( ω 1 ( k ) F ( k ) + ω 1 , o )
where γ 1 , j is the hidden layer, ω 1 ( k ) is the weights, ω 1 , o is the bias, j 1 is the neuron index of the hidden layer, j 1 = 0 , , J , and f ( · ) is the RELU activation function that helps the FFNN to converge faster than other activation functions [37]. The output layer is defined by Equation (8).
γ 2 , j 2 = f ( ω 2 ( k ) M Δ , β ( k ) + ω 2 , o )
where γ 2 , j 2 is the output layer, j 2 is the neuron index of the output layer, ω 2 ( k ) are the weights, ω 2 , o is the bias, and f ( · ) is the sigmoid activation function used to represent a binary classification with one neuron [38].

3. Experimental Setup

An experimental setup and methodology were designed to inspect and classify the contour profile of machined parts using the NIIM. The approach involves utilizing calibration pieces, employing an intelligent vision system, and implementing image processing alongside machine learning algorithms for proficient profile classification.
According to [1,2,4,15,16,39], a traditional machine learning approach requires dozens of milling parts to train and test ANNs for classification purposes in contour profile measurement applications. Subsequently, 60 pieces were machined as part of the experimental requirements, utilizing the Haas VF1 CNC machine detailed in Section 2.1. Within this set, 15 pieces were crafted from delrin, 15 from nylon, 15 from aluminum, and 15 from steel. An illustration of calibration pieces made from delrin, nylon, aluminum, and steel is depicted in Figure 19. The selection of the materials was specifically chosen to represent a diverse range commonly encountered in machining processes.

3.1. Image Dataset

The dataset for training and testing comprises 356 images in the format I α , β ( x , y ) R G B , where 180 were generated based on 60 calibration pieces and the others were generated artificially. The 180 images were obtained using the process presented in Section 2.2, and the 60 calibration pieces were designed using the process of Section 2.1. The other 176 images were generated with the generative adversarial network (GAN) presented in [40]. The GAN was configured with a model gradient function, 1,000 epochs, a batch size of 128, a learning rate of 0.0002, a gradient decay factor of 0.5, and a square gradient decay factor of 0.999. Table 6 presents the organization of the dataset developed for the NIIM, where the 356 images are balanced into 90 delrin images, 90 nylon images, 88 aluminum images, and 88 steel images. Regarding the shape, there are 120 curve images, 119 line images, and 118 slope images for the machine learning experiments.

3.2. Machine Learning Experiments

The machine learning experiments were conducted on a laptop with a 2.60 GHz i7-10750H CPU, 16 GB RAM, and an NVIDIA GeForce RTX 1650 Ti GPU. The experiments addressed two primary tasks: contour profile inspection and quality profile classification.
In the contour profile inspection, each image is classified into curve, line, or slope categories to ensure that the profile fixture or products adhere to specific interchangeable tolerances. It also helps identify deviations from the desired profile, detect potential production process issues, and provides documented evidence for quality control. The second task involves profile quality analysis, classifying contour profiles as normal or defective. The selection of the profile quality analysis task is motivated by findings in [41], which highlight the impact of contour profiles on assembly, shape deformation, tolerance accuracy, fatigue resistance, and fluid passage in fixtures.
The GTs used for the NIIM were designed by an expert geometric tolerance, dividing the dataset and considering geometric dimensions and tolerances according to ASME Y14.5.1M and ISO 1101-18 standards and quality standards for the automotive and household appliance industries. Five machine-learning methods, including different feature vectors and artificial neural networks (ANNs), were employed to implement profile inspection and quality classification. The objective was to identify machine-learning methods with optimal performance and computational efficiency for real-time applications in the industry.
The machine-learning methods considered are the following:
  • An FFNN named rFFNN where the input F ( k ) is x α , β ( n )
  • An FFNN named mFFNN where the input F ( k ) is M α , β ( k ) .
  • An FFNN named kFFNN where the input F ( k ) is D Δ , β ( k ) .
  • A convolutional neural network (CNN) named CNNG where is I α , β ( x , y ) R G B .
  • A CNN named CNNP where is P α , β ( x , y ) .
The CNN architecture comprises the input, feature extraction, and classification layers. The input is the green channel I d , β ( x , y ) G for CNNG and P d , β ( x , y ) G for CNNP. The feature extraction layer comprises two convolutional sublayers, each composed of a set of two-dimensional kernels, a ReLU activation function, and max-pooling. The first convolution sublayer has 10 kernels with dimensions of ( 3 × 3 ) , and the second has 20 kernels of ( 5 × 5 ) . The result of the feature extraction layer is a vector with the abstract properties of the input.
The classification layer comprises a feature vector and fully connected (FCN) and softmax sublayers. We used two CNNs for the experiments, shown in Figure 20, and the sublayers of the CNNs are defined in [42]. The Fourier features M Δ , β ( k ) were processed with the FFNN and the CNN with the architecture of [13]. The images I α , β ( x , y ) G and P α , β ( x , y ) were also processed with AlexNet, VGG-16, ResNet, Inception presented in [14].
The dataset is divided into 70% for training and 30% for testing. This division is regular in the machine learning literature and corresponds to 250 images for training and 105 for testing. The learning hyperparameters must train the networks with few images but improve convergence with the minor epoch possible. Then, the FFNNs and CNNs are trained with stochastic gradient descendant (SGD) as an optimizer, with a learning rate of 0.001, a batch of one, and 300 epochs with early stops. The hyperparameters were selected because, according to [43], SGD performs better than SGDM, ADAM, NADAM, and RMSprop because these methods have statistical moments that reduce the oscillations during the training but reduce the generalization with few samples. The learning rate and the batch were selected to reduce the oscillations of the SGD. Moreover, SGD generates better performance in the experiments than SGD with momentum (SGDM), adaptive moment estimation (ADAM), Nesterov-accelerated ADAM (NADAM), and root mean square propagation (RMSprop).

4. Results

This section presents the results of the quantitative and qualitative experiment regarding contour profile inspection, a machine learning analysis of classifications, a comparison of the NIIM between the CMM contact method, and a discussion.

4.1. Contour Profile Inspection

The results of the contour profile inspection were conducted by generating the signature spectrum evaluation, involving the examination of 60 signatures for each profile, encompassing four distinct materials. This compares the spectrum, M d , β ( k ) , of the calibration piece versus the spectrum, M g , β ( k ) , of the reference. The subtraction of the two spectrum signals generates a third spectrum signal M Δ , β ( k ) , which defines the profile variation.
The analysis of an aluminum sample is renowned for its superior dimensional precision, making it an ideal material for evaluating profile accuracy. The examination of signature profiles I d , C ( x , y ) S G , I d , L ( x , y ) S G , and I d , S ( x , y ) S G generated the spectrum signals, M Δ , β ( k ) , shown in Figure 21, Figure 22 and Figure 23.
The values depicted in Figure 24, Figure 25 and Figure 26 reveal the result of the third signal spectrums for each profile signature. The maximum peaks: M Δ , C ( k ) = 0.623 for I d , C ( x , y ) S G 8 , M Δ , L ( k ) = 0.556 for I d , L ( x , y ) S G 3 , and M Δ , S ( k ) = 0.489 for I d , S ( x , y ) S G 4 indicates significant form deviations within each signature. However, they fall within the tolerance zone limits. The M Δ , β ( k ) numerical representations serve as a quantitative indicator, offering a precise contour profile inspection of the machined parts in each signature I d , β ( x , y ) S G . The significance of M Δ , β ( k ) values lies in the ability of the NIIM to quantitatively assess the line profile tolerance and characterize the contour profile quality, giving an impact of machining on the accuracy of each profile type, ensuring a thorough understanding of the impact of the NIIM on profile inspection accuracy.
The form deviation results are presented in a probability plot, demonstrating a systematic approach that guarantees close correspondence between the derived inspection and the genuine physical attributes of the profile. The results obtained from the analysis of each contour based on the study of its shape deviation are shown in the following subsection.

4.1.1. Form Deviation Analysis on Curve Profile

Figure 27 outlines the trends in form deviation, showing the correlation with M Δ ( k ) values obtained from I d , C ( x , y ) S G . The materials involved in the analysis include aluminum, nylon, delrin, and steel.
It is crucial to highlight that M Δ , C ( k ) serves as an indicator for quantifying the form deviations in the curve profiles of these materials. A reduced M Δ , C ( k ) value indicates a closer adherence to the ideal curve, implying minimal form deviations. Conversely, a higher value suggests more pronounced deviations, potentially exceeding the tolerance limits.
Aluminum, with a mean of M Δ , C ( k ) = 0.1726, exhibits the least form deviations among the materials under consideration. The results show that the curve profile of aluminum closely matches the ideal curve, reflecting a high degree of accuracy and precision in its manufacturing.
Nylon, with a mean of M Δ , C ( k ) = 0.7359, shows moderate form deviations compared to aluminum. While nylon may have some imperfections in its curve profile, the deviation is still within an acceptable tolerance, and the material can be considered suitable for certain applications.
With a mean of M Δ , C ( k ) = 0.6067, delrin falls within a similar range as nylon regarding form deviations. The results imply that delrin also exhibits a moderate level of accuracy in its curve profile, making it a viable option for specific applications where such deviations are acceptable.
On the other hand, steel stands out for tolerance, with a relatively higher mean M Δ , C ( k ) value of 1.16, indicating more significant form deviations than the other materials. The results may be attributed to the inherent characteristics of steel or the specific manufacturing processes involved, which result in a curve profile that deviates noticeably from the ideal.
In summary, aluminum demonstrates the least deviations, nylon and delrin exhibit moderate levels, and steel shows a higher degree of deviation.

4.1.2. Form Deviation Analysis on Line Profile

The line profile analysis presented in Figure 28 outlines the trends in form deviation, showing the correlation with M Δ ( k ) values obtained from the I d , L ( x , y ) S G . The materials involved in this analysis include aluminum, nylon, delrin, and steel.
Starting with aluminum, which has M Δ , L ( k ) = 0.3614, the analysis reveals moderate form deviations in its line profile. The results show that aluminum maintains relatively good accuracy in its line profile, but there are discernible deviations from the ideal form. This information is crucial for applications where precision in the line profile is a critical factor.
Nylon, with M Δ , L ( k ) = 0.2518, exhibits lower form deviations than aluminum. The results show that nylon’s line profile is closer to the ideal form, indicating higher accuracy and potentially making it suitable for applications where stringent form requirements are essential.
Delrin stands out with a significantly higher M Δ , L ( k ) = 1.078, signaling a more substantial level of form deviations in its line profile. This information is essential for applications where precision and conformity to the ideal form are critical, as the deviations in delrin may impact its suitability for certain use cases.
Steel, with M Δ , L ( k ) = 0.9205, demonstrates considerable form deviations in its line profile. The results show that the line profile of steel deviates noticeably from the ideal form, indicating potential challenges in applications that require high precision and accuracy.
In summary, the line profile analysis demonstrates the least deviations in nylon, the strong correlation between nylon and aluminum, and the highest form of delrin deformation. The correlation with changing machining conditions emphasizes the need for a comprehensive understanding of material properties and machining parameters to achieve the desired line profile tolerances in various applications.

4.1.3. Form Deviation Analysis on Slope Profile

The slope profile analysis, as depicted in Figure 29, outlines the trends in form deviation, showing the correlation with M Δ ( k ) values obtained from the I d , S ( x , y ) S G . The materials involved in this analysis include aluminum, nylon, delrin, and steel.
Beginning with aluminum, which has M Δ , S ( k ) = 0.3771, the slope profile analysis reveals moderate form deviations. The results show that the slope profile of aluminum exhibits noticeable variations from the ideal form, emphasizing the importance of understanding these deviations in applications where slope precision is critical.
Nylon, with M Δ , S ( k ) = 0.8373, exhibits higher-form deviations in its slope profile than aluminum. The results indicate that nylon is out of tolerance for essential applications where slope accuracy is paramount. The nylon deviations may impact suitability for certain use cases requiring precise slope control.
With M Δ , S ( k ) = 0.5769, delrin presents a moderate range of form deviations in its slope profile. Understanding these deviations is crucial for applications that demand a specific slope precision, as delrin may display variations that must be considered in the design and manufacturing processes.
Steel, with M Δ , S ( k ) = 0.5521, demonstrates a relatively low level of form deviations in its slope profile. The results show that the slope profile of Steel is closer to the ideal form, making it potentially well-suited for applications requiring precise slope control.
Similar to the previous analyses, the correlation between varying machining conditions and distinct levels of profile form deviations is highlighted in the slope profile analysis. The results demonstrate a correlation and underscore the importance of considering the influence of machining parameters, such as cutting speeds, feeds, and tool geometries, on the slope precision of these materials. Adjustments in machining conditions may be explored in future research to minimize slope deviations and enhance the overall accuracy of slope profiles.

4.2. Machine Learning Results

The machine learning models rFFNN, mFFNN, kFFNN, CNNG, CNNP, SVM, LSTM, AlexNet, ResNet, VGG-16, and Inception were evaluated to determine which feature vector and network are the best option for shape and quality contour profile classification.
According to [1,2,4,15,16] and [39], the metrics used to know the performance are accuracy for training and test (TAcc and PAcc, respectively) and confusion matrices, defined in [13,14]. Moreover, we include computational cost metrics such as frame per second (FPS) and the number of parameters (NPam) to know which network is feasible for real-time processing in industrial environments for inspection applications.
Contour profile classification. The NIIM classifies contour calibration pieces into curve, line, and slope categories in terms of quality. The feature vector r d , β ( n ) has a size of 508 elements. In contrast, the feature vectors M d , β ( k ) and D Δ , β ( k ) have a size of 150 because, according to our experiments, the frequencies 0 < k < 100 are enough to represent the shape in the frequency domain. The networks rFFNN, mFFNN, and kFFNN have six neurons in the hidden layers and were tested with five validation experiments. Table 7 shows the results where the networks rFFNN, mFFNN, kFFNN, CNNG, and CNNP achieved 100% for training and testing. However, mFFNN and kFFNN are faster and have fewer parameters than the others.
Figure 30 presents the confusion matrices of rFFNN, mFFNN, kFFNN, CNNG, and CNNP, where the performance is the same. However, kFFNN presents less overfitting during the training. Regarding converging epochs, rFFNN requires 56 epochs, mFFNN 28, kFFNN 25, CNNG 15, and CNNP 10. CNNG and CNNP require fewer epochs to converge than the other networks, but they present more overfitting than kFFNN. SVM, LSTM, AlexNet, VGG-16, ResNet, and Inception networks require 300 epochs.
CNNG learns features based on the piece surface and the illumination of the vision system, while CNNP learns features of the profile shape. For example, Figure 31 shows the second convolution activation maps, where the propagation of a curve image generates activation divided into the piece surface and the illumination.
Figure 32 shows the activation maps of the second convolution layer, where the propagation of a curve image generates activation with similar patterns to Laplacian filtering.
rFFNN, mFFNN, CNNG, and CNNP achieve good results because they learn the shape features that have r d , β ( n ) , M d , β ( k ) , I d , β ( x , y ) G , and P d , β ( x , y ) . Additionally, kFFNN generates good results because D Δ , β ( k ) has form deviation properties derived from the three machined processes that generate curve, line, and slope profiles. Added to this, kFFNN and mFFNN generate the lowest computational cost. The models SVM, LSTM, AlexNet, VGG-16, ResNet, and Inception generate less accuracy than the FFNNs and CNNs proposed in this work. SVM has three lineal discriminant functions, each with 251 parameters (one for each feature vector and the bias).
However, the low accuracy is due to the shape classes being overlapped in the frequency feature space. The LSTM has low accuracy because it interprets a false causal relation between frequencies. The CNNs AlexNet, VGG-16, ResNet, and Inception have many parameters that codify many feature maps during propagation with irrelevant information and properties for shape classification.
Quality classification: The NIIM classifies calibration pieces into normal and defect-calibration pieces. For task classification, the feature vector r d , β ( n ) has a size of 508, and the feature vectors M d , β ( k ) and D Δ , β ( k ) have a size of 168 because, according to our experiments, the frequencies 2 < k < 170 are enough to represent the quality of the contour profile in the frequency domain.
The contour profile signature was selected because, according to [41], profile quality defects and form deviations affect wear resistance, tolerance accuracy, shape deformation, fatigue resistance, corrosion resistance, and fluid passage in the milling part.
An expert generates the ground truths for task classification by dividing the dataset considering the geometric dimension and tolerances according to ASME Y14.5.1M and ISO 213 for machine learning purposes.
Concerning the metrics of the experiments and results, we add the F-measure (F1) metric because it is used in many works, e.g., in [13,14], and is defined as the harmonic mean between precision and recall in binary classifications.
The NIIM considers the true positive when a normal piece is classified as normal. The networks rFFNN, mFFNN, and kFFNN have 48 neurons in the hidden layers, and they were tested with five validation experiments. Regarding converging epochs, rFFNN requires 69, mFFNN 100, kFFNN 110, CNNG 32, and CNNP 32. CNNG and CNNP require fewer epochs to converge than the other networks, but after 32 epochs, they cannot improve the accuracy. SVM, LSTM, AlexNet, VGG-16, ResNet, and Inception networks require 300 epochs.
Table 8 shows the results of the experiments in quality classification, where kFFNN presents the best performance and computational cost because D Δ , β ( k ) describes the form deviation generated by the machined process. rFFNN and mFFNN had low performance in the test and training because the input feature vectors of r α , β ( n ) and M d , β ( k ) concentrate most of their energy on shape features. Hence, these vectors feed the ANN with few form deviation features. The CNN networks had good accuracy during the training, but the accuracy during the test decreased significantly. This performance is because of overfitting generated by many features unrelated to the contour profile error [44].
Figure 33 and Figure 34 show the second layer activation maps of CNNG and CNNP trained considering the normal and defective classes, where the features learned are focused on the shape properties. Then, rFFNN, mFFNN, CNNG, and CNNP process shape rather than form deviation features because the energy of the features is mainly concentrated in shape features. kFFNN achieves good results and has the lowest computational cost because it only has deviation features that describe the milling process in the piece.
Figure 35 shows the contour profile classification confusion matrices. mFFNN and rFFNN classified all samples as normal, and CNNG and CNNP classified half of the defective samples as normal.
SVM, LSTM, AlexNet, VGG-16, ResNet, and Inception models generate less accuracy and F1 than the FFNN and CNNs proposed in the NIIM. SVM has low accuracy because the shape classes overlap in the frequency feature space. The LSTM has low accuracy because it interprets a false causal relation between frequencies. The CNNs AlexNet, VGG-16, ResNet, and Inception are networks with many parameters that codify many feature maps during propagation with irrelevant information and properties for quality classification.

4.2.1. Cross Validation

Table 9 reports a five-folder cross-validation of kFFNN. The metric used is Acc, and the average results of the five folders are 99.2% for shape classification and 94.8% for quality classification. These cross-validation results are similar to those reported in Table 7 and Table 8 and are superior to the rest of the networks used in the comparisons. Then, the Acc of kFFNN is considered consistent at 99.2% for shape classification and 94.8% for quality classification.

4.2.2. Computational Cost

Table 7 and Table 10 show that kFFNN and mFFNN achieve the best FPS and number of variables, and Table 11 presents the relation of NPam of CNNG, CNNP, and rFFNN against NPam of kFFNN and mFFNN. The differences in the computational costs are because I α , β ( x , y ) G and P α , β ( x , y ) have 307,200 elements and many abstract features that the CNNs need to codify. The rFFNN processes the signals r α , β ( n ) , which have 600 to 640 elements and are time-domain signals with shape, form deviation, and resolution error features. On the other hand, M Δ , β ( k ) and D Δ , β ( k ) have 150 or 170 elements that represent the shape and form deviation features.
The computational performance of renowned networks, such as AlexNet [45], VGG-16, and ResNet [46], comes at a higher cost, resulting in accuracy levels below 85% for shape and quality classification. The results are attributed to the networks’ tendency to learn redundant features, which may not contribute significantly to the classification task. Moreover, their computational demands render them impractical for real-time processing, as the frames per second (FPS) achieved are not conducive to swift and efficient analysis.
According to the machine learning experiments, any ANN with r α , β ( n ) , M α , β ( k ) , or I α , β ( x , y ) G and P α , β ( x , y ) generate good performance in shape classification, but regular results in quality classification. The results are obtained because these inputs concentrate the energy in shape information and have little energy in form deviation information. Then, the ANN cannot learn from the form deviation features.
On the other hand, D Δ , β ( k ) and the FFNN generate the best computational cost and good performance in shape and quality classification. These results are obtained because D Δ , β ( k ) have only deviation features, and the tolerance zone is represented with 100 frequency elements; it can be seen in Section 2.3.3. The obtained performance of D Δ , β ( k ) is because the form deviation feature vector is a signature of the CNC milling process that generates the profile of the calibration piece.
Moreover, according to the discussion section, the D Δ , β ( k ) feature vector generates high energy when the piece has a shape deformation and can be used to identify if the profile machine process accomplishes the geometric standard tolerances.

5. Discussion

The energy of the calibration piece form deviation refers to the distribution of microscopic peaks and valleys not defined in the GT profiles. A metric known as the energy of D Δ , β ( k ) is implemented to quantify and analyze these characteristics. The D Δ , β ( k ) metric represents the displacement of the milling part, peaks, and residue of the machining process defined as
E = 1 N k = 0 N 1 D Δ , β ( k ) 2
The results of the energy analysis for the calibration pieces are illustrated by the shapes in Figure 36 and by quality in Figure 37. Based on D Δ , β ( k ) analysis, it becomes evident that the curve generates more energy compared to the line and slope. The heightened energy output can be attributed to the inherent complexities of machining curves, especially in scenarios where the machine simultaneously interpolates the X and Y axes to conform to the specified radius.
When machining a curve, the machinery co-ordinates the movement along two axes simultaneously, necessitating a more intricate interpolation process. The dual-axis interpolation demands the machine’s capabilities, requiring it to precisely synchronize movements to conform to the curvature specified in the program. The intricate nature of this simultaneous interpolation results in increased energy consumption during the machining process, as compared to simpler geometries such as a straight line or a slope. Regarding contour profile quality, calibration pieces with form deviation defects generate more energy during machining due to the inherent challenges of irregular surface features.
The energy generated in the slope, line, and curve profiles varied for delrin, nylon, aluminum, and steel. Delrin exhibits low energy generation, nylon exhibits high energy generation, and aluminum exhibits moderate energy generation. These differences are primarily influenced by the friction coefficients of the materials and their resistance to deformation under stress [47].
Figure 38 displays the energy at zero frequency and the frequencies 0 < k > 101 of D Δ , β ( k ) . The amplitude at zero frequency corresponds to millimetric displacements between the calibration piece placement in the fixture and the zero position. Within the bandwidth 1 < k < 100 for all samples, the energy is non-zero, indicating that small-scale variations in height actively contribute to the texture or deviations of the profile. Remarkably, the curve defective pieces exhibit notably higher energy levels at zero and low frequencies. This heightened energy is attributed to the challenges associated with machining irregularities on the curved surface.

Comparison between CMM and NIIM

A comparative analysis between NIIM and contact measurement was performed using a co-ordinate-measuring machine (CMM) to assess the reliability of the proposed method. The calibration pieces used for the study were aluminum and were mounted in the CMM surface plate referenced to datums A and B, as shown in Figure 39.
The measuring of the profile of a line tolerance by CMM was performed based on the direction vector method [48], involving the assessment of 152 points from point C to D for each cross-section. The direction vectors were defined to direct the probe along the contour profile, enabling the capture of data points at predetermined positions. A 2 mm ball diameter probe was utilized to record multiple measurements and juxtapose them with a virtual boundary to measure the profile line.
Figure 40 illustrates the average deviation of the profile of the line measures obtained by CMM. The upper label, 75.19549, corresponds to the overall profile of a line, while the lower label, 74.91963, pertains to the per-unit profile of a line. In both instances, the average 0.71579 deviation falls within the prescribed tolerance zone limits.
Subsequently, a measurement study was conducted on the repeatability, reproducibility, and total Gage R&R for the 152 discrete points evaluating the average deviation, using 10 calibration pieces with three operators in three series. The results of these analyses are presented in Table 12 and Table 13. Specifically, the 95th percentile values for σ R & R were determined to be 7.9% for the NIIM and 10.9% for the CMM.
The data in Table 12 show that the CMM R&R study presents a lower form deviation measurement than the NIIM R&R Study. However, the practical importance of this difference is relatively small and falls within acceptable industry standards. CMM and NIIM satisfy the criteria of an R&R study according to common benchmarks, which aim for a Gage R&R tolerance of under 30%. However, the advantage of the NIIM lies in its significantly faster inspection time and lower computational costs. These factors essentially determine the reliability of the NIIM system.
Finally, to evaluate the effectiveness of NIIM, an error study was computed to measure the contour profile from deviations obtained from CMM and NIIM. This assessment, as described in [49], involves the average relative error ( A R E ), the root mean square error ( R M S E ), and the correlation coefficient R 2 represented by Equations (10)–(12), respectively. The resulting metrics are summarized in Table 14.
A R E = 1 n i = 1 n y i y ^ i y i
R M S E = 1 n i = 1 n ( y i y ^ i ) 2
R 2 = 1 i = 1 n ( y i y ^ i ) 2 i = 1 n ( y i y ¯ ) 2
where n is the number of the form deviation observations, y i are the actual form deviation values, and y ^ i are the predicted form deviation values.
Several observations can be made in the results between CMM and NIIM: CMM demonstrates a lower ARE (0.0257) than NIIM (0.0301), indicating slightly better performance regarding the average error. Similarly, CMM exhibits a lower RMSE (0.0781) than NIIM (0.0812), suggesting slightly better overall accuracy in measurements. CMM shows a higher R 2 (0.9318) than NIIM (0.9265), implying a stronger linear relationship between the predicted and observed values for CMM measurements. CMM achieves a slightly higher accuracy of 97.43% compared to the accuracy of NIIM at 96.99%.

6. Conclusions

According to the machine learning experiments, D Δ , β ( k ) and the FFNN generate the best computational cost and good performance in shape and quality classification. The results are obtained because D Δ , β ( k ) has only deviation features, and the tolerance zone is represented with 100 frequency elements (it can be seen in Section 2.3.3. The obtained performance of D Δ , β ( k ) is due to the form deviation feature vector being a signature of the CNC milling process that generates the profile of the calibration piece. Moreover, according to the discussion section, the D Δ , β ( k ) feature vector generates high energy when the piece has a shape deformation and can be used to identify if the profile machine process accomplishes the geometric standard tolerances. CNNs with r α , β ( n ) , M α , β ( k ) , or I α , β ( x , y ) G and P α , β ( x , y ) generate good performance in shape classification but regular results in quality classification. The results are obtained because the inputs concentrate the energy in shape information and have little energy in form deviation information. Then, the CNNs generate features unrelated to deviation and quality contour shape profiles. SVM and SLTM methods generate regular results in shape and quality classification due to overlap between classes and the misinterpretation of contour frequencies. The networks VGG-16, ResNet, and Inception generate regular results because they analyze many abstract features that are irrelevant to shape and quality analysis.
In conclusion, while contact measurement methods such as CMM may offer slightly better accuracy in specific metrics, NIIM delivers a remarkable 96.99% accuracy, low computational demands, 100% inspection capability, quality classification, and superior overall effectiveness. Furthermore, the NIIM methodology provides valuable insights that manufacturing engineers can leverage to refine machining parameters. By implementing NIIM, the milling process can be optimized, form deviations minimized, and the precision and quality of the final product significantly enhanced.

Author Contributions

M.M.M. and J.A.R.Q. proposed the methodology and prepared the original draft; M.N. and O.O.V.V. validated the obtained results; E.L.R.J. edited the final paper. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Autonomus University of Juárez City an the National Council for Humanities, Sciences, and Technologies (Conahcyt) grant number 250582.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors upon request.

Acknowledgments

The authors express their gratitude for the support received in various areas from the TecNM - Instituto Tecnológico de Chihuahua (Digital Signal Processing and Artificial Intelligence Lab), the Universidad Autónoma de Ciudad Juárez (Department of Industrial and Manufacturing Engineering), the Universidad Tecnológica de Chihuahua (Department of Industrial Maintenance Engineering) and Ing. Raul Villareal for scientific collaboration and the ease of use of equipment and laboratories.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Zhou, Y.; Liu, C.; Yu, X.; Liu, B.; Quan, Y. Tool wear mechanism, monitoring and remaining useful life (RUL) technology based on big data: A review. SN Appl. Sci. 2022, 4, 232. [Google Scholar] [CrossRef]
  2. Shen, Y.; Yang, F.; Habibullah, M.S.; Ahmed, J.; Das, A.K.; Zhou, Y.; Ho, C.L. Predicting tool wear size across multi-cutting conditions using advanced machine learning techniques. J. Intell. Manuf. 2021, 32, 1753–1766. [Google Scholar] [CrossRef]
  3. Duan, Z.; Li, C.; Zhang, Y.; Yang, M.; Gao, T.; Liu, X.; Li, R.; Said, Z.; Debnath, S.; Sharma, S. Mechanical behavior and Semiempirical force model of aerospace aluminum alloy milling using nano biological lubricant. Front. Mech. Eng. 2023, 18, 4. [Google Scholar] [CrossRef]
  4. Navarro-Devia, J.H.; Chen, Y.; Dao, D.V.; Li, H. Chatter detection in milling processes—A review on signal processing and condition classification. Int. J. Adv. Manuf. Technol. 2023, 125, 3943–3980. [Google Scholar] [CrossRef]
  5. Duong, T.-Q.; Rodriguez-Ayerbe, P.; Lavernhe, S.; Tournier, C.; Dumur, D. Contour error pre-compensation for five-axis high speed machining: Offline gain adjustment approach. Int. J. Adv. Manuf. Technol. 2019, 100, 3113–3125. [Google Scholar] [CrossRef]
  6. Liu, D.; Li, C.; Dong, L.; Qin, A.; Zhang, Y.; Yang, M.; Gao, T.; Wang, X.; Liu, M.; Cui, X.; et al. Kinematics and improved surface roughness model in milling. Int. J. Adv. Manuf. Technol. 2024, 131, 2087–2108. [Google Scholar] [CrossRef]
  7. Myshkin, N.K.; Grigoriev, A.Y.; Chizhik, S.A.; Choi, K.Y.; Petrokovets, M.I. Surface roughness and texture analysis in microscale. Wear 2003, 254, 1001–1009. [Google Scholar] [CrossRef]
  8. Cheung, C.-F.; Lee, W.B. A multi-spectrum analysis of surface roughness formation in ultra-precision machining. Precis. Eng. 2000, 24, 77–87. [Google Scholar] [CrossRef]
  9. Bolar, G.; Das, A.; Joshi, S.N. Measurement and analysis of cutting force and product surface quality during end-milling of thin-wall components. Measurement 2018, 121, 190–204. [Google Scholar] [CrossRef]
  10. Jia, Z.-Y.; Ma, J.-W.; Song, D.-N.; Wang, F.-J.; Liu, W. A review of contouring-error reduction method in multi-axis CNC machining. Int. J. Mach. Tools Manuf. 2018, 125, 34–54. [Google Scholar] [CrossRef]
  11. Prabhakar, D.V.N.; Kumar, M.S.; Krishna, A.G. A Novel Hybrid Transform approach with integration of Fast Fourier, Discrete Wavelet and Discrete Shearlet Transforms for prediction of surface roughness on machined surfaces. Measurement 2020, 164, 108011. [Google Scholar] [CrossRef]
  12. Kochetkov, A.V.; Troshin, A.A.; Zakharchenko, M.Y.; Zakharov, O.V. Selection of Filter Methods in the Analysis and Measured of Geometry and Surface Roughness. In Proceedings of the 2020 International Multi-Conference on Industrial Engineering and Modern Technologies (FarEastCon), Vladivostok, Russia, 6–9 October 2020. [Google Scholar] [CrossRef]
  13. Ross, N.S.; Shibi, C.S.; Mustafa, S.M.; Gupta, M.K.; Korkmaz, M.E.; Sharma, V.S.; Li, Z. Measuring Surface Characteristics in Sustainable Machining of Titanium Alloys Using Deep Learning-Based Image Processing. IEEE Sens. J. 2023, 23, 13629–13639. [Google Scholar] [CrossRef]
  14. Ross, N.S.; Sheeba, P.T.; Shibi, C.S.; Gupta, M.K.; Korkmaz, M.E.; Sharma, V.S. A novel approach of tool condition monitoring in sustainable machining of Ni alloy with transfer learning models. J. Intell. Manuf. 2024, 35, 757–775. [Google Scholar] [CrossRef]
  15. Ntemi, M.; Paraschos, S.; Karakostas, A.; Gialampoukidis, I.; Vrochidis, S.; Kompatsiaris, I. Infrastructure monitoring and quality diagnosis in CNC machining: A review. CIRP J. Manuf. Sci. Technol. 2022, 38, 631–649. [Google Scholar] [CrossRef]
  16. Soori, M.; Arezoo, B.; Dastres, R. Machine learning and artificial intelligence in CNC machine tools, A review. Sustain. Manuf. Serv. Econ. 2023, 2, 100009. [Google Scholar] [CrossRef]
  17. Ali, J.; Jailani, H.; Murugan, M. Surface roughness evaluation of electrical discharge machined surfaces using wavelet transform of speckle line images. Measurement 2020, 149, 107029. [Google Scholar] [CrossRef]
  18. Joshi, K.; Patil, B. Evaluation of surface roughness by machine vision using neural networks approach. In Recent Advances in Mechanical Infrastructure; Springer: Singapore, 2019. [Google Scholar]
  19. Nouhi, S.; Pour, M. Prediction of surface roughness of various machining processes by a hybrid algorithm including time series analysis, wavelet transform and multi-view embedding. Measurement 2021, 184, 109904. [Google Scholar] [CrossRef]
  20. Jain, T. Industrial objects recognition in intelligent manufacturing for computer vision. Int. J. Intell. Unmanned Syst. 2021, 10, 401–415. [Google Scholar] [CrossRef]
  21. Pande, S.D.; Rani Chetty, M.S. Position invariant spline curve based image retrieval using control points. Int. J. Intell. Eng. Syst. 2019, 12, 177–191. [Google Scholar] [CrossRef]
  22. Tigistu, T.; Abebe, G. Classification of rose flowers based on Fourier descriptors and color moments. Multimed. Tools Appl. 2021, 80, 36143–36157. [Google Scholar] [CrossRef]
  23. Hossain, A.; Kaisar, M.S.; Khan, M.A.H. A review work on image retrieval of content-based and shape-based method. Int. J. Mech. Eng. 2019, 6, 26–32. [Google Scholar] [CrossRef]
  24. Wang, J.; Fu, P.; Gao, R.X. Machine vision intelligence for product defect inspection based on deep learning and Hough transform. J. Manuf. Syst. 2019, 51, 52–60. [Google Scholar] [CrossRef]
  25. ASME Y14.5; Standards Committee B46, Surface Texture: Surface Roughness, Waviness and Lay- Classification and Designation of Surface Qualities and American National Standards Institute. American Society of Mechanical Engineers: New York City, NY, USA, 2003. Available online: https://www.asme.org/codes-standards/find-codes-standards/b46-1-surface-texture (accessed on 10 April 2023).
  26. ISO 1101-18; Geometrical Product Specification (GPS)—Geometrical Tolerances—Tolerances of Form, Orientation, Location and Run-Out, Part 18: Definitions of Geometrical Tolerances. International Standards Organization (ISO): Geneva, Switzerland, 2012.
  27. Ren, Z.; Fang, F.; Yan, N.; Wu, Y. State of the art in defect detection based on machine vision. Int. J. Precis. Eng. Manuf.-Green Technol. 2022, 9, 661–691. [Google Scholar] [CrossRef]
  28. Daniyan, I.A.; Adeodu, A.O.; Oladapo, B.I.; Daniyan, O.L.; Ajetomobi, O.R. Development of a reconfigurable fixture for low weight machining operations. Cogent Eng. 2019, 6, 1579455. [Google Scholar] [CrossRef]
  29. George, P.; Selvaraj, D.P. Cutting parameter optimization of CNC dry milling process of AISI 410 and 420 grade MSS. Mater. Today Proc. 2021, 42, 897–901. [Google Scholar] [CrossRef]
  30. Cai, Y.; Qin, X.; Liu, Q.; Zhang, S. Study on high-precision inspection multi-vision cameras space layout. In Proceedings of the Second International Conference on Communication Systems, Networks, and Applications, Hong Kong, China, 29 June–1 July 2010. [Google Scholar] [CrossRef]
  31. Zheng, Y.; Meng, F.; Liu, J.; Guo, B.; Song, Y.; Zhang, X.; Wang, L. Fourier Transform to Group Feature on Generated Coarser Contours for Fast 2D Shape Matching. IEEE Access 2020, 8, 90141–90152. [Google Scholar] [CrossRef]
  32. Yang, C.; Yu, Q. Multiscale Fourier descriptor based on triangular features for shape retrieval. Signal Process. Image Commun. 2019, 71, 110–119. [Google Scholar] [CrossRef]
  33. Wang, J.; Qian, W.; Chen, G. Combining quantitative analysis with an elliptic Fourier descriptor: A study of pottery from the Gansu-Zhanqi site based on 3D scanning and computer technology. J. Archaeol. Sci. Rep. 2021, 36, 102897. [Google Scholar] [CrossRef]
  34. Singh, K.U.; Bhatia, S.; Kumar, A.; Kautish, S.; Kumar, A.; Basheer, S.; Hameed, A.A. A Robust NIfTI Image Authentication Framework Based on DST and Multi-Scale Otsu Thresholding. IEEE Access 2022, 10, 132608–132620. [Google Scholar] [CrossRef]
  35. Wang, L.; Zhang, Y.; Feng, J. On the Euclidean distance of images. IEEE Trans. Pattern Anal. Mach. Intell. 2005, 27, 1334–1339. [Google Scholar] [CrossRef]
  36. Wang, Q.; Tang, B.; Xu, Z.; Zheng, J.; Ke, X.; Xiao, H.; Li, Y. An Attribute Extraction Algorithm based on Canny. In Proceedings of the 2022 IEEE 6th Advanced Information Technology, Electronic and Automation Control Conference (IAEAC), Beijing, China, 3–5 October 2022; pp. 344–347. [Google Scholar] [CrossRef]
  37. You, Z.; Gao, H.; Li, S.; Guo, L.; Liu, Y.; Li, J. Multiple Activation Functions and Data Augmentation-Based Lightweight Network for In Situ Tool Condition Monitoring. IEEE Trans. Ind. Electron. 2022, 69, 13656–13664. [Google Scholar] [CrossRef]
  38. Effendi, M.K.; Soepangkat, B.O.P.; Pramujati, B.; Norcahyo, R.; Nurullah, F.P. The combined methodology of backpropagation neural network with genetic algorithm to optimize delamination factor and surface roughness in end-milling of carbon fiber reinforced polymer composites. In Proceedings of the AIP Conference Proceedings, Yogyakarta, Indonesia, 10–11 October 2019; p. 030006. [Google Scholar] [CrossRef]
  39. Moayyedian, M.; Mohajer, A.; Kazemian, M.G.; Mamedov, A.; Derakhshandeh, J.F. Surface roughness analysis in milling machining using design of experiment. SN Appl. Sci. 2020, 2, 1–9. [Google Scholar] [CrossRef]
  40. Mehralian, M.; Karasfi, B. RDCGAN: Unsupervised Representation Learning with Regularized Deep Convolutional Generative Adversarial Networks. In Proceedings of the Conference on Artificial Intelligence and Robotics and 2nd Asia-Pacific International Symposium, Kish Island, Iran, 10 December 2018. [Google Scholar] [CrossRef]
  41. Shrestha, R.; Simsiriwong, J.; Shamsaei, N. Fatigue behavior of additive manufactured 316L stainless steel parts: Effects of layer orientation and surface roughness. Int. J. Fatigue 2021, 144, 106063. [Google Scholar] [CrossRef]
  42. Bhandari, B. Comparative study of popular deep learning models for machining roughness classification using sound and force signals. Micromachines 2021, 12, 1484. [Google Scholar] [CrossRef] [PubMed]
  43. Goodfellow, I.; Bengio, Y.; Courville, A. Deep Learning; MIT Press: Cambridge, MA, USA, 2016. [Google Scholar]
  44. Hong, G.S.; San Wong, Y. Profile error compensation in fast tool servo diamond turning of micro-structured surfaces. Int. J. Mach. Tools Manuf. 2012, 52, 23. [Google Scholar]
  45. Zarini, H.; Khalili, A.; Tabassum, H.; Rasti, M.; Saad, W. AlexNet Classifier and Support Vector Regressor for Scheduling and Power Control in Multimedia Heterogeneous Networks. IEEE Trans. Mob. Comput. 2023, 22, 2520–2536. [Google Scholar] [CrossRef]
  46. Chen, R.; Huang, H.; Yu, Y.; Ren, J.; Wang, P.; Zhao, H.; Lu, X. Rapid Detection of Multi-QR Codes Based on Multistage Stepwise Discrimination and a Compressed MobileNet. IEEE Internet Things J. 2023, 10, 15966–15979. [Google Scholar] [CrossRef]
  47. Du, F.; Ma, T. Experimental study on the friction and wear performance of new dual friction materials. In Proceedings of the 2011 Second International Conference on Mechanic Automation and Control Engineering, Inner Mongolia, China, 15–17 July 2011. [Google Scholar] [CrossRef]
  48. Sładek, J.A.; Sładek, J.A. Analysis of the Accuracy of Coordinate Measuring Systems. In Coordinate Metrology: Accuracy of Systems and Measurements; Springer: Berlin/Heidelberg, Germany, 2016; pp. 131–225. [Google Scholar] [CrossRef]
  49. Li, B.; Tian, X. An effective PSO-LSSVM-based approach for surface roughness prediction in high-speed precision milling. IEEE Access 2021, 9, 80006–80014. [Google Scholar] [CrossRef]
Figure 1. Drawing of the calibration piece.
Figure 1. Drawing of the calibration piece.
Applsci 14 08144 g001
Figure 2. Tolerance zone for curve, line, and slope.
Figure 2. Tolerance zone for curve, line, and slope.
Applsci 14 08144 g002
Figure 3. NIIM stages.
Figure 3. NIIM stages.
Applsci 14 08144 g003
Figure 4. Contour profile milling process.
Figure 4. Contour profile milling process.
Applsci 14 08144 g004
Figure 5. Calibration piece milling profile.
Figure 5. Calibration piece milling profile.
Applsci 14 08144 g005
Figure 6. R A M - S t a r l i t e T M 150 machine vision system.
Figure 6. R A M - S t a r l i t e T M 150 machine vision system.
Applsci 14 08144 g006
Figure 7. Fixture for calibration piece placement.
Figure 7. Fixture for calibration piece placement.
Applsci 14 08144 g007
Figure 8. GTs: line I g , L ( x , y ) , curve I g , C ( x , y ) , and slope I g , S ( x , y ) profiles.
Figure 8. GTs: line I g , L ( x , y ) , curve I g , C ( x , y ) , and slope I g , S ( x , y ) profiles.
Applsci 14 08144 g008
Figure 9. Images captures for curve I d , C ( x , y ) R G B , line I d , L ( x , y ) R G B , and slope I d , S ( x , y ) R G B .
Figure 9. Images captures for curve I d , C ( x , y ) R G B , line I d , L ( x , y ) R G B , and slope I d , S ( x , y ) R G B .
Applsci 14 08144 g009
Figure 10. Image I d , L ( x , y ) R G B and it I d , L ( x , y ) G channels.
Figure 10. Image I d , L ( x , y ) R G B and it I d , L ( x , y ) G channels.
Applsci 14 08144 g010
Figure 11. B α , β ( x , y ) and profile features in P α , β ( x , y ) .
Figure 11. B α , β ( x , y ) and profile features in P α , β ( x , y ) .
Applsci 14 08144 g011
Figure 12. Signature: I d , C ( x , y ) S G 1 .
Figure 12. Signature: I d , C ( x , y ) S G 1 .
Applsci 14 08144 g012
Figure 13. Signature: I d , L ( x , y ) S G 2 .
Figure 13. Signature: I d , L ( x , y ) S G 2 .
Applsci 14 08144 g013
Figure 14. Signature: I d , S ( x , y ) S G 3 .
Figure 14. Signature: I d , S ( x , y ) S G 3 .
Applsci 14 08144 g014
Figure 15. Profile r ( n ) of GT line and its M ( k ) .
Figure 15. Profile r ( n ) of GT line and its M ( k ) .
Applsci 14 08144 g015
Figure 16. M δ ( k ) frequency from the difference between M g , c ( k ) and M g , s ( k ) .
Figure 16. M δ ( k ) frequency from the difference between M g , c ( k ) and M g , s ( k ) .
Applsci 14 08144 g016
Figure 17. R δ ( k ) behavior from the difference between M g , c ( k ) and M g , s ( k ) .
Figure 17. R δ ( k ) behavior from the difference between M g , c ( k ) and M g , s ( k ) .
Applsci 14 08144 g017
Figure 18. FFNN architecture.
Figure 18. FFNN architecture.
Applsci 14 08144 g018
Figure 19. Machined calibration pieces.
Figure 19. Machined calibration pieces.
Applsci 14 08144 g019
Figure 20. CNN architecture used for I ( x , y ) G analysis.
Figure 20. CNN architecture used for I ( x , y ) G analysis.
Applsci 14 08144 g020
Figure 21. M g , C ( k ) and M d , C ( k ) FSS for I d , C ( x , y ) S G 8 .
Figure 21. M g , C ( k ) and M d , C ( k ) FSS for I d , C ( x , y ) S G 8 .
Applsci 14 08144 g021
Figure 22. M g , L ( k ) and M d , L ( k ) FSS for I d , L ( x , y ) S G 3 .
Figure 22. M g , L ( k ) and M d , L ( k ) FSS for I d , L ( x , y ) S G 3 .
Applsci 14 08144 g022
Figure 23. M g , S ( k ) and M d , S ( k ) FSS for I d , S ( x , y ) S G 4 .
Figure 23. M g , S ( k ) and M d , S ( k ) FSS for I d , S ( x , y ) S G 4 .
Applsci 14 08144 g023
Figure 24. Third signal curve.
Figure 24. Third signal curve.
Applsci 14 08144 g024
Figure 25. Third signal line.
Figure 25. Third signal line.
Applsci 14 08144 g025
Figure 26. Third signal slope.
Figure 26. Third signal slope.
Applsci 14 08144 g026
Figure 27. Form deviation: curve probability plot.
Figure 27. Form deviation: curve probability plot.
Applsci 14 08144 g027
Figure 28. Form deviation: Line probability plot.
Figure 28. Form deviation: Line probability plot.
Applsci 14 08144 g028
Figure 29. Form deviation: Slope probability plot.
Figure 29. Form deviation: Slope probability plot.
Applsci 14 08144 g029
Figure 30. Confusion matrices of ANNs for contour profile classification.
Figure 30. Confusion matrices of ANNs for contour profile classification.
Applsci 14 08144 g030
Figure 31. Feature maps of the second convolution for CNNG contour profile classification.
Figure 31. Feature maps of the second convolution for CNNG contour profile classification.
Applsci 14 08144 g031
Figure 32. Feature maps of the second convolution for CNNP contour profile classification.
Figure 32. Feature maps of the second convolution for CNNP contour profile classification.
Applsci 14 08144 g032
Figure 33. Feature maps of the second convolution for CNNG contour profile classification.
Figure 33. Feature maps of the second convolution for CNNG contour profile classification.
Applsci 14 08144 g033
Figure 34. Feature maps of the second convolution for CNNP contour profile classification.
Figure 34. Feature maps of the second convolution for CNNP contour profile classification.
Applsci 14 08144 g034
Figure 35. Confusion matrices of ANNs for contour profile classification.
Figure 35. Confusion matrices of ANNs for contour profile classification.
Applsci 14 08144 g035
Figure 36. Energy of D Δ , β ( k ) classified by contour profile.
Figure 36. Energy of D Δ , β ( k ) classified by contour profile.
Applsci 14 08144 g036
Figure 37. Energy of D Δ , β ( k ) classified by shape quality.
Figure 37. Energy of D Δ , β ( k ) classified by shape quality.
Applsci 14 08144 g037
Figure 38. Energy of zero frequency and frequencies regarding form deviations.
Figure 38. Energy of zero frequency and frequencies regarding form deviations.
Applsci 14 08144 g038
Figure 39. CMM contour profile measurement.
Figure 39. CMM contour profile measurement.
Applsci 14 08144 g039
Figure 40. CMM contour profile measurement results.
Figure 40. CMM contour profile measurement results.
Applsci 14 08144 g040
Table 1. Mechanical properties of the materials employed.
Table 1. Mechanical properties of the materials employed.
Materials σ u HE
AISI 1018 (Gray)440 Mpa89 HRB205 GPa
Aluminum 106095 MPa20 HRB69 GPa
Delrin (Black)85 MPa110 HRC2.6 GPa
Nylon (White)85 MPa70 HRC3.0 GPa
σ u : Tensile strength; HRB: Hardness Rockwell B. HRC: Hardness Rockwell C; E: Modulus of Elasticity.
Table 2. Description of cutting tools.
Table 2. Description of cutting tools.
TypeMaterialDiameterFlutes
Face millCarbide16 mm5
Slot DrillCarbide12 mm3
End MillCarbide9.52 mm6
Table 3. Materials and milling parameters.
Table 3. Materials and milling parameters.
Materials V c (m/min)f (mm/tooth)
AISI 101830/400.005/0.02
Aluminum 106061/700.05/0.07
Nylon (PA)70/900.07/0.09
Delrin90/1000.03/0.01
Table 4. Feeds and speeds for different materials.
Table 4. Feeds and speeds for different materials.
MaterialOperationS (Rev/min)F (mm/min)
AISI 1018Face milling59660
Contour roughing79579
Contour finishing1000120
AluminumFace milling1200300
Contour roughing1600350
Contour finishing2000240
Nylon 60Face milling1400500
Contour roughing1900700
Contour finishing2400300
DelrinFace milling1800400
Contour roughing2400500
Contour finishing3000360
Table 5. WCS reference point positions.
Table 5. WCS reference point positions.
PointX (mm)Y (mm)
MCS0.00.0
WCS1107.0112.0
WCS2116.0115.0
WCS3120.0120.0
Table 6. Image dataset structure.
Table 6. Image dataset structure.
ProfileNumber of Samples
Delrin Curve30
Delrin Line30
Delrin Slope30
Nylon Curve30
Nylon Line30
Nylon Slope30
Aluminium Curve30
Aluminium Line29
Aluminium Slope28
Steel Curve30
Steel Line30
Steel Slope28
Total355
Table 7. Average results of contour profile classification.
Table 7. Average results of contour profile classification.
NetworkTaccPaccFPSNPam
kFFNN100%100%10,000903
mFFNN100%100%10,000903
rFFNN100%100%76003060
CNNG100%100%308,256,106
CNNP100%100%328,256,106
SVM80%78%210753
LSTM85%72%50001250
AlexNet95%82%262,378,344
VGG-1693%82%0.11138,357,544
ResNet-1891%80%411,174,362
Inception-V388%72%421,776,508
Table 8. Average results of the quality contour profile classification.
Table 8. Average results of the quality contour profile classification.
NetworkTaccF1PaccFPSNPam
kFFNN95.2%94.6%97%90008066
mFFNN73.8%74.5%83%80008067
rFFNN71.1%69.1%87%42124,386
CNNG100%80.1%87%308,256,104
CNNP95.1%78.5%88%328,256,104
SVM75%72%73%300753
LSTM78%69%74%55001250
AlexNet58%55%41%262,378,344
VGG-1654%52%39%0.11138,357,544
ResNet-1853%52%34%411,174,362
Inception-V353%50%35%421,776,508
Table 9. Cross-validation of kFFNN based on Acc.
Table 9. Cross-validation of kFFNN based on Acc.
Folder12345Average
Shape Classification100.0%98.0%99.0%100.0%99.0%99.2%
Quality Classification95.0%94.0%96.0%96.0%93.0%94.8%
Table 10. Average results of the quality contour profile classification.
Table 10. Average results of the quality contour profile classification.
MetricDffnnMffnnRffnnIcnnPcnn
TAcc95.2%73.8%71.1%100%95.1%
PAcc94.6%74.5%69.1%80.1%78.5%
F197%86%83%87%88%
FPS900080004213032
NPam8066806724,3868,256,1048,256,104
Table 11. Profile classification results.
Table 11. Profile classification results.
NetworkShape ClassQuality Class
Icnn91431023
Pcnn91431023
Mffnn3.43
Table 12. CMM R&R study.
Table 12. CMM R&R study.
PartOperator AOperator BOperator C
No.M-1M-2M-3RangeM-1M-2M-3RangeM-1M-2M-3Range
10.760.770.770.010.730.720.730.010.660.770.680.11
20.750.740.750.010.740.640.650.100.670.730.660.07
30.770.730.700.070.750.780.720.060.790.680.700.11
40.690.680.680.010.770.650.740.120.750.680.650.10
50.780.670.660.120.730.680.750.070.770.770.770.00
60.770.720.710.060.720.740.760.040.780.780.730.05
70.690.770.730.080.730.720.770.050.760.760.650.11
80.720.790.750.070.680.650.740.090.700.770.770.07
90.750.660.770.110.670.660.670.010.720.730.750.03
100.770.690.760.080.700.670.690.030.690.750.750.06
R ¯ 0.062 0.058 0.071
X ¯ 0.7317 0.7117 0.7273
Repeatability0.507 Reproducibility8% R&R7.9%
Table 13. NIIM R&R Study.
Table 13. NIIM R&R Study.
PartOperator A-Operator B-Operator C-
No.M-1M-2M-3RangeM-1M-2M-3RangeM-1M-2M-3Range
10.710.700.710.010.710.710.710.000.710.710.710.00
20.690.690.710.020.710.690.710.020.690.690.710.02
30.590.560.550.040.580.610.590.030.550.560.520.04
40.660.700.710.050.690.670.710.040.650.690.700.05
50.560.540.560.020.550.000.560.560.710.700.700.01
60.590.690.690.100.710.580.590.130.520.560.510.05
70.610.660.630.050.600.590.590.010.620.690.630.07
80.680.660.620.060.690.670.630.060.650.630.590.06
90.580.690.590.110.560.580.610.050.690.630.610.08
100.630.660.630.030.650.620.680.060.690.690.670.02
R ¯ 0.040 0.096 0.04
X ¯ 0.6417 0.6183 0.646
Repeatability0.475 Reproducibility11% R&R10.9%
Table 14. Comparison between CMM and NIIM.
Table 14. Comparison between CMM and NIIM.
ErrorCMMNIIM
Average Relative Error (ARE)0.02570.0301
Root Mean Square Error (RMSE)0.07810.0812
Coefficient of Correlation ( R 2 )0.93180.9265
Accuracy97.43%96.99%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Méndez, M.M.; Quintana, J.A.R.; Jardón, E.L.R.; Nandayapa, M.; Vergara Villegas, O.O. Fourier Features and Machine Learning for Contour Profile Inspection in CNC Milling Parts: A Novel Intelligent Inspection Method (NIIM). Appl. Sci. 2024, 14, 8144. https://doi.org/10.3390/app14188144

AMA Style

Méndez MM, Quintana JAR, Jardón ELR, Nandayapa M, Vergara Villegas OO. Fourier Features and Machine Learning for Contour Profile Inspection in CNC Milling Parts: A Novel Intelligent Inspection Method (NIIM). Applied Sciences. 2024; 14(18):8144. https://doi.org/10.3390/app14188144

Chicago/Turabian Style

Méndez, Manuel Meraz, Juan A. Ramírez Quintana, Elva Lilia Reynoso Jardón, Manuel Nandayapa, and Osslan Osiris Vergara Villegas. 2024. "Fourier Features and Machine Learning for Contour Profile Inspection in CNC Milling Parts: A Novel Intelligent Inspection Method (NIIM)" Applied Sciences 14, no. 18: 8144. https://doi.org/10.3390/app14188144

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop