## 4 Endomet Tissue Segmentation Model
A high-resolution picture was created in the up-sampling step by decoding the low-resolution image (or features). The color images of size 576 \(\times\) 576 pixels are used as inputs. The size of the input images is gradually reduced; depth is gradually increased until the size of the features reaches 18 \(\times\) 18 \(\times\) 512 pixels. The middle convolutional layer is used as a bottleneck, and it is positioned between the encoder and decoder paths. The \"bottleneck\" consists of convolutional and batch-normalization layers. Through the concatenation of feature maps from the down-sampling side to the up-sampling side, skip connections are employed to transmit local features. The final output layer consists of a convolutional layer with a softmax activation function and a convolutional filter size of 1 \(\times\) 1. The resulting output segmentation map consists of grayish blobs on a white background, which correspond to the area of the endometrial glands in a colored, HE-stained histology image. Adam optimizer and binary cross-entropy (BCE) loss function were used to train a U-Net network with 7.7 trainable parameters. A U-Net++ type network serves as the second deep neural network in the ensemble of models. Nested and thick linkages serve as the model's foundation. It has skip connections that incorporate convolutional layers for passing semantic information from the encoder (down-sampling) to the decoder (up-sampling) paths. The dense skip connections are used to improve the gradient flow, i.e., training [26]. The U-Net++ model is efficient at collecting the fine features of 2D pictures used to define endometrial glands. The number of convolutional blocks is controlled by deep supervision. It prunes and adjusts the complexity of the network, keeping high performance (segmentation accuracy) and inference time. A segmentation map with a resolution of 576 \(\times\) 576 pixels is the output of the U-Net++ model. This model was trained using the Adam optimizer with the loss function BCE and has around 9.1 million trainable parameters. The third pretrained ResNet34-Unet network is used as a part of the ensemble-based method. The ResNet34-based network is used  
Figure 5: An illustration of the proposed ensemble-based segmentation model’s functionality. as the semantic features encoding part of the segmentation model (the down-sampling path). A residual network is built from serially connected residual blocks that have skip connections. The enhanced attention module and a decoder block (the up-sampling route) make up the network's decoding section. There are two connections from the input for each residual block. Convolutional layers, batch normalization, and linear functions are applied to the initial input. The second input omits the further addition of the convolutions and functions. In order to preserve segmentation accuracy and resilience, residual networks assist in resolving the vanishing gradient problem that is typical in big and complicated networks. The residual U-Net model's up-sampling path resembles that of U-Net from the preceding description. Through skip connections, the up-sampling component receives the local data and concatenating features. This model was trained using the Adam optimizer with the loss function BCE and has around 21.6 million trainable parameters. All mentioned models and ensemble-based segmentation methods segment only a small portion of the whole biopsy image. In order to reconstruct all the segmentation maps that correspond to the whole biopsy image, several processing steps have to be undertaken. There are three basic processes in this reconstruction flow: Each patch is stitched back onto the canvas in the same way that it was cropped from the original picture, and average prediction values are generated in the areas where patches overlap. The predictions are obtained from each image patch using the proposed segmentation model. Finally, a threshold value is used to determine the segmentation map of the expected glands.