## 2 Materials and Methods
### Performance Evaluation Metrics  
This study used six image operations that included different transformations such as scaling, flipping 360 degrees, Gaussian blur addition, histogram colour adjustment, Gaussian noise addition, and elastic 2D modification. In addition, the magnitude and scale of the elastic deformation were adjusted using Alpha and Sigma, and the study was divided into seven values for easy magnitude range location. The experiments were conducted on a professional Windows operating system with a Ryzen computer that had 32 GB of memory and a 16 GB RTX graphic processor. The network could predict segmented images of 512 px and accept tests on images of any size. After testing various combinations, it was determined that a batch size of 4, along with learning rates of 0.001, beta values of 0.9 and 0.999, and 2170 iterations for 70 epochs, yielded satisfactory results [50]. The neural network framework Keras, which is open-source and written in Python, was used alongside TensorFlow.  
To measure the similarity between the predicted and true segmentations, the mean Intersection Over Union (IoU) was used, which is a comparison metric between sets [51]. It assesses the accuracy of segmentations predicted by different models by comparing their outputs to the ground truth. Specifically, the IoU for two sets, M and N, can be defined as follows:  
\[J_{index}=\frac{|M\ \cap N|}{|M\ \cup N|}=\frac{|M\ \cap N|}{|M|+|N|-|M\ \cap N|}, \tag{5}\]  
where the images are composed of pixels. As a result, the final equation can be adjusted to represent discrete objects in this manner:  
\[J_{index}=\frac{1}{num}\sum_{C=1}^{4}\omega_{C}\sum_{P_{i}=1}^{num}\left( \frac{l_{P_{i}}^{C}l_{P_{i}}^{C}}{l_{P_{i}}^{C}+l_{P_{i}}^{C}-l_{P_{i}}^{C}l_ {P_{i}}^{C}}\right) \tag{6}\]  
To address the class imbalance, the study incorporated class weights \(\omega_{C}\) into the network. For this problem, \(\omega_{C}=1\) was assigned to classes \(C\in[1.....4]\) for simplicity. To enhance robustness and evaluate the loss performance, the study employed the Binary Logistic loss (\(BLog_{loss}\)), which is shown in Equation (7). This formula includes \(C_{T}\) as the actual mask image, \(C_{Ts}\) as a single element of that mask, \(C_{P}\) as the projection of the output image, and \(C_{Ps}\) as a single feature of that projection. In this equation, \(l_{P_{i}}^{C}\) represents the binary value (label), and \(l_{P_{i}}^{C}\) represents the estimated probability for the pixel \(P_{i}\) of class \(C\).  
\[BLog_{loss}=\sum_{s}-(C_{Ts}\text{log}C_{Ps}+(1-C_{Ts})\text{log}(1-C_{Ps})) \tag{7}\]  
when \(C_{Ps}\) has a value of 1 or 0, the result of \(\text{log}(0)\) is undefined. To avoid this, the values of \(C_{P}\) are restricted to a range of \([\delta,1-\delta]\). The Keras framework handles this by setting \(\delta\) to \(1\times 10^{-7}\).  
In order to further evaluate the performance of segmentation models, this study employed the dice similarity coefficient, a statistical metric. The dice coefficient, also known as the Sorensen-Dice coefficient or F1 score, is calculated by multiplying the overlapping area of actual and predicted images by two and then dividing it by the sum of the pixels in those images [52]. By measuring the spatial overlap, the dice coefficient provides a measure of accuracy and predictability for the segmentation model:  
\[DSC=\frac{2 TP}{(2 TP+FN+FP)} \tag{8}\]  
Unlike the dice coefficient, which overlooks many instances of improper segmentation, the IoU (Intersection over Union) only takes into account one occurrence of imprecise segmentation. This means that an algorithm with occasional errors will have a lower IoUscore than the dice coefficient. However, the dice coefficient is a better indicator of average performance when compared with each individual.  
After analysing the performance metrics, the morphological types of the ST were classified using a colour-coded system for each of the defined classes, including the background. Figure 6 illustrates this colour-coding representation for the ST types.