The input images for activations must be of size equal to or greater than [224 224 3].

3 visualizaciones (últimos 30 días)
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?

Respuesta aceptada

Sai Bhargav Avula
Sai Bhargav Avula el 8 de Abr. de 2020
Editada: Sai Bhargav Avula el 11 de Abr. de 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 comentarios
Sai Bhargav Avula
Sai Bhargav Avula el 11 de Abr. de 2020
The ColorPreprocessing name value can be removed. As all the images already has 3 channels no processing occurs.
aitali hassna
aitali hassna el 11 de Abr. de 2020
yes exactly sir that work for me soo but i didn't py attention that i have some image has 1 channel so the fault that i make 'rgb2gray' in place of 'gray2rgb'
thanks sir
for your help

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Image Segmentation and Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by