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
2020년 4월 5일
aitali - does your test set contain any images that are smaller than 224x224x3?
채택된 답변
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
2020년 4월 11일
The ColorPreprocessing name value can be removed. As all the images already has 3 channels no processing occurs.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!