what is difference between augmentedImageDatastore and ImageDatastore

7 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Simon
Simon il 26 Mag 2020
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.

Più risposte (1)

Image Analyst
Image Analyst il 25 Mag 2020
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 Commento
Simon
Simon il 26 Mag 2020
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!

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by