Thyroid Nodule Segmentation and Classification ofUltrasound Images Using Deep Learning

Abstract

Thyroid nodules are a common clinical condition, and ultrasound imaging
is widely used as the primary diagnostic modality due to its safety, accessibility,
and cost-effectiveness. Accurate computer-aided diagnosis (CAD) of thyroid
nodules in ultrasound (US) images remains difficult due to speckle noise, low
contrast, and high variability across patients and devices. This study proposes an
end-to-end pipeline that integrates robust segmentation with reliable
classification. Nodule boundaries are extracted using an enhanced DeepLabV3+
network with a ResNet-50 encoder, atrous spatial pyramid pooling, and spatial
attention. For classification, deep encoder features are fused with GLCM texture
descriptors, reduced via principal component analysis, and classified using a
regularized multi-layer perceptron (MLP). The system was trained on the public
TDID dataset and evaluated on both public TDID, TN3K, and an independent
Nanakali hospital dataset. On TDID, segmentation achieved 96.6% accuracy and
a Dice score of 82.32%, while classification reached 92.31% accuracy with 100%
malignant recall. Despite domain shift, segmentation accuracy remained 95.83%
on TN3K and 95.69% on the Nanakali clinical set, while classification accuracy on
the Nanakali cohort was 78.9%. Overall, these results demonstrate that
combining deep contextual and texture-based features effectively addresses key
challenges in thyroid nodule CAD and highlights the potential of the proposed
framework as a clinically relevant decision-support tool for thyroid cancer
screening and triage.