CNN training and testing (resizing training images)

1 回表示 (過去 30 日間)
mariam aboelwafa
mariam aboelwafa 2017 年 11 月 7 日
回答済み: sam Boadi 2018 年 8 月 14 日
Dear All,,, It's my first time to use the Convolutional Neural Net training commands. I'm using this line to resize my training images
Folder = '256_ObjectCategories'; digitData = imageDatastore(Folder,'IncludeSubfolders',true,'LabelSource','foldernames'); digitData.ReadFcn = @(loc)imresize(imread(loc),[128 128],'nearest','Colormap','original');
However, I still get this error:
Unexpected image size: All images must have the same size.
Any help please ?
  1 件のコメント
mariam aboelwafa
mariam aboelwafa 2017 年 11 月 7 日
I also can't completely understand this line: digitData.ReadFcn = @(loc)imresize(imread(loc),[128 128],'nearest','Colormap','original'); But I found it in MathWorks documentation

サインインしてコメントする。

回答 (1 件)

sam Boadi
sam Boadi 2018 年 8 月 14 日
use imresize. anyway is the dataset in an imageDataStore?

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by