Error when using semanticseg on a imagedatastore

조회 수: 12 (최근 30일)
Jingyang Zhao
Jingyang Zhao 2019년 8월 6일
댓글: Srivardhan Gadila 2019년 8월 21일
This is the error information:
The input images for activations must be of size equal to or greater than [32 32 1].
Y = this.calculateActivations(X, layerID, 1, varargin{:});
Y = this.UnderlyingDAGNetwork.activationsSeries(X, layerID, varargin{:});
allScores = activations(net, X, params.PixelLayerID, ...
L = iClassifyImagePixels(X, net, params);
filenames = iProcessImageDatastoreInParallel(imds, net, params);
The code:
testdatastore=imageDatastore('parpath\');
%montage(testdatastore)
%Try to segment the test image.
tic
pxds = semanticseg(testdatastore,net,'ExecutionEnvironment',"cpu")
%C = semanticseg(Img,net,'ExecutionEnvironment',"cpu");
%B = labeloverlay(testImage,C);
%imshow(B)
pxdsC=="activated";
X=ans;
Num=size(regionprops(X,"BoundingBox"))
imshow(X)
t2=toc
However, when I use semanticseg processing single picture, everything goes well and gives a result in several seconds. The code is almost the same:
C = semanticseg(Img,net,'ExecutionEnvironment',"cpu");
The image is about 4000*4000 JPG. When I use semanticseg on a imagedatastore of 32*32 or 64*64 images, there are pixellabel outcomes, but the outcomes are totally different from when I am not using parallel computing and definitely they are wrong. I also dont know what's wrong with it.
  댓글 수: 1
Srivardhan Gadila
Srivardhan Gadila 2019년 8월 21일
Can you copy some images(2 or 3 on which "C = semanticseg(Img,net,'ExecutionEnvironment',"cpu");" is working) to a new folder and try runnig the code on images present in the new folder using the imageDatastore.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by