Classification options when testing a CNN

1 次查看(过去 30 天)
Hello!
I've been doing a lot of work with CNNs lately and I'm moving beyond constructing them to actually using them. I've been doing a lot of reading outside Matlab to try to understand how to use CNNs effectively and I found a pretty interesting article on how to preprocess data before classification (https://machinelearningmastery.com/best-practices-for-preparing-and-augmenting-image-data-for-convolutional-neural-networks/). Now, most of these methods are available as options in the imageInputLayer function, but I found the test processing in the above article pretty interesting.
It seems like it isn't uncommon to take multiple crops and rotations of a single image during testing, using each subimage classification to update an overall classification, then return the final value as the actual result.
Is there a way to do this in Matlab?

采纳的回答

Sahil Jain
Sahil Jain 2021-8-30
Hi Matt. From my understanding of the question, you want to do test-time augmentation by applying multiple different sets of image transformations on the dataset and then aggregating the predictions of all the sets. This can be done by creating multiple datastores using the Image Processing Toolbox. The Augment Images for Deep Learning Workflows Using Image Processing Toolbox article describes how to create a set of transformations and apply it to a datastore. Using this workflow, you can create multiple sets of transformations and apply them to your testing dataset. The predictions from all the datastores can then be averaged to get the final prediction.

更多回答(0 个)

类别

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

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by