can you segment with the 3D unet an image with unequal dimensions, like 128x384x128 for example as an input to the model?
13 次查看(过去 30 天)
显示 更早的评论
I am using the unet 3d segmentation matlab built in function. tyoical inputs to that function is equal spaced dimentioons of 32, 64, 128, 256, and so on. can i input an image of size 128x384x128 to the unet function. if not then why?
0 个评论
回答(1 个)
Karl
2024-4-29
The function unet3d() doesn't require that images have the same size in each dimension. From the documentation for the input argument inputSize, it does have the constraint: "Network input image size must be chosen such that the dimension of the inputs to the max-pooling layers must be even numbers."
% Define number of classes.
numClasses = 5;
% This works - image sizes in all dimensions are integer multiples of 2^3.
unet1 = unet3d([128 384 128], numClasses, EncoderDepth=3)
% This gives an error - 386 isn't an integer multiple of 2^2.
unet2 = unet3d([128 386 128], numClasses, EncoderDepth=2)
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!