what is difference between augmentedImageDatastore and ImageDatastore

조회 수: 7 (최근 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