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

8 ビュー (過去 30 日間)
Kaniska Samanta
Kaniska Samanta 2019 年 4 月 29 日
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 件のコメント
Mohammed Zubair Mohammed Shamim
Mohammed Zubair Mohammed Shamim 2019 年 6 月 21 日
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.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by