Kochamparampil Anil, Akhil (2025) Improving Model Generalization of Pneumonia Detection from Chest Xray Images Using Deep Learning and Transfer Learning. Masters thesis, University of Wales Trinity Saint David.
|
Text
Anil_Kochamparampil_A_MSc_Thesis.pdf - Accepted Version Available under License CC-BY-NC-ND Creative Commons Attribution Non-commercial No Derivatives. Download (2MB) |
Abstract
Pneumonia continues to be a major global health threat and one of the leading causes of mortality, with chest X-rays serving as the primary diagnostic tool. Despite their promise, deep learning models for pneumonia detection often face limitations in generalization, performing strongly on familiar datasets but losing accuracy when applied to unseen data from different clinical environments. This study addresses that challenge by applying transfer learning with ResNet152 and DenseNet201 to improve generalization in pneumonia detection using chest Xray images. Publicly available datasets, including the COVID-19 Radiography Database and the Chest X-ray (COVID-19 & Pneumonia) dataset, were merged, pre-processed, and balanced prior to training. Model optimization involved freezing and unfreezing layers, adjusting learning rates, and applying various data augmentation strategies. Performance was evaluated with metrics such as accuracy, precision, recall, F1-score, error rate, and AUC-ROC, and further validated using an independent external dataset. Experimental results showed that DenseNet201 consistently outperformed ResNet152, reaching 93.2% accuracy with an AUC of 0.9916 on the main dataset and 88.3% accuracy with an AUC of 0.9742 on the external dataset. By comparison, ResNet152 achieved 86.4% accuracy (AUC 0.9665) on the main dataset and 84.6% accuracy (AUC 0.9573) on the external dataset. Confusion matrix analysis revealed that most errors occurred between Normal and Pneumonia classes, mirroring real world diagnostic challenges. In conclusion, DenseNet201 demonstrated superior robustness and generalization compared to ResNet152, highlighting its suitability for clinical application and underscoring the necessity of external validation in medical AI research.
| Item Type: | Thesis (Masters) |
|---|---|
| Subjects: | R Medicine > RA Public aspects of medicine T Technology > T Technology (General) |
| Divisions: | Theses and Dissertations > Masters Dissertations |
| Depositing User: | Victoria Hankinson |
| Date Deposited: | 12 Mar 2026 10:30 |
| Last Modified: | 12 Mar 2026 10:30 |
| URI: | https://repository.uwtsd.ac.uk/id/eprint/4143 |
Administrator Actions (login required)
![]() |
Edit Item - Repository Staff Only |
