Functional imaging fills a gap. Standard CT scans provide anatomical detail but miss functional information, making low-contrast abnormalities hard to identify. PET imaging captures the metabolic activity of cancer cells, which consume more glucose than normal tissue. Combined PET/CT imaging provides both anatomical and functional data, improving diagnostic accuracy.
The problem of human error. Analyzing large volumes of PET/CT scans is time-consuming and prone to error. False positives can occur due to inflammation or infection, and false negatives can occur in slow-growing lesions. Even experienced physicians show poor reproducibility when interpreting complex scans.
Distinguishing cancer subtypes is clinically critical. The two main types of lung cancer, non-small cell lung cancer (NSCLC) and small cell lung cancer (SCLC), require very different treatment approaches. SCLC is particularly aggressive with high metastatic potential, making accurate subtype classification essential for treatment planning.
AI as a diagnostic assistant. Deep learning-based CAD systems can automate and standardize the interpretation of PET/CT images, acting as a second reader to reduce errors, flag missed lesions, and improve throughput in busy radiology departments.
Patient population. The study retrospectively analyzed PET/CT data from 146 patients scanned at Kowsar hospital between June 2019 and March 2025. The 1,974 two-dimensional scan slices were divided as: 933 normal, 539 NSCLC, and 502 SCLC. An external validation cohort from The Cancer Imaging Archive (TCIA) included 44 additional patients (976 scans) with NSCLC and SCLC cases.
Standardized imaging conditions. All patients fasted for 6 hours before the scan and received an intravenous injection of 18F-FDG (fluorodeoxyglucose). Scans were acquired 60 to 80 minutes after injection, allowing the radiotracer to accumulate in metabolically active tissue. Only thoracic slices were selected from the whole-body scans.
Expert labeling with clinical verification. All scan labels were assigned by a nuclear medicine specialist with over 30 years of clinical experience. Ambiguous cases were verified against official medical reports. This rigorous labeling process minimized the risk of mislabeling that could degrade model performance.
Image preprocessing. Raw scanner images measured 363 by 657 pixels. These were cropped to 245 by 457 pixels to remove uninformative background regions. Data augmentation techniques including rotation, shifting, and zooming were applied to the training set to handle class imbalance and improve generalization.
Leveraging models pre-trained on ImageNet. Six established CNN architectures were evaluated: InceptionV3, InceptionResNetV2, Xception, DenseNet201, ResNet101V2, and ResNet152V2. These networks were pre-trained on the large ImageNet dataset, giving them the ability to recognize a wide range of low-level and mid-level visual features.
Fine-tuning for PET/CT images. The early convolutional layers of each model were frozen to preserve general-purpose features, while a subset of higher-level layers were left trainable to adapt to the specific patterns in PET/CT images. The original classification heads were replaced with custom dense layers ending in a softmax output for three-class prediction.
Optimization strategy. Models were trained with either the Adam or SGD optimizer, combined with exponential learning rate decay schedules that gradually reduced the learning rate to maintain training stability as the model converged.
Patient-level data splitting to prevent leakage. Data splitting was performed at the patient level rather than the scan level. This ensures that all slices from the same patient appear in only one of the training or test sets, preventing the model from memorizing patient-specific features rather than learning generalizable patterns.
Motivation for a custom design. Pre-trained models, while powerful, are complex architectures originally designed for natural images. When applied to the relatively small PET/CT dataset with three closely related classes, they struggled to distinguish NSCLC from SCLC. A lighter, task-specific model was needed.
Residual connections for stable training. Residual (skip) connections allow the gradient signal to flow directly backward through a shortcut path, bypassing convolutional layers. This prevents the vanishing gradient problem in deep networks and helps preserve low-level features from early layers that remain relevant for classification.
Squeeze-and-excitation attention for feature focus. Embedded within each residual block, squeeze-and-excitation (SE) modules apply channel-wise attention. The squeeze step compresses spatial information using global average pooling, and the excitation step learns importance weights for each feature channel. This focuses the model on the channels most relevant to tumor characteristics while suppressing less informative ones.
Alternating block design. The Res-SE Net alternates between residual blocks with SE attention and standard convolutional blocks without skip connections. Standard blocks further refine features from the preceding attention-enhanced block, providing richer hierarchical representations that help distinguish subtle visual differences between cancer subtypes.
Final classification head. After the convolutional stages, global average pooling compresses the feature maps into a 512-dimensional vector. This passes through a dense layer reducing to 256 dimensions with LeakyReLU activation and 60% dropout for regularization, then to a final softmax layer outputting probabilities for normal, NSCLC, and SCLC classes.
Making AI decisions transparent. Gradient-weighted Class Activation Mapping (Grad-CAM) was used to generate visual heatmaps showing which regions of each PET/CT slice were most influential in the model's prediction. This helps clinicians verify that the AI is attending to anatomically relevant areas rather than imaging artifacts.
How Grad-CAM works. The method computes gradients of the predicted class score with respect to the feature maps of the final convolutional layer. These gradients are averaged across spatial dimensions to produce importance weights for each feature channel. A weighted sum of the feature maps creates a class-specific heatmap, which is upsampled to match the input image size.
Preserving spatial resolution for accurate localization. The effectiveness of Grad-CAM depends on maintaining sufficiently high spatial resolution in the final convolutional layer. The Res-SE Net architecture was designed to avoid excessive downsampling, ensuring that heatmaps retain meaningful spatial correspondence to the actual lesion locations in the original image.
Clinical interpretation support. Heatmaps are displayed with a color scale from dark blue to red, where red regions indicate the strongest relevance to the predicted class. These visualizations allow clinicians to review whether the model's diagnostic focus aligns with known tumor locations, building trust in AI-assisted decisions.
Res-SE Net dominates on the internal test set. In three-class classification, the custom Res-SE Net achieved 100% accuracy, sensitivity, and specificity on the internal test dataset. This perfect result extended to the patient level using majority voting, where even patients with a few mislabeled slices were correctly classified overall.
Pre-trained models performed well but not for subtypes. Among the transfer learning models, InceptionV3 achieved the highest accuracy at 91.13%, followed by ResNet152V2 at 89.90% and Xception at 88.91%. However, pre-trained models consistently struggled to distinguish NSCLC from SCLC in binary subtype comparisons, with many achieving NSCLC sensitivity below 70%.
Res-SE Net excels in binary subtype classification. In binary comparisons using the internal dataset, Res-SE Net achieved 91.67% accuracy and 92.00% sensitivity for NSCLC detection, and 90.14% accuracy with 90.00% sensitivity for SCLC detection, far outperforming all pre-trained alternatives which ranged from 19% to 93% sensitivity with high variability.
External validation shows strong cancer detection. On the TCIA external dataset, Res-SE Net achieved 98.00% accuracy in binary cancer versus normal classification, outperforming InceptionV3 at 80.22%, ResNet152V2 at 77.43%, and Xception at 76.83%. Three-class external performance was lower: 73.02% for NSCLC and 66.26% for SCLC, reflecting the challenge of cross-cohort subtype generalization.
Why pre-trained models underperformed for subtypes. Pre-trained networks were originally designed for natural image datasets and carry architectural complexity that does not always translate well to small, specialized medical image datasets. When the training set for NSCLC and SCLC is small, these models tend to overfit or fail to learn the fine-grained differences between cancer subtypes.
The generalization challenge across cohorts. The drop in three-class performance on the external TCIA dataset (73% for NSCLC, 66% for SCLC) compared to internal results reflects the inherent difficulty of generalizing to data from different scanners and populations. Overlapping imaging features between NSCLC and SCLC, combined with limited external SCLC cases, contributed to this reduced performance.
Dataset size remains a constraint. With 146 patients in the internal cohort, the dataset represents a meaningful starting point but is too small to capture the full variability of lung cancer presentations. Rare subtypes and unusual manifestations are likely underrepresented, limiting the model's ability to generalize to edge cases.
Future directions. The authors identify several avenues for improvement: acquiring larger, multi-center datasets to improve generalization; integrating clinical data such as patient history and biomarkers with imaging features; and extending the architecture to 3D classification that processes volumetric PET/CT data rather than individual 2D slices, which could capture spatial relationships between adjacent tumor regions.