Abstract
Pleural effusion, the abnormal accumulation of fluid around the lungs, is a critical clinical indicator for diseases such as tuberculosis (TB), particularly in resource-limited settings. While ultrasound is an accessible diagnostic tool, its utility is often limited by the requirement for expert interpretation and high inter-observer variability. This paper presents the first deep learning-based approach for the automated segmentation of pleural effusion in ultrasound images. By integrating Coordinate Convolutions (CoordConv) into the state-of-the-art nnU-Net framework, the proposed method achieves segmentation performance that exceeds the consistency of human experts, offering a path toward objective, automated TB screening.
Introduction
In low-to-middle-income countries (LMICs), tuberculosis remains a leading cause of mortality. Pleural effusion is a frequent manifestation of the disease, making its detection and measurement vital for diagnosis and treatment monitoring. Ultrasound is the preferred imaging modality in these regions due to its portability and low cost. However, the "human bottleneck"—the scarcity of trained sonographers and the inherent subjectivity in manual fluid depth measurements—limits its effectiveness.
To address this, we explore the automation of pleural effusion segmentation. Automated tools can provide robust, reproducible measurements, reducing the reliance on highly specialized personnel and standardizing clinical assessments across different practitioners.
Methodology
The nnU-Net Framework
The foundation of our approach is the nnU-Net, a self-configuring framework for medical image segmentation. nnU-Net is designed to automatically handle preprocessing, architecture selection, and hyperparameter tuning, making it a robust baseline for diverse medical imaging tasks.
Coordinate Convolutions (CoordConv)
Standard Convolutional Neural Networks (CNNs) are characterized by translation invariance, meaning they recognize features regardless of their spatial location. However, in medical ultrasound, the relative position of a pixel—specifically its depth from the probe—is highly informative. To provide the model with this spatial context, we implemented Coordinate Convolutions. This technique appends extra channels to the input data representing the normalized $x$ and $y$ coordinates of each pixel. This allows the network to learn spatial dependencies that are otherwise lost in standard convolutions.
Training and Optimization
The models were trained using a combined loss function of Cross Entropy and Dice loss. To ensure generalization to the varied conditions of clinical ultrasound, we applied extensive data augmentation, including rotations, scaling, and additive noise.
Experimental Setup
Dataset Characteristics
The study utilized 143 ultrasound images obtained from 59 patients at Gondar University Hospital in Ethiopia. The dataset was categorized by the type of probe used, as probe geometry significantly affects image structure:
- Dataset A (Linear Array): 51 images. These produce rectangular fields of view and are typically used for superficial structures.
- Dataset B (Curved Array): 92 images. These produce convex, "pie-slice" shaped images for deeper thoracic imaging.
Evaluation Metrics
Ground truth was established through manual segmentation by a trained observer. To benchmark the model against human performance, a second observer independently segmented a subset of the data to calculate inter-observer variability. Performance was primarily measured using the Dice Similarity Coefficient (DSC).
Results and Discussion
Performance Gains with CoordConv
The inclusion of Coordinate Convolutions yielded significant improvements for the linear array images (Dataset A). The baseline nnU-Net achieved a median DSC of 0.82, which rose to 0.85 with the addition of CoordConv. This improvement was accompanied by a dramatic reduction in clinical measurement error; the absolute area error dropped from 20.0% to 11.2%.
Interestingly, CoordConv did not provide the same benefit for the curved array (Dataset B), where the model achieved a median DSC of 0.74. This suggests that Cartesian coordinates ($x, y$) may not align well with the non-rectangular geometry of curved probes, indicating a need for polar coordinate maps in future iterations.
AI vs. Human Consistency
A key finding of this study is that the AI models demonstrated higher consistency with the primary annotator (DSC 0.82–0.85) than the second human expert did (DSC 0.71–0.78). While this does not imply the AI is inherently more accurate than a clinician, it demonstrates the model's ability to learn and replicate a specific segmentation style with a level of precision and repeatability that exceeds human observers.
Conclusion and Future Work
This research demonstrates the feasibility of automated pleural effusion segmentation using deep learning. By providing spatial context through Coordinate Convolutions, we achieved expert-level consistency on linear probe images.
Future work will focus on three areas:
- Healthy Controls: Incorporating data from healthy individuals to ensure the model does not produce false positives.
- AI-Assisted Acquisition: Developing tools to guide non-expert users in capturing high-quality diagnostic images.
- Geometric Refinement: Exploring geodesic distance maps or polar coordinates to improve performance on curved array transducers.
Ultimately, these advancements represent a significant step toward deploying automated diagnostic tools in the regions that need them most.
Summary updated