when i try to train a yolo network with input image size [3508 2480 1] and images with size [3508 2480] of class uint8, it gives the following error.
Invalid transform function defined on datastore.
The cause of the error was:
Error using vision.internal.cnn.validation.checkImageAndNetworkChannelSizes (line 8)
Invalid input image channel size: 1.
The input image channel size (1) must be the same as the network's input channel size (1).
When i click on the line hyperlink of first error, it shows the following code:
function checkImageAndNetworkChannelSizes(I, networkChannelSize)
[~, ~, Isize] = size(I);
if ndims(I) ~= 3 || Isize ~= networkChannelSize
error(message('vision:rcnn:invalidInputImageChannelSize', Isize, networkChannelSize));
I understand that images must be three dimensinal although documentary says we can use grayscale images. Is it possible to change the size of a matrix from [m n] to [m n 1] ?
Haw to fix this problem ?