DOI: 10.57760/sciencedb.27733
title: nnU-Net segmentation of esophagus with esophageal cancer weights and end-side lightweight inference software based on dual-layer detector non-contrast CT
title: 基于双层探测器非增强CT的nnU-Net食管及食管癌分割模型与终端轻量化推理软件的开发

description: Objective: To develop an nnU-Net model using virtual non-contrast (VNC) CT for automated segmentation of the esophagus and esophageal squamous cell carcinoma (ESCC) on true non-contrast (TNC) CT, facilitating clinical translation through multi-center validation and lightweight software deployment.Methods: We retrospectively enrolled 100 pathologically confirmed ESCC patients and 100 controls from Center A, all scanned with dual-layer detector CT. VNC and iodine maps from enhanced CT were fused for manual segmentation. 3D full-resolution and 2D nnU-Net models were trained on VNC images and evaluated on TNC images. External validation included 80 internal (40 ESCC) and 90 external (45 ESCC) cases from different scanners and centers. Performance was assessed using Dice Similarity Coefficient (DSC), 95% Hausdorff Distance (HD95) and radiologists' diagnostic AUC with versus without model assistance. The optimal model was packaged into standalone software using PyInstaller.Results: Patient demographics were balanced across validation set, test set 1, and test set 2 (median ages: 69/70/70 years; female: 36.0%/33.8%/23.0%). The 3D model was statistically superior (P &lt; 0.001) to the 2D model in segmenting the esophagus (DSC: 0.904/0.898/0.903 vs. 0.866/0.870/0.850; HD95: 1.78/5.72/2.14 mm vs. 3.75/6.07/4.74 mm) and ESCC (DSC: 0.937/0.964/0.959 vs. 0.843/0.842/0.819; HD95: 6.82/8.31/6.71 mm vs. 13.37/18.93/15.37 mm). Model assistance improved junior radiologists' AUC (0.760/0.887/0.922 to 0.910/0.925/0.978; Delong test P=0.001/0.180/0.023) and senior radiologists' AUC (0.810/0.875/0.956 to 0.905/0.950/1.000; P=0.001/0.029/0.042). The software runs without Python and is open-sourced.Conclusion: The VNC-trained nnU-Net model effectively segments esophagus and ESCC lesions. Combined with lightweight software, it demonstrates substantial clinical potential.Train and validate source code：Brief code for training a CT-based deep learning segmentation model of esophagus and esophageal squamous cell 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 an nnU-Net model using virtual non-contrast (VNC) CT for automated segmentation of the esophagus and esophageal squamous cell carcinoma (ESCC) on true non-contrast (TNC) CT, facilitating clinical translation through multi-center validation and lightweight software deployment.Methods: We retrospectively enrolled 100 pathologically confirmed ESCC patients and 100 controls from Center A, all scanned with dual-layer detector CT. VNC and iodine maps from enhanced CT were fused for manual segmentation. 3D full-resolution and 2D nnU-Net models were trained on VNC images and evaluated on TNC images. External validation included 80 internal (40 ESCC) and 90 external (45 ESCC) cases from different scanners and centers. Performance was assessed using Dice Similarity Coefficient (DSC), 95% Hausdorff Distance (HD95) and radiologists' diagnostic AUC with versus without model assistance. The optimal model was packaged into standalone software using PyInstaller.Results: Patient demographics were balanced across validation set, test set 1, and test set 2 (median ages: 69/70/70 years; female: 36.0%/33.8%/23.0%). The 3D model was statistically superior (P &lt; 0.001) to the 2D model in segmenting the esophagus (DSC: 0.904/0.898/0.903 vs. 0.866/0.870/0.850; HD95: 1.78/5.72/2.14 mm vs. 3.75/6.07/4.74 mm) and ESCC (DSC: 0.937/0.964/0.959 vs. 0.843/0.842/0.819; HD95: 6.82/8.31/6.71 mm vs. 13.37/18.93/15.37 mm). Model assistance improved junior radiologists' AUC (0.760/0.887/0.922 to 0.910/0.925/0.978; Delong test P=0.001/0.180/0.023) and senior radiologists' AUC (0.810/0.875/0.956 to 0.905/0.950/1.000; P=0.001/0.029/0.042). The software runs without Python and is open-sourced.Conclusion: The VNC-trained nnU-Net model effectively segments esophagus and ESCC lesions. Combined with lightweight software, it demonstrates substantial clinical potential.Train and validate source code：Brief code for training a CT-based deep learning segmentation model of esophagus and esophageal squamous cell 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