muellerdo / kits19.MIScnn

Kidney Tumor Segmentation Challenge 2019: MIScnn - 3D Residual U-Net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

patch_size and batch_size

JiangYuhan1996 opened this issue · comments

I find that some cases size is smaller than the path_size(for example, case_00021's size is 38512512), The first size < 48(patch_size 's first size) , so when i concat, It tells that the Shape[0] VS shape[1] is not match. and i also find that our GPU can only run bach_size = 2, could you please tell me can I use the group-norm to solve it? thanks a lot.

Hey JiangYuhan1996,

this code was run on the interpolated images of KiTS19 in which all CT scans have at least 48 slices (first axis of the image). You could reduce the number of slices of your patch in order to make it work...

BUT: I strongly recommend you to check out the official repository for MIScnn: https://github.com/frankkramer-lab/MIScnn
The kits19.MIScnn repository, here, is frozen to an old MIScnn version due to reproducibility reasons. Therefore, it is outdated. Whereas the newest MIScnn version in the official repository is way easier to use and performs better. Check out the Jupyter Notebook for the KiTS19 data set to find out how to use the newest version of MIScnn.

Additionally, this code runs a patchwise-grid approach. I would recommend to check out the patchwise-crop approach of the newest MIScnn version for batch creating during runtime (default setting in the newest version). It will drastically reduce the risk of overfitting and with extensive data augmentation result into stronger performance. ;)

Also one advice for smaller GPUs: On the newest MIScnn version, you are able to reduce the number of filters (n_filters) of an architecture. This allows you to simplify the model in order to reduce the required GPU memory size. Soon, I'm going to add a minimal UNet architecture to MIScnn for smaller GPUs.

Best,
Dominik

Thank you very much for your answers. You are very patient. I will definitely check out the latest MIScnn, but I still have the problem with kits data. My data set is downloaded from https://github.com/neheller/kits19 And I printed their shape, there are indeed 9 sets of data with a slice size less than 48 (case_00021; case_00030; ...), o (╥_╥) o.
Thank you again for your answer.

Try out the interpolated data set of KiTS19.
You can download it by switching branches from master to interpolated ;)
https://github.com/neheller/kits19/tree/interpolated

If you want to use the raw data set (master branch) then you have to do some resampling. In the KiTS19 example of the newest MIScnn version, I use the raw KiTS19 data and resamples it to a better size. But the old MIScnn version of this repository does not have resampling implemented, yet.

Wow, I just found that the original kits19 also released an interpolated data set,Thank you very much, you have helped me a lot!