Closed liujiyaoFDU closed 2 years ago
Hi @Jy-stdio, thanks for checking out our repo!
I believe the issue is with this line:
https://github.com/rixez/Brats21_KAIST_MRI_Lab/blob/6dfd1a4cb66be5ec94b9b7c102b0e5e89d8ec657/nnunet/training/network_training/competitions_with_custom_Trainers/BraTS2020/nnUNetTrainerV2BraTSRegions_moreDA.py#L377
Please change the volume_shape
parameter to be the size of the volume in your dataset. Then, the axial attention embedding should be calculated correctly.
Thanks!! I'll try it soon
I've try change the volume_shape
to the patch size of my dataset -volume_shape=(16, 320, 320)
(this is right), but this error still occur and not the same as before:
RuntimeError: The size of tensor a (4) must match the size of tensor b (0) at non-singleton dimension 2
It's so confused.. Do u have some ideas?
Judging from the error message, it seems like the volume_shape
should be (128,320,320)
for your data.
I changed to (128,320,320)
...but still got the error
RuntimeError: The size of tensor a (16) must match the size of tensor b (32) at non-singleton dimension 2
Seem like the network's configuration is different from the one that I used.
You might need to modify this line:
https://github.com/rixez/Brats21_KAIST_MRI_Lab/blob/6dfd1a4cb66be5ec94b9b7c102b0e5e89d8ec657/nnunet/network_architecture/generic_UNet.py#L380
The original embedding shape was calculated by dividing the original volume shape by 2^(level) of downsampling, ignoring the level specified by the no_attention
parameter. You can try checking the shape of the feature maps and manually specify it.
ok, I'll try it. Thanks a lot!!
Same promblem, and cannot solved by above methods.
hello ,how do I use the "BL +AA" training strategy? It‘s nnUNet_train 3d_fullres nnUNetTrainerV2BraTSRegions_DA4_BN_BD_normalUnet_axialattention 501 1 ?But meet the error raise RuntimeError("Could not find trainer class in nnunet.training.network_training") RuntimeError: Could not find trainer class in nnunet.training.network_training?Can you help me work it?thanks
Hi @shifuxiao, Can you post more of the error message? I haven't encountered this with my codes. Judging from this error, it seems like the script cannot find the definition for the trainer. Please check if you have the corresponding function: https://github.com/rixez/Brats21_KAIST_MRI_Lab/blob/6dfd1a4cb66be5ec94b9b7c102b0e5e89d8ec657/nnunet/training/network_training/competitions_with_custom_Trainers/BraTS2020/nnUNetTrainerV2BraTSRegions_moreDA.py#L354 If you do have the function, I think there might be some problem with searching for the definition of the trainer. You can check the code for that here: https://github.com/rixez/Brats21_KAIST_MRI_Lab/blob/6dfd1a4cb66be5ec94b9b7c102b0e5e89d8ec657/nnunet/run/default_configuration.py#L34 Hope this helps!!
hello, can you help mi?I use my dataset train model,but the resulting Dice plot is as follows.The dice keep it 0.0.you know why it there. thanks
It would be difficult to figure out the source of the problem without knowing the characteristic of your dataset. Judging from the negative dice score, I think it might have to do with the preprocessing of the dataset. If your dataset does not follow the BraTS dataset convention, maybe you can try training with the default nnUNet trainer and model (instruction at the original repo).
hello , I used "BL " traing my dataset ,But the Dice curve fluctuates too much.Can you help mi work on it.
The evaluation metric is calculated based on random samples from the validation dataset so it can fluctuate a lot during training. It seems the metric is trending upward so I think it's working well. You can check the validation result at the end of the training for a more accurate evaluation.
Hello, your work is so great!! When using
nnUNetTrainerV2BraTSRegions_DA4_BN_BD_normalUnet_axialattention
to train on my dataset, I met the problem :I check the part of
axial_attention.py
, and check the x and getattr(self, f'param_{i}') size,print size:
but I don.t know why this problem happend, could you please help me ? Thx