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?
aitali hassna
aitali hassna 2020 年 4 月 8 日
yes the size of all images i test is 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 Center および File ExchangeImage Segmentation and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by