Error using trainNetwork (line 165) Invalid training data. ImageDatastore not supported for regression problems.

7 ビュー (過去 30 日間)
I am trying to use dnCNNLayers. I am getting this error. I used text image [256x256], so I changed the size of dnCNNLayers. But, the problem is still there. Anyone please help me.

回答 (1 件)

Naoya
Naoya 2019 年 5 月 29 日
The ImageDatastore currently does not support for CNN regression problems.
Please give the input data via table data for specifying image files as follows.
% Define the image files as cell arrays
filename = {'C:\****\img\img1.png';
'C:\****\img\img2.png';
'C:\****\img\img3.png';
'C:\****\img\img4.png'};
% Define the target values
value = [0.1;0.7;0.3;0.5];
% Create a table data
tbl = table(filename, value);
% Data Augmentation
imageAugmenter = imageDataAugmenter( ...
'RandRotation',[-20,20], ...
'RandXTranslation',[-3 3], ...
'RandYTranslation',[-3 3])
augimds = augmentedImageDatastore([128,128, 3],tbl,'DataAugmentation',imageAugmenter);
% Train network for CNN regression problem
net = trainNetwork(augimds, layers, options)
  2 件のコメント
Edward Peake
Edward Peake 2019 年 10 月 30 日
Hi, This only seems to work for png or jpeg images. I would like to Read NIfTI image into an ImageDatastore for training a regression CNN. Thanks.
latifa houria
latifa houria 2020 年 4 月 8 日
did have a solution i have the same problem!!!!!

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

カテゴリ

Help Center および File ExchangeDeep Learning for Image Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by