Error when using semanticseg on a imagedatastore

3 次查看(过去 30 天)
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