Abstract
Chronic postoperative atelectasis of lung lobes is an occasional complication following thoracic surgery, particularly middle lobe atelectasis following right upper lobectomy (RULobectomy). Existing methods of grading atelectasis are typically manual, subjective, and not scalable. We aimed to develop and validate an automated, deep learning–based volumetric framework to quantify and grade postoperative atelectasis using pre- and post-operative CT scans. We retrospectively included 236 patients who underwent RULobectomy. We trained two separate nnU-Net v2 segmentation models for preoperative and postoperative lobar anatomy. The pre- and postoperative models achieved high segmentation accuracy (mean Dice scores: 0.98 and 0.99). Median RML volume loss progressively increased with higher atelectasis grades (p < 0.001). This automated pipeline enables reproducible quantification of atelectasis and may serve as a scalable tool for clinical and research applications.
Introduction
Atelectasis—the partial or complete collapse of a lung lobe—is a frequent complication following thoracic surgery, occurring in up to 72% of cases. This condition is particularly prevalent in the right middle lobe (RML) following a right upper lobectomy (RULobectomy). Clinically, atelectasis is significant because it reduces the surface area available for oxygen exchange and increases the risk of postoperative infections.
Currently, clinicians grade atelectasis using a subjective 5-point visual scale on CT scans. This manual process is time-consuming and prone to inter-observer variability. Furthermore, traditional objective metrics, such as Hounsfield Unit (HU) density measurements, often fail at the lung periphery where collapsed tissue becomes indistinguishable from the chest wall or heart. To address these limitations, this study presents an automated, deep-learning-based volumetric framework to provide objective, reproducible measurements of lobar collapse.
Methods
The researchers developed a volumetric framework using nnU-Net v2, a state-of-the-art, self-configuring deep learning framework for medical image segmentation. Because surgery physically rearranges the thoracic cavity, the team employed a dual-model strategy to ensure accuracy across the surgical timeline.
The pipeline involves two distinct models:
- Preoperative Model: Trained on standard lung anatomy to establish a baseline for each patient.
- Postoperative Model: Specifically optimized to handle the anatomical distortions, surgical staples, and shifted lobes characteristic of the post-RULobectomy state.
The study cohort included 236 patients from Stanford University Hospital (2008–2023). To enhance generalizability, the preoperative model was also trained on the OttawaChestCT dataset and validated against the LOLA11 (LObe Segmentation LAbeled) challenge dataset. Following segmentation, the system calculates the volumes of the RML and Right Lower Lobe (RLL), normalizing these values against the total lung volume to account for variations in inspiratory effort during CT acquisition.
Results
The deep-learning models demonstrated exceptional performance, achieving mean Dice scores of 0.98 for preoperative scans and 0.99 for postoperative scans. On the external LOLA11 benchmark, the model achieved a Dice score of 0.923, placing it among the top-performing algorithms globally.
A primary finding of this study is the strong correlation between AI-derived volumetric measurements and clinical atelectasis grades. As the surgeon-assigned grade increased from "none" (Grade 0) to "lobar collapse" (Grade 4), the measured volume loss increased predictably:
- Grade 0 (No atelectasis): Median RML volume change was a negligible -4.6 mL.
- Grade 4 (Total collapse): Median RML volume loss reached -317.8 mL.
This relationship was statistically significant (p < 0.001), validating volume loss as a reliable surrogate for clinical severity. Additionally, the study quantified compensatory hyperinflation. Data showed that as the RML collapsed, the RLL volume increased, suggesting that the remaining lung tissue expands to occupy the space vacated by the collapsed lobe.
Discussion and Conclusion
This study demonstrates the feasibility of using automated deep learning to quantify postoperative atelectasis. By moving beyond subjective visual scales, this pipeline provides a scalable, objective tool for both clinical monitoring and research.
While the model is highly accurate, approximately 6% of postoperative scans required manual refinement due to severe pleural effusions or extreme anatomical shifts. Future research will focus on establishing specific volumetric thresholds to guide clinical interventions and utilizing this tool to evaluate surgical techniques intended to minimize postoperative collapse. By providing a reproducible metric for lung volume, this technology offers a new standard for assessing surgical outcomes in thoracic oncology.
Summary updated