ミニバッチデータスト​アで入力画像(Pat​ch)のサイズを変更​する方法

5 vues (au cours des 30 derniers jours)
Fork
Fork le 10 Oct 2018
Commenté : Fork le 11 Oct 2018
今、上記のミニバッチデータストアのプログラムを参考にしています。私はPatchのサイズを50*50*3に設定し、学習させたいのですが、 (入力層のサイズを50*50*3にしたいため。)上記のプログラムだと入力画像の大きさ(768*1024*3など)になってしまいます。  ImageDataStore のみを用いて、サイズを変更することは可能でしょうか?また、augmentedImageDatastore をもちいなければいけないのでしょうか?

Réponse acceptée

mizuki
mizuki le 10 Oct 2018
はい、入力画像のサイズが異なる場合は以下のように augmentedImageDatastore でサイズ合わせをする必要があります。
net = alexnet;
inputSize = net.Layers(1).InputSize;
augimdsValidation = augmentedImageDatastore(inputSize(1:2), imds);
枚数が少なければ imresize を用いて一枚一枚リサイズしても良いですが、augmentedImageDatastore の方がデータストアとして定義した画像に対して一度にリサイズできるので便利かと思います。
  1 commentaire
Fork
Fork le 11 Oct 2018
 ご回答いただきありがとうございます。
 質問のプログラムのミニバッチデータストアのどこを変更すれば良いのでしょうか?
 いずれかのイメージデータストアしか使用できなくなっています。

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur イメージを使用した深層学習 dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!