How to solve the error: The spatial dimension sizes [313 316 3] of the input images to layer 'imageinput' must be greater than or equal to the corresponding minimum input dime
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I tried to use evaluatesemanticsegmentation function as follow:
destinationTestLabels = "D:\Matlab pics\matlab practices21\Phd analysis\trial meyhods\GroundTruth\crack\testLabels";
destinationTestImages = "D:\Matlab pics\matlab practices21\Phd analysis\trial meyhods\GroundTruth\crack\testImages";
testImagesDir = fullfile(destinationTestImages,'testImages');
testLabelsDir = fullfile(destinationTestLabels,'testLabels');
pixelLabelID = [1 0];
classNames = ["crack" "background"];
imds = imageDatastore(destinationTestImages);
pxdstest11 = pixelLabelDatastore(destinationTestLabels,classNames,pixelLabelID,"FileExtensions",".png");
data = load('triangleSegmentationNetwork');
net = data.net
pxdsResults = semanticseg(imds,net,"WriteLocation",tempdir);
I got the following error:
Error using SeriesNetwork/activations (line 817)
The spatial dimension sizes [313 316 3] of the input images to layer 'imageinput' must be greater than
or equal to the corresponding minimum input dimension sizes of the layer [32 32 1].
Error in semanticseg>iPredictDAGSeriesNetwork (line 609)
allScores = activations(net, X, layerName, ...
Error in semanticseg>iClassifyImagePixels (line 556)
allScores = iPredictDAGSeriesNetwork(X, net, params);
Error in semanticseg>iProcessImageDatastoreSerially (line 938)
L = iClassifyImagePixels(X{i}, net, params);
Error in semanticseg (line 265)
filenames = iProcessImageDatastoreSerially(ds, net, params);
Error in Gtruth3 (line 11)
pxdsResults = semanticseg(imds,net,"WriteLocation",tempdir);
I followed the same steps mentioned in:
www.mathworks.com/help/vision/ref/evaluatesemanticsegmentation.html
The files mentioned has the same two attached images, can anyone help me to fix this erro to calculate IoU?
6 commentaires
Matt J
le 8 Oct 2023
Modifié(e) : Matt J
le 8 Oct 2023
Please stop re-iterating your original post and goals. We all understand you have a bigger task than the simplified code, but the simplified code contains key parts of the original code which you should be checking first. If it runs fine for you, then the problem is somewhere in your imds, because it is then obvious that the network fails only for particular images in the data store.
Réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!