EventsThe 1st International Online Conference on Tomography
Published
This submission belongs to the session S5. AI: the relevant topics in the recent literature of the event The 1st International Online Conference on Tomography
Published date
07 Sep, 2026
Academic Editor
author-avatarEmilio Quaia
Citation
Syed Qasim Safeer Gardezi, Syed Talha Safeer Gardezi, Explainable Transfer Learning for Lung Cancer Classification from CT Images Using Grad-CAM, in Proceedings of The 1st International Online Conference on Tomography, 10 September–11 September 2026, MDPI: Basel, Switzerland
Share
Email
Facebook
Twitter
LinkedIn

Explainable Transfer Learning for Lung Cancer Classification from CT Images Using Grad-CAM

Syed Qasim Safeer Gardezi 1
1. Department of Computer and Software Engineering, National University of Sciences and Technology (NUST), CE&ME, Islamabad, 44000, Pakistan
2. LINAC Project, Pakistan Institute of Nuclear Science & Technology (PINSTECH), Islamabad, 45650, Pakistan
Abstract

Lung CT imaging plays an important role in identifying lung abnormalities, but deep learning models for medical image classification often face two practical challenges: class imbalance and limited interpretability. This study presents an explainable transfer learning framework for classifying lung CT images into normal, benign, and malignant categories. The IQ-OTH/NCCD lung cancer CT dataset was used, and the processed experimental set included 1097 CT images: 561 malignant, 416 normal, and 120 benign images. The dataset was divided into stratified training, validation, and test sets to preserve the class distribution. Three ImageNet-pretrained transfer learning models, ResNet50, DenseNet121, and EfficientNetB0, were trained and compared under the same preprocessing conditions. A fine-tuned ResNet50 model was also evaluated. Class weights and moderate data augmentation were applied to reduce the effect of class imbalance. Model performance was assessed using accuracy, precision, recall, F1-score, Macro F1, weighted F1, and Macro ROC-AUC. Grad-CAM was used to visualize model attention for correct predictions and high-confidence wrong predictions. ResNet50 achieved the best Macro F1 score of 0.7150, with an accuracy of 0.8364 and Macro ROC-AUC of 0.9064. Although fine-tuned ResNet50 achieved slightly higher accuracy, its Macro F1 decreased due to poor benign-class recall. Error analysis showed that benign cases were most frequently misclassified as normal. These results show that accuracy alone can be misleading for imbalanced lung CT classification. The study highlights the importance of combining class-sensitive evaluation metrics with explainability methods to better understand model behavior in AI-assisted tomography applications.

Keywords
lung cancer classification
CT imaging
tomography
transfer learning
ResNet50
DenseNet121
EfficientNetB0
Grad-CAM
explainable AI
medical image analysis
Deep learning-based denoising for synchrotron radiation breast computed tomography images
Automatic differentiation frameworks for photoacoustic tomography