Abstract
Accurate assessment and detection of pulmonary lesions are of paramount importance in the treatment of lung diseases. Chest X-rays (CXR) serve as a critical screening method, allowing physicians to differentiate between normal and diseased tissues by examining the level of X-ray absorption in the chest. However, as diseases progress, pulmonary lesions associated with pneumonia can transition from a singular pattern to a more diverse set of features. These features manifest as more intricate textures in chest X-ray images and are often surrounded by interference from multiple low-density tissues, posing a significant challenge for lesion detection in the lungs. Hence, this paper proposes an improved YOLOv8 network model for the detection of pulmonary lesion features. This model employs novel Swin Transformer attention modules and feature fusion methods to accurately pinpoint the lesion areas based on the patterns and regularities of lesion evolution. It categorizes the lesions into three types: consolidation, infiltration, and ground-glass opacities. This approach will provide more dependable support for disease progression assessment and clinical diagnosis and treatment.
Introduction: The Challenge of Subtle Lesions
Detecting pneumonia in Chest X-rays is a high-stakes task, yet it remains notoriously difficult even for experienced radiologists. Pneumonia lesions—categorized here as consolidation (PC), infiltration (IS), and ground-glass opacities (GGS)—often present as subtle, low-contrast textures that blend into surrounding healthy tissue.
While deep learning models like YOLOv8 are excellent at general object detection, they often struggle with the "fuzzy" boundaries and multi-scale nature of medical lesions. Standard models frequently miss small, early-stage infiltrations or get confused by the overlapping shadows of ribs and other low-density tissues. The authors sought to bridge this gap by creating a model that can better distinguish these "soft" medical features from background noise.
Proposed Architecture
The authors propose two primary architectural innovations to the standard YOLOv8 framework to enhance its sensitivity to medical features:
- Deep Feature Extraction Block (DFEB): This module replaces standard convolutional blocks with a Residual Swin Transformer Block (RSTB). Unlike standard convolutions that look at small local neighborhoods, the Swin Transformer uses "Sliding Migration Attention" (shifted windows). This allows the model to capture long-range dependencies across the lung image while keeping computational costs manageable, helping the model understand the global context of the lung.
- Feature Enhancement Module (FEM): Standard YOLOv8 uses a module called SPPF to pool features. The authors replaced this with the FEM, which uses multi-branch dilated convolutions. By using different dilation rates, the model can "see" at multiple scales simultaneously without losing spatial resolution, which is critical for identifying lesions that vary wildly in size.
Finally, the researchers utilized Grad-CAM (Gradient-weighted Class Activation Mapping) to visualize the model’s decision-making process, ensuring the network was actually focusing on the lesions rather than irrelevant anatomical structures like the ribs.
Dataset and Methodology
The study utilized a dataset of 341 high-quality pneumonia CXR images, sourced from the Pneumonia Radiography Database and supplemented by images from partner hospitals.
- Expert Annotation: Three senior radiologists reviewed and annotated the images to ensure ground-truth accuracy.
- Classes: The images were labeled for three specific focal features: Lung Consolidation (PC), Infiltrating Shadow (IS), and Ground-Glass Opacity (GGS).
- Format: Annotations were converted to the MS COCO standard format for training and evaluation.
Key Results and Insights
The proposed model outperformed several state-of-the-art (SOTA) detectors, including Faster R-CNN, CenterNet, and various versions of YOLO (v5, v7, and the baseline v8).
- High Accuracy: The model achieved a 93.4% [email protected], representing a 5.6% improvement over the baseline YOLOv8.
- Class-Specific Performance: The model was particularly strong at identifying Ground-Glass Opacities (92% accuracy) and Consolidation (90% accuracy), which are traditionally difficult to segment.
- Clinical Viability: Despite the added complexity (53.57M parameters), the model maintains a real-time capable speed of 53 FPS, making it viable for clinical deployment.
- Localization Precision: The [email protected]:0.95 reached 71.8%, significantly higher than the 64.4% of the baseline, indicating much tighter and more accurate bounding box placement.
Conclusion
The integration of Swin Transformer attention and multi-scale feature fusion addresses the primary weaknesses of standard object detectors in medical imaging. By preserving resolution through dilated convolutions and capturing global context through shifted windows, the model effectively suppresses anatomical noise.
While the current dataset is relatively small (341 images), the results demonstrate a powerful proof-of-concept for more sensitive pneumonia screening. Future work will focus on scaling the dataset to improve generalization across different X-ray hardware and further optimizing the architecture to reduce parameter count without sacrificing sensitivity.
Summary updated