Closed jumutc closed 3 years ago
Hey @jumutc,
it's no bug in the U-Net architecture. This error results due to the wrong image/patch sizes.
The U-Net architecture is build as a structure with multiple levels. https://lmb.informatik.uni-freiburg.de/people/ronneber/u-net/u-net-architecture.png
In theory, the analysed image part is reduced via a convolutional layer in each level. By default, the reduction is done by /2. This means that your image/patch shape has to be dividable by 2 for N-times, in which N is the number of levels (depth). MIScnn utilizes by default the standard U-Net of Ronneberger et al. with a depth of 4. In contrast, the plain U-Net is a reimplementation of Isensee et al. U-Net variant, which performed a little bit better than the standard one.
Long story short: You have to adjust your image/patch sizes.
Solutions:
Hope that I was able to help you.
Cheers, Dominik
@muellerdo thanks for answering, my default patch size is 596x596 which worked with other architectures. As far as I get it from the paper the size should be 160x160 or 2x multiples of it but there is no clear indication in Wiki on this. I would suggest to add one-liner in the documentation about each architecture's defaults (layers + patch sizes)
Totally agreed. You are right, currently I just added the reference to the papers in the wiki. I added a one line note with the recommended patch shape.
The paper, on which the plain u-net is based, used a patch shape of 80×160×160. http://arxiv.org/abs/1908.02182
Thanks for the feedback!
Hello,
My pipeline looks as follows (
miscnn==1.1.2
):and after starting the training I get: