Unrecognized method, property, or field 'Labels' for class 'augmentedImageDatastore'.
15 次查看(过去 30 天)
显示 更早的评论
I am writing a CNN classification code, and I used an augmented Image Datastore for resizing my database. Now when I try to extract the labels from the datastore using this line:
YValidation = imdsValidation.Labels;
I get the following error: Unrecognized method, property, or field 'Labels' for class 'augmentedImageDatastore'.
I opened the augmented datastore and I could not find the labels. Any idea how I can get them to finalize my results?
Thank you in advance!
0 个评论
回答(1 个)
Srivardhan Gadila
2021-11-15
Only imageDatastore has the property Labels whereas augmentedImageDatastore does not have it. You can refer to the following documentation pages: imageDatastore Properties & augmentedImageDatastore Properties for more information.
If you have created an augmentedImageDatastore using an imageDatastore and you have only used the resize functionality, then you can get the label data by accessing the Labels property of imageDatastore.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!