nnUNetV2修改笔记-D2

首先完成了原始nnUNetV2和EAB-nnUNetV2的全部五折100e训练。
之后按照官方的指南:

Automatically determine the best configuration
Once the desired configurations were trained (full cross-validation) you can tell nnU-Net to automatically identify
the best combination for you:

1
nnUNetv2_find_best_configuration DATASET_NAME_OR_ID -c CONFIGURATIONS 

CONFIGURATIONS hereby is the list of configurations you would like to explore. Per default, ensembling is enabled
meaning that nnU-Net will generate all possible combinations of ensembles (2 configurations per ensemble). This requires
the .npz files containing the predicted probabilities of the validation set to be present (use nnUNetv2_train with
--npz flag, see above). You can disable ensembling by setting the --disable_ensembling flag.

See nnUNetv2_find_best_configuration -h for more options.

nnUNetv2_find_best_configuration will also automatically determine the postprocessing that should be used.
Postprocessing in nnU-Net only considers the removal of all but the largest component in the prediction (once for
foreground vs background and once for each label/region).

Once completed, the command will print to your console exactly what commands you need to run to make predictions. It
will also create two files in the nnUNet_results/DATASET_NAME folder for you to inspect:

  • inference_instructions.txt again contains the exact commands you need to use for predictions
  • inference_information.json can be inspected to see the performance of all configurations and ensembles, as well
    as the effect of the postprocessing plus some debug information.

运行了nnUNetv2_find_best_configuration DATASET_NAME_OR_ID -c CONFIGURATIONS 。
显示忘了保存,但是好像几种后处理都不大可能带来益处。最后生成了文件

1
2
3
4
5
6
7
8
inference_instructions.txt
***Run inference like this:***

nnUNetv2_predict -d Dataset043_BraTS2019 -i INPUT_FOLDER -o OUTPUT_FOLDER -f 0 1 2 3 4 -tr nnUNetTrainer -c 3d_fullres -p nnUNetPlans

***Once inference is completed, run postprocessing like this:***

nnUNetv2_apply_postprocessing -i OUTPUT_FOLDER -o OUTPUT_FOLDER_PP -pp_pkl_file D:\nnUNetWeb\STUNet\nnUNet_results\Dataset043_BraTS2019\nnUNetTrainer__nnUNetPlans__3d_fullres\crossval_results_folds_0_1_2_3_4\postprocessing.pkl -np 8 -plans_json D:\nnUNetWeb\STUNet\nnUNet_results\Dataset043_BraTS2019\nnUNetTrainer__nnUNetPlans__3d_fullres\crossval_results_folds_0_1_2_3_4\plans.json

然后

1681718993295.jpg
显存就不出意外的炸了,真是可喜可贺,可喜可贺。
cuda.PNG