The input images for activations must be of size equal to or greater than [224 224 3].
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
aitali hassna
le 5 Avr 2020
Modifié(e) : Sai Bhargav Avula
le 11 Avr 2020
my code is:
augmentedTrainset=augmentedImageDatastore(imagesize,...
trainset,'ColorPreprocessing','rgb2gray');
augmentedTestset=augmentedImageDatastore(imagesize,...
testset,'ColorPreprocessing','rgb2gray');
featureLayer = 'fc1000';
trainingFeatures = activations(net, augmentedTrainset, featureLayer, ...
'MiniBatchSize', 39, 'OutputAs', 'columns');
[224 224 3] image size
And I take an error as "The input images for activations must be of size equal to or greater than [224 224 3]."
Why I'm taking this error, how can I fix it?
2 commentaires
Geoff Hayes
le 5 Avr 2020
aitali - does your test set contain any images that are smaller than 224x224x3?
Réponse acceptée
Sai Bhargav Avula
le 8 Avr 2020
Modifié(e) : Sai Bhargav Avula
le 11 Avr 2020
Hi,
Is your image [224 224 3] or of different order?
And try the below code once
augmentedTrainset=augmentedImageDatastore(imagesize,...
trainset);
augmentedTestset=augmentedImageDatastore(imagesize,...
testset);
featureLayer = 'fc1000';
trainingFeatures = activations(net, augmentedTrainset, featureLayer, ...
'MiniBatchSize', 39, 'OutputAs', 'columns');
6 commentaires
Sai Bhargav Avula
le 11 Avr 2020
The ColorPreprocessing name value can be removed. As all the images already has 3 channels no processing occurs.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Image Segmentation and Analysis dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!