# Towards a Better Understanding of Transfer Learning for Medical Imaging: A Case Study
## 6 Experimental Results  
The evaluation stage was achieved by calculating recall, precision, and F1-score, where TP refers to true positives, FP refers to false positives, and FN refers to false negatives. These parameters are defined as:  
\[\text{Recall}=\text{TP/}\left(\text{TP+FN}\right) \tag{1}\]  
\[\text{Precision}=\text{TP/}\left(\text{TP+FP}\right) \tag{2}\]  
\[\text{F1}_{\text{score}}=2\times\left(\left(\text{Precision}\times\text{ Recall}\right)/\left(\text{Precision}+\text{Recall}\right)\right. \tag{3}\]  
We started by evaluating the proposed model performance with target datasets trained with Scenario 1, as reported in Table 2.  
Figure 10: The learned filter of the normal class. Figure 9: Learned filters of the abnormal class (DFU). The results of the proposed model with Dataset A are slightly higher than those with Dataset B, achieving 84.8%, 88.6%, and 86.6% for precision, recall, and F1-score, respectively. The proposed model with Dataset B achieved 82.9% for precision, 87.5% for recall, and 85.1% for the F1-score. Although the performance of the proposed model with Dataset A was higher than the proposed model with Dataset B, both still roughly had the same performance. In Scenario 2, TL from medical sources (Dataset C) was adopted and the results are listed in Table 3.  
The results of the proposed model with Dataset A were significantly higher than those with Dataset B, achieving 96.8%, 98.6%, and 97.6% for precision, recall, and F1-score, respectively. By comparing the performance of the proposed model with Dataset A in Scenario 2 to Scenario 1, there was a remarkable improvement in the performance of Scenario 2 due to the TL from the same domain of Dataset A. On the other hand, the situation was different with Dataset B in Scenario 2 compared to Scenario 1. Employing TL from a medical source for animal classification (Dataset B) degraded the performance due to differences in learned features. The proposed model with dataset B achieved 81.8% for precision, 86.7% for recall and 84.1% for the F1-score. In these situations, training from scratch is preferable as in Scenario 1. In Scenario 3, the source of TL was in the same domain of Dataset B, which boosted the results to 91.6%, 96.9%, and 94.1% for precision, recall, and F1-score, respectively. By comparing the performance of the proposed model with Dataset B in Scenario 3 to that of Dataset B in Scenarios 1 and 2, it was clear that the same domain transfer played a big role in enhancing performance. Although the performance of the proposed model with Dataset A was less than that with Dataset B in Scenario 3, the results of the proposed model with Dataset A slightly improved compared to the results from Scenario 1. It achieved 86.5% for precision, 92.7% for recall and 89.4% for the F1-score. These results are still less than the results from Scenario 2. The results of the proposed model with Datasets A and B trained in Scenario 3 are listed in Table 4.  
In Table 5, we employed two state-of-the-art models trained on the ImageNet dataset, which consists of natural images including animals. Both the ImageNet dataset and Dataset B are in the same domain. For that reason, the results of Dataset B were higher than the results of Dataset A with a score 89.3% for precision, 95.2% for recall and 92.1% for the F1-score with VGG19, while it scored 93.7% for precision, 98.9% for recall, and 96.2% for the F1-score with ResNet50. The results of ResNet50 with Dataset B were considered the dataset's highest results due to training with the ImageNet dataset as source of TL and the results of the proposed model in Scenario 3 were the second \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Target Dataset** & **Precision (\%)** & **Recall (\%)** & **F1- score (\%)** \\ \hline Dataset A & 86.5 & 92.7 & 89.4 \\ Dataset B & 91.6 & 96.9 & 94.1 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Results of two target datasets with Scenario 3.