Error when using semanticseg on a imagedatastore
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Srivardhan Gadila
el 21 de Ag. de 2019
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.
Respuestas (0)
Ver también
Categorías
Más información sobre Image Data Workflows en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!