# Attention-Based Transfer Learning for Efficient Pneumonia Detection in Chest X-ray Images
## 3 Results
### Comparison  
In this subsection, we compared the performance of our models against recent CNN-based models that support the diagnosis of pneumonia. We compared the models that have the same domain and dataset of chest X-rays from Guangzhou Women and Children's  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Model** & **Data** & **Epoch** & **Recall (\%)** & **Precision (\%)** & **AUC (\%)** & **F-Score** & **Accuracy (\%)** \\ \hline ResNet152 & ImageNet dataset & 30 & 98.97 & 93.46 & 93.72 & 0.961 & 95.03 \\ DenseNet121 & NIH dataset & 30 & 98.72 & 94.13 & 94.23 & 0.964 & 95.35 \\ ResNet18 & Custom dataset & 30 & 98.97 & 93.24 & 93.50 & 0.960 & 94.87 \\ Self-attention & - & 30 & 98.72 & 96.46 & 93.72 & 0.976 & 95.03 \\ ECA & - & 30 & 98.21 & 95.99 & 95.68 & 0.971 & 96.31 \\ SE-Attention & - & 30 & 98.46 & 96.24 & 96.03 & 0.973 & 96.63 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Comparison of simple transfer learning models and models with different attention mechanisms on the test dataset in terms of performance metrics.  
Figure 9: Matrix of relationships between actual and model-predicted answers.  
Medical Center. The results are summarized in Table 3. [PERSON] et al. [32] used a pre-trained InceptionV3 model, which was trained on the ImageNet. The model was initialized with the weights of the pre-trained InceptionV3 rather than random initialization. They trained the model by unfreezing and updating the pretrained weights on chest X-ray images as fine-tuning. They obtained a classification accuracy and recall of 92.8%, 93.2%, respectively. [PERSON] et al. [34] used the DenseNetl21 [11] architecture, which was shown to perform well on chest X-ray images with a CheXnet DenseNetl21 model [28]. They used Adam optimization with default parameters values (\(b1\) = 0.9 and \(b2\) = 0.999), a learning rate of 0.001, and a learning rate decay of 0.1 when the validation accuracy converged. They achieved an AUC of 98.4%.  
[PERSON] et al. [35] used customized models based on a pre-trained CNN model as the feature selector. They selected specific regions of interest (ROI) on chest X-ray images to perform the classification of pneumonia and normal images. They evaluated models with two types of dataset, original data as baseline and cropped ROI data. The best model was customized VGG16 and we outperformed their model in terms of accuracy, F-score, and recall. [PERSON] et al. and [PERSON] et al. attempted to detect pneumonia with the customized CNN model. [PERSON] et al. [24] used a MobileNet as the feature extractor and the AEO algorithm as the feature selector. The AEO algorithm finds only the relevant features from a lot of features that are extracted from a MobileNet. [PERSON] et al. [36] used two neural networks, the multilayer perceptron and neural network to detect and classify the pneumonia. They achieved best results in recall, precision, F-score and accuracy, of 94.85%, 95.72%, 0.953% and 95.07%, respectively. [PERSON] and [PERSON] [37] also used deep-learning-based methods Xception and VGG16 for pneumonia classification. The VGG16 model outperformed Xception with an accuracy of 87%. [PERSON] et al. [38] proposed two CNN architectures that were designed from scratch with or without a dropout layer. They used deep CNN architectures as the feature extractor. The accuracy of the results was 90.68%. Despite other papers not providing as detailed results as ours for evaluation, we outperformed other methods in terms of classification accuracy, recall and F-score.