How to introduce training and labeled image to train a neural network

2 visualizaciones (últimos 30 días)
Neus Alcon
Neus Alcon el 15 de Mayo de 2020
Comentada: Neus Alcon el 19 de Mayo de 2020
Hello,
I'm trying to work with neural networks... Now I have the images that I want to train (.JPG) the network and the same images labeled (.m) but I'm not able to introduce this data to start the training or at least to run that function pximds = pixelLabelImageDatastore(imds,pxds);
I'm trying to use:
imds = imageDatastore(image) to open the training images
pxds = pixelLabelDatastore(label,classNames,labelIDs); to open the labeled images
but both function don't work and Matlab shows me this Cannot find files or folders matching
Do you have some suggestion to me to fix that ?
Thanks for your help!

Respuestas (1)

Sindhu Karri
Sindhu Karri el 19 de Mayo de 2020
Hii,
You can verify the path where respective images, label files are stored and include those paths correctly in the code. The easiest way to access images, label files is to add them to current working folder.
Below is sample code which I have tried ,where images is the folder containing .jpg files placed in the current working folder(matlab path)
imds = imageDatastore('images')
classNames = ["sky" "grass" "blue"];
labelIDs = [1 2 3];
pxds = pixelLabelDatastore('images',classNames,labelIDs);
pximds = pixelLabelImageDatastore(imds,pxds);
Please refer to the below link for more details:
  1 comentario
Neus Alcon
Neus Alcon el 19 de Mayo de 2020
Hi Sindhu!
Thanks for your answer. Now when I try to train the network I have the follow error... Actually I don't know how I have to solve... Could you help me?
My regular image are .JPEG images with 3 channels (RGB) and the labeled images are .PNG with one channel.

Iniciar sesión para comentar.

Categorías

Más información sobre Image Data Workflows en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by