## 4 Experiment and Results  
In the last epoch of training (epoch 363), our model estimates the focal length on the validation data as \(MSE\) of 128 \(\upmu\)m\({}^{2}\) from the corresponding ground truth on the validation \begin{table}
\begin{tabular}{l c c c c} \hline  & \(MSE\) [\(\upmu\)m\({}^{2}\)] & \(MAE\) [\(\upmu\)m] & \(STD\) [\(\upmu\)m] & **Accuracy [\%]** \\ \hline
**1 st Dataset** & 53.61 & 6.5 & 3.88 & 75 \\ \hline
**2 nd Dataset before TF** & 48,486.00 & 213.36 & 62.85 & 0 \\ \hline
**2 nd Dataset after TF** & 69.59 & 8.15 & 2.01 & 75 \\ \hline \end{tabular}
\end{table} 
Table 1: Results of the trained CNN on the test dataset; TF = transfer learning; \(MSE\) = mean square error; \(MAE\) = mean average error; \(STD\) = standard deviation. Figure 4: Loss over epochs for both training processes. data. Furthermore, random noise was added as data augmentation to the validation and training datasets, but for testing, a small dataset without data augmentation was used. For data augmentation, Gaussian noise from [30] was used. Here, noise in the form of counts was added to each pixel per image. The noise was sampled from a normal distribution with a mean of zero counts and a standard deviation of eight counts for the first training process. Thereby, it was possible to enhance the dimension of the training and validation datasets to 13,431 images. On this test dataset, we end up with a test loss of 6.5 \(\upmu\)m, calculated as _MAE_. This test loss depends on the overall performance of the network and its hyper-parameter but also on the quality and quantity of the training data. The training was performed on a system consisting of AMD Ryzen 9 3900X 12\(\times\) 3.80 GHz (CPU) and Corsair DIMM 128 GB DDR4-2666 Quad-Kit (RAM) and GeForce RTX 2080 Ti Blower (GPU). Here, the first training took 69 min. To prevent our model from overfitting and to achieve a good generalization, we used the following strategies:  
* Early stopping after four validation epochs without decreasing validation loss;
* Data augmentation (random noise) [30]. To assess the results of an experimental application of the CNN in combination with the AL, measurement uncertainties should be considered first. As potential sources of uncertainties in the setup, we identified the movement stage and random measurement uncertainties while capturing the gt values and camera parameters. The motorized stage has an unidirectional repeatability of 0.25 \(\upmu\)m and provides minimum incremental motion of 0.1 \(\upmu\)m [31]. These tolerances are far below cell size (10 \(\upmu\)m), thus, we neglect these influences. To minimize random measurement uncertainties with unknown origin, we used the average of 10 axial scans to obtain the gt value of the position of the focal plane. The camera parameters have a huge impact on image quality criteria such as the saturation of pixels, etc. The quality of the images for the CNN is an important factor for the learning process. Additional changes in the images through unsuitable camera parameters might make a correct estimation more difficult to achieve. To deal with this problem, we used the automatic mode for camera usage to avoid over saturation and other issues. For complex specimens, sample-induced aberrations may be an issue that could degrade the performance quality, as the focus position estimations of the CNN are made independent of the sample. To investigate the quality of the estimations made by the CNN, loss functions and accuracy calculations are a common method of evaluation. In Figure 5a, the gt values and estimated values for each data element in the training, validation, and test sets are shown.Here, the estimations of the trained CNN on all available data elements are shown. Of course, the elements for testing were not included in the training process; there, only training and validation elements were used. The elements from the test set are marked with a black star.