How to train googlenet network by using Images with different size?

4 vues (au cours des 30 derniers jours)
Kaniska Samanta
Kaniska Samanta le 29 Avr 2019
I have an imageDatastore containing RGB images with different file size though I resized all the images in 224x224 resolution. when I am using 'trainNetwork' function it shows error, 'Unexpected image size: All images must have the same size.' I tried image augmentation but it shows, 'augmentedImageSource cannot form MiniBatches of data because input image sizes differ in 3rd dimension. Consider using 'ColorPreprocessing' option to ensure all augmented images have same number of channels'. I used ColorPreprocessing option 'rgb2gray' but it makes the images dimention as 224x224x1 but googlenet is asking for 224x224x3. Any solution?
Thank you..
  1 commentaire
Mohammed Zubair Mohammed Shamim
Option 1:
Remove all files with non "JPG" extensions from your dataset (e.g. JPEG, TIFF, PNG etc)
Option 2:
Use a batch converter (free online) to convert all non-JPG files into JPG.
I utilzed option 2.
Hope this helps.

Connectez-vous pour commenter.

Réponses (0)

Catégories

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

Community Treasure Hunt

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

Start Hunting!

Translated by