I am trying to use a six-channel image; the output is only a three-channel image. I added a quick fix to the training method to let me concatenate the images to make the six channels by adding an extra folder parameter passed down to PairedImageDatastore. The third folder would load and add the image to the A image.
function data = read(obj)
imagesA = obj.ImagesA.read();
imagesB = obj.ImagesB.read();
imagesC = obj.ImagesC.read();
% for batch size 1 imagedatastore doesn't wrap in a cell
if ~iscell(imagesA)
imagesA(:,:,4:6) = imagesC;
imagesA = {imagesA};
imagesB = {imagesB};
end
[transformedA, transformedB] = ...
p2p.data.transformImagePair(imagesA, imagesB, ...
obj.PreSize, obj.CropSize, ...
obj.Augmenter);
[A, B] = obj.normaliseImages(transformedA, transformedB);
data = table(A, B);
end
Hi,
I am trying to use a six-channel image; the output is only a three-channel image. I added a quick fix to the training method to let me concatenate the images to make the six channels by adding an extra folder parameter passed down to PairedImageDatastore. The third folder would load and add the image to the A image.
Before the training, I changed the options as:
options = p2p.trainingOptions('InputChannels',6,'OutputChannels',3);
Then, when training starts, it completes the first iteration of the first epoch, but then it breaks. With the following output: