## 4 Results and Discussion
### Diamond Grits Segmentation Results  
Thanks to our optimization strategy and the previous experimental study, we found the best hyperparameter configurations, shown in Table 5. Based on these, we trained three diamond grit segmentation models, as shown in Figures 7-10. We trained our models on a heterogeneous stack of 153 DGW images. We deliberately chose to test our model on three types of DGW images:  
* Type I: Standard metallic DGW images taken at high magnification. * Type II: Metallic DGW images taken at low magnification. * Type III: Electroplated DGW images. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Optimizer** & **Epochs** & **Batch Size** & \(\mathbf{\kappa}\) & **Runtime** & **Val IoU** & **Val F1-Score** \\ \hline Adamax & 60 & 4 & \(1\times 10^{-3}\) & 22 min 16 s & 0.50 & 0.66 \\ Adam & 40 & 2 & \(1\times 10^{-4}\) & 30 min 13 s & 0.52 & 0.68 \\ RMSprop & 30 & 2 & \(1\times 10^{-3}\) & 22 min 38 s & 0.52 & 0.68 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Best hyperparameter configurations found by our BO optimization strategy. Figure 8: DGW test images of type II, associated mask and prediction for each optimizer. Figure 7: DGW test images of type I, associated mask and prediction for each optimizer. In addition, it is worth noting that deep learning experiment reproducibility is a complex problem [71, 72, 73, 74]. Indeed, previous segmentation results should not be seen as a rule of thumb but as automatic methodology and guidelines toward the best segmentation performance for our dataset. Furthermore, it is important to notice that we have not labeled all the diamond grits on the ground truth. Each model was tested on different types of DGW images for performance estimation purposes, and the results are summarized in Figure 10.  
Although the reproducibility of deep learning experiments is a complex problem, the results conform to the best hyperparameter configurations found previously with our BO experiments. In fact, they are even better, with a validation IoU in the range of [0.51-0.53], and of [0.67-0.69] for the corresponding F1-score. On type I DGW images, the models performed relatively well, with an overall validation IOU of 0.52 and F1-score of 0.68, as shown in Figure 8. The RMSprop optimizer exhibits the best performance, detecting a labeled diamond grit not seen by the others. In addition, smoother segmentation with better edge detection was achieved by the RMSprop optimizer. On the type II images shown in Figure 9, some subtle differences began to appear in the segmentation quality, although the IoU/F1 score denotes the RMSprop configuration as the best. In fact, Adam detects more diamond grits than the two others, whereas RMSprop tends to better preserve the diamond grits' shape. Although our models reached some overall acceptable segmentation scores, the type III images shown in Figure 10 highlight some limitations of only using IoU/F1-score for partially annotated ground truth. In fact, the RMSprop configuration is the worst one in regard to diamond grit detection. The best configuration in this case is Adam, which segments practically all the diamond grits. This highlights an important point about the selected segmentation metrics for evaluating model performances. For type III images, we found that IoU/F1-score are not well suited for evaluating the model performance, as the labels/real diamond numbers are strongly unbalanced. In such extreme cases of partially annotated labels, the IoU/F1-score should be used in conjunction with other metrics such as Dice, Hausdorff distance, partially annotated algorithms [75, 76, 77] and visual evaluation. Figure 9: DGW test images of type III, associated mask and prediction for each optimizer. Regarding the loss evolution, RMSprop exhibits some overfitting behavior until the 20 th epoch, as shown in Figure 10b. Adamax also has some predisposition to overfitting in the range of [20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50] epochs.