MIC-DKFZ / nnUNet

Apache License 2.0
5.71k stars 1.73k forks source link

How to change the source code to execute 3d_lowres and 3d_cascade_fullres network #341

Closed tea321000 closed 4 years ago

tea321000 commented 4 years ago

I want to test the performance of the Brats dataset on 3d_lowres and 3d_cascade_fullres network, and when I execute these commands directly, I will be prompted that they do not need to be used. I changed self.how_much_of_a_patient_must_the_network_see_at_stage0 = 4 to self.how_much_of_a_patient_must_the_network_see_at_stage0 = 1 in experiment_planner_baseline_3DUNet.py, but still failed to pass. How could I execute 3d_lowres and 3d_cascade_fullres?

FabianIsensee commented 4 years ago

Hi, it makes no sense to run the cascade on BraTS. This will not improve results. If you really want to run the cascade you probably also need to chanke these lines

            if 2 * np.prod(new['median_patient_size_in_voxels'], dtype=np.int64) < np.prod(
                    self.plans_per_stage[0]['median_patient_size_in_voxels'], dtype=np.int64):

in ExperimentPlanner. Best, Fabian

FabianIsensee commented 4 years ago

Probably

            if True:

will do

tea321000 commented 4 years ago

Thanks for your suggestion, I just want to test the performance of the network using the available dataset, although that may not be helpful. I've finished training the 3d_lowres network, but when I run nnUNet_train 3d_cascade_fullres nnUNetTrainerV2CascadeFullRes TaskXXX all, it prompts AssertionError: seg from prev stage missing: /home/user062/nnunet/dataset/nnUNet_trained_models/nnUNet/3d_lowres/Task100_BraTS2020/nnUNetTrainerV2__nnUNetPlansv2.1/pred_next_stage/BraTS20_Training_001_segFromPrevStage.npz.

Do you know how to fix it? Do I have to run

nnUNet_train 3d_lowres nnUNetTrainerV2 TaskXXX 0
nnUNet_train 3d_lowres nnUNetTrainerV2 TaskXXX 1
nnUNet_train 3d_lowres nnUNetTrainerV2 TaskXXX 2
nnUNet_train 3d_lowres nnUNetTrainerV2 TaskXXX 3
nnUNet_train 3d_lowres nnUNetTrainerV2 TaskXXX 4

separately instead of nnUNet_train 3d_lowres nnUNetTrainerV2 TaskXXX all?

FabianIsensee commented 4 years ago

Yes you need to run the 5 folds separately. Best, Fabian

tea321000 commented 4 years ago

Okay, thanks for your reply!