How to add an image augmentation layer?

3 次查看(过去 30 天)
Hi, I am using MATLAB for deep learning. And was wondering how to add an image augmentation layer after the imageInputLayer. I have read that I can use "Create Custom Layer with Learnable Parameters". But I am not sure how to do that. Anyone already tried it?
All I need is to be able to manipulate my input batches right before they are used for training. Specifically, I want to train the VGG-19 from scratch. And there every image is supposed to be rescaled randomly, cropped randomly, and reflected randomly at every epoch.
I found that
imageDataAugmenter
can do the trick for re-scaling the images for example. But the scaling the DataAugmenter applies messes up the aspect ratio of the images because there is an X-scale and Y-scale.
Any idea?
Thank you in advance!

回答(0 个)

类别

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