DOI: 10.57760/sciencedb.28688
title: Development and Validation of a 3D Deep Learning Framework for Integrated Thyroid Gland and Papillary Thyroid Carcinoma Segmentation and Detection on Non-Contrast CT: A Multicenter Study
title: 基于非对比增强CT的甲状腺及乳头状癌联合分割与检测深度学习模型的开发与验证：一项多中心研究

description: Objective: To develop and validate a 3D deep learning framework based on nnU-Net for integrated segmentation and detection of the thyroid gland and papillary thyroid carcinoma (PTC) lesions on non-contrast-enhanced computed tomography (NCCT). Additionally, to establish an edge-deployable inference platform enabling direct Windows-based operation to improve preoperative diagnostic accuracy and clinical utility for PTC.Methods: A retrospective multicenter study was conducted using three cohorts: (1) A training set comprising 200 PTC patients with preoperative NCCT at Center A (June 2021–May 2024), confirmed pathologically; (2) A temporal validation set of 61 patients from Center A (June–July 2024); and (3) An external validation set of 45 patients from Center B (October 2022–October 2025). The nnU-Net framework (Python-based) trained both 3D full-resolution and 2D models, with robustness assessed via 5-fold cross-validation. Segmentation performance was evaluated using Dice similarity coefficient (DSC), recall (REC), and 95% Hausdorff distance (HD95). Volume consistency was quantified using intraclass correlation coefficient (ICC) and Pearson correlation. Diagnostic utility was assessed by comparing pre- and post-model-assisted performance across radiologist experience levels and against ultrasound T-staging. The optimal model was deployed as a GPU-accelerated Windows application (PyInstaller) requiring no Python environment setup.Results: The training, temporal validation, and external validation cohorts had median ages of 48, 44, and 47 years (female proportions: 75%, 80%, 76%, respectively). For whole thyroid segmentation, 3D and 2D models showed comparable performance (DSC: 0.912, 0.914, 0.982 vs. 0.927, 0.916, 0.899; HD95: 1.00, 1.00, 1.00 mm vs. 1.00, 1.00, 1.14 mm; P &gt; 0.05). However, the 3D model significantly outperformed the 2D model in PTC lesion segmentation (DSC: 0.860, 0.768, 0.716 vs. 0.938, 0.559, 0.436; P &lt; 0.001; HD95: 1.00, 1.73, 2.24 mm vs. 1.00, 4.00, 5.05 mm; P &lt; 0.001). Model assistance significantly improved diagnostic accuracy for junior radiologists (AUC: 0.812 → 0.945, P &lt; 0.001; 0.748 → 0.875, P &lt; 0.001), with marginal improvement for senior radiologists (AUC: 0.835 → 0.883, P = 0.015; 0.858 → 0.883, P = 0.287). The inference platform operates natively on Windows terminals, with source code and model weights publicly accessible (https://doi.org/10.57760/sciencedb.28688).Conclusion: This study successfully developed a high-precision 3D deep learning framework for integrated thyroid and PTC lesion analysis on NCCT. The edge-deployable inference platform delivers a clinically viable solution for preoperative PTC detection, with potential for widespread implementation in routine practice.Model training and source code: Brief code for training a CT-based deep learning segmentation model of thyroid and Papillary thyroid carcinoma using the nnU-Net framework. For more information on running inference with nnU-Net, click here: (https://github.com/MIC-DKFZ/nnUNet)。#0: activate virtual environmentconda create -n nnUNet python=3.10 -yconda activate nnUNetpip install nnunetv2pip install medpy#1: set environment variablesset nnUNet_raw_data_base="path\to\nnUNet_raw_data_base"set nnUNet_preprocessed="path\to\nnUNet_preprocessed"set RESULTS_FOLDER="path\to\nnUNet_trained_models"#2: Task11 (CT), Divide the data set"path\\Scripts\\nnUNetv2_convert_MSD_dataset.exe" -i "D:\nnunet\nnUNet\nnUNet_raw\Task11_example"#3: Preprocessing"path\\Scripts\\nnUNetv2_plan_and_preprocess.exe" -d 11 --verify_dataset_integrity#4: Training 2D models with 5 fold cross-validation"path\\Scripts\\nnUNetv2_train.exe" 11 2d all -tr nnUNetTrainer -device cudafor %%i in (0,1,2,3,4) do (echo Training fold %%icall "path\Scripts\nnUNetv2_train.exe" 11 2d %%i -tr nnUNetTrainer -device cuda)#5: Training 3D fullres models with 5 fold cross-validation"path\\Scripts\\nnUNetv2_train.exe" 11 3d_fullres all -tr nnUNetTrainer -device cudafor %%i in (0,1,2,3,4) do (echo Training fold %%icall "path\Scripts\nnUNetv2_train.exe" 11 3d_fullres %%i -tr nnUNetTrainer -device cuda)#6: Test set reasoning 2D and 3D fullres"path\\Scripts\\nnUNetv2_predict.exe" -i D:\nnunet\nnUNet\nnUNet_raw\Dataset011_example\imagesTs -o output -d 11 -c 3d_fullres -f all"path\\Scripts\\nnUNetv2_predict.exe" -i D:\nnunet\nnUNet\nnUNet_raw\Dataset011_example\imagesTs -o output -d 11 -c 2d -f all#7: Compute the test set DSC"path\\Scripts\\nnUNetv2_evaluate_folder.exe" -djfile output\dataset.json -pfile output\plans.json D:\nnunet\nnUNet\nnUNet_raw\Task11_example\labelsTs output#8: Computing Test Set HD95"path\\python.exe" calculate_hd95_multilabel.py --pred_folder output --gt_folder D:\nnunet\nnUNet\nnUNet_raw\Task11_example\labelsTs --labels 1,2 --output hd95_multilabel_results.json
description: Objective: To develop and validate a 3D deep learning framework based on nnU-Net for integrated segmentation and detection of the thyroid gland and papillary thyroid carcinoma (PTC) lesions on non-contrast-enhanced computed tomography (NCCT). Additionally, to establish an edge-deployable inference platform enabling direct Windows-based operation to improve preoperative diagnostic accuracy and clinical utility for PTC.Methods: A retrospective multicenter study was conducted using three cohorts: (1) A training set comprising 200 PTC patients with preoperative NCCT at Center A (June 2021–May 2024), confirmed pathologically; (2) A temporal validation set of 61 patients from Center A (June–July 2024); and (3) An external validation set of 45 patients from Center B (October 2022–October 2025). The nnU-Net framework (Python-based) trained both 3D full-resolution and 2D models, with robustness assessed via 5-fold cross-validation. Segmentation performance was evaluated using Dice similarity coefficient (DSC), recall (REC), and 95% Hausdorff distance (HD95). Volume consistency was quantified using intraclass correlation coefficient (ICC) and Pearson correlation. Diagnostic utility was assessed by comparing pre- and post-model-assisted performance across radiologist experience levels and against ultrasound T-staging. The optimal model was deployed as a GPU-accelerated Windows application (PyInstaller) requiring no Python environment setup.Results: The training, temporal validation, and external validation cohorts had median ages of 48, 44, and 47 years (female proportions: 75%, 80%, 76%, respectively). For whole thyroid segmentation, 3D and 2D models showed comparable performance (DSC: 0.912, 0.914, 0.982 vs. 0.927, 0.916, 0.899; HD95: 1.00, 1.00, 1.00 mm vs. 1.00, 1.00, 1.14 mm; P &gt; 0.05). However, the 3D model significantly outperformed the 2D model in PTC lesion segmentation (DSC: 0.860, 0.768, 0.716 vs. 0.938, 0.559, 0.436; P &lt; 0.001; HD95: 1.00, 1.73, 2.24 mm vs. 1.00, 4.00, 5.05 mm; P &lt; 0.001). Model assistance significantly improved diagnostic accuracy for junior radiologists (AUC: 0.812 → 0.945, P &lt; 0.001; 0.748 → 0.875, P &lt; 0.001), with marginal improvement for senior radiologists (AUC: 0.835 → 0.883, P = 0.015; 0.858 → 0.883, P = 0.287). The inference platform operates natively on Windows terminals, with source code and model weights publicly accessible (https://doi.org/10.57760/sciencedb.28688).Conclusion: This study successfully developed a high-precision 3D deep learning framework for integrated thyroid and PTC lesion analysis on NCCT. The edge-deployable inference platform delivers a clinically viable solution for preoperative PTC detection, with potential for widespread implementation in routine practice.Model training and source code: Brief code for training a CT-based deep learning segmentation model of thyroid and Papillary thyroid carcinoma using the nnU-Net framework. For more information on running inference with nnU-Net, click here: (https://github.com/MIC-DKFZ/nnUNet)。#0: activate virtual environmentconda create -n nnUNet python=3.10 -yconda activate nnUNetpip install nnunetv2pip install medpy#1: set environment variablesset nnUNet_raw_data_base="path\to\nnUNet_raw_data_base"set nnUNet_preprocessed="path\to\nnUNet_preprocessed"set RESULTS_FOLDER="path\to\nnUNet_trained_models"#2: Task11 (CT), Divide the data set"path\\Scripts\\nnUNetv2_convert_MSD_dataset.exe" -i "D:\nnunet\nnUNet\nnUNet_raw\Task11_example"#3: Preprocessing"path\\Scripts\\nnUNetv2_plan_and_preprocess.exe" -d 11 --verify_dataset_integrity#4: Training 2D models with 5 fold cross-validation"path\\Scripts\\nnUNetv2_train.exe" 11 2d all -tr nnUNetTrainer -device cudafor %%i in (0,1,2,3,4) do (echo Training fold %%icall "path\Scripts\nnUNetv2_train.exe" 11 2d %%i -tr nnUNetTrainer -device cuda)#5: Training 3D fullres models with 5 fold cross-validation"path\\Scripts\\nnUNetv2_train.exe" 11 3d_fullres all -tr nnUNetTrainer -device cudafor %%i in (0,1,2,3,4) do (echo Training fold %%icall "path\Scripts\nnUNetv2_train.exe" 11 3d_fullres %%i -tr nnUNetTrainer -device cuda)#6: Test set reasoning 2D and 3D fullres"path\\Scripts\\nnUNetv2_predict.exe" -i D:\nnunet\nnUNet\nnUNet_raw\Dataset011_example\imagesTs -o output -d 11 -c 3d_fullres -f all"path\\Scripts\\nnUNetv2_predict.exe" -i D:\nnunet\nnUNet\nnUNet_raw\Dataset011_example\imagesTs -o output -d 11 -c 2d -f all#7: Compute the test set DSC"path\\Scripts\\nnUNetv2_evaluate_folder.exe" -djfile output\dataset.json -pfile output\plans.json D:\nnunet\nnUNet\nnUNet_raw\Task11_example\labelsTs output#8: Computing Test Set HD95"path\\python.exe" calculate_hd95_multilabel.py --pred_folder output --gt_folder D:\nnunet\nnUNet\nnUNet_raw\Task11_example\labelsTs --labels 1,2 --output hd95_multilabel_results.json