# Segmentation of Liver Tumors by Monai and PyTorch in CT Images with Deep Learning Techniques
## 5 Results and Discussion  
The model code is developed on VS Code 1.82 using Monai 0.6 and PyTorch 1.10, a Python 3.11 language that sets the device to Cuda 11.3 for testing and training. Using the Adam optimizer, the network weight is updated [32] from Monai by setting the learning rate to \(1\times 10^{-5}\) and setting the mini-batch size to 16. We set the batch normalization technique to improve neural network training by normalizing the previous layer's activation for each input data batch. We used all other necessary libraries to convert the dicome2 nififi files to readable by Monai. ResUNet training and testing were performed on an NVIDIA GPU. Ourproposed method has been examined and validated using synthetic and publicly available CT images. Table 1 shows the outcomes derived from 20 epochs of training the ResUNet model for liver segmentation, details on the tumor segmentation results, and monitors the ResUNet model's training progress across 100 epochs. The training dice and dice loss metrics are shown in Figure 7; liver training and validation loss gradually decrease for every epoch, indicating a good learning rate. In each epoch, we save the loss of training, metric of training, loss of testing, and metric of testing to avoid overfitting. During model training, when the dice loss ceased decreasing or began increasing, we stopped and saved the training loss to prevent the graph from decreasing gradually. The liver model training and validation accuracy value increased with every epoch. The proposed model attains an accuracy rate of 98%, accompanied by an SVD score of 0.23, indicating minimal deviation between the predicted and actual masks, which is outlined in Table 2. The higher accuracy score can be attributed to class imbalance, particularly in CT images where more pixels are assigned to a background class with a low likelihood of tumor presence. Consequently, the accuracy tends to be skewed toward the background class, as accuracy considers the total number of true positives (TPs), false positives (FPs), true negatives (TNs), and false negatives (FNs) for all classes. We load and create the ResUNet model to test the model and then put its weights. Finally, we passed the test patients to determine whether the model was segmenting well. The following are some patient slices, and the quantitative and qualitative results of the public patient CT image segmentation are shown in Figure 8 and Table 3.  
emerging tumors. The authors developed a novel technique for liver tumor segmentation in CT volumes. Table 4 compares the performance of the developed method with that of other cutting-edge approaches. Table 1 displays the tumor segmentation results and ResUNet model training progress over 100 epochs. Some additional metrics were determined for assessment, including training accuracy and the SVD value. The SVD metric determines the difference between the actual and expected masks. Table 2 shows that the proposed model achieved a notable accuracy of 98%, accompanied by a low SVD of 0.22, indicating minimal deviation between the actual and predicted masks, as shown in Table 4. However, it is essential to acknowledge that a higher accuracy score is affected by class imbalance. The elevated number of pixels assigned to the background class (where the likelihood of a tumor's presence is low) results in accuracy being skewed toward the background class, as it encompasses the overall numbers of (_TP_), (_FP_), (_TN_), and (_FN_) for all classes. In our approach, the tumor is distinctly identified from the segmented liver. Slices lacking liver in the CT volume were excluded from subsequent tumor segmentation procedures. Table 5 highlights the comparison of our method with contemporary techniques. Ref. [36] employed an FCN for liver and tumor segmentation in CT and MRI abdomen scans (CFCNs) and obtained a VOE of 0.823. Ref. [34] used a 2.5D DCNN to achieve a DSC of 0.67. Ref.