# Automated Pneumothorax Segmentation with a Spatial Prior Contrast Adapter
## 1 Introduction  
Pneumothorax is a medical condition in which air or gas accumulates in the pleural cavity, leading to partial or complete lung collapse. It can occur spontaneously due to underlying lung diseases, such as chronic obstructive pulmonary disease, or as a resultof trauma [1]. Based on the mechanism by which air enters the pleural cavity, pneumothorax is classified into the following three categories: open pneumothorax, which results from a direct communication between the pleural cavity and the external environment; closed pneumothorax, in which air accumulates without an external wound, often due to internal lung pathology; and tension pneumothorax, a medical emergency where air enters the pleural space but cannot escape, causing increased intrathoracic pressure, lung collapse, mediastinal shift, and compromised cardiovascular function [2]. The mortality rate of untreated tension pneumothorax can reach as high as 91% [3], underscoring the urgency of prompt medical intervention. Additionally, pneumothorax has a high recurrence rate; primary spontaneous pneumothorax recurs in approximately 30% of cases [4], while secondary spontaneous pneumothorax, which occurs in patients with pre-existing lung disease, exhibits an even higher recurrence risk. These figures highlight the necessity of appropriate treatment and preventive measures, such as pleuroresis or surgical management, especially in recurrent cases. Therefore, early and accurate segmentation and diagnosis of pneumothorax are essential, necessitating the involvement of trained medical professionals. For clinical diagnosis and treatment planning, medical imaging is an essential technology that enables the visualization of internal anatomical structures. It includes various modalities such as X-ray, computed tomography (CT), magnetic resonance imaging (MRI), ultrasound, and nuclear medicine, each offering unique benefits depending on the clinical application. Among these, X-ray imaging is particularly favored by respiratory physicians for the detection and management of pneumothorax due to its ability to provide detailed images of bones and thoracic structures, in addition to its low cost and widespread availability in most healthcare facilities [5]. However, a significant challenge in X-ray-based diagnosis is the global shortage of trained radiologists. In clinical workflows, image annotations made by less experienced personnel often require verification by more experienced annotators or radiologists, particularly in ambiguous cases, further increasing the workload of specialists. To address this issue and alleviate the burden on radiologists, computer-aided diagnosis (CAD) systems have been developed. Artificial intelligence (AI) and medical image-processing techniques enable advanced CAD approaches and have been widely adopted across multiple disciplines, including radiology, oncology, and neurology. In the context of pneumothorax, CAD systems powered by deep learning algorithms can automatically detect pneumothorax regions in chest X-rays, thereby supporting clinicians in making more accurate and timely diagnostic decisions. Convolutional neural networks (CNNs), such as U-Net [6] and its optimized variants, have been widely employed for medical image segmentation tasks. Among these, nnUNet [7] stands out as a self-configuring deep learning framework that eliminates the need for manual network design and hyperparameter tuning. Designed as a robust and adaptive solution, nnUNet automatically configures its architecture, preprocessing, training, and postprocessing pipelines based on the properties of a given dataset. This makes it highly versatile across a range of medical imaging modalities, including CT, X-ray, and ultrasound. It achieves state-of-the-art performance by leveraging a U-Net-like architecture while dynamically optimizing its components to suit different tasks. Inspired by its self-configuring nature, nnUNet has the potential to be adapted for automated pneumothorax diagnosis after appropriate task-specific optimization.