## 5 Validation Metrics of Tissue Segmentation Model  
The proposed segmentation model is evaluated using intersection over union (IoU) and Dice coefficient criteria. IoU is a performance metric often used in object detection and image segmentation applications to measure the accuracy of predicted bounding boxes. IoU estimates the intersection rate between predicted areas (segmentation maps produced by neural networks) and ground truth (provided by manual labeling). The range of intersection over union values is 0 to 1, with 0 denoting no overlap and 1 denoting a perfect overlap. In the case when comparative pixel-by-pixel analysis is performed, IoU is the first metric in the list, and it is defined using Formula (1).  
\[IoU=\frac{TP}{(TP+FP+FN)}, \tag{1}\]  
where _TP_ is a true positive, _FP_ is a false positive, and _FN_ is a false negative (see Table 1 for a deeper explanation). The _TP_, _FP_, and _FN_ terms are used to evaluate the object detection results because these values correspond to image areas (or the number of pixels).  
The Dice coefficient (DC) is a metric used in image segmentation and object detection tasks that measure the similarity between predicted and ground truth maps (the output of the models). The DC value ranges between 0 and 1, where 0 indicates the overlap between GT and S, and 1 indicates a perfect overlap (100% similarity). The Dice scores can be expressed through definitions of precision and recall (see Table 2).  
\begin{table}
\begin{tabular}{c c c} \hline \hline True Positive (TP) & \(TP=GT\wedge S\) & \begin{tabular}{c} It is a region of intersection between the manually labeled ground truth picture \\ (GT) and the predicted segmentation map (S), which is the model output. \\ \end{tabular} \\ \hline False Positive (FP) & \(FP=(GT\lor S)-GT\) & \
\begin{tabular}{c} False positive refers to the anticipated area in the final segmentation map that is \\ outside of the experts’ provided ground truth areas. \\ \end{tabular} \\ \hline False Negative (FN) & \(FN=(GT\lor S)-S\) &
\begin{tabular}{c} False negative refers to the quantity of pixels in the segmentation model’s \\ unpredicted area of the ground truth. \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table}
Table 1: Model performance metrics.  
Figure 7 shows the detected positions of endometrial glands on whole-slide images obtained using the ensemble-based technique (the histology image is zoomed in for clarity). Above a colored, HE-stained histology picture, blue contour color patches indicate the probable sites of the endometrial glands.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Performance Metric** & **U-Net** & **RestNet34-UNet** & **U-Net++** & **Ensemble** \\ \hline IoU & 0.77 & 0.79 & 0.85 & 0.90 \\ Dice Score & 0.85 & 0.88 & 0.89 & 0.95 \\ \hline \hline \end{tabular}
\end{table}
Table 3: The ensemble-based model and its average output from three neural networks.  
Figure 6: (From left to right): Original image section, corresponding ground truth annotation, endometrial glands segmentation results using the U-Net model, endometrial glands segmentation results using the residual U-Net model, endometrial glands segmentation results using the U-Net++ model, endometrial glands results using the ensemble-based method.  
Figure 7: Example of histology image with detected endometrial glands.