CNN training and testing (resizing training images)

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 comentario

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

Iniciar sesión para comentar.

Respuestas (1)

sam Boadi
sam Boadi el 14 de Ag. de 2018

0 votos

use imresize. anyway is the dataset in an imageDataStore?

Categorías

Más información sobre Deep Learning Toolbox en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 7 de Nov. de 2017

Respondida:

el 14 de Ag. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by