HEGFT-UNet: a hybrid transformer–CNN UNet architecture for thyroid ultrasound image segmentation
摘要
Accurate thyroid nodule segmentation in ultrasound (US) images is critical for computer-aided diagnosis. However, it remains challenging due to speckle noise, low contrast, and the presence of surrounding anatomical structures, which often obscure small lesions and lead to poorly defined boundaries. To address these limitations, a hybrid UNet-based framework is proposed that integrates transformer-based global modeling with convolutional local feature extraction. The architecture employs a dual-encoder structure, combining a Convolutional Neural Network (CNN) branch with a Swin Transformer (ST) branch to simultaneously capture fine-grained textures and long-range spatial dependencies. A multi-stage fusion strategy is introduced, utilizing specialized Multi-Feature Fusion Blocks (MFFBs) and an Edge-Focused Feature Block (EFFB) to enhance boundary preservation in deep semantic layers. Furthermore, the decoder incorporates a Multi-Frequency Channel Spatial Attention (MFCSA) module that leverages Discrete Cosine Transform (DCT) frequency cues to emphasize diagnostically relevant structures while suppressing ultrasound-specific noise. The model was trained on the TN3K dataset and validated on an independent clinical dataset. Experimental results demonstrate that the proposed approach outperforms state-of-the-art methods, achieving the highest Dice and IoU scores on the TN3K and IPPT datasets, respectively. In addition, the model yields the lowest HD95 values, indicating improved boundary localization accuracy. These findings demonstrate that the integration of global contextual modeling, boundary-aware feature fusion, and frequency-guided attention provides a robust and effective solution for thyroid nodule segmentation with strong potential for clinical application. The source code is available at HEGFT-UNet.