フィルターのクリア

How to rotate and rescale a portion of a class images in an image datastore network ?

3 ビュー (過去 30 日間)
Mohamed Elbeialy
Mohamed Elbeialy 2020 年 4 月 3 日
コメント済み: Mohammad Sami 2020 年 4 月 3 日
I have a network of 5 classes and looking to rotate and rescale a portion of images of specifc class , then train, test and validate the network

回答 (1 件)

Mohammad Sami
Mohammad Sami 2020 年 4 月 3 日
You can use the augmentedImageDataStore. It will randomly apply the specified agumentation to the images.
https://www.mathworks.com/help/deeplearning/ref/augmentedimagedatastore.html
% From Example
imageAugmenter = imageDataAugmenter( ...
'RandRotation',[-20,20], ...
'RandXTranslation',[-3 3], ...
'RandYTranslation',[-3 3])
augimds = augmentedImageDatastore(imageSize,XTrain,YTrain,'DataAugmentation',imageAugmenter);
% or
augimds = augmentedImageDatastore(imageSize,imds,'DataAugmentation',imageAugmenter);
  1 件のコメント
Mohammad Sami
Mohammad Sami 2020 年 4 月 3 日
You can combine multipe data stores using the combine function.
So create and augmenteddatastore with the images you want to rotate.
Create another datastore with rest of the images.
Then use the combine function to merge the two together.
Reference :

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

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by