## 3 Materials and Methods
### Data Processing  
The information extraction of the measured topography of the setting is performed by executing the procedure illustrated in Figure 5. The difficulty is in obtaining a highly accurate segmentation with the number of outliers reduced to a minimum. Otherwise, false models are fitted to the segmented points leading to an inaccurate volume estimation. Initially, the point cloud is segmented by means of a machine learning approach using a Mask Region-based convolutional neural network [15]. This neural network simultaneously performs the tasks of classification, bounding box regression, and mask estimation. The architecture of the Mask R-CNN is illustrated in Figure 6 in an abstracted form. For detailed information the reader is referred to [15]. Figure 5: Processing Sequence. Classification means the ability to recognize and understand different objects. In this paper, we use this function to predict if any bread dough is present in the current topography or not. The bounding box regression determines the rectangle that frames an object, in our case one piece of dough. By means of the estimated mask, the bounding of the particular object is precisely detected. To fit the neural network to our task, a training dataset containing example topographies that were generated during a real fermentation process was built-up and projected into depth maps by taking the x- and z-coordinates as the particular pixel positions and by normalizing the y-value to an 8-bit linear scale representing the depth. These depth maps were masked with an image annotation tool by defining the regions, and hence all pixels that contain bread. In that way, a dataset of 50 images with the corresponding ground-truth was generated. Due to the small amount of training data, the so-called 'transfer learning method' was applied [21]. Therefore, a weight file that was pre-trained on the huge COCO-dataset (Common Objects in Context dataset) containing 2.5 million labeled instances in 328.000 images was used [22]. With this status, the neural network was already able to recognize common image features. Afterward, the dataset was fed with training material for the bread instance segmentation. The output of the network was a set of images containing the particular segmented bread instances. The images were transformed back to a point cloud by converting the depth value back to the y-coordinate representation. The results of this process step are the segmented points belonging to a particular instance that can be used for the further processing steps. After the segmentation, model fitting by means of superellipsoids is applied to achieve an implicit representation of the object that allows an analytical volume calculation. The surfaces of superellipsoids fulfill the equation  
\[F(X,Y,Z)=\left(\left(\frac{X}{A}\right)^{\frac{2}{2}}+\left(\frac{Y}{B}\right) ^{\frac{2}{2}}\right)^{\frac{\ell_{2}}{2}}+\left(\frac{Z}{C}\right)^{\frac{2 }{\ell_{1}}}=1 \tag{4}\]  
Figure 6: Architecture of Mask R-CNN (own illustration based on [15]). where \(A\), \(B\) and \(C\) define the axis-scaling and \(\varepsilon_{1}\) and \(\varepsilon_{2}\) the deformation parameters. By means of that equation a large amount of different bodies can be represented. To achieve a complete pose estimation, the translation and rotation by quaternions are added which leads to [23]:  
\[ \begin{split}\left[\begin{array}{c}x\\ y\\ z\end{array}\right]=R_{Quat}\left[\begin{array}{c}X-X_{0}\\ Y-Y_{0}\\ Z-Z_{0}\end{array}\right]\\ =\left[\begin{array}{ll}a^{2}+b^{2}-c^{2}-d^{2}&2 bc-2 ad&2 bd+2 ac\\ 2 ad+2 bc&a^{2}-b^{2}+c^{2}-d^{2}&-2 ab+2 cd\\ -2 ac+2 bd&2 ab+2 cd&a^{2}-b^{2}-c^{2}+d^{2}\end{array}\right]\left[\begin{array}[ ]{c}X-X_{0}\\ Y-Y_{0}\\ Z-Z_{0}\end{array}\right]\end{split}  \tag{5}\]  
The parameters \(a\), \(b\), \(c\) and \(d\) represent the quaternion components.