Research Article

A Novel Approach Using AI-vision Transformer for CT Scan Analysis for Lung Cancer Detection

DOI:

10.3791/69302

November 28th, 2025

In This Article

Summary

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

The use of Vision Transformers in this study allows lung cancer to be classified from CT images, achieving an accuracy of 98.18%, at 1,190 scans. The model preserved a satisfactory level of robustness, with accuracy levels between (80–88%) with noisy and blurred images, against standard convolutional neural network (CNN) models, in consumer health diagnostic applications.

Abstract

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

Diagnosing lung cancer remains challenging because of the subtle differences between benign versus malignant disease on imaging studies. While traditional, convolutional neural networks (CNNs) have been the mainstay of medical imaging analysis, they still have limited applicability and robustness with variation of imaging methods. The advancement of machine learning is transforming traditional methods of diagnosis in consumer-facing healthcare technologies, changing processes in accessibility and personalized patient care. This paper describes the use of Vision Transformers (ViTs) for the task of lung cancer classification with CT scans, associated with consumer health applications. The Vision Transformer model was trained on complete dataset of 1,190 CT images, and achieved a classification rate of 98.18% with a Matthews Correlation Coefficient of 0.9676. Additionally, the model's performance was validated on simulated real-time scenarios using real-time noises and blurred datasets. Although preserving validation methods with strong diagnostic accuracy, across the entire dataset the ViT model also outperformed the conventional validated method by showing an accuracy of between 80-88% to differentiate between the noisy images and fuzzy images, even under these circumstances. While initial results provide promising information about the robustness of ViTs when dealing with image variation, a cautious approach should still be exercised in contextualizing results since the evaluation studies were completed within a relatively small dataset and simulation settings. It will be valuable for future research studies to use larger datasets that are more representative of true clinical conditions and datasets that are clinically validated to determine whether ViTs are advantageous to clinical identification of oncology diagnostic and to improve early detection.

Introduction

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

Lung cancer has a substantial global burden, affecting millions of lives every year. Due to the cancer's aggressive nature and frequent late-presenting disease state, the mortality associated with lung cancer is high. Early detection is essential because the intervention can improve treatment effectiveness and survival rates a great deal1. The conventional approach for preliminary screening and diagnosis remains with the utilization of computed tomography (CT) to allow more detailed visualization of the pulmonary structures. However, the evaluation of the CT images is complex and is entirely dependent on the reviewers as radiologists. Tumor var....

Access restricted. Please log in or start a trial to view this content.

Protocol

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

The dataset includes a total of 1,190 CT scan slices from 110 cases, categorized into three classes: normal (55 cases), benign (15 cases), and malignant (40 cases). Each case comprises multiple CT slices (ranging from approximately 80 to 200 slices per case), offering diverse axial views of the thoracic region. The CT images were obtained in DICOM using the SOMATOM scanner with standard imaging parameters: tube voltage = 120 kV, slice thickness = 1 mm, window width = 350–1,200 Hounsfield Units (HU), and window center values = 50–600 HU, during a full inspiration breath hold.

All images were fully de-identified prior to analysis to remove an....

Access restricted. Please log in or start a trial to view this content.

Results

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

The Vision Transformer model demonstrated exceptional results on a multiple evaluation metrics on the IQ-OTH/NCCD lung cancer datasets, effectively differentiating normal, benign, and malignant CT images. Overall model performance reached a high accuracy of 98.18% across the test dataset comprised of 220 images. This extremely high accuracy indicates that the model is able to generalize very effectively and can therefore be used in a clinical setting.

Access restricted. Please log in or start a trial to view this content.

Discussion

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

It has achieved remarkable results in the evaluation and implementation of the Vision Transformer model on the IQ-OTH/NCCD lung cancer dataset with high accuracy. The general accuracy of classifying a CT scan as normal, benign, and malignant is 98.18% using this model.

This superior accuracy is further proven by the model's performance in the other key scores, such as 100% precision for malignant case detection, which is very important in early diagnosis and management.

Access restricted. Please log in or start a trial to view this content.

Disclosures

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

The authors declare that they have no conflicts of interest.

Acknowledgements

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

This work was supported by Princess Nourah bint Abdulrahman University Researchers Supporting Project number (PNURSP2025R432), Princess Nourah bint Abdulrahman University, Riyadh, Saudi Arabia.  The authors are thankful to the Deanship of Graduate Studies and Scientific Research at Najran University for funding this work under the Growth Funding Program grant code (NU/GP/SERC/13/575-6).

....

Access restricted. Please log in or start a trial to view this content.

Materials

List of materials used in this article
NameCompanyCatalog NumberComments
A100 GPU (CUDA)NVIDIACUDA Version 11.6GPU acceleration for model training and evaluation.
AMD EPYC-7502P CPUAMDN/AProcessor used for high-performance computing.
Gigabit EthernetIntelN/ANetworking for peer-to-peer secure communication in CPS.
MatplotlibPython Software FoundationVersion 3.5Visualization library for plotting results.
Paillier CryptosystemOpen Source (implemented via TenSEAL)N/AEnables additive homomorphic encryption on gradients.
PySyftOpenMinedVersion 0.6.0Differential privacy and federated learning library.
Python (Anaconda Distribution)Anaconda IncVersion 3.9Includes pre-installed packages and environment management tools, Used for scripting and framework development.
PyTorchMeta AIVersion 1.12Deep learning framework for training models.
RAMCorsair256 GigaByte (GB) High memory support for intensive training.
Scikit-learnPython Software FoundationVersion 1.1Machine learning tools for performance evaluation.
SeabornPython Software FoundationVersion 0.11Statistical data visualization library.
SSD StorageSeagate1 TeraByte (TB)For fast data storage and retrieval.
TenSEALOpenMinedVersion 0.3Homomorphic encryption library for secure aggregation.
TensorFlowGoogleVersion 2.9Deep learning framework for diffusion models.
Ubuntu OSCanonicalVersion 20.04 LTSOperating system used for all experiments.

References

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,
  1. Wang, L., et al. Transformer-based deep learning model for the diagnosis of suspected lung cancer in primary care based on electronic health record data. EBioMedicine. 110, 105442(2024).
  2. Kshatri, S. S., Singh, D.

Access restricted. Please log in or start a trial to view this content.

Reprints and Permissions

Request permission to reuse the text or figures of this JoVE article

Request Permission

Tags

Lung Cancer DetectionCT Scan AnalysisVision TransformerAI Medical ImagingMachine Learning HealthcareLung Cancer ClassificationImaging RobustnessDiagnostic AccuracyMedical Image NoiseOncology Diagnostics

Related Articles