## 4 Result Analysis and Discussion
### Comparison Between Models  
In the beginning, four pretrained models were used on two datasets throughout the initial phase. All these models are compared using the same hyperparameter values. Every model performed 25 epochs of training, and the statistical results for the initial dataset are presented in Figure 4. Based on accuracy, the Resnet50V2 model is our best candidate. It is 0.7% larger and has an accuracy of 99%, sensitivity of 99.2%, specificity of 99%, and F1-score of 99.1%. Considering the highest level of accuracy achieved in the instance, this model was selected for enhancement. We suggest a hybrid model, SwT+Resnet50V2, which combines the Swin Transformer and Resnet50V2. This model leverages the strengths of both components to extract optimal features and achieve superior performance. The technique of transfer learning was employed in this study. Initially, the model was trained for 15 epochs. Subsequently, the last 30 layers of the Resnet50V2 model were fixed, and the learning rate was adjusted to improve the results for an additional 15 epochs. This model achieved an accuracy of 99.9%, sensitivity 99.8%, specificity 99.9%, and F1 score 99.9% as shown in Figure 5. The improvement rate was 0.9% compared to the initial Resnet50V2 model. The VGG16 model achieved an accuracy of 98.3%, sensitivity of 99.6%, specificity of 98%, and F1 score of 99.9%. Following the VGG16 model, the CNN model achieved an accuracy of 98.2%, a sensitivity of 99.4%, a specificity of 97.4%, and an F1 score of 98.3%. The MobileNetV2 model achieved the lowest accuracy of 98%, sensitivity of 99%, specificity of 97%, and F1 score of 98%, placing it in last place. Also, a comparison was made with two models, EfficientNetV2B3 and ConvNeXtTiny, where the accuracy was achieved up to 94.6% for the ConvNeXtTiny model and the worst accuracy was for the EfficientNetV2B3 model at 71.3%. It was shown that the modern models did not achieve high performance compared to the famous models and the proposed model SwT+Resnet50V. Figure 6 shows the ultimate enhanced accuracy and reduction in errors of the suggested model (SwT+Resnet50V2) through the validation and training phases. A more effective approach to comparing models is by analyzing their confusion matrices. A confusion matrix is a summary of accurate and inaccurate predictions. The results of the confusion matrices appear in Figure 7.  
In the next stage, based on the second dataset consisting of three types of tumors and normal tissue, the same previous pretrained models were used. All these models are compared using the same hyperparameter values. Each model performed 25 epochs of training, and the statistical results on the raw dataset are shown in Figure 6. Based on accuracy, the Resnet50V2 model is also our best candidate. It is 1.6% larger, has an accuracy of 91.1%, a sensitivity of 91%, a specificity of 91.2%, and an F1 score of 91.1%. Given the highest level of accuracy achieved in this example, this model was chosen for optimization. The proposed model (SwT+Resnet50V2) was used, which combines a Swin Transformer and Resnet50V2. The model was trained for 15 epochs. Then, the last 30 layers of the Resnet50V2 model were fixed, and the learning rate was adjusted to improve the results for an additional 15 epochs. Accuracy reached 96.8%, sensitivity reached 97%, specificity reached 97%, and F1 score reached 97% as shown in Figure 8. The improvement rate was 5.7% compared to the initial Resnet50V2 model. The MobileNetV2 model achieved an accuracy of 89.6%, sensitivity of 90%, specificity of 90.2%, and F1 score of 90%. Following the MobileNetV2 model, the CNN model achieved an accuracy of 86.7%, a sensitivity of 85.1%, a specificity of 84.9%, and an F1 score of 86%. The VGG16 model achieved an accuracy of 70.9%, sensitivity of 68%, specificity of 68%, and F1 score of 68%, scoring it in last place. The worst accuracy was for the ConvNeXtTiny and EfficientNetV2B3 models, where an accuracy of 69% and 34% was achieved, respectively.