## 4 Experiments
### Data Generation and Data Aquisition
If data are randomly distributed to folders after augmentation, it is possible that the models learn differing parameters from the data and their performance differs as a result. Since transfer learning models usually expect three-channel inputs because their base models have been trained on RGB data, a method of generating color images from the gray value images has been tested [53,54], as is illustrated in Figure 5. In principle, the height information is coded as a single intensity value, whereas RGB images encode three values between 0 and 255 for each pixel. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Dataset**} & \multirow{2}{*}{**Description**} & \multirow{2}{*}{**Color Coding**} & \multirow{2}{*}{**Augm.**} & \multicolumn{5}{c}{**Data Per Class**} \\ \cline{5-8}  & & & & **Solid** & & **Infill** & **Wire Good** & **Wire Bad** \\ \hline
1 & Initial & 1 Ch., Grayscale & no & 1422 & 2574 & 811 & 964 \\
2 & Initial & 1 Ch., Grayscale & yes & 5688 & 10,296 & 3244 & 3856 \\
3 & RGB, seriell & 3 Ch., RGB & no & 1422 & 2574 & 811 & 964 \\
4 & RGB, seriell & 3 Ch., RGB & yes & 5688 & 10,296 & 3244 & 3856 \\
5 & RGB, parallel & 3 Ch., RGB & no & 1422 & 2574 & 811 & 964 \\
6 & RGB, parallel & 3 Ch., RGB & yes & 5688 & 10,296 & 3244 & 3856 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Allocation of the data of the initial dataset and of derived datasets containing RGB images, each of the derived RGB datasets being both without and with augmentation. Figure 5: (**a**) Serial color coding of the normalized CSV data using the height information. (**b**) Coding of the height information in two channels parallel to each other. (**c**) Example image output dataset, (**d**) Example image serial coding. (**e**) Example image parallel coding. With the serial coding method applied, the different channels (red, green and blue) are coded one after the other with ascending values. This means that the lowest Z value in a file has the coding [1,0,0]. When the color coding of a channel reaches the maximum value of 255, this channel is set to 0 and the consecutive channel starts at 1. This means that there are not only grey levels in the range [0-255] but three channels with 256 bins each (see Figure 5a). As the start of each channel begins with the value 1 and the other channels set to 0, it should be noted that black coloration occurs at the transitions from one channel to another. The images obtained are saved as PNGs and can be loaded into a pretrained model without further processing. The advantage of serial coding is the high number of bins. This makes it possible to divide height information into smaller bins, giving pretrained models more precise information for learning. The disadvantage, however, is the strong differentiation between the color channels. If an important information sector for layer determination is encoded along the channel boundaries, the important information may fall into different channels depending on the image. In the worst case, this can lead to indeterminability of the feature. Parallel coding solves this shortcoming. The information is encoded in parallel in two channels to enable CNN to recognize features across multiple channels. The number of bins is then 511, whereby the missing bin is due to the transition from the first green color gradient to the following one (see Figure 5b). Figure 5c-e shows example images of different color coding variants. The result of parallel encoding is shown in Figure 5c. It can be seen that the resulting image is brighter than the same initial image with serial encoding (Figure 5d). This is due to the fact that with serial encoding, each color channel starts with black and the predominant color only gradually appears. With parallel coding, two color channels are always combined so that no black areas are created in the result and the combined colors are lighter on average.