MIC-DKFZ / batchgenerators

A framework for data augmentation for 2D and 3D image classification and segmentation
Apache License 2.0
1.09k stars 221 forks source link

When inference phase, how can we ensure that we have adequate brain sampling (i.e. The obtained patches can fully cover the whole brain area) #71

Closed 675492062 closed 3 years ago

675492062 commented 3 years ago

When inference phase, how can we ensure that we have adequate brain sampling (i.e. The obtained patches can fully cover the whole brain area)? 1)BraTS2017DataLoader3D and crop method may not have this function. Is there any demo for users? 2)In BraTS2017DataLoader3D, "get_split_deterministic" can get a random training && validation set split, but only the one fold of them, which is no use usually. Mostly, we gain the whole training && validation pairs split, and do validation after training on the corresponding training split. Finally ,we should finish training on all split.

FabianIsensee commented 3 years ago

Hi, batchgenerators is only intended for training. At test time you need to implement that yourself. Each method will have its own requirements so it will be hard to provide something that works for all applications. If you want to have some inspiration you could have a look at the nnU-Net inference code: https://github.com/MIC-DKFZ/nnUNet/blob/b4f69956ba4c50d44316650b77a75751c426a647/nnunet/network_architecture/neural_network.py#L287

Best, Fabian

675492062 commented 3 years ago

Thanks for your reply! I see!