Error when using semanticseg on a imagedatastore

3 ビュー (過去 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 Center および File ExchangeImage Data Workflows についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by