Pericardial effusion refers to the accumulation of fluid in the pericardial cavity due to various causes.Although echocardiography is a common diagnostic tool,its effectiveness can be limited by issues such as image noise,echo variations,and irregular segmentation boundaries,making it challenging to accurately locate effusions.This study proposes an improved U-Net model to explore its application value in the automatic segmentation of pericardial effusion in echocardiographic images.The publicly available Pericardial-Effusion-experimental-data dataset,containing 2541 sets(5082 images),were divided into a 7∶3 ratio,with 1779 sets(3558 images)used for training and 762 sets(1524 images)for testing.Additionally,38 echocardiographic images of pericardial effusion patients from the Affiliated Hospital of Shandong Second Medical University were included as an external test set.The U-Net model was enhanced by incorporating a multi-scale feature extraction module and a Dropout2d mechanism to improve generalization and segmentation accuracy.The LeakyReLU activation function was applied during downsampling to boost the model's nonlinear expression capability,while reflection padding was used in the convolutional layers to refine the boundaries of the effusion region.Performance comparison between the original and improved models,using the open and external test sets,revealed that the improved U-Net model achieved accuracy rates of 96.97%and 98.00%,recall rates of 91.47%and 80.03%,precision rates of 69.84%and 52.20%,and F1 scores of 77.34%and 60.86%,respectively.These results demonstrate that the improved U-Net model exhibits strong generalization ability and offers an effective solution for the automatic segmentation of pericardial effusion echocardiographic images,enhancing diagnostic efficiency while maintaining high accuracy.
EchocardiographyPericardial effusionMedical image segmentationU-Net model