Skip to content

Commit

Permalink
for release r20240628
Browse files Browse the repository at this point in the history
  • Loading branch information
yw7 committed Jun 28, 2024
1 parent f02d053 commit 8d05598
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/inference_nnunet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export nnUNet_preprocessed="$TOTALSPINESEG_DATA"/nnUNet/preprocessed
export nnUNet_results="$TOTALSPINESEG_DATA"/nnUNet/results
export nnUNet_exports="$TOTALSPINESEG_DATA"/nnUNet/exports

nnUNetTrainer=nnUNetTrainer_16000epochs
nnUNetTrainer=nnUNetTrainer_8000epochs
nnUNetPlans=nnUNetPlans
configuration=3d_fullres

Expand All @@ -72,7 +72,7 @@ echo ""
# ensure the custom nnUNetTrainer is defined in the nnUNet library and add it if it is not
source "$TOTALSPINESEG"/scripts/add_nnunet_trainer.sh

FOLD=0
FOLD=all
step1_dataset=101
step2_dataset=102

Expand Down Expand Up @@ -111,7 +111,7 @@ done
nnUNetv2_predict -d $step2_dataset -i "${OUTPUT_FOLDER}"/step2_input -o "${OUTPUT_FOLDER}"/step2 -f $FOLD -c $configuration -p $nnUNetPlans -tr $nnUNetTrainer -npp $JOBS -nps $JOBS

# Use an iterative algorithm to to assign an individual label value to each vertebrae and IVD in the final segmentation mask.
totalspineseg_generate_labels_sequential -s "${OUTPUT_FOLDER}"/step2 -o "${OUTPUT_FOLDER}"/output --sacrum-labels 14 --csf-labels 16 --sc-labels 17 --disc-labels 2 3 4 5 6 7 --vertebrea-labels 9 10 11 12 13 14 --init-disc 4:224 7:202 5:219 6:207 --init-vertebrae 11:40 14:17 12:34 13:23 --step-diff-label --step-diff-disc
totalspineseg_generate_labels_sequential -s "${OUTPUT_FOLDER}"/step2 -o "${OUTPUT_FOLDER}"/output --sacrum-labels 14 --csf-labels 16 --sc-labels 17 --disc-labels 2 3 4 5 6 7 --vertebrea-labels 9 10 11 12 13 14 --init-disc 4:224 7:202 5:219 6:207 --init-vertebrae 11:41 14:17 12:34 13:23 --step-diff-label --step-diff-disc

# Fix csf label to include all non cord spinal canal, this will put the spinal canal label in all the voxels (labeled as a backgroupn) between the spinal canal and the spinal cord.
totalspineseg_fix_csf_label -s "${OUTPUT_FOLDER}"/output -o "${OUTPUT_FOLDER}"/output --largest-cord --largest-canal
Expand Down

0 comments on commit 8d05598

Please sign in to comment.