Effacer les filtres
Effacer les filtres

Classification options when testing a CNN

2 vues (au cours des 30 derniers jours)
Matt
Matt le 17 Août 2021
Commenté : Matt le 30 Août 2021
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?

Réponse acceptée

Sahil Jain
Sahil Jain le 30 Août 2021
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.
  1 commentaire
Matt
Matt le 30 Août 2021
This sounds like exactly what I was looking for - thanks!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by