## 3 Experimental Setup
### 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:  
1. An FFNN named rFFNN where the input \(F(k)\) is \(x_{a,\beta}(n)\)
2. An FFNN named mFFNN where the input \(F(k)\) is \(M_{a,\beta}(k)\). 3. An FFNN named kFFNN where the input \(F(k)\) is \(D_{\Delta,\beta}(k)\). 4. A convolutional neural network (CNN) named CNNG where is \(I_{a,\beta}(x,y)^{RGB}\). 5. A CNN named CNNP where is \(P_{a,\beta}(x,y)\). The CNN architecture comprises the input, feature extraction, and classification layers. The input is the green channel \(Id\), \(\beta(x,y)^{G}\) for CNNG and \(Pd\), \(\beta(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\times 3)\), and the second has 20 kernels of \((5\times 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_{\Delta,\beta}(k)\) were processed with the FFNN and the CNN with the architecture of [13]. The images \(I_{a,\beta}(x,y)^{G}\) and \(P_{a,\beta}(x,y)\) were also processed with AlexNet, VGG-16, ResNet, Inception presented in [14]. \begin{table}
\begin{tabular}{c c} \hline
**Profile** & **Number of Samples** \\ \hline Delrin Curve & 30 \\ Delrin Line & 30 \\ Delrin Slope & 30 \\ Nylon Curve & 30 \\ Nylon Line & 30 \\ Nylon Slope & 30 \\ Aluminium Curve & 30 \\ Aluminium Line & 29 \\ Aluminium Slope & 28 \\ Steel Curve & 30 \\ Steel Line & 30 \\ Steel Slope & 28 \\ \hline
**Total** & **355** \\ \hline \end{tabular}
\end{table} 
Table 6: Image dataset structure. 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.