Tensor enhanced chest cancer classification via CNN and Vision Transformer models

N Nayab Asim M Mehreen Sirshar M Mohammad Zubair Khan S Sidra Ejaz S Sobia Khalid I Ibrahim Aljubayri A Abdulrahman Alahmadi

Abstract

Lung diseases, particularly lung cancer, remain a leading cause of mortality worldwide, accounting for approximately 1.8 million deaths annually. Early and accurate diagnosis is critical for improving patient outcomes. This study also introduces a unified platform for evaluating multiple convolutional neural network architectures and comparing them to a Vision Transformer model while utilizing a common tensor-based preprocessing pipeline for classifying lung cancer with CT/PET-CT imaging. To enhance model adaptability, all input images were initially converted into tensors prior to training, enabling implicit fine-tuning without altering the original architecture. The YOLOTransfer dataset, comprising diverse and annotated medical images, was used to benchmark model performance. Classical CNN models such as AlexNet, VGG-16, ResNet-50, DenseNet, and EfficientNet were compared against ViT in terms of accuracy, sensitivity, specificity, F1-score, and AUC-ROC. Among all models, ResNet-50 and EfficientNet achieved the highest accuracy, while the Vision Transformer showed competitive results in capturing complex global patterns. The findings highlight the complementary strengths of convolutional and transformer-based architectures for medical image analysis and demonstrate the feasibility of deep learning approaches for lung cancer detection.

Article Details

Journal PLoS ONE
Volume / Issue Vol. 21, Issue 6
Published June 02, 2026
Pages e0348863
ISSN 1932-6203
Publisher Public Library of Science

Journal Info

PLoS ONE

Public Library of Science

ISSN: 1932-6203 Open Access Health Sciences

Authors (7)

N

Nayab Asim

M

Mehreen Sirshar

M

Mohammad Zubair Khan

S

Sidra Ejaz

S

Sobia Khalid

I

Ibrahim Aljubayri

A

Abdulrahman Alahmadi