How to define Block Size Based on Input Image Dimensions in BLOCKPROC with SEMANTICSEG()
Dear all,
I am using the BLOCKPROC command to segment an input image (21828x54644x3) by passing blocks to the SEGMANTICSEG() function. In this case, I found that the smallest block size that executes without error is [2048,2048]. However, when using an even larger input image (22609x24064x3), the command does not execute if I keep the same block size of [2048,2048]. I need to increase the block size slightly, and it worked with a block size of [2100,2100]. I would like to understand the reason for this and how I can determine the smallest block size based on the image size. Could someone help me?
Thank you.
IMG = imread(‘image.tif’);
BlockSize = [2048 2048];
fun_proc_semanticseg = @(bloco)semanticseg(bloco.data, net, ExecutionEnvironment="gpu",
MiniBatchSize=16,OutputType="uint8");
C = blockproc(IMG, BlockSize, fun_proc_semanticseg);Dear all,
I am using the BLOCKPROC command to segment an input image (21828x54644x3) by passing blocks to the SEGMANTICSEG() function. In this case, I found that the smallest block size that executes without error is [2048,2048]. However, when using an even larger input image (22609x24064x3), the command does not execute if I keep the same block size of [2048,2048]. I need to increase the block size slightly, and it worked with a block size of [2100,2100]. I would like to understand the reason for this and how I can determine the smallest block size based on the image size. Could someone help me?
Thank you.
IMG = imread(‘image.tif’);
BlockSize = [2048 2048];
fun_proc_semanticseg = @(bloco)semanticseg(bloco.data, net, ExecutionEnvironment="gpu",
MiniBatchSize=16,OutputType="uint8");
C = blockproc(IMG, BlockSize, fun_proc_semanticseg); Dear all,
I am using the BLOCKPROC command to segment an input image (21828x54644x3) by passing blocks to the SEGMANTICSEG() function. In this case, I found that the smallest block size that executes without error is [2048,2048]. However, when using an even larger input image (22609x24064x3), the command does not execute if I keep the same block size of [2048,2048]. I need to increase the block size slightly, and it worked with a block size of [2100,2100]. I would like to understand the reason for this and how I can determine the smallest block size based on the image size. Could someone help me?
Thank you.
IMG = imread(‘image.tif’);
BlockSize = [2048 2048];
fun_proc_semanticseg = @(bloco)semanticseg(bloco.data, net, ExecutionEnvironment="gpu",
MiniBatchSize=16,OutputType="uint8");
C = blockproc(IMG, BlockSize, fun_proc_semanticseg); blocksize, matlab, blockproc, semanticseg MATLAB Answers — New Questions