It is possible to use of augmentedImageDatastore for image regression?

4 ビュー (過去 30 日間)
Antonio Bilotta
Antonio Bilotta 2021 年 10 月 23 日
回答済み: Sahil Jain 2021 年 11 月 15 日
In order to train a network for classification and to reduce overfitting I prepared the following augumented data store
imageAugmenter = imageDataAugmenter('RandXTranslation',[-24 24]);
imageSize = [8 1041 1];
augimdsTrain = augmentedImageDatastore(imageSize,imdsTrain,'DataAugmentation',imageAugmenter);
Then I trained the network for classification replacing previous training command
[net, traininfo] = trainNetwork(imdsTrain,layers,opts);
with
[net, traininfo] = trainNetwork(augimdsTrain,layers,opts);
This worked well.
Now I want to apply the same augumentation to train a different network for regression. I prepared the augmented data store using the images XTrain and the numeric labels YTrain
augXTrain = augmentedImageDatastore(imageSize,XTrain,YTrain,'DataAugmentation',imageAugmenter);
The command that I used to train the network for regression was
[net, traininfo] = trainNetwork(XTrain,YTrain,layers,opts);
which I replaced with the command
[net, traininfo] = trainNetwork(augXTrain,layers,opts);
But it does not seem to eliminate overfitting as in the case of the image classification. I think that augmentation must be implemented in a different way in the case of image regression. Any suggestion?

回答 (1 件)

Sahil Jain
Sahil Jain 2021 年 11 月 15 日
Hi Antonio, the "augmentedImageDatastore" can be used for regression as well as classification. It is difficult to determine exactly why your network is overfitting as it depends on your data and network but for starters, you can try using a smaller network for regression or adding regularization.

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by