How to train googlenet network by using Images with different size?
8 次查看(过去 30 天)
显示 更早的评论
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
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 Exchange 中查找有关 Image Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!