Early detection of lung cancer depends heavily on finding small abnormalities in CT scans. Pulmonary nodules are small spots in the lungs that can indicate early-stage lung cancer. Finding them promptly, before they grow and spread, is the most reliable way to save lives - but the task is surprisingly difficult.
Manual detection by radiologists is time-consuming and imperfect. Nodules can be very small, have blurry edges, and look similar to surrounding blood vessels and tissue. The difficulty increases as the number of CT scans requiring review grows faster than the radiologist workforce in many healthcare systems.
Previous automated methods had meaningful limitations. Traditional image-processing techniques like thresholding struggle with complex backgrounds. Earlier machine learning classifiers required manual feature design and were sensitive to imaging noise. Even recent deep learning models struggled with very small or irregularly shaped nodules, leading to missed diagnoses.
A new framework called YOLOv8-BCD was developed to address these problems. The goal was to build a system that detects nodules with high precision and speed - fast enough and accurate enough to be genuinely useful in a busy radiology department, not just in a research setting.
YOLOv8-BCD is an enhanced version of YOLOv8, a leading real-time object detection algorithm. The YOLO (You Only Look Once) family of models works by scanning an image just once and predicting where objects of interest are located - unlike older methods that scan the image multiple times. YOLOv8 was chosen as the foundation because it balances accuracy and speed well for medical imaging tasks.
Three key enhancements were added to the base YOLOv8 architecture. BiFormer - an attention mechanism that helps the model focus on the most relevant image regions. CARAFE (Content-Aware ReAssembly of Features) - a smarter way to upscale low-resolution feature maps. DO-DConv (Depth-wise Over-Parameterized Depth-wise Convolution) - an improved convolution layer that captures finer details without dramatically increasing computational cost.
A preprocessing step using SRGAN (Super-Resolution Generative Adversarial Network) was also added. SRGAN enhances the sharpness and resolution of CT images before the detection model even sees them, making subtle nodule boundaries more visible and reducing the impact of imaging noise and artifacts.
The name 'BCD' comes from the three modules: BiFormer, CARAFE, and DO-DConv. Together, these additions address the specific challenges of lung nodule detection - small size, low contrast, blurry boundaries, and diverse shapes - that standard YOLOv8 handles less effectively.
BiFormer is an attention mechanism inspired by transformer neural networks. Rather than treating every part of an image equally, it uses a bidirectional routing approach to identify which image regions are most relevant to detecting a nodule and focuses computational effort there. This is particularly helpful for small nodules in complex backgrounds, where the model needs to distinguish a tiny abnormality from surrounding vessels and tissue.
CARAFE improves how the model combines feature information across scales. Detection networks typically need to look at images at multiple resolutions simultaneously. When upscaling lower-resolution feature maps back up, conventional methods can blur details. CARAFE instead predicts a custom upscaling pattern for each location based on actual image content, preserving fine nodule details that would otherwise be lost.
DO-DConv extends the model's ability to capture local texture details. Standard depth-wise convolution - a computationally efficient technique used in lightweight networks - has limited capacity to learn complex patterns. DO-DConv adds extra learnable parameters during training that improve representation quality, but these extra parameters are folded back into the model before deployment, meaning inference speed is not significantly impacted.
SRGAN preprocessing uses adversarial training to generate enhanced images. A generator network learns to produce sharper, higher-resolution versions of CT images, while a discriminator network critiques whether the output looks realistic. This adversarial dynamic produces enhanced images with clearer nodule edges and better contrast, giving the detection model higher-quality input to work with.
Two datasets were used to train and test the model. The primary dataset was LUNA16 (LUng Nodule Analysis 2016), a publicly available benchmark containing CT scans from approximately 1,000 patients with thousands of annotated nodules. 550 images were selected for this study to provide a diverse range of nodule sizes and anatomical positions.
An external validation dataset called TianChi was also used. This Chinese dataset contains 1,971 annotated CT scans from multiple hospitals, with greater diversity in imaging equipment, acquisition protocols, and patient populations. Testing on TianChi assessed whether the model could generalize beyond the dataset it was designed around - a crucial real-world concern.
Ablation experiments systematically tested each module's contribution. The researchers tested all combinations of the three modules (BiFormer, CARAFE, DO-DConv), both with and without SRGAN preprocessing. This allowed them to quantify exactly how much each individual component contributed to overall performance, rather than simply reporting the final combined result.
Performance was measured using mean average precision (mAP), recall, precision, and inference speed in frames per second (FPS). In clinical screening, recall (catching real nodules) and precision (avoiding false alarms) must both be high. The 30 FPS speed threshold was used as the benchmark for real-time clinical applicability.
Each of the three modules contributed distinct improvements. Adding BiFormer alone increased recall from 79.7% to 85.4%, meaning fewer real nodules were missed - at the cost of a slight dip in precision. Adding CARAFE alone pushed mAP0.5 to 85.2%, particularly helping with small nodules where detail recovery matters. DO-DConv alone boosted accuracy to 90.3% by improving fine texture discrimination, though recall dipped slightly.
Combining all three modules together produced the best balanced performance. The complete YOLOv8-BCD model achieved 86.4% accuracy, 80.6% recall, and 88.3% mAP0.5 - higher than any individual module or two-module combination. This confirms that the three enhancements complement each other rather than overlapping.
SRGAN preprocessing provided additional gains across all configurations. Comparing results with and without SRGAN showed that higher-quality input images consistently improved detection metrics, especially for small and low-contrast nodules. The BiFormer module benefited most from SRGAN, with recall jumping from 80.9% to 85.4% when enhanced images were used.
The combination of CARAFE and DO-DConv without BiFormer slightly reduced precision, indicating that global context modeling (BiFormer's role) is needed to prevent the finer-grained local detail modules from generating excess false positives. All three modules working together provides the necessary balance.
YOLOv8-BCD outperformed all other models tested on the LUNA16 dataset. It achieved the highest mAP0.5 (88.3%) and mAP across stricter detection thresholds (41.0%), while maintaining a competitive inference speed of about 72 frames per second - well above the 30 FPS threshold for real-time clinical use.
Older and simpler models performed substantially worse. SSD (Single Shot Detector) achieved only 59.6% mAP0.5 and missed most nodules. Faster R-CNN, despite being a highly regarded architecture, reached only 34.6% mAP0.5 on this dataset and ran at just 12 frames per second - far too slow for clinical workflows. DETR (a transformer-based detector) had better precision but missed many nodules.
Compared to other YOLO versions, YOLOv8-BCD clearly leads. YOLOv9 had high recall (88.1%) but ran at only 22 FPS, used 60 million parameters (versus 9.75 million for YOLOv8-BCD), and had lower mAP0.5. YOLOv10 was fast but underperformed on small nodule detection and had lower mAP overall.
On the external TianChi dataset, YOLOv8-BCD achieved 83.8% mAP0.5 and 98 FPS, demonstrating strong generalization to a more diverse clinical imaging environment. The model successfully detected small nodules and low-contrast lesions even when nodules overlapped with blood vessels - one of the hardest detection scenarios.
5-fold cross-validation confirmed that the model performs consistently, not just on one lucky data split. Across five different training-test splits of the LUNA16 dataset, YOLOv8-BCD maintained high performance with mAP0.5 ranging from 84.6% to 95.8% and recall consistently above 84% in all folds.
Recall remaining above 84% across all folds is particularly significant for clinical screening. In lung cancer screening, missing a real nodule (a false negative) is generally considered more dangerous than flagging a false positive - because missed nodules may be allowed to grow undetected. A consistently high recall rate means the model reliably catches most true abnormalities regardless of which patients are in the test set.
The range in mAP0.5 across folds (84.6% to 95.8%) reflects variability in nodule difficulty across patients, not model instability. Some subsets contain more challenging cases (very small nodules, low contrast, unusual shapes), naturally producing lower scores. The model's strong floor performance on the hardest folds indicates real clinical robustness.
YOLOv8-BCD is designed to function as a practical clinical assistant, not just a research system. Its 71-98 FPS inference speed means it can process a CT scan in near real-time, allowing radiologists to receive AI-flagged results quickly rather than waiting for batch processing. An online demonstration application is already available for users to upload CT scans and receive detection results.
The model's precision-recall balance is calibrated for clinical reality. While YOLOv9 achieves slightly higher recall, its lower precision creates more false positives - which in practice means radiologists must review more unnecessary follow-up cases. YOLOv8-BCD's balanced approach minimizes both missed nodules and unnecessary alerts, supporting rather than overwhelming clinical workflows.
The computational cost is manageable for real-world deployment. At 9.75 million parameters and 31.3 GFLOPs, YOLOv8-BCD runs on consumer-grade GPU hardware (tested on an NVIDIA RTX 4060 laptop). This is far more practical for most hospitals than models like Faster R-CNN, which requires 370 GFLOPs, or YOLOv9, which requires 266 GFLOPs.
The potential impact extends beyond individual patient care. AI-assisted nodule detection could help healthcare systems make better use of limited radiology resources, enable faster throughput in lung cancer screening programs, and reduce variation in detection rates between centers with different levels of radiologist expertise.