Error when using semanticseg on a imagedatastore
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Srivardhan Gadila
le 21 Août 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.
Réponses (0)
Voir également
Catégories
En savoir plus sur Image Data Workflows dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!