필터 지우기
필터 지우기

How to keep image labels after combining two datastores?

조회 수: 5 (최근 30일)
Guilherme Roberto
Guilherme Roberto 2020년 2월 11일
댓글: Girish Tiwari 2020년 10월 20일
Hello, I have two sets of 58 images each which I have to feed as input to a multiple-input network.
To do so, I first read each of the sets onto a different Image Datastore, as shown on the images
Reading the first dataset:
imds1.PNG
And then, the second dataset:
imds2.PNG
Then I merge the two datastores by using 'combine'. However, according to the documentation available here, I should be reading a three-column cell array, wherein the third column would be the labels. I get only two columns when reading though:
combined.PNG
If I try to give this combined dataset as input to my network (which has two inputs and one output) I get the following error message:
>> net = trainNetwork(imdsCombined,lgraph_1,options);
Error using trainNetwork (line 170)
Invalid training data for multiple-input network. For a network with 2 inputs and 1 output, the datastore read function must
return an M-by-3 cell array, but it returns an M-by-2 cell array.
I am using R2019b by the way.
So, is there a way to insert the labels column onto the cell arrays read from the image datastore? Or is there something else I need to do?
Thanks for all the help.
Regards,
Guilherme Freire
  댓글 수: 1
Girish Tiwari
Girish Tiwari 2020년 10월 20일
You can follow this link:
https://www.mathworks.com/matlabcentral/answers/586949-multi-input-imagedatastore

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Deep Learning for Image Processing에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by