필터 지우기
필터 지우기

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

조회 수: 3 (최근 30일)
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
Geoff Hayes
Geoff Hayes 2020년 4월 5일
aitali - does your test set contain any images that are smaller than 224x224x3?

댓글을 달려면 로그인하십시오.

채택된 답변

Sai Bhargav Avula
Sai Bhargav Avula 2020년 4월 8일
편집: Sai Bhargav Avula 2020년 4월 11일
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
Sai Bhargav Avula
Sai Bhargav Avula 2020년 4월 11일
The ColorPreprocessing name value can be removed. As all the images already has 3 channels no processing occurs.
aitali hassna
aitali hassna 2020년 4월 11일
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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by