# Camera-Based in-Process Quality Measurement of Hairpin Welding
## 3 Results
In our use case, it leads to the fact that the classes cannot always be clearly distinguished from each other. The SDU-Net processes feature maps of each resolution using multiple dilated convolutions successively and concatenates all the convolution outputs as input to the next resolution. This increases the receptive field and both, smaller and larger receptive fields are considered in the result. \begin{table}
\begin{tabular}{l c c c c c c} \hline \hline  & **Coaxial Single** & \begin{tabular}{c} **Coaxial** \\ **Complete** \\ \end{tabular} & \begin{tabular}{c} **Lateral** \\ **Complete** \\ \end{tabular} & **All Data** & \
\begin{tabular}{c} **SDU-Net Double** \\ **Filter Size, All Data** \\ \end{tabular} &
\begin{tabular}{c} **U-Net, All** \\ **Data** \\ \end{tabular} \\ \hline Steps per epoch & & & & 500 & & \\ \hline Batch size & & & & 6 & & \\ \hline Input size [pixels] & & & & \(256\times 256\) & & \\ \hline DL & 0.173 & 0.196 & 0.198 & 0.156 & 0.146 & 0.163 \\ \hline Accuracy & 0.993 & 0.966 & 0.995 & 0.980 & 0.980 & 0.975 \\ \hline Validation DL & 0.488 & 0.347 & 0.489 & 0.361 & 0.339 & 0.428 \\ \hline Validation Accuracy & 0.976 & 0.831 & 0.953 & 0.963 & 0.963 & 0.951 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Training results of the neural network models based on the SDU-Net architecture. Three different models are trained for each input data generation approach. The fourth model was trained for the prediction of all data. In comparison the results of an SDU-Net architecture with twice the number of filters and of the small U-Net are shown. Visualized results of the different methods are shown in Table 3. In comparison to the small SDU-Net, results of small U-Net, binary opening, and gray-scale opening are shown. The models of the SDU-Net and the U-Net are trained on all data and with four classes, while the morphological filter on the one hand requires a structural element of different sizes per data set and also cannot distinguish between process light and cooling process. For better visualization, the pixel-by-pixel classification of the neural networks is displayed in different colors and superimposed on the input image. The class of the process light is shown in green color, the spatters in red, and the cooling process in blue. The resulting images of the morphological filter are displayed analogously to Figure 3. \begin{table}
\begin{tabular}{l c c c c c c c c} \hline \hline  & **Morph.** & **Morph.** & **SDU-Net,** & **SDU-Net,** & **SDU-Net,** & **SDU-Net,** & **One Model,** & **U-Net, One Model,** & **U-Net, One Model,** \\  & **Binary** & **Gray** & **Models, DL** & **Models, FL** & **Models, FL** & **DL** & **FL** & **Model, DL** \\ \hline \hline Coaxial Single & 0.406, 0.962 & 0.421, 0.958 & 0.819, 0.980 & 0.821, 0.990 & 0.746, 0.990 & 0.739, 0.989 & 0.709, 0.965 \\ \hline Coaxial Complete & 0.731, 0.847 & 0.722, 0.568 & 0.830, 0.909 & 0.810, 0.937 & 0.850, 0.953 & 0.840, 0.952 & 0.828, 0.848 \\ \hline Lateral Complete & 0.497, 0.860 & 0.482, 0.920 & 0.644, 0.935 & 0.611, 0.968 & 0.681, 0.967 & 0.688, 0.984 & 0.659, 0.932 \\ \hline Average & 0.544, 0.889 & 0.542, 0.789 & 0.764, 0.943 & 0.747, 0.965 & 0.759, 0.972 & 0.756, 0.975 & 0.732, 0.915 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Evaluation results of the different approaches. The first value shows the average IoU value of the pixel which was assigned to a specific class, excluding the background class and the second value shows the average IoU value for the entire image. Figure 4: Comparison of the IoU of the classes process light, cool down, and spatter for the different loss functions dice coefficient loss and focal loss, as well as the approach with three different models and one model for all data. Figure 5: Comparison of the IoU of the different input data sets. All three models are trained with the weighted dice coefficient loss. With the morphological filtering, small regions always remain at the edge of the area of the process light, since the structural element can never fill the shape exactly.