what is difference between augmentedImageDatastore and ImageDatastore

5 次查看(过去 30 天)
If an ImageDatastore (e.g., imdsTrain) object has the class/label information, where is the class/label info in the augmentedImageDatastore that was derived using augmentedImageDatastore
(e.g., augmentedImageDatastore(inputSize(1:2),imdsTrain, ...
'DataAugmentation',imageAugmenter)
)?
Many thanks for your help.

采纳的回答

Simon
Simon 2020-5-26
Soved: I found Labels is inside augimdsTrain. But it's a private parameter, can be seen using [data,info]=read(augimdsTrain).
Thanks for those replied and viewed.

更多回答(1 个)

Image Analyst
Image Analyst 2020-5-25
With the augmented version you have to give it instructions how to modify the original image, like rotate it or scale it. So it creates modified images on the fly from original images, giving you essentially a much larger training set.
  1 个评论
Simon
Simon 2020-5-26
Hi MVP, really thank you for answering my question. However, maybe I didnot make the question clear, so I try to state it again below to see if I could get more accurate answer:
I have
imdsTrain =
ImageDatastore with properties:
Files: {
' ...\MerchData\MathWorks Cap\Hat_0.jpg';
' ...\MerchData\MathWorks Cap\Hat_123.jpg';
' ...\MerchData\MathWorks Cap\Hat_148.jpg'
... and 52 more
}
Labels: [MathWorks Cap; MathWorks Cap; MathWorks Cap ... and 52 more categorical]
AlternateFileSystemRoots: {}
ReadSize: 1
ReadFcn: @readDatastoreImage
After I ran
augimdsTrain = augmentedImageDatastore(net.Layers(1).InputSize(1:2),imdsTrain, ...
'DataAugmentation',imageAugmenter);
I got:
augimdsTrain =
augmentedImageDatastore with properties:
NumObservations: 55
Files: {55×1 cell}
AlternateFileSystemRoots: {}
MiniBatchSize: 128
DataAugmentation: [1×1 imageDataAugmenter]
ColorPreprocessing: 'none'
OutputSize: [224 224]
OutputSizeMode: 'resize'
DispatchInBackground: 0
Then question is:
The original Labe information in imdsTrain is not shown in augimdsTrain. Is it because I use the function augmentedImageDatastore wrongly, or I suppose to get the label info from another variable? I do need to know/see where the label/classification is so I can program further.
Many Thanks!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by